Skip to content

refactor(desktop): align the design contracts with the code - #239

Merged
IchenDEV merged 1 commit into
mainfrom
t3code/align-design-contracts
Sep 16, 2026
Merged

IchenDEV merged 1 commit into
mainfrom
t3code/align-design-contracts

Conversation

@IchenDEV

Copy link
Copy Markdown
Owner

Outcome

The governance item of the agreed repair order: the design system's machine-readable contracts now
describe what the code does, the shared module the doc omitted is registered, and the loading
contract has real callers.

  • layout-spec.json takes the token values it had drifted from: titlebar 48 → 46 (both places),
    normal control 28 → 32, field control 32 → 36. The rest of the file was audited and already
    matched the code (rail 288 with 220/420 clamps, dock 440, spacing 2–32, the 768 content and
    settings measures, the 800/1000/1400 breakpoints).
  • A new tests/designContract.test.ts resolves the token aliases and asserts the spec against them,
    so editing one side without the other fails the suite.
  • docs/design/system.md registers src/settings/SettingsPrimitives.tsx as the settings-scoped
    composition with its real callers, and adds the settings pages to the PageHeader caller list.
  • github/PullRequestsPage.tsx routes its list and detail loading/failure states through the shared
    LoadFeedback, which until now had no product caller while the page hand-rolled its exact shape
    four times.
  • Correction to the earlier audit in this thread: ControlChip is not a dead contract — the
    composer and SceneChip call it through its Chip alias, nine call sites in total. The record
    carries the correction.

Change record

  • Change: docs/sdlc/changes/2026-09-16-align-design-contracts/intent.md

The linked change directory owns scope, authorization, acceptance, evidence, and residual risk.

Review and release

  • Acceptance evidence covers the current diff, including rendered UI where affected: the
    failure state rendered through [data-slot="load-feedback"][data-state="error"] (role="alert"
    + Retry) and the loading state through [data-state="loading"]/role="status" by temporarily
    forcing the UI Lab fixture, which was restored byte-identically; the record's AC-1..AC-5 map to
    current PASS evidence.
  • Required checks passed on this base: bun run lint, bunx tsc --noEmit (inside
    build:renderer), bun test (963 pass / 3 skip / 0 fail), bun run build:renderer,
    bun script/verify/sdlc.ts --worktree, bun script/verify/docs.ts, git diff --check.
  • Merge authorization: pending (this PR was requested; merge is not authorized)
  • Release authorization: not requested

@IchenDEV
IchenDEV merged commit 88b13cd into main Sep 16, 2026
1 check passed
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