Skip to content

Consolidate the UI onto one set of primitives - #506

Merged
mtaanquist merged 2 commits into
developfrom
feat/primitives-consolidation
Jul 29, 2026
Merged

Consolidate the UI onto one set of primitives#506
mtaanquist merged 2 commits into
developfrom
feat/primitives-consolidation

Conversation

@mtaanquist

Copy link
Copy Markdown
Owner

Ports the accepted primitives sheet from the design pass (decisions note reviewed in session; sheet lives in the Codex design project). Authored by an Opus 5 agent against the reviewed spec; committed unsigned from the orchestrating session because the 1Password signing agent is unreachable from agent environments.

What changed

  • New src/lib/styles/primitives.css, imported last: the modal, the empty state, the removable chip, and the shared focus ring.
  • tokens.css: seven-step type ramp, --danger-contrast, per-theme --select-caret.
  • pages.css: the complete .btn state matrix (disabled buttons no longer light on hover) plus .btn-accept; form kit reads the ramp; token-driven select caret.
  • theme.css: .icon-btn.sm/.danger and states; .seg-btn focus/disabled; .seg-count.
  • All twelve migration-table rows applied: review buttons to the .btn/.icon-btn families (accept is .btn-accept), rtabs/rv-filters/rv-mtabs/revision-filter-chip to .seg, the three modals onto the one modal primitive (behavior preserved), twelve empty-state spellings to .empty-state, labels to .pill, tokens to .chip/.chip-x.
  • ~1,470 lines of superseded and dead CSS deleted, each grep-verified unreferenced first.
  • Components sheet and design kit updated (new modal.html card); forced-state hooks (.is-hover/.is-active/.is-focus) documented as sheet-only, with the pre-existing .md-tool.is-active usage grandfathered.

Intentional visible differences

Disabled buttons no longer react to hover; icon-only buttons settle on 32px chrome / 28px card sizes (up from 22-24px one-offs); segment counts move to 11px; disabled opacity is 0.45 everywhere; the select caret follows each theme; review quick-action tints kept, scoped under .rv-quick.

Verification

  • npm run lint and npm run check: fully clean (0 errors, 0 warnings).
  • Unit + integration: 1077 passed, 1 skipped, against local Postgres.
  • E2E: 48 passed; 3 failures are the known local MinIO baseline (export/import steps). Four selector updates the migration required are included.
  • Kit cards render-verified in all three themes (buttons, seg, empty states, forms, modal).
  • Not verified locally: the .rel-row .icon-btn assertion at core-flow.spec.ts:612 sits past the MinIO-dependent step; CI exercises it first.

🤖 Generated with Claude Code

mtaanquist and others added 2 commits July 29, 2026 18:29
Adds primitives.css, loaded last, owning the modal, the empty state, the
chip remove affordance, and the shared focus ring. Completes .btn (states
plus btn-accept), gives .icon-btn a 28px .sm and a .danger tint, gives
.seg a .seg-count, and adds the type ramp, --danger-contrast, and a
per-theme --select-caret.

Migrates the scoped duplicates onto them: the rv-btn family, rv-quick-btn,
rb-btn, mini-btn, tool-btn, send-btn and pop-open become .btn/.icon-btn;
rtabs, rv-filters, rv-mtabs and revision-filter-chip become .seg; the three
hand-rolled modals share one panel; twelve empty-state spellings become
.empty-state. Deletes the superseded CSS and the drift sheet's dead blocks.

Behaviour is unchanged; e2e selectors follow the renames.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The modal primitive centres its panel, which made the palette's input
drift as results changed height while typing. A .top modifier on the
backdrop restores the 14vh anchor for overlays with changing content;
the review modal and help stay centred, their content height is fixed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mtaanquist
mtaanquist marked this pull request as ready for review July 29, 2026 18:40
@mtaanquist
mtaanquist merged commit 9e771cd into develop Jul 29, 2026
3 checks passed
@mtaanquist
mtaanquist deleted the feat/primitives-consolidation branch July 29, 2026 18:41
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