refactor(desktop): align the design contracts with the code - #239
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jsontakes 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).
tests/designContract.test.tsresolves the token aliases and asserts the spec against them,so editing one side without the other fails the suite.
docs/design/system.mdregisterssrc/settings/SettingsPrimitives.tsxas the settings-scopedcomposition with its real callers, and adds the settings pages to the
PageHeadercaller list.github/PullRequestsPage.tsxroutes its list and detail loading/failure states through the sharedLoadFeedback, which until now had no product caller while the page hand-rolled its exact shapefour times.
ControlChipis not a dead contract — thecomposer and
SceneChipcall it through itsChipalias, nine call sites in total. The recordcarries the correction.
Change record
The linked change directory owns scope, authorization, acceptance, evidence, and residual risk.
Review and release
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 temporarilyforcing the UI Lab fixture, which was restored byte-identically; the record's AC-1..AC-5 map to
current PASS evidence.
bun run lint,bunx tsc --noEmit(insidebuild: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.