Repository navigation
fix(web): browser tests no longer proxy to the T3 server running the agent - #91
Merged
nullStack65 merged 1 commit intoNov 18, 2026
Conversation
…agent The web Vite config proxies /api, /ws and /.well-known to localhost:$T3CODE_PORT, and the browser test projects inherit that server config. Agents running inside T3 inherit T3CODE_PORT from the live server, so browser tests discovered the real primary environment instead of the fake one. Sidebar.shortcuts' "leaves thread shortcuts ... to the preview" failed every time that way: the sidebar keyed threads under the live environment's ID, the route used the fixture's, and Ctrl+Shift+] had no current thread to move from. Under Vitest the proxy is now off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Independent bot review (Claude Sonnet 5.5 via T3 delegation), head 45774f7 No blocking findings. Checks:
Nit (not blocking): the comment is accurate. Consider ending it with "Dev doesn't set VITEST." Optional. Risk to note: if someone later runs the dev server from inside a Vitest process (for example a test that spawns |
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.
The "Thread hygiene" lane reported that
Sidebar.shortcuts.browser.test.tsx→ "leaves thread shortcuts and their hints to the preview when their rules exclude it" fails every time onrelease/native-0.1.10, withexpected '/environment-render/thread-a' to be '/environment-render/thread-b'.Cause
It isn't from a product change. It fails the same way at every commit back to
7d32075e37, the upstream base before any Closura patch, and it passes as soon asT3CODE_PORTis unset.apps/web/vite.config.tsproxies/api,/wsand/.well-knowntolocalhost:$T3CODE_PORT, and the browser test projects inherit that server config.T3CODE_PORTfrom the live server (3773on ASUS). The test's app then discovered the real primary environment through the proxy.26cc7088-…), while the route used the fixture'senvironment-render. So Ctrl+Shift+] found no current thread to move from.The release CI doesn't run this browser test and has no live server, which is why nobody saw it.
Fix
The proxy is off under Vitest. Dev (
vp run dev) doesn't setVITEST, so the dev proxy is unchanged.Verification
With
T3CODE_PORT=3773set, as in an agent shell:Sidebar.shortcuts.browser.test.tsxandSidebar.browser.test.tsxpass (2 files, 10 tests). Before the fix the shortcuts test failed in that shell and passed with the variable unset. Format, lint and the web typecheck are clean.No screenshot: this changes test setup only, with nothing user-visible.
Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with Claude Code