diff options
| author | Clawd <ai@clawd.bot> | 2026-02-28 08:11:41 -0800 |
|---|---|---|
| committer | Clawd <ai@clawd.bot> | 2026-02-28 08:11:41 -0800 |
| commit | e4b1b26c1d61854b93c2cc3cba1714df2d7417d5 (patch) | |
| tree | de9cd8e341c2b0d40c08f8c1a1ac1a1585a52887 | |
| parent | ae65c31bd0e6d47e98401c93a91500d0b61c50b5 (diff) | |
Add onboarding screen for first-time users
- Show welcome view when no project is selected
- Explain the Research → Plan → Implement workflow
- Include ANTHROPIC_API_KEY setup instructions
- List getting started steps (add project, create session, describe work)
- Explain iteration workflow with Review/Submit buttons
- Add CSS styling for onboarding content
| -rw-r--r-- | renderer/src/App.tsx | 1 | ||||
| -rw-r--r-- | renderer/src/components/DocumentPane.tsx | 37 | ||||
| -rw-r--r-- | renderer/src/styles/globals.css | 56 |
3 files changed, 94 insertions, 0 deletions
diff --git a/renderer/src/App.tsx b/renderer/src/App.tsx index 22082a2..d5a2efd 100644 --- a/renderer/src/App.tsx +++ b/renderer/src/App.tsx | |||
| @@ -256,6 +256,7 @@ export function App() { | |||
| 256 | onChange={setDocumentContent} | 256 | onChange={setDocumentContent} |
| 257 | phase={selectedSession?.phase || "research"} | 257 | phase={selectedSession?.phase || "research"} |
| 258 | disabled={!selectedSession || selectedSession.phase === "implement"} | 258 | disabled={!selectedSession || selectedSession.phase === "implement"} |
| 259 | showOnboarding={!selectedProject} | ||
| 259 | /> | 260 | /> |
| 260 | 261 | ||
| 261 | <ChatPane | 262 | <ChatPane |
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 | ||
| 11 | function renderMarkdown(md: string): string { | 12 | function 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"> |
diff --git a/renderer/src/styles/globals.css b/renderer/src/styles/globals.css index d917f7e..809ff15 100644 --- a/renderer/src/styles/globals.css +++ b/renderer/src/styles/globals.css | |||
| @@ -413,3 +413,59 @@ body { | |||
| 413 | .error-bar button:hover { | 413 | .error-bar button:hover { |
| 414 | opacity: 0.8; | 414 | opacity: 0.8; |
| 415 | } | 415 | } |
| 416 | |||
| 417 | /* Onboarding */ | ||
| 418 | .onboarding h1 { | ||
| 419 | font-size: 32px; | ||
| 420 | margin-bottom: 8px; | ||
| 421 | } | ||
| 422 | |||
| 423 | .onboarding h2 { | ||
| 424 | font-size: 20px; | ||
| 425 | margin-top: 28px; | ||
| 426 | margin-bottom: 12px; | ||
| 427 | color: var(--accent); | ||
| 428 | } | ||
| 429 | |||
| 430 | .onboarding p { | ||
| 431 | margin: 12px 0; | ||
| 432 | line-height: 1.6; | ||
| 433 | } | ||
| 434 | |||
| 435 | .onboarding ol { | ||
| 436 | margin: 12px 0 12px 24px; | ||
| 437 | } | ||
| 438 | |||
| 439 | .onboarding li { | ||
| 440 | margin: 8px 0; | ||
| 441 | line-height: 1.5; | ||
| 442 | } | ||
| 443 | |||
| 444 | .onboarding pre { | ||
| 445 | background: var(--bg-tertiary); | ||
| 446 | padding: 12px 16px; | ||
| 447 | border-radius: 6px; | ||
| 448 | margin: 12px 0; | ||
| 449 | } | ||
| 450 | |||
| 451 | .onboarding code { | ||
| 452 | font-family: "SF Mono", Monaco, monospace; | ||
| 453 | font-size: 13px; | ||
| 454 | } | ||
| 455 | |||
| 456 | .onboarding a { | ||
| 457 | color: var(--accent); | ||
| 458 | text-decoration: none; | ||
| 459 | } | ||
| 460 | |||
| 461 | .onboarding a:hover { | ||
| 462 | text-decoration: underline; | ||
| 463 | } | ||
| 464 | |||
| 465 | .onboarding-tip { | ||
| 466 | margin-top: 28px; | ||
| 467 | padding: 16px; | ||
| 468 | background: var(--bg-tertiary); | ||
| 469 | border-left: 3px solid var(--accent); | ||
| 470 | border-radius: 0 6px 6px 0; | ||
| 471 | } | ||
