Repository navigation
Conversation
The price stream opens /ws/v1 on the page origin, but the dev server only proxied /api and /actuator, so the upgrade never reached backend.
3 tasks done
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 and why
marketData.tsopens the price stream at/ws/v1/market-data/priceson the API origin, which is the page origin whenVITE_API_BASE_URLis empty (the default in Docker development). The Vite dev server only proxied/api/v1/backtests,/apiand/actuator, so the WebSocket upgrade was never forwarded and the live price stream never connected locally.This adds a
/wsproxy rule withws: trueto the sameVITE_REAL_API_TARGET(backend-api, which registers/ws/v1/market-data/prices). A small node-environment test pins the rule.The unused
VITE_WS_BASE_URLin rootcompose.front.ymlis removed in the companion root PR (same branch name).Verified
VITE_REAL_API_TARGETpointing at it:develop: HTTP ticket proxied, WebSocketTIMEOUT, upstream never saw an upgradeOPEN and received {"stub":"price"}, upstream sawUPGRADE /ws/v1/market-data/prices?ticket=t-1src/viteDevProxy.test.tsfails ondevelopand passes herenode --test scripts/test-github-action-pins.mjs scripts/test-real-api-integration-workflow.mjs: passedpnpm typecheck: cleanpnpm exec vitest run(Node 24): 690 passed (one earlier run hit the known create-dialog focus flake fixed by fix(competition): keep dialog focus on re-render #185; two reruns were green)pnpm build && node scripts/assert-production-bundle.mjs: passedCI=1 pnpm e2e: 26 passedChecklist
VITE_REAL_API_TARGETis set, as beforeRelated: Idea2Strategy/Idea2Strategy#531