Skip to content

fix: correct theme wiring, accessibility and tooling gaps - #4

Merged
DutchyD merged 15 commits into
mainfrom
development
Aug 10, 2026
Merged

fix: correct theme wiring, accessibility and tooling gaps#4
DutchyD merged 15 commits into
mainfrom
development

Conversation

@DutchyD

Copy link
Copy Markdown
Contributor

Follows up on #2. Reviews the pastel theme against the Astryx docs shipped in @astryxdesign/cli, fixes what that turned up, and adds the tooling to stop it recurring.

Blocking fixes

  • dev and build were broken — both called an undefined build:projects script and failed with ERR_PNPM_NO_SCRIPT.
  • The theme was never applied. The generated CSS is @scoped to [data-astryx-theme], which only the Theme provider sets, so components rendered with Astryx's default palette. The root document now wraps children in <Theme> from the /built subpath, sets the scope attribute server-side to avoid a flash before hydration, and paints the body with themed utilities.
  • The lockfile was out of sync with the catalog (^0.3.0 declared, 0.2.0 resolved), so pnpm install --frozen-lockfile failed.

Accessibility

Two token pairs failed WCAG AA:

PairBeforeAfter
--color-on-accent on light accent2.61:15.54:1
--color-on-warning on light warning2.91:15.91:1

The warning case was a slip — on-success and on-error were [light, dark] tuples but on-warning was a scalar, so light mode got dark text on a dark brown.

--color-shadow also lost its alpha (the scale emits it at 10%/30%); anything resolving it through the Tailwind bridge painted a solid slab.

Cleanup

  • Dropped unused @astryxdesign/theme-neutral and @heroicons/react.
  • Consolidated build-script config onto allowBuilds — it was split across that and the legacy onlyBuiltDependencies, and the comment claimed astryx init had run when it had not. It has now.
  • Restored min-height on html/body; the Astryx reset covers box-sizing and body margin but not height.

Tooling

  • Repo-wide Biome formatting. The scaffolded files were never formatted, so pnpm check had failed since the first commit. Also removes three unused scaffold imports and migrates the config to the installed 2.4.5 schema.
  • Husky: pre-commit runs Biome through lint-staged and restages fixes; commit-msg runs commitlint against the conventional preset.
  • typecheck script and a CI workflow running check, typecheck and build. typecheck builds the theme first, since tsc cannot resolve the /built subpath from a fresh checkout.

Verification

pnpm check, pnpm typecheck and pnpm build all pass. Both hooks were tested against deliberately bad input — a malformed file was reformatted before it entered history, and a non-conventional message was rejected. typecheck was confirmed to fail on an injected type error rather than being a no-op.

DutchyDand others added 15 commits August 10, 2026 00:47
feat: add initial set of required dependencies and a pastel theme
The script was never defined, so both `pnpm dev` and `pnpm build` failed
with ERR_PNPM_NO_SCRIPT.
The catalog declared ^0.3.0 while the lockfile still resolved 0.2.0,
which fails `pnpm install --frozen-lockfile`.
White on the light-mode accent measured 2.61:1 and dark slate on the
light-mode warning 2.91:1, both below the 4.5:1 threshold. Dark slate on
accent now measures 5.54:1 and white on warning 5.91:1.
Also applies the repo biome formatting, which the file was missing.
The theme CSS is @scope'd to [data-astryx-theme], so without a provider
none of its tokens applied. Wraps the document in Theme from the /built
subpath, sets the scope attribute server-side to avoid a flash before
hydration, and paints the body with the themed background and text.
The generated scale emits this token at 10% / 30% alpha; the override was
fully opaque, so anything resolving it through the Tailwind bridge painted
a solid slab instead of a shadow.
Neither is imported. theme-neutral is an optional peer of the astryx CLI,
so removing it produces no peer warning.
esbuild and lightningcss were split across allowBuilds and the legacy
onlyBuiltDependencies field, and the accompanying comment claimed astryx
init had run when it has not.
The scaffold set min-height on the document; the astryx reset covers
box-sizing and body margin but not height.
Output of `astryx init --features agents`, so agents discover the
component index, CLI commands and usage rules instead of guessing.
The scaffolded files were never formatted, so `pnpm check` failed from the
first commit. Also removes three unused scaffold imports and migrates the
biome config to the installed 2.4.5 schema.
pre-commit runs biome through lint-staged and restages the fixes;
commit-msg runs commitlint against the conventional preset.
typecheck builds the theme first, as tsc cannot resolve the /built
subpath from a fresh checkout. Pins the package manager so the workflow
resolves the same pnpm version as local.
fix: correct theme wiring, accessibility and tooling gaps
@DutchyD
DutchyD merged commit e5f43ea into mainAug 10, 2026
1 check passed
Sign up for freeto 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

@DutchyD