aboutsummaryrefslogtreecommitdiffstats
path: root/renderer/src/components
diff options
context:
space:
mode:
authorClawd <ai@clawd.bot>2026-02-28 15:21:27 -0800
committerClawd <ai@clawd.bot>2026-02-28 15:21:27 -0800
commita9ae7c65c387bcf144de8df0a13dbbfd7496cc1e (patch)
treee742a76e5638e8564b893584836678dec095fee8 /renderer/src/components
parent4bd42f9c508345391806eb7c5c2ed39863764695 (diff)
Restyle UI with light/dark theme support
- Add light/dark theme toggle with localStorage persistence - Add 'Claude Flow' wordmark in header - Switch to monospace font (SF Mono, Cascadia Code, etc.) - Update accent colors (lighter blue) - Add theme-aware CodeMirror styling (oneDark vs defaultHighlightStyle) - Update window title to 'Claude Flow' - Refine spacing and visual polish throughout - Add .claude-flow/ artifacts from self-restyling session
Diffstat (limited to 'renderer/src/components')
-rw-r--r--renderer/src/components/DocumentPane.tsx10
-rw-r--r--renderer/src/components/Header.tsx14
2 files changed, 22 insertions, 2 deletions
diff --git a/renderer/src/components/DocumentPane.tsx b/renderer/src/components/DocumentPane.tsx
index c5f456c..f5368b3 100644
--- a/renderer/src/components/DocumentPane.tsx
+++ b/renderer/src/components/DocumentPane.tsx
@@ -5,6 +5,7 @@ import { EditorState } from "@codemirror/state";
5import { EditorView, keymap, lineNumbers, highlightActiveLine, drawSelection } from "@codemirror/view"; 5import { EditorView, keymap, lineNumbers, highlightActiveLine, drawSelection } from "@codemirror/view";
6import { markdown } from "@codemirror/lang-markdown"; 6import { markdown } from "@codemirror/lang-markdown";
7import { languages } from "@codemirror/language-data"; 7import { languages } from "@codemirror/language-data";
8import { syntaxHighlighting, defaultHighlightStyle } from "@codemirror/language";
8import { defaultKeymap, history, historyKeymap } from "@codemirror/commands"; 9import { defaultKeymap, history, historyKeymap } from "@codemirror/commands";
9import { oneDark } from "@codemirror/theme-one-dark"; 10import { oneDark } from "@codemirror/theme-one-dark";
10import type { Phase } from "../types"; 11import type { Phase } from "../types";
@@ -15,16 +16,19 @@ interface DocumentPaneProps {
15 phase: Phase; 16 phase: Phase;
16 disabled: boolean; 17 disabled: boolean;
17 showOnboarding?: boolean; 18 showOnboarding?: boolean;
19 theme: "dark" | "light";
18} 20}
19 21
20function MarkdownEditor({ 22function MarkdownEditor({
21 content, 23 content,
22 onChange, 24 onChange,
23 disabled, 25 disabled,
26 theme,
24}: { 27}: {
25 content: string; 28 content: string;
26 onChange: (content: string) => void; 29 onChange: (content: string) => void;
27 disabled: boolean; 30 disabled: boolean;
31 theme: "dark" | "light";
28}) { 32}) {
29 const editorRef = useRef<HTMLDivElement>(null); 33 const editorRef = useRef<HTMLDivElement>(null);
30 const viewRef = useRef<EditorView | null>(null); 34 const viewRef = useRef<EditorView | null>(null);
@@ -47,7 +51,7 @@ function MarkdownEditor({
47 history(), 51 history(),
48 keymap.of([...defaultKeymap, ...historyKeymap]), 52 keymap.of([...defaultKeymap, ...historyKeymap]),
49 markdown({ codeLanguages: languages }), 53 markdown({ codeLanguages: languages }),
50 oneDark, 54 theme === "dark" ? oneDark : syntaxHighlighting(defaultHighlightStyle),
51 updateListener, 55 updateListener,
52 EditorView.editable.of(!disabled), 56 EditorView.editable.of(!disabled),
53 EditorView.lineWrapping, 57 EditorView.lineWrapping,
@@ -81,7 +85,7 @@ function MarkdownEditor({
81 view.destroy(); 85 view.destroy();
82 viewRef.current = null; 86 viewRef.current = null;
83 }; 87 };
84 }, [disabled]); 88 }, [disabled, theme]);
85 89
86 // Update content when it changes externally 90 // Update content when it changes externally
87 useEffect(() => { 91 useEffect(() => {
@@ -109,6 +113,7 @@ export function DocumentPane({
109 phase, 113 phase,
110 disabled, 114 disabled,
111 showOnboarding, 115 showOnboarding,
116 theme,
112}: DocumentPaneProps) { 117}: DocumentPaneProps) {
113 const [isEditing, setIsEditing] = useState(false); 118 const [isEditing, setIsEditing] = useState(false);
114 119
@@ -211,6 +216,7 @@ export function DocumentPane({
211 content={content} 216 content={content}
212 onChange={onChange} 217 onChange={onChange}
213 disabled={disabled} 218 disabled={disabled}
219 theme={theme}
214 /> 220 />
215 ) : ( 221 ) : (
216 <div 222 <div
diff --git a/renderer/src/components/Header.tsx b/renderer/src/components/Header.tsx
index b6bed26..b4faa6e 100644
--- a/renderer/src/components/Header.tsx
+++ b/renderer/src/components/Header.tsx
@@ -1,6 +1,8 @@
1import React from "react"; 1import React from "react";
2import type { Project, Session, Phase } from "../types"; 2import type { Project, Session, Phase } from "../types";
3 3
4type Theme = "dark" | "light";
5
4interface HeaderProps { 6interface HeaderProps {
5 projects: Project[]; 7 projects: Project[];
6 sessions: Session[]; 8 sessions: Session[];
@@ -12,6 +14,8 @@ interface HeaderProps {
12 onCreateSession: () => void; 14 onCreateSession: () => void;
13 onDeleteProject?: (id: string) => void; 15 onDeleteProject?: (id: string) => void;
14 onDeleteSession?: (id: string) => void; 16 onDeleteSession?: (id: string) => void;
17 theme: Theme;
18 onToggleTheme: () => void;
15} 19}
16 20
17const phaseLabels: Record<Phase, string> = { 21const phaseLabels: Record<Phase, string> = {
@@ -33,6 +37,8 @@ export function Header({
33 onCreateSession, 37 onCreateSession,
34 onDeleteProject, 38 onDeleteProject,
35 onDeleteSession, 39 onDeleteSession,
40 theme,
41 onToggleTheme,
36}: HeaderProps) { 42}: HeaderProps) {
37 const handleDeleteProject = () => { 43 const handleDeleteProject = () => {
38 if (!selectedProject || !onDeleteProject) return; 44 if (!selectedProject || !onDeleteProject) return;
@@ -51,6 +57,9 @@ export function Header({
51 return ( 57 return (
52 <header className="header"> 58 <header className="header">
53 <div className="header-left"> 59 <div className="header-left">
60 {/* ── Wordmark ── */}
61 <span className="app-wordmark">Claude Flow</span>
62
54 <select 63 <select
55 value={selectedProject?.id || ""} 64 value={selectedProject?.id || ""}
56 onChange={(e) => { 65 onChange={(e) => {
@@ -129,6 +138,11 @@ export function Header({
129 })} 138 })}
130 </div> 139 </div>
131 )} 140 )}
141
142 {/* ── Theme toggle ── */}
143 <button className="theme-toggle" onClick={onToggleTheme}>
144 {theme === "dark" ? "[light]" : "[dark]"}
145 </button>
132 </div> 146 </div>
133 </header> 147 </header>
134 ); 148 );