Skip to content

Extend the control-face ratchet to the shell renderer (Settings)#152

Merged
th3-br41n merged 1 commit into
mainfrom
fix/control-faces-shell-ratchet
Jul 13, 2026
Merged

Extend the control-face ratchet to the shell renderer (Settings)#152
th3-br41n merged 1 commit into
mainfrom
fix/control-faces-shell-ratchet

Conversation

@th3-br41n

Copy link
Copy Markdown
Contributor

Why

The control-face gate enforces the design-system invariant that a native <input>/<textarea>/<select> must ride a shared face class (.bs-input / .bs-select) — so a field is the same height as the button/select beside it. It only scanned apps/.

But the shell renderer uses the same faces (<TextField> emits .bs-input), and Settings is exactly where "the input is a different height from the control next to it" keeps getting filed. The design system's own privileged surface was the one place the ratchet couldn't see — so the enforcement half of the fix was missing there.

What

  • Widen check-control-faces.mjs to also scan packages/shell/src/renderer, exempting its ui/ folder — the shell's local primitive home, where a raw <input> is legitimately wrapped into a face (mirrors how the app scan exempts packages/sdk).
  • Grandfather the 9 current offenders (Settings panels + Welcome + Help) into control-faces-baseline.json. The ratchet now:
    • fails any NEW hand-rolled shell control (new code must compose from the primitive), and
    • shrinks as the 9 migrate to <TextField> / <SelectMenu> when next touched (stale-baseline detection forces the list down).

Verified: gate green (10 baselined, 0 new); a synthetic new <input> under settings/ trips it; css-tokens + app-reactivity ratchets still green.

No feature files change — this is the enforcement mechanism, not the migrations (several offenders live in files active branches are editing; they migrate under the ratchet later).

🤖 Generated with Claude Code

…ettings)

The control-face gate — native `<input>/<textarea>/<select>` must ride a shared
face class (`.bs-input`/`.bs-select`) so a field lines up pixel-exact beside the
button/select next to it — only scanned `apps/`. But the shell renderer uses the
SAME faces (its `<TextField>` emits `.bs-input`), and Settings is exactly where
"the input is a different height from the button beside it" keeps getting filed.
So the design system's own privileged surface was the one place the ratchet
couldn't see.

Widen the scan to `packages/shell/src/renderer`, exempting its `ui/` folder (the
shell's local primitive home — the sanctioned place a raw `<input>` is wrapped
into a face, mirroring how the app scan exempts `packages/sdk`). Nine current
Settings/Welcome/Help offenders are grandfathered into the baseline; the ratchet
now fails any NEW hand-rolled shell control and shrinks as these nine migrate to
`<TextField>`/`<SelectMenu>` when next touched.

No feature files change — this is the enforcement mechanism, not the migrations.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@th3-br41n th3-br41n merged commit c9bd834 into main Jul 13, 2026
1 of 3 checks passed
@th3-br41n th3-br41n deleted the fix/control-faces-shell-ratchet branch July 13, 2026 13:34
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