feat(web): /snippets page — pipeline-ab Arm B (STREAMLINED)#10
Conversation
|
🚅 Deployed to the testing-pr-10 environment in testing
|
A /snippets route rendering a gallery of syntax-highlighted code cards, highlighted at build time so the browser ships zero highlighter JS. Highlighting (src/lib/highlight.ts): Shiki via a css-variables theme, so every token color resolves through a --shiki-* CSS variable defined under :root and .dark in app.css (OKLCH, no hardcoded hex that breaks in one theme). Done in a server load (+page.server.ts) so Shiki + grammars + WASM never enter the client bundle -- the snippets client chunk stays ~8 kB instead of ~230 kB. Each card has a copy-to-clipboard button (raw source, SSR-guarded clipboard helper) and an auto-dismiss toast (in-tree store with full timer cleanup -- every setTimeout has a matching clearTimeout path; the icon reset timer and toast timers are cleared on unmount). 3 snippets (TS / Svelte / shell), wired into the site-header nav. Adds vitest + jsdom and a dedicated vitest.config.ts; tests cover the snippet data integrity, the lang mapping + highlighter output shape incl. a hex-absence assertion, the clipboard success/SSR/failure paths, and the toast auto-dismiss + timer-cleanup contract. shiki is a dependency; vitest + jsdom are devDependencies. Code authored by Cursor Composer 2.5 (test-firewalled) per ADR 0042; designed, tested, reviewed, and gated by the Opus seat, which moved the highlight load server-side to keep Shiki out of the client bundle. Station-Trailer-Version: 1
|
Warning Review limit reached
More reviews will be available in 59 minutes and 59 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (16)
✨ 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 |
Final review (advisory -- not a merge gate)Arm B (lean) -- whole-diff red-team review: /snippetsScope: This arm is clean. No blocking or act-worthy correctness/standards/spec defects Lens 1 -- Spec gaps (against plan + original ask)None. Red-team notes (checked, NOT findings):
Lens 2 -- Standards violationsNone. Red-team notes (checked, NOT findings):
Lens 3 -- Quality problemsNone act-worthy. One cosmetic nit (left for judgement):
Red-team notes (checked clean, NOT findings):
VerdictClean change. Meets the plan and the original ask, follows repo conventions, |
Arm B (lean) -- review dispositionActed onNone. No cheap, clearly-correct, behavior-preserving fix was warranted -- the Left for your judgement
Pass-2 (report-only): not run -- no fix was applied, so the assembled whole is |
EXPERIMENT PR — DO NOT MERGE. pipeline-ab A/B experiment artifact (Arm B (STREAMLINED)).
Streamlined
leanlayout: Composer 2.5 hands + review-reconcile red-team review only (no mid-process ceremony, no QA).Both arms build the IDENTICAL
/snippetsfeature from ONE shared plan. This PR stays OPEN for the operator to evaluate by eye against its live Railway preview. Implementation commits land here next.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.