aboutsummaryrefslogtreecommitdiffstats
path: root/renderer/src/components/DocumentPane.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'renderer/src/components/DocumentPane.tsx')
-rw-r--r--renderer/src/components/DocumentPane.tsx37
1 files changed, 37 insertions, 0 deletions
diff --git a/renderer/src/components/DocumentPane.tsx b/renderer/src/components/DocumentPane.tsx
index e44b0fb..a22ecad 100644
--- a/renderer/src/components/DocumentPane.tsx
+++ b/renderer/src/components/DocumentPane.tsx
@@ -6,6 +6,7 @@ interface DocumentPaneProps {
6 onChange: (content: string) => void; 6 onChange: (content: string) => void;
7 phase: Phase; 7 phase: Phase;
8 disabled: boolean; 8 disabled: boolean;
9 showOnboarding?: boolean;
9} 10}
10 11
11function renderMarkdown(md: string): string { 12function renderMarkdown(md: string): string {
@@ -50,10 +51,46 @@ export function DocumentPane({
50 onChange, 51 onChange,
51 phase, 52 phase,
52 disabled, 53 disabled,
54 showOnboarding,
53}: DocumentPaneProps) { 55}: DocumentPaneProps) {
54 const [isEditing, setIsEditing] = useState(false); 56 const [isEditing, setIsEditing] = useState(false);
55 const renderedHtml = useMemo(() => renderMarkdown(content), [content]); 57 const renderedHtml = useMemo(() => renderMarkdown(content), [content]);
56 58
59 if (showOnboarding) {
60 return (
61 <div className="document-pane">
62 <div className="document-header">
63 <span>Welcome to Claude Flow</span>
64 </div>
65 <div className="document-content rendered onboarding">
66 <h1>Claude Flow</h1>
67 <p>
68 A structured workflow for AI-assisted coding: <strong>Research → Plan → Implement</strong>.
69 </p>
70
71 <h2>Setup</h2>
72 <p>Export your Anthropic API key:</p>
73 <pre><code>export ANTHROPIC_API_KEY=your-key-here</code></pre>
74 <p>Get one at <a href="https://platform.claude.com" target="_blank" rel="noopener">platform.claude.com</a></p>
75
76 <h2>Getting Started</h2>
77 <ol>
78 <li><strong>Add a project</strong> — Select a codebase folder</li>
79 <li><strong>Create a session</strong> — Start a new task</li>
80 <li><strong>Describe your work</strong> — Tell Claude what you want to build</li>
81 </ol>
82
83 <h2>Workflow</h2>
84 <p><strong>Research:</strong> Claude analyzes your codebase and writes findings to <code>research.md</code>. Add notes like <code>// REVIEW: check this</code> — click <strong>Review</strong> when done.</p>
85 <p><strong>Plan:</strong> Claude drafts an implementation plan in <code>plan.md</code> with code snippets and a TODO list. Iterate the same way.</p>
86 <p><strong>Implement:</strong> Claude executes the plan, marking tasks complete as it goes.</p>
87
88 <p className="onboarding-tip">Iterate on research and plan docs as long as you want. Click <strong>Submit</strong> when happy to move to the next phase.</p>
89 </div>
90 </div>
91 );
92 }
93
57 if (phase === "implement") { 94 if (phase === "implement") {
58 return ( 95 return (
59 <div className="document-pane"> 96 <div className="document-pane">