Skip to content

Commit 6e4bcc5

Browse files
committed
FIX: preserve query params in URL path and decode query parameter
1 parent b1cdcda commit 6e4bcc5

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
### Fixed
1616

1717
- Connection errors no longer show "(undefined)"; they now display the actual network error and hint at common causes (server down, wrong endpoint URL, CORS)
18+
- Reflecting the loaded backend in the URL path no longer drops query parameters (e.g. `?query=...`)
19+
- The `query` URL parameter is now URI-decoded before opening it in a tab
1820

1921
## [0.5.0] - 2026-06-32
2022

frontend/src/backend/backends.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export async function configureBackends(editor: Editor) {
116116
}
117117
// NOTE: reflect the loaded backend in the URL path when none was specified.
118118
if (path_slug === undefined && activeEndpointSlug) {
119-
history.replaceState(null, '', `${BASE_PATH}${activeEndpointSlug}`);
119+
history.replaceState(null, '', `${BASE_PATH}${activeEndpointSlug}${window.location.search}`);
120120
}
121121
// NOTE: remember the loaded backend so a new tab without a path reuses it.
122122
if (activeEndpointSlug) {

frontend/src/request_params.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export async function handleRequestParameter(editor: Editor) {
2424
} else {
2525
const query = params.get('query');
2626
if (query) {
27-
await openOrCreateTab(editor, undefined, query);
27+
await openOrCreateTab(editor, undefined, decodeURIComponent(query));
2828
}
2929
}
3030
const exec = params.get('exec');

0 commit comments

Comments
 (0)