Commit 372f0d9
authored
🤖 refactor: consolidate Storybook to full-app only approach (#823)
## Summary
Consolidate all Storybook stories to full-app only - no more isolated
component stories. Every visual state is now tested in context, showing
how changes will actually appear to users.
## Changes
**Deleted (22 files, ~5,800 lines)**
- All individual component stories in `src/browser/components/`
- Original `src/browser/App.stories.tsx`
**Created (2 files, ~1,800 lines)**
- `src/browser/stories/mockFactory.ts` - Composable mock infrastructure
- `src/browser/stories/App.stories.tsx` - 17 full-app stories
## New Story Organization
| Area | Stories |
|------|---------|
| Empty/Welcome | WelcomeScreen |
| Sidebar & Navigation | SingleProject, MultipleProjects, ManyWorkspaces
|
| Git Status | GitStatusVariations (clean, ahead, behind, dirty,
diverged, SSH) |
| Chat Messages | ChatConversation, ChatWithReasoning, ChatWithTerminal,
ChatWithAgentStatus |
| Streaming | StreamingState (pending tool calls) |
| Markdown | MarkdownTables, CodeBlocks |
| Media | MessageWithImages |
| Errors | StreamError, HiddenHistory |
| Diffs | LargeDiff |
| Comprehensive | ComprehensiveDemo (exercises everything) |
## Benefits
1. **Context is king** - Every visual state shown in full app
2. **DRY mock infrastructure** - Composable factories eliminate
duplication
3. **Maintainable** - Adding stories = combining existing building
blocks
4. **Realistic** - Stories exercise real app behavior
5. **~70% less code** - 1,800 lines vs ~5,800 previously
---
_Generated with `mux`_1 parent 8125b40 commit 372f0d9
File tree
35 files changed
+2111
-6126
lines changed- src/browser
- components
- Messages
- RightSidebar/CodeReview
- Settings
- ui
- stories
35 files changed
+2111
-6126
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
0 commit comments