feat(atoms): highlight [bracketed] variables in prompt and code blocks#58
Conversation
…ero copy - Hero paragraph: removes "hand-crafted", names the stack (React + Tailwind CSS + Radix UI), rephrases theme count as prose - stats array: Atoms 10→11, Molecules 18→17, UI primitives 40+→48 (canonical source: docs/design-system.md) - README: same count fixes in directory tree and Component Inventory table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tecture - Rename heading "Three-file architecture" → "Agent context architecture" - Add subtext below heading describing the four-file agent context system - Fix third card filename display: "DESIGN_SYSTEM.md" → "docs/design-system.md" - Add fourth card for AGENTS.md (Cross-tool Agent Context) - Expand grid to lg:grid-cols-4 for one-row desktop, 2×2 tablet layout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Tokenizes children strings in StepCode and CodeBlock on /(\[[^\]\n]+\])/g, wrapping each match in a highlighted span (bg-accent/10 text-accent rounded-sm px-1) matching the inline Code atom style. Copy-to-clipboard always receives the raw original string. Covers unit tests for single token, multiple tokens, plain text, and multiline guard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 58 minutes and 59 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ 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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 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 |
Summary
tokenizeBracketsutility that splits any string on[bracketed]tokens and wraps each match in a highlighted<span>using the accent token palette (bg-accent/10 text-accent rounded-sm px-1) — matching the inlineCodeatom style exactly.StepCode(src/pages/ai/_shared.tsx) andCodeBlock(src/components/atoms/CodeBlock.tsx) so variable placeholders like[product]and[brand direction]render in the accent color across all AI page prompts.MATCH_REfor per-part testing to avoid statefullastIndexissues on the shared split regex.Commits
fee241273c11fe3d7fa60Files changed
src/lib/tokenizeBrackets.tsxsrc/__tests__/tokenizeBrackets.test.tsxsrc/components/atoms/CodeBlock.tsxtokenizeBracketsin<pre>; copy value stays rawsrc/pages/ai/_shared.tsxtokenizeBracketsinStepCode; copy value stays rawsrc/pages/AiPage.tsxsrc/components/organisms/ai/FileArchitectureSection.tsxsrc/pages/OverviewPage.tsxREADME.mdTest plan
npm run lint— passes cleannpm run test— 89 tests pass (6 new intokenizeBrackets.test.tsx)[product]/[brand direction]render in accent orange across warm, dark, and light themesCodeBlockorStepCodecontaining[token]copies the raw bracketed string (not HTML)🤖 Generated with Claude Code