Repository navigation
fix(cli): keep headless configuration independent of JSX - #483
Merged
Merged
Conversation
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.
Summary
Root cause
The CLI entry point eagerly loads configuration. Its schema and migration modules imported
packages/tui/src/config/index.tsxandconfig/v1/index.tsx, which mixed schemas with Solid JSX providers. The new tests start the source CLI with an absolute entry point and a temporary working directory. That child does not loadpackages/cli/bunfig.toml's@opentui/solid/preload; Bun falls back to its React JSX runtime and fails before the command runs. The release unit job leavesNODE_ENVunset, not production. Adding React would mask the wrong runtime rather than fix this dependency boundary.Locally,
/home/shuv/node_modules/reactalso masked the undeclared dependency even in a freshly installed worktree. Clean validation below hides that ancestor directory in a mount namespace without modifying the host installation.Fixes the eight failures in release 2.2.6-shuv.3.
Verification
Fresh disk-backed clone, no existing
node_modulesor build output;bun install --frozen-lockfilewith Bun 1.4.4 (38afee6c8) and Node 24.22.2. Used an isolated HOME,CI=true,GITHUB_ACTIONS=falsefor tests, noNODE_ENV, and masked ambient~/node_modulesusingbwrap --bind / / --dev-bind /dev /dev --tmpfs /home/shuv/node_modules.e3a9fcb376: both regression files reproduce 3 pass / 8 fail, with the exact missingreact/jsx-dev-runtimeerror.bun turbo test --filter=shuvcode --concurrency=3 --force): 464 pass / 7 existing skips / 0 fail, 471 tests across 68 files, 316.55 seconds. No cache hits.bun run check: passed, lint plus all 39 typecheck tasks, no cache hits.bun run typecheck:tscin bothpackages/cliandpackages/tui: passed.NODE_ENV=production: 11 pass / 0 fail (10.22 seconds).Feature flag: none; this repairs source CLI startup without introducing new behavior.
Visual
Headless commands load schemas directly; JSX providers remain on the TUI path.