style: token the Dictionary catalogue's repeated max-w-[76rem] - #2355
Conversation
…atalogue token The Dictionary catalogue pages and the diagnosis-map-panel drawer each repeated the same arbitrary Tailwind width value in 7 places. Adds a --content-width-catalogue token to globals.css and points every call site at it, per CodeRabbit's suggestion on PR #2341.
This pull request has been ignored for the connected project Preview Branches by Supabase. |
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughThe change adds a shared ChangesCatalogue content width
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk:⚪ Minimal · up to This change centralizes an existing 76rem width value without changing computed layout or application behavior. It is merge-ready after normal checks, with no actionable merge-blocking risk remaining. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Uh oh!
There was an error while loading. Please reload this page.


Summary
--content-width-catalogue: 76remtoken tosrc/app/globals.css.max-w-[76rem]Tailwind value withmax-w-[var(--content-width-catalogue)]acrossdictionary-catalogue-pages.tsx,dictionary-sources-page.tsx, anddiagnosis-map-panel.tsx.Follow-up from a CodeRabbit review comment on PR #2341, which pointed out the arbitrary value was repeated in one file but is actually a repo-wide pattern spanning 3 files — so it's tokenized here rather than fixed in isolation, per the review reply on that PR.
Verification
npm run check:design-system-contract— passed (990 files; arbitrary tracking 0; no ratchet regressions).tests/search-route-ownership.test.ts,tests/diagnosis-map-panel.dom.test.tsx,tests/mode-nav-addon-slot.dom.test.tsx— 3 files, 36 tests passed.npx prettier --checkclean on all changed files.npx eslintclean on all changed.tsxfiles.npm run verify:pr-local— pure visual/no-behaviour-change styling swap, no layout or logic touched.Risk and rollout
Clinical Governance Preflight
Not applicable — pure design-token/CSS refactor, no clinical, ingestion, answer-generation, or source-governance surface touched.
Generated by Claude Code
Note
Low Risk
CSS token swap only—same max-width before and after, no logic or data paths touched.
Overview
Introduces
--content-width-catalogue: 76reminglobals.cssalongside the other layout constraint tokens, so the dictionary catalogue’s shared content column width has one source of truth.Replaces every
max-w-[76rem]withmax-w-[var(--content-width-catalogue)]on dictionary catalogue, topics, topic detail, and sources shells, plus the diagnosis map sheet’s large breakpoint cap. Computed width stays 76rem; this is a maintainability / design-contract cleanup (follow-up to repeated arbitrary-width review), not a layout change.Reviewed by Cursor Bugbot for commit 94bb968. Configure here.
Summary by CodeRabbit