feat(cardshed): implement S01 MainMenu (M3 — first half of #149)#159
Conversation
First half of #149. M4 (PlayerSetup + matchStore) ships in a follow-up session — needs its own Stitch run per the warm-session-drop invariant. Stitch run #2 (S01 MainMenu) - DS-1 propagated via designSystem=assets/a70557bcdeed4f9ca600d28ffca0d467 — theme round-trips byte-identical to S03 Table. - Project 4083518914509964664 / Screen cb1645e2f8f84834914174930efbbfb6. - .stitch/designs/S01-main-menu.{html,png} kept as visual source-of-truth. apps/ui — wire DS-1 + render MainMenu - index.css: replace M1 placeholder @theme with the full DS-1 token block from .stitch/DESIGN.md §9 (felt, ink, accents, card, outlines, type, spacing, radius). Add Google Fonts @import for Inter + Playfair Display BEFORE the tailwindcss @import (CSS spec ordering). - features/menu/MainMenu.tsx: stateless presentational component, props {onAction, version}. Tokens consumed via CSS vars (no inline hex). PrimaryButton (gold pill + glow) + GhostButton (1px outline-variant) + FannedCardsMotif (aria-hidden decorative). - lib/cn.ts: clsx + tailwind-merge helper. - App.tsx: replace M1 boot stub. Tiny useState screen router with three placeholders ("Coming at M4 (S02)" / "Coming at M11 (S09)" / "...S10") so all three menu buttons land somewhere visible. Real PlayerSetup, Rules, Settings ship at their owning milestones. What this PR does NOT do - No PlayerSetup component (M4 owns it). - No matchStore (M4 owns it). - No mouse-tracking gradient or audio cue from Stitch's HTML — skipped per docs/DECISIONS/2026-05-21-stitch-run-2.md. - No framer-motion (M14). - No mobile sweep (M13). Evidence - dogfood-output/20260521T195710Z/m3-main-menu/ — three agent-browser screenshots (initial render, Play→placeholder, back-to-menu) + report.md. Zero console errors.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (8)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Sorry @w7-mgfcode, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
First half of #149 (M3 only). M4 PlayerSetup + matchStore ships in a follow-up PR — it needs its own Stitch run for S02 per the warm-session-drop invariant.
Summary
designSystemparameter (asset `a70557bcdeed4f9ca600d28ffca0d467`, "Tournament Card Elite"). Theme block round-trips byte-identical to S03 Table — confirming DS-1 carries cleanly across screens.apps/ui/src/index.css. Replaced the M1 placeholder `@theme` with the full DS-1 token block from `.stitch/DESIGN.md` §9 (felt, ink, accents, card, outlines, typography, spacing, radius). Added Google Fonts `@import` for Inter + Playfair Display before the `tailwindcss` import (CSS spec ordering).MainMenu.tsxas a stateless presentational component consuming DS-1 tokens via CSS vars (no inline hex). Three buttons: gold PLAY pill with glow + two ghost-styled RULES/SETTINGS pills + decorative fanned cards.Acceptance gates (PRP 3 §M3 lines 758–773)
Evidence
dogfood-output/20260521T195710Z/m3-main-menu/— three screenshots + report.md01-mainmenu-1440x900.png— initial render02-play-click-routes-to-m4-placeholder.png— Play navigates correctly03-back-to-mainmenu.png— back navigation restores MainMenu.stitch/designs/S01-main-menu.{html,png}docs/DECISIONS/2026-05-21-stitch-run-2.mdrecords what Stitch produced, what was skipped (mouse-tracking gradient + audio cue + ornament footer line), and the token-name bridge between Material-3 names Stitch uses and the domain names DS-1 usesdocs/SCREENS/main-menu.mddocuments the component contract + layout regions + token consumption tableWhat this PR does NOT do
--motion-snap,--motion-card-snap) wire at M14.Notable design decisions (also in
docs/DECISIONS/2026-05-21-stitch-run-2.md)docs/SCREENS/main-menu.md§ "Token consumption".Test plan
Next (post-merge → M4)
Follow-up session opens, runs one Stitch generation for S02 PlayerSetup against the same project ID + DS-1, implements `PlayerSetup.tsx` + `matchStore.ts` (zustand) calling `@cardshed/core.startNewRound(null, seed)` where `seed` comes from `crypto.getRandomValues()` called once outside core (per PRP 3 M4 common-bug warning). Closes #149.