Uh oh!
There was an error while loading. Please reload this page.
fix: correct theme wiring, accessibility and tooling gaps - #4
Merged
Conversation
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
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
devandbuildwere broken — both called an undefinedbuild:projectsscript and failed withERR_PNPM_NO_SCRIPT.@scoped to[data-astryx-theme], which only theThemeprovider sets, so components rendered with Astryx's default palette. The root document now wraps children in<Theme>from the/builtsubpath, sets the scope attribute server-side to avoid a flash before hydration, and paints the body with themed utilities.^0.3.0declared,0.2.0resolved), sopnpm install --frozen-lockfilefailed.Accessibility
Two token pairs failed WCAG AA:
--color-on-accenton light accent--color-on-warningon light warningThe warning case was a slip —
on-successandon-errorwere[light, dark]tuples buton-warningwas a scalar, so light mode got dark text on a dark brown.--color-shadowalso lost its alpha (the scale emits it at 10%/30%); anything resolving it through the Tailwind bridge painted a solid slab.Cleanup
@astryxdesign/theme-neutraland@heroicons/react.allowBuilds— it was split across that and the legacyonlyBuiltDependencies, and the comment claimedastryx inithad run when it had not. It has now.min-heighton html/body; the Astryx reset covers box-sizing and body margin but not height.Tooling
pnpm checkhad failed since the first commit. Also removes three unused scaffold imports and migrates the config to the installed 2.4.5 schema.pre-commitruns Biome through lint-staged and restages fixes;commit-msgruns commitlint against the conventional preset.typecheckscript and a CI workflow runningcheck,typecheckandbuild.typecheckbuilds the theme first, sincetsccannot resolve the/builtsubpath from a fresh checkout.Verification
pnpm check,pnpm typecheckandpnpm buildall 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.typecheckwas confirmed to fail on an injected type error rather than being a no-op.