feat(ui): consolidate Storybook and shared UI library - #615
Conversation
WalkthroughThe Start app adds a React-Vite Storybook setup, themed component stories, accessibility configuration, and scripts for static builds. It also adds UI inventory generation and documentation describing the boundary and staged extraction constraints. ChangesStart UI library tooling
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Developer
participant Storybook
participant main_ts as main.ts
participant vite_config as vite.config.ts
participant preview_tsx as preview.tsx
participant UIStories as UI stories
Developer->>Storybook: Start or build Storybook
Storybook->>main_ts: Load StorybookConfig
main_ts->>vite_config: Apply Vite configuration
Storybook->>preview_tsx: Load preview decorators and parameters
Storybook->>UIStories: Discover component stories
preview_tsx->>UIStories: Wrap stories with theme and TooltipProvider
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/wodsmith-start/.storybook/vite.config.ts (1)
8-17: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the duplicate
@alias The manualresolve.aliasduplicates the@/*mapping already provided byvite-tsconfig-pathsviaapps/wodsmith-start/tsconfig.json, so keep a single source of truth to avoid drift.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/wodsmith-start/.storybook/vite.config.ts` around lines 8 - 17, Remove the manual "@" entry from the resolve.alias configuration in the Vite config, relying on the tsconfigPaths plugin and the "`@/`*" mapping in tsconfig.json as the single source of truth.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/wodsmith-start/scripts/generate-ui-library-inventory.mjs`:
- Around line 67-71: Normalize the relative path in consumerArea before the
prefix checks by converting platform-specific separators to POSIX “/”
separators, then classify the normalized value with the existing routes/ and
components/ui/ prefixes.
---
Nitpick comments:
In `@apps/wodsmith-start/.storybook/vite.config.ts`:
- Around line 8-17: Remove the manual "@" entry from the resolve.alias
configuration in the Vite config, relying on the tsconfigPaths plugin and the
"`@/`*" mapping in tsconfig.json as the single source of truth.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e179745e-5a39-425a-9e72-ed0cc1a50360
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (13)
apps/wodsmith-start/.gitignoreapps/wodsmith-start/.storybook/main.tsapps/wodsmith-start/.storybook/preview.tsxapps/wodsmith-start/.storybook/vite.config.tsapps/wodsmith-start/docs/ui-library-inventory.mdapps/wodsmith-start/package.jsonapps/wodsmith-start/scripts/generate-ui-library-inventory.mjsapps/wodsmith-start/src/components/ui/badge.stories.tsxapps/wodsmith-start/src/components/ui/button.stories.tsxapps/wodsmith-start/src/components/ui/card.stories.tsxapps/wodsmith-start/src/components/ui/input.stories.tsxlat.md/lat.mdlat.md/ui-library.md
|
Independent review result: blockers found on
Validation completed with the repository toolchain (Node 24.15.0, corepack pnpm 9.12.1): focused app type-check passed, inventory freshness passed, static Storybook build passed, dev server/browser smoke passed with no console/page errors, |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
LGTM — no blockers remain on I re-reviewed the incremental range
Focused validation with Node 24.15.0 and corepack pnpm 9.12.1 passed: app type-check, inventory freshness, Windows path-normalization simulation, static Storybook build, Clean browser verification covered all four story groups (Badge, Button, Card, Form controls) in the full 16-state Docs/Canvas × light/dark matrix. Docs chrome remained readable, dark stories used isolated full-width backgrounds, Canvas filled the 1440×1000 viewport, and no Vite overlays or page errors appeared. Live state is also clean: all GitHub checks are green, the PR is mergeable with |
Summary
main@repo/uifoundations and compatibility adapters for Start and CrewStack consolidation
PRs #616 through #649 were independently reviewed and fast-forward merged leaf-to-base into this branch. The non-numeric dependency junction was preserved as #637 → #639 → #638 → #640. PR #615 is now the only open PR from the stack.
Final head:
23be842b77d38bd533f220a734fa36878f9e1e52Verification
lat checkgit diff --check origin/main...HEADMerge scope
This PR intentionally remains directly based on
mainand contains the reviewed cumulative stack. Intermediate PRs #616–#649 are merged.