Skip to content

refactor(ui): migrate renderer atoms to Astryx - #1670

Merged
Astro-Han merged 8 commits into
refactor/1565-astryx-atomsfrom
refactor/1565-astryx-button
Jul 31, 2026
Merged

refactor(ui): migrate renderer atoms to Astryx#1670
Astro-Han merged 8 commits into
refactor/1565-astryx-atomsfrom
refactor/1565-astryx-button

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Activate the prepared Maka theme with the first Astryx atom consumers and retire the replaced atom paths in one atomic cut:

  • Move every direct Button consumer to the Astryx label/icon API; route 18 icon-only actions through the dedicated IconButton primitive instead of a boolean mode.
  • Replace Separator, Card, and Badge with Astryx Divider/Card/Badge, migrate all consumers, and delete the retired implementations and CSS ownership.
  • Mount makaTheme in the live app and Storybook only here, where consumers exist. The theme-induced Markdown typography change and atom changes are declared through the existing slice contract.
  • Keep buttonVariants only at Base UI render-prop seams whose owning later slices must remove it; no compatibility component, feature flag, or parallel Button authority is introduced.
  • Strengthen tests at public seams: native/tooltip-disabled semantics, IconButton accessible naming, the real composer send control, an AST-based dynamic-label guard, and a production ban on isIconOnly.

This is one forced API cut. Splitting it would leave old and new Button authorities alive together or make an intermediate branch fail to compile, so the indivisible mechanical migration is the smaller design in state and rollback surface.

Refs #1565

Verification

  • npm --workspace @maka/ui run test — 282 tests, 0 failures.
  • npm --workspace @maka/desktop run test — 2967 tests, 0 failures.
  • npm run typecheck / npm run lint / npm run format:check — clean.
  • npx knip --workspace apps/desktop / npx knip --workspace packages/ui — clean; only the two existing desktop configuration hints remain.
  • npm run check:visual-contract -- --against refactor/1565-astryx-atoms --scopes scripts/visual-contract-scopes/pr3-atoms.json — 20/20 comparisons clean; every change is attributed to a hook-owned migrated subtree.
  • npm run check:hit-test — all 5 routes clean.
  • node scripts/audit-alignment.mjs — all 12 fixtures clean.
  • Composer mode-indicator E2E — 1/1 passed.

Review focus

  • Theme activation and first consumers intentionally ship together; feat(ui): prepare the Astryx theme and atom foundation #1669 remains zero-diff.
  • Disabled controls with tooltips use aria-disabled; ordinary disabled controls retain native disabled.
  • buttonVariants is not a second component authority: it remains only as classes on native controls owned by later floating/dialog/toast slices.

@Astro-Han
Astro-Han force-pushed the refactor/1565-astryx-button branch from 4c945be to 0c47204 Compare July 30, 2026 18:46
@Astro-Han
Astro-Han force-pushed the refactor/1565-astryx-button branch from 0c47204 to 64e8a1c Compare July 30, 2026 18:57
@Astro-Han Astro-Han changed the title refactor(ui): move Button call sites onto the Astryx label API refactor(ui): migrate renderer atoms to Astryx Jul 30, 2026
Retires the legacy cva Button from packages/ui and migrates every direct
call site to the Astryx Button (label/isDisabled/isIconOnly/tooltip).
Base UI render-prop seams (Tooltip/Menu/Toast/Dialog triggers) stay on
the legacy buttonVariants classes until their owning slices retire them.

Refs #1565
Slice PR 3 of #1565: Divider is Astryx's taxonomy name for the primitive.
The Separator wrapper had zero product consumers, so the barrel entry moves
with it; the form-controls story and the curated-primitives contract now
exercise Divider (orientation, label).
Slice PR 3 of #1565: the thin data-slot Card retires; the barrel slot now
re-exports Astryx Card, which owns the card face (background, border,
radius, elevation). SettingsRows keeps only its row grid / container query
in rows.css (padding={0}, rows carry their own insets); the crash surface
expresses its destructive face through Card's own vocabulary
(variant="red", elevation="high") and error.css keeps only the icon/copy
grid. Visual diff is confined to the declared settings-rows subtree — all
five routes clean under the scoped contract.
Slice PR 3 of #1565: the cva pill recipe retires; the barrel slot re-exports
Astryx Badge (label prop). Call sites map destructive→error and
secondary→neutral (statusBadgeVariant now returns Astryx names); the
health-page wrapping override targets the stable .astryx-badge component
class (runtime-hook allowlisted); badgeVariants retires with the recipe (no
consumers). Converge/radius/chip contracts re-pin the Astryx authority.
@Astro-Han
Astro-Han force-pushed the refactor/1565-astryx-button branch from 64e8a1c to b1c3694 Compare July 30, 2026 19:03
@Astro-Han
Astro-Han merged commit f5c9c93 into main Jul 31, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the refactor/1565-astryx-button branch July 31, 2026 02:44
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