Skip to content

Commit 372f0d9

Browse files
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

35 files changed

+2111
-6126
lines changed

bun.lock

Lines changed: 52 additions & 10 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
"@storybook/addon-docs": "^10.0.0",
102102
"@storybook/addon-links": "^10.0.0",
103103
"@storybook/react-vite": "^10.0.0",
104+
"@storybook/test": "^8.6.14",
104105
"@storybook/test-runner": "^0.24.0",
105106
"@tailwindcss/vite": "^4.1.15",
106107
"@testing-library/react": "^16.3.0",

0 commit comments

Comments
 (0)