Repository navigation
fix(test): add @vitejs/plugin-react to vitest config - #1
Merged
Merged
Conversation
The vitest config had no plugins block, so .tsx files with JSX
syntax failed to parse (vite import-analysis transform). Adding
@vitejs/plugin-react gives Vitest the JSX/TSX transform it needs.
Before: 2 test files failed to load (ChatMessage.test.tsx,
useChat.test.tsx), 33 tests reported passed but 10 hidden behind
the unparseable transforms.
After: 6/6 test files pass, 43/43 tests pass.
Verified end-to-end inside cheshirecode/sandbox v1.1+:
$ npm install --save-dev @vitejs/plugin-react
$ npm run test:run
Test Files 6 passed (6)
Tests 43 passed (43)
cheshirecode
added a commit
to cheshirecode/sandbox
that referenced
this pull request
Jun 6, 2026
Real bug found by dogfood: pushed a fix to cheshirecode/frontend-ai-template from inside the sandbox; gh CLI was authenticated (hosts.yml written) but git itself had no credential helper, so `git push` failed with "could not read Username for 'https://github.com'". Manual workaround was `gh auth setup-git` once per container, which configures git's credential helper to invoke gh. Propagating into the entrypoint so future runs work without manual setup. The fix mirrors what `gh auth login --with-token` would have done if we hadn't bypassed it for the scope-check reasons. Evidence (D3 trailer): Before: `git push` from inside sandbox → "could not read Username" After: `gh auth setup-git` runs automatically in entrypoint; git push works end-to-end. PR opened from inside sandbox using this exact flow: cheshirecode/frontend-ai-template#1 This was the LAST gap in the BYO-keys-free developer-loop promise. Sandbox now supports: clone → install → test → commit → push → PR end-to-end without any manual setup beyond `bin/sandbox.sh up`.
The lockfile was generated on a platform without arm64 awareness;
@rolldown/binding-linux-arm64-{gnu,musl} were missing from the locked
dependency tree even though rolldown declared them in optionalDependencies.
Regenerated from package.json on linux-arm64 inside cheshirecode/sandbox.
Lockfile now contains all platform-specific bindings. Tests still 43/43
pass; install on linux-arm64 hosts no longer needs the
`npm install --no-save @rolldown/binding-linux-arm64-gnu` workaround.
cheshirecode
marked this pull request as ready for review
June 6, 2026 02:29
cheshirecode
force-pushed
the
fix/vitest-jsx-transform-and-arm64-bindings
branch
from
June 6, 2026 02:35
b7a9cb3 to
758d3a7
Compare
cheshirecode
added a commit
to cheshirecode/sandbox
that referenced
this pull request
Sep 16, 2026
Real bug found by dogfood: pushed a fix to cheshirecode/frontend-ai-template from inside the sandbox; gh CLI was authenticated (hosts.yml written) but git itself had no credential helper, so `git push` failed with "could not read Username for 'https://github.com'". Manual workaround was `gh auth setup-git` once per container, which configures git's credential helper to invoke gh. Propagating into the entrypoint so future runs work without manual setup. The fix mirrors what `gh auth login --with-token` would have done if we hadn't bypassed it for the scope-check reasons. Evidence (D3 trailer): Before: `git push` from inside sandbox → "could not read Username" After: `gh auth setup-git` runs automatically in entrypoint; git push works end-to-end. PR opened from inside sandbox using this exact flow: cheshirecode/frontend-ai-template#1 This was the LAST gap in the BYO-keys-free developer-loop promise. Sandbox now supports: clone → install → test → commit → push → PR end-to-end without any manual setup beyond `bin/sandbox.sh up`.
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 PR fixes
Two small fixes that unblock
npm run test:run:vitest.config.ts: added@vitejs/plugin-reactplugin. Without it, JSX in.tsxtest files failed to load (vite:import-analysiserror). Result: 2 of 6 test files no longer parseable.package-lock.jsonregenerated: the previous lockfile was generated on a platform without arm64 awareness;@rolldown/binding-linux-arm64-{gnu,musl}were missing from the locked tree even though rolldown declared them inoptionalDependencies. Regenerated on linux-arm64 inside an isolated sandbox.Verification
npm run test:run→ 6/6 test files pass, 43/43 tests pass (up from 4/6 files + 33 of the 43 tests passing, with 10 hidden behind unparseable JSX).cheshirecode/sandboxv1.1+ on linux-arm64.Out-of-scope pre-existing bugs discovered (for maintainer to file separately)
While verifying this PR against the repo's own CI, three pre-existing bugs surfaced on main, unrelated to this fix:
.github/workflows/ci.ymlmatrix includesnode-version: [18.x, 20.x]— Node 18.x cannot run vitest 4 / vite 8 / rolldown 1 (they use Node 22+styleTextAPI).[20.x, 22.x]recommended.isomorphic-dompurify's nestedjsdomis missingdefault-stylesheet.css— fails Next.js build on Node 22. Update dompurify or swap sanitizer.test:e2escript missing —e2e.ymlcallsnpm run test:e2ebutpackage.jsondoesn't define it.playwrightalso not in devDependencies.These are independent of this PR's scope (JSX transform + arm64 bindings). Recommend filing separately.