dogfooding fixes: astryx theme build --watch#3478
Open
josephfarina wants to merge 1 commit into
Open
Conversation
Add a --watch flag to theme build that rebuilds automatically whenever the theme source file changes, until interrupted with Ctrl-C. This removes the manual re-run step (and the stale-CSS confusion from forgetting it) from the theme-authoring loop. Each rebuild runs in a child process reusing the exact single-build code path, so a build error is contained and the watcher keeps running. Watch is a human-interactive mode and is not supported with --json. Closes #3375
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cixzhang
approved these changes
Jul 3, 2026
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
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 free
to 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.
What this adds
astryx theme build --watch— rebuild a theme automatically whenever its source file changes, until interrupted with Ctrl-C. Closes #3375 (item 1, the highest-impact request in that DX report).Why
Today every tweak to a
defineThemefile requires manually re-runningastryx theme build theme.ts --out theme.css. Forget it once and you're debugging stale CSS that has nothing to do with your change.--watchturns theme authoring into a real tight loop: edit → save → rebuilt.How it works
--watchis a human-interactive mode and is rejected with--json(which expects a single machine-readable envelope).Per-rebuild latency is ~235ms (Node startup + core import), which is imperceptible next to the browser refresh that follows a theme edit.
Verification
New
build-theme.watch.test.mjs(3 tests):--watchis advertised intheme build --help.--watchwith--jsonis rejected.Existing
build-themetests (prose, import-path, path-safety, variants) are unaffected — the single-build path is unchanged. ESLint clean.