Skip to content

docs(design-sync): correct conventions header drift after the token port - #1443

Merged
BigSimmo merged 5 commits into
mainfrom
claude/design-sync-db0a54
Jul 30, 2026
Merged

docs(design-sync): correct conventions header drift after the token port#1443
BigSimmo merged 5 commits into
mainfrom
claude/design-sync-db0a54

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Re-synced the design system to the Clinical KB Design System project on claude.ai/design (08d6f126-3fd0-4764-aedf-0062a467280a) and corrected the conventions header, which had drifted out of date after the Clinical Sky token port (7695b36f8).

This PR carries sync inputs only — the two durable .design-sync/ files. The upload itself is already done and verified.

  • .design-sync/conventions.md — two claims that no longer resolve against the built bundle. This file is inlined into the design agent's system prompt, so a stale name means silently unstyled output in every design built with the library:

    • Status families: the header promised a -solid / -solid-contrast pair for success, warning, info and danger alike. Only danger defines one; the other three define -text, -bg, -border, -soft. Non-danger filled states now point at -bg + -text.
    • controlBase was documented as module-private, but src/components/ui-primitives.tsx:34 exports it. Moved into the exported class-string vocabulary, with a note preferring primaryControl / floatingControl / toolbarButton unless composing a new control.
  • .design-sync/NOTES.md — triage of the new [TOKENS_MISSING] warn so a future re-sync does not re-investigate it, plus two re-sync risks worth knowing: why the driver reports changed: [] for a token port, and that conventions drift must be re-validated against definitions rather than bare var() references on every sync.

  • docs/outstanding-issues.md (separate commit, independently revertible) — closes #110 and captures #131:

    • #110 "Design-system project token manifest lags its stylesheet" is resolved by this sync. _ds_manifest.json is converter-generated, so the partial push in feat(design): port Clinical Sky token system, elevation ladder and radius grid #1375 could not refresh it; a full upload with a re-armed _ds_needs_recompile sentinel makes the app rebuild it from the uploaded source.
    • #131 (new, P2 issue) records the five undefined CSS custom properties described under Notes below, with the per-site next action, the verify:ui requirement, and an explicit stop rule for the two vars that are expected to be absent.

Everything else the header enumerates was verified present in the build: 25 class constants, 35 lucide icons, all 10 components, the --e0--e4 elevation ladder with all seven shadow aliases, and --spacing-tap: 2.75rem (44 px).

Verification

package-validate.mjs exited 0 on the build that was uploaded. Decisive lines:

render check: 10/10 previews render cleanly (screenshots in _screenshots/)
_ds_sync.json render hashes match disk (10 recomputed)
styles.css: 2 @import(s), all resolve
✓ bundle is complete (1 warning(s) — review above, non-blocking)
  • .render-check.json aggregate: total 10, bad 0, thin 0, variantsIdentical 0, blank 0, rootEmpty 0, fallbackCard 0.
  • Driver verdict: ok: true, anchor: ok, pendingGrade: [], learningsUnmerged: [].
  • Grading: 6/6 spot-checked preview cells graded good (EmptyState ×3, PanelHeading ×3), re-confirmed against the fresh sheets after the header rebuild.
  • npx prettier --check .All matched files use Prettier code style!
  • Upload verified by list_files: 66 sync files present, 0 deletes, and every design-side artifact preserved (templates/** ×5, CLAUDE_CODE_FIXES.md, DESIGN_ELEVATION_REVIEW.md, Clinical Deck.html).

No unit/lint/typecheck gate applies — the diff is two markdown files under .design-sync/ with no source, schema, config or test changes. They match none of pr-policy.mjs's clinical-risk, operational-risk, RAG-ranking or UI path patterns. The real proof for these files is the converter build that consumed them, which is quoted above.

Notes

  • Closes the stale-manifest debt tracked as ledger #110: a full converter upload plus the re-armed _ds_needs_recompile sentinel makes the app regenerate _ds_manifest.json and _adherence.oxlintrc.json server-side, which the partial re-sync in feat(design): port Clinical Sky token system, elevation ladder and radius grid #1375 could not do.
  • Surfaced but deliberately not fixed here: five CSS custom properties referenced by repo code and defined nowhere — --med-accent / --med-accent-border (4 sites in src/components/clinical-dashboard/medication-record-page.tsx) and --clinical-accent-strong (src/components/clinical-dashboard/answer-status.tsx:252) in production, plus --primary-hover / --success-hover in gate-exempt mockups. They carry no fallback, so the declaration is dropped at parse time and the colour silently does not apply — the same defect family as the dead --text-4xs classes repaired in 39f2bcea7. Editing clinical dashboard UI is out of scope for a design sync and needs its own verify:ui proof, so it is raised separately.

🤖 Generated with Claude Code

The 2026-07-30 re-sync to the "Clinical KB Design System" project validated
`.design-sync/conventions.md` against the freshly built bundle and found two
claims that no longer hold after the Clinical Sky token port (7695b36). The
header is inlined into the design agent's system prompt, so a name that does not
resolve produces silently unstyled output in every design built with it.
- Status families: the header promised a `-solid` / `-solid-contrast` pair for
success, warning, info and danger alike. Only `danger` defines one; the other
three define `-text`, `-bg`, `-border`, `-soft`. Documented the real split and
pointed non-danger filled states at `-bg` + `-text`.
- `controlBase` was listed as a module-private helper, but
`src/components/ui-primitives.tsx:34` exports it. Moved it into the exported
class-string vocabulary with a note preferring the ready-made control recipes.
Everything else the header enumerates was verified present in the build: 25
class constants, 35 lucide icons, all 10 components, the `--e0`…`--e4` ladder
with all seven shadow aliases, and `--spacing-tap: 2.75rem`.
NOTES.md additionally records:
- Triage of the new `[TOKENS_MISSING]` warn (7 vars). Two are benign —
`--mobile-composer-reserve` is set at runtime and always read through a
`var(…, 0rem)` fallback, and `--x` is Tailwind v4 scanning the literal string
`bg-[color:var(--x)]` out of prose in docs/redesign/03-decision-log.md. The
other five are undefined references in repo code, tracked separately.
- Why the driver reports `changed: []` for a token port: `sourceKeys` track the
authored preview and preview-affecting config, not component source, so token
changes surface as render churn plus `styling: true` instead.
- That conventions drift needs re-validating on every re-sync, matching
definitions only rather than bare `var()` references.
Sync inputs only — no source, schema or RAG-surface changes. The upload itself
is already verified: package-validate.mjs exited 0 with 10/10 previews rendering
cleanly, and the 6 spot-checked preview cells graded good.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitaiBot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in:15 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f68c301c-2ecd-4958-9697-7f8d89108842

📥 Commits

Reviewing files that changed from the base of the PR and between 20e0fa5 and a1819d8.

📒 Files selected for processing (3)
  • .design-sync/NOTES.md
  • .design-sync/conventions.md
  • docs/outstanding-issues.md

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

@supabase

supabaseBot commented Jul 30, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:b0bacfb442

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread.design-sync/NOTES.md Outdated
…-30 re-sync) and capture #131 (five undefined CSS custom properties)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@cursoragent resolve merge conflict

@cursor

cursorBot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Merge conflict on PR #1443 is resolved and pushed.

GitHub’s DIRTY state was the known merge=union trap on docs/outstanding-issues.md (#140): the merge itself succeeded, but the driver duplicated the whole ledger. I rebuilt that file from origin/main and re-applied only this PR’s edits.

  • Merged origin/main into claude/design-sync-db0a54
  • Rebuilt the issues ledger; archived #110; captured the token gap as #141 (main already owns #131)
  • Corrected NOTES/#141 so --med-accent / --med-accent-border stay runtime-set via medicationAccentStyle()
  • npm run check:outstanding-issues passed; git merge-tree is clean; PR is MERGEABLE

Head: 00e87040#1443

Open in WebOpen in Cursor

cursoragentand others added 3 commits July 30, 2026 11:50
…0a54
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
merge=union concatenated both sides of docs/outstanding-issues.md when
merging main into this branch, doubling every row. Rebuild from
origin/main and re-apply only this PR's ledger edits: archive #110 and
capture the token-gap issue as #141 (main already owns #131). Correct
NOTES/#141 triage so --med-accent/--med-accent-border stay classified as
runtime-set via medicationAccentStyle(), leaving --clinical-accent-strong
and the mockup hover tokens as the real gaps.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo
BigSimmo merged commit 7d92ea0 into mainJul 30, 2026
23 checks passed
@BigSimmo
BigSimmo deleted the claude/design-sync-db0a54 branch July 30, 2026 13:03
Sign up for freeto 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.

2 participants

@BigSimmo@cursoragent