Skip to content

feat: examples page, scroll reset, bracket highlights, agent context arch, padding polish#59

Merged
mmorerasanchez merged 5 commits into
mainfrom
fix/scroll-reset-on-route-change
Jun 2, 2026
Merged

feat: examples page, scroll reset, bracket highlights, agent context arch, padding polish#59
mmorerasanchez merged 5 commits into
mainfrom
fix/scroll-reset-on-route-change

Conversation

@mmorerasanchez

@mmorerasanchez mmorerasanchez commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • fix(theme): Reset scroll to top on every route change — useLayoutEffect + [pathname, search, hash, key] deps; hash-aware scrollIntoView; window.scrollTo fallback
  • feat(atoms): Highlight [bracketed] variables in prompt and code blocks via tokenizeBrackets
  • feat(organisms): Add AGENTS.md card to FileArchitecture section; rename section to "Agent context architecture"
  • feat(pages): Add /ai/examples page — three worked customizations (Violet, Blue, Amber), token overrides only, no component files touched
  • feat(pages): Add Examples card to Overview "Customize with your brand" grid; layout moves to lg:grid-cols-4 (single row on desktop, 2×2 on tablet)
  • style(pages): Standardize content-card padding to p-5 on Overview stat tiles, Sections grid, and Design-principle cards — matches the How-path cards baseline
  • docs: Align Overview inventory counts, note prompt-x origin in Manifesto, reconcile design-page category counts

Test plan

  • Navigate between pages — scroll resets to top on every route change
  • /ai/examples loads and displays three customization previews (Violet, Blue, Amber)
  • Overview "Customize" grid — four cards in one row at 1280px, 2×2 at 768px, stacked at 375px
  • Overview stat tiles, Sections grid, Design-principle cards — all p-5, consistent with How-path cards; no overflow at tablet or mobile
  • [variable] tokens render highlighted in CodeBlock and prompt atoms
  • AGENTS.md card visible in organisms AI section; section heading updated
  • Warm / dark / light themes verified at desktop (1280px), tablet (768px), mobile (375px)
  • npm run lint passes clean
  • npm run test passes (89 unit tests)

🤖 Generated with Claude Code

mmorerasanchez and others added 3 commits June 2, 2026 13:25
- Switch ScrollToTop to useLayoutEffect (SSR-guarded) so the reset
  fires before paint and eliminates mid-page flash.
- Depend on pathname + search + hash + key so query-string and hash
  navigations also trigger a reset.
- If location.hash is set, scrollIntoView the target element instead
  of jumping to the top.
- Add window.scrollTo(0,0) fallback for layouts without #main-scroll.
- Add Playwright test: scroll Overview halfway, navigate to /atoms,
  assert #main-scroll scrollTop === 0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds ExamplesPage at /ai/examples showing three end-to-end brand
overrides (violet dark prompt library, blue obs dashboard, amber AI-ops
platform) using CSS-only token changes. Registers the route in
AiDetailPage platformMap.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
democrito Ready Ready Preview, Comment Jun 2, 2026 11:35am

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@mmorerasanchez, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 44 minutes and 22 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e08b1832-9e4a-4cdb-99ec-564ed5a437ce

📥 Commits

Reviewing files that changed from the base of the PR and between 47dbbb6 and 2bb1b1b.

📒 Files selected for processing (8)
  • src/components/ShowcaseLayout.tsx
  • src/pages/AiDetailPage.tsx
  • src/pages/AtomsPage.tsx
  • src/pages/ManifiestoPage.tsx
  • src/pages/MoleculesPage.tsx
  • src/pages/OverviewPage.tsx
  • src/pages/ai/examples.tsx
  • tests/visual/scroll-reset.spec.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/scroll-reset-on-route-change

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

mmorerasanchez and others added 2 commits June 2, 2026 13:28
Add fourth card to the Customize with your brand grid linking to /ai/examples (Layers icon, Violet · Blue · Amber badge). Update grid from lg:grid-cols-3 to lg:grid-cols-4 for a balanced single row on desktop, 2×2 on tablet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Before → After:
| Page         | subtitle | cat-sum |
|--------------|----------|---------|
| AtomsPage    | 10 → 11  | 15 → 11 |
| MoleculesPage| 18 → 17  | 16 → 17 |
| OrganismsPage| 19 ✓     | 19 ✓    |
| TemplatesPage| 7 ✓      | — ✓     |

AtomsPage changes:
- Renamed local CodeBlock helper → ApiSnippet to un-shadow the atom import
- Added sections for 4 previously unlisted custom atoms:
  CopyButton (cat-form), StatusBadge (cat-labels),
  CodeBlock (cat-utility), Logo (cat-utility)
- Category counts now represent custom democrito atoms only (sum = 11):
  cat-form=1, cat-labels=6, cat-feedback=1, cat-utility=3
- Subtitle corrected: "10 atoms" → "11 atoms"

MoleculesPage changes:
- Added missing TokenReferenceCard section to cat-data
- cat-data count: 5 → 6; total 16 → 17
- Subtitle corrected: "18 molecules" → "17 molecules"

Cross-check findings:
- All 11 custom atoms have files ✓ (no missing, no unlisted)
- All 17 molecules have files ✓ (TokenReferenceCard was built but unlisted on page)
- All 19 organisms have files ✓
- Templates: 7 files match the "7 templates" subtitle;
  SettingsLayout, AuthLayout, ModalLayout appear as previews on the
  page but have no component files — these are known planned templates
  (noted in docs/design-system.md §7)
- docs/design-system.md §7 inventory already correct; no doc changes needed
- organisms/ai/ (5 AI-page organisms) are intentionally excluded from the
  public surface and from OrganismsPage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mmorerasanchez mmorerasanchez changed the title fix(theme): reset scroll to top on every route change feat: examples card, scroll reset, bracket highlights, agent context architecture Jun 2, 2026
@mmorerasanchez mmorerasanchez changed the title feat: examples card, scroll reset, bracket highlights, agent context architecture feat: examples page, scroll reset, bracket highlights, agent context arch, padding polish Jun 2, 2026
@mmorerasanchez mmorerasanchez merged commit 316006f into main Jun 2, 2026
4 checks passed
@mmorerasanchez mmorerasanchez deleted the fix/scroll-reset-on-route-change branch June 2, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant