[Website] Preserve selected Query API parameters when starting over after an error - #4123
Merged
Merged
Conversation
adamziel
marked this pull request as ready for review
July 20, 2026 18:31
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates “Start without a Blueprint” (error recovery) navigation so that it keeps the current pathname and a small set of “shell” Query API parameters, while ensuring setup/blueprint parameters are dropped to avoid re-triggering the failed setup.
Changes:
- Centralized the list of preserved “shell” query parameters and refactored URL param preservation into a helper.
- Added
PlaygroundRoute.newSitePreservingShell()and updated the error modal recovery action to use it. - Added unit test to verify only shell params (and pathname) are preserved during recovery navigation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/playground/website/src/lib/state/url/router.ts | Introduces shell param key list, newSitePreservingShell, and a helper to copy selected query params. |
| packages/playground/website/src/lib/state/url/router.spec.ts | Adds test coverage for the new recovery URL behavior. |
| packages/playground/website/src/components/site-error-modal/site-error-modal.tsx | Switches “Start without a Blueprint” to use the new route helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamziel
force-pushed
the
error-recovery-preserve-shell-parameters
branch
4 times, most recently
from
July 20, 2026 19:20
9ff4bc0 to
e4d16c0
Compare
…fter an error "Start without a Blueprint" resets the entire document and drops parameters owned by the surrounding integration along with the failed setup. Build a fresh Playground URL from the existing route, restore only the embedding mode, target URL, page title, MCP connection, and saving policy, then send it through the in-app router. The failed setup, storage selection, and site route remain discarded without reloading the application. Exercise the failed-Blueprint recovery in Playwright and keep a marker on the current document so the test fails if this turns back into a page navigation.
adamziel
force-pushed
the
error-recovery-preserve-shell-parameters
branch
from
July 20, 2026 19:34
e4d16c0 to
75d54e8
Compare
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.
Part of #4099.
Start without a Blueprint previously assigned a new
location.href. That reloaded the entire application and discarded the current pathname and parameters used by the surrounding integration along with the failed setup.The action now builds a fresh Playground URL through
PlaygroundRoute.newSite(), restoresmode,url,page-title,mcp,mcp-port, andcan-save, and passes it to the existing in-app router. All other query parameters, the Blueprint hash, storage selection, and site route remain discarded. Saved-site routing is unchanged.The affected action is the blue button in the lower-right corner:
Testing
Trigger an error from a non-root URL containing both retained and setup parameters. Choose Start without a Blueprint and confirm a fresh Playground starts in place, the pathname and retained parameters remain, and the failed setup does not run again.