Skip to content

fix(ui): tokenize composer branch-picker min-height + cover it in the control-height contract - #821

Merged
Astro-Han merged 1 commit into
mainfrom
refactor/composer-branch-picker-token
Jul 12, 2026
Merged

Astro-Han merged 1 commit into
mainfrom
refactor/composer-branch-picker-token

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Swap .maka-composer-branch-picker min-height from a bare 24px to var(--h-control-sm), matching the adjacent workspace-picker.
  • Add .maka-composer-branch-picker to the control-height-converge contract's CONTROL_HEIGHT list so the existing owner contract guards both pickers.

Why

The branch-picker carried a bare min-height: 24px while the adjacent workspace-picker used var(--h-control-sm) (both resolve to 24px). The bare literal is exactly the drift the control-height-converge contract exists to prevent — the branch-picker was simply missing from its CONTROL_HEIGHT list (the workspace-picker was already covered). Fix at the owner: swap the token and add the missing list entry, instead of a parallel guard. Found by the #546 Composer combined-state audit. Refs #546.

Scope

  • One CSS value (branch-picker min-height) + one contract list entry. No new contract file, no helper changes, no other surfaces.

Verification

  • npm run -w @maka/desktop test — 2346/2346 pass (the control-height-converge contract now covers both pickers).
  • npm run -w @maka/desktop typecheck + test:checks (console/a11y/copy) — clean.
  • CDP text-evidence on the live model-processing fixture (light-990 / dark-990 / light-990-reduced-motion): both pickers render min-height: 24px, content height 36px — the swap is a visual no-op. Per the repo's "style/cascade invariant: computed-style or text-contract" guidance, the control-height-converge contract is the locking layer; CDP computed-style is the substitute evidence.
  • No screenshot: pixel-level appearance is unchanged (24px → token resolving to 24px); the contract + CDP computed-style are the locking layers.

Impact

None — visual no-op; no behavior, API, or migration change.

Reviewer notes

  • An earlier iteration added a separate 83-line per-selector contract (composer-row-picker-size-contract) duplicating helpers from sidebar-indicator-size-contract; a Codex review flagged that as over-engineered (the owner contract already existed) and proposed merging the two picker CSS rules. The merge broke two existing contracts (control-height-converge and project-context-badge) that assert .maka-composer-workspace-picker { as a standalone rule — the repo's established convention (per refactor(ui): converge remaining sidebar row indicator sizes #743) is per-selector contracts guarding drift, not merging rules. Reassessment from first principles: the real root cause was the branch-picker missing from the owner contract's list, so the clean minimal fix is the one-line swap + one-line list entry.

Ready for review

  • Verification is complete and the results above are current
  • Impact, compatibility, migration, documentation, and release-note needs are addressed (none)
  • User-visible UI/UX changes include visual evidence, or Verification explains why it is not applicable (visual no-op; substitute evidence above)

… control-height contract

The branch-picker carried a bare `min-height: 24px` while the adjacent
workspace-picker used `var(--h-control-sm)`. Both resolve to 24px (a visual
no-op — CDP-verified on the live model-processing fixture: both pickers
render min-height 24px, content height 36px), but the bare literal is exactly
the drift the `control-height-converge` contract exists to prevent. The
branch-picker was simply missing from its CONTROL_HEIGHT list (the
workspace-picker was already covered there).

Fix at the owner: swap the bare 24px for the token, and add
.maka-composer-branch-picker to the control-height-converge list so the
existing contract guards both pickers (no bare px, expected --h-control-sm
tier) instead of needing a parallel guard.

Found by the #546 Composer combined-state audit. Refs #546
@Astro-Han
Astro-Han force-pushed the refactor/composer-branch-picker-token branch from 59c4463 to f4de905 Compare July 12, 2026 13:03
@Astro-Han Astro-Han changed the title refactor(ui): converge composer branch-picker min-height onto var(--h-control-sm) fix(ui): tokenize composer branch-picker min-height + cover it in the control-height contract Jul 12, 2026
@Astro-Han
Astro-Han merged commit ede42f7 into main Jul 12, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the refactor/composer-branch-picker-token branch July 14, 2026 05:05
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