Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ent only Dev-panel replies were sent via server.ws.send(), which Vite broadcasts to every connected client. Route each response through the WebSocketClient passed to the event handler so info-data, template:sync:*, action-required, and config:update reach only the tab that initiated the request. Add regression tests covering targeted info-data and template:sync responses.
…gation Template data was loaded only when the first request matched the exact main page URL. Opening a deep-linked sub-path (e.g. an SPA route) left template variables unloaded, breaking page injection. Load template data also on the first HTML-document navigation under the app base (detected via Sec-Fetch-Dest / Accept), so asset and XHR requests are unaffected; the load is cached and stays a no-op afterwards. The base is passed as a dedicated appBase option used only for navigation scoping, leaving the auth-failure redirect URL unchanged to avoid a redirect loop on v7. Add integration tests for sub-path, asset, and out-of-base requests.
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
Fixes two dev-server bugs (PP-3449):
Key changes
server.ws.send(), which Vite broadcasts to every connected client. Each response is now routed through theWebSocketClientpassed to the event handler, soinfo-data,template:sync:*,action-required, andconfig:updatereach only the tab that initiated the request./pl/<name>). Opening a deep-linked sub-path (e.g. an SPA route) left variables unloaded. Data now also loads on the first HTML-document navigation under the app base (detected viaSec-Fetch-Dest/Accept), so asset/XHR requests are unaffected; the load is cached and stays a no-op afterwards. The base is passed as a dedicatedappBaseoption used only for navigation scoping, leaving the auth-failure redirect URL unchanged to avoid a redirect loop on v7.Testing
npm run test:unit— 162 passednpm run test:integration— 35 passed (includes new sub-path navigation tests)tsc --noEmit— cleantests/unit/lib/client.service.spec.ts) and sub-path/asset/out-of-base loading (tests/integration/middleware/load-pp-data.spec.ts).Included commits
fix(middleware): load template variables on deep-linked sub-path navigationfix(client): send dev-panel WebSocket responses to the requesting client onlyMerge Request:
origin/pp-3449→origin/develop