From 6d70c5f8a3ed90564b08616a3fb041409916059c Mon Sep 17 00:00:00 2001 From: Clawd Date: Sat, 28 Feb 2026 07:30:40 -0800 Subject: Phase 4: React UI - Add renderer/src/types.ts with Project, Session, Message, Phase types - Add renderer/src/styles/globals.css with full styling - Dark theme with accent colors - Header, document pane, chat pane, action bar layouts - Phase indicator, token usage bar, buttons - Add renderer/src/components/Header.tsx - Project/session dropdowns with create buttons - Phase indicator showing current workflow state - Add renderer/src/components/DocumentPane.tsx - Markdown viewer/editor with toggle - Syntax highlighting for review comments - Task checkbox rendering - Add renderer/src/components/ChatPane.tsx - Message list with auto-scroll - Input field with Enter to send - Loading state indicator - Add renderer/src/components/ActionBar.tsx - Token usage bar with color coding - Review/Submit buttons for workflow - Permission mode toggle for implement phase - Add renderer/src/App.tsx - Full state management for projects, sessions, messages - Claude message subscription - Workflow handlers (review, submit, phase advance) - Update renderer/src/main.tsx to render App --- renderer/src/styles/globals.css | 391 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 391 insertions(+) create mode 100644 renderer/src/styles/globals.css (limited to 'renderer/src/styles/globals.css') diff --git a/renderer/src/styles/globals.css b/renderer/src/styles/globals.css new file mode 100644 index 0000000..57dc917 --- /dev/null +++ b/renderer/src/styles/globals.css @@ -0,0 +1,391 @@ +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +:root { + --bg-primary: #1a1a1a; + --bg-secondary: #252525; + --bg-tertiary: #333; + --border: #444; + --text-primary: #e0e0e0; + --text-secondary: #888; + --accent: #3b82f6; + --accent-hover: #2563eb; + --success: #10b981; + --warning: #f59e0b; + --danger: #ef4444; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + background: var(--bg-primary); + color: var(--text-primary); + overflow: hidden; +} + +.app { + display: flex; + flex-direction: column; + height: 100vh; +} + +/* Header */ +.header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 12px 16px; + background: var(--bg-secondary); + border-bottom: 1px solid var(--border); + -webkit-app-region: drag; +} + +.header-left, +.header-right { + display: flex; + align-items: center; + gap: 8px; + -webkit-app-region: no-drag; +} + +.header select, +.header button { + padding: 6px 12px; + background: var(--bg-tertiary); + border: 1px solid var(--border); + border-radius: 4px; + color: var(--text-primary); + cursor: pointer; + font-size: 13px; +} + +.header button:hover { + background: var(--border); +} + +.phase-indicator { + display: flex; + gap: 4px; +} + +.phase-step { + padding: 4px 12px; + font-size: 12px; + border-radius: 4px; + background: var(--bg-tertiary); + color: var(--text-secondary); +} + +.phase-step.active { + background: var(--accent); + color: white; +} + +.phase-step.complete { + background: var(--success); + color: white; +} + +/* Main Content */ +.main-content { + flex: 1; + display: flex; + overflow: hidden; +} + +/* Document Pane */ +.document-pane { + flex: 1; + display: flex; + flex-direction: column; + border-right: 1px solid var(--border); +} + +.document-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 8px 16px; + background: var(--bg-secondary); + border-bottom: 1px solid var(--border); + font-size: 14px; + color: var(--text-secondary); +} + +.document-header button { + padding: 4px 8px; + background: var(--bg-tertiary); + border: 1px solid var(--border); + border-radius: 4px; + color: var(--text-primary); + cursor: pointer; + font-size: 12px; +} + +.document-content { + flex: 1; + overflow-y: auto; + padding: 24px; +} + +.document-content.editing { + font-family: "SF Mono", Monaco, "Cascadia Code", monospace; + font-size: 14px; + line-height: 1.6; + background: var(--bg-primary); + border: none; + resize: none; + color: var(--text-primary); +} + +.document-content.rendered { + line-height: 1.7; +} + +.document-content.rendered h1 { + font-size: 28px; + margin: 24px 0 16px; +} +.document-content.rendered h2 { + font-size: 22px; + margin: 20px 0 12px; + color: var(--text-secondary); +} +.document-content.rendered h3 { + font-size: 18px; + margin: 16px 0 8px; +} +.document-content.rendered p { + margin: 8px 0; +} +.document-content.rendered code { + background: var(--bg-tertiary); + padding: 2px 6px; + border-radius: 4px; + font-size: 13px; +} +.document-content.rendered pre { + background: var(--bg-tertiary); + padding: 16px; + border-radius: 8px; + overflow-x: auto; + margin: 16px 0; +} +.document-content.rendered pre code { + background: none; + padding: 0; +} +.document-content.rendered li { + margin-left: 24px; + margin-bottom: 4px; +} +.document-content.rendered li.task { + list-style: none; + margin-left: 0; +} +.document-content.rendered li.task.done { + color: var(--success); +} +.document-content.rendered mark.review { + background: var(--warning); + color: black; + padding: 2px 4px; + border-radius: 2px; +} +.document-content.rendered mark.note { + background: var(--accent); + color: white; + padding: 2px 4px; + border-radius: 2px; +} +.document-content.rendered .empty { + color: var(--text-secondary); + font-style: italic; +} + +.badge { + background: var(--accent); + color: white; + padding: 2px 8px; + border-radius: 4px; + font-size: 11px; +} + +/* Chat Pane */ +.chat-pane { + width: 380px; + display: flex; + flex-direction: column; + background: var(--bg-secondary); +} + +.chat-messages { + flex: 1; + overflow-y: auto; + padding: 16px; +} + +.message { + margin-bottom: 12px; + padding: 10px 14px; + border-radius: 8px; + max-width: 90%; + font-size: 14px; + line-height: 1.5; + white-space: pre-wrap; +} + +.message.user { + background: var(--accent); + margin-left: auto; +} + +.message.assistant { + background: var(--bg-tertiary); +} + +.message.loading { + color: var(--text-secondary); + font-style: italic; +} + +.chat-input { + display: flex; + gap: 8px; + padding: 12px; + border-top: 1px solid var(--border); +} + +.chat-input input { + flex: 1; + padding: 10px 14px; + background: var(--bg-tertiary); + border: 1px solid var(--border); + border-radius: 8px; + color: var(--text-primary); + font-size: 14px; +} + +.chat-input input:focus { + outline: none; + border-color: var(--accent); +} + +.chat-input button { + padding: 10px 16px; + background: var(--accent); + border: none; + border-radius: 8px; + color: white; + cursor: pointer; + font-size: 14px; +} + +.chat-input button:hover:not(:disabled) { + background: var(--accent-hover); +} + +.chat-input button:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +/* Action Bar */ +.action-bar { + display: flex; + justify-content: space-between; + align-items: center; + padding: 12px 16px; + background: var(--bg-secondary); + border-top: 1px solid var(--border); +} + +.action-bar-left, +.action-bar-right { + display: flex; + align-items: center; + gap: 16px; +} + +.token-indicator { + display: flex; + align-items: center; + gap: 8px; +} + +.token-bar { + width: 100px; + height: 6px; + background: var(--bg-tertiary); + border-radius: 3px; + overflow: hidden; +} + +.token-fill { + height: 100%; + transition: width 0.3s ease; +} + +.token-label { + font-size: 12px; + color: var(--text-secondary); +} + +.permission-toggle { + display: flex; + align-items: center; + gap: 6px; + font-size: 13px; + color: var(--text-secondary); + cursor: pointer; +} + +.permission-toggle input { + cursor: pointer; +} + +.btn-secondary { + padding: 8px 16px; + background: var(--bg-tertiary); + border: 1px solid var(--border); + border-radius: 6px; + color: var(--text-primary); + cursor: pointer; + font-size: 14px; +} + +.btn-secondary:hover:not(:disabled) { + background: var(--border); +} + +.btn-secondary:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.btn-primary { + padding: 8px 20px; + background: var(--accent); + border: none; + border-radius: 6px; + color: white; + cursor: pointer; + font-weight: 500; + font-size: 14px; +} + +.btn-primary:hover:not(:disabled) { + background: var(--accent-hover); +} + +.btn-primary:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.implementing-status { + color: var(--success); + font-size: 14px; +} -- cgit v1.2.3