Title: Pages router: API for shallow routing · Issue #833 · voidzero-dev/void · GitHub
Open Graph Title: Pages router: API for shallow routing · Issue #833 · voidzero-dev/void
X Title: Pages router: API for shallow routing · Issue #833 · voidzero-dev/void
Description: Void version: 1.9.1, affecting every adapter Use case The simplest that I hit: A page has multiple side panels with info. Which panel is open depends on the query string (/page?panel=X), so the view can be shared and other pages can link...
Open Graph Description: Void version: 1.9.1, affecting every adapter Use case The simplest that I hit: A page has multiple side panels with info. Which panel is open depends on the query string (/page?panel=X), so the vie...
X Description: Void version: 1.9.1, affecting every adapter Use case The simplest that I hit: A page has multiple side panels with info. Which panel is open depends on the query string (/page?panel=X), so the vie...
Opengraph URL: https://github.com/voidzero-dev/void/issues/833
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Pages router: API for shallow routing","articleBody":"**Void version:** 1.9.1, affecting every adapter\n\n## Use case\n\nThe simplest that I hit: A page has multiple side panels with info. Which panel is open depends on the query string (`/page?panel=X`), so the view can be shared and other pages can link to it.\nThe server ignores the param: it's left out of `revalidateQueryAllowlist`, so every variant shares one ISR entry, and the panel opens on the client.\n\nWhen the user opens, switches or closes a panel, `?panel=` should change in place: no new history entry, no request, no re-render.\n\n## Current status with today's API\n\nThe only Void way to change the query is\n\n```ts\nrouter.visit(url, { replace: true, preserveState: true, preserveScroll: true });\n```\n\nwhich is a full GET navigation. For state the server doesn't render, that means:\n\n- **The page data is fetched again on every change**, in our case that's about 122 KB except the exact entry was cached already.\n- **Deferred props go back to loading**, which would include our panel.\n\nSo instead of using it we fall back to the raw `history.replaceState`. That works, but the router no longer matches the address bar: `useRouter().url` / `.query` keep reporting the old query until the next navigation.\n\n## API Proposal\n\nSomething like\n\n```ts\nrouter.replaceUrl(url); // or router.visit(url, { replace: true, shallow: true })\n```\n\nThis would:\n\n- write history (replace, or push as an option),\n- update the router's route state\n- keep scroll-restoration bookkeeping in step,\n- does **not** fetch, re-render, or touch deferred props.\n\nThis is similar to what other meta frameworks do, e.g. SvelteKit's `replaceState` or Next.js's shallow routing.","author":{"url":"https://github.com/TheAlexLichter","@type":"Person","name":"TheAlexLichter"},"datePublished":"2026-11-14T23:08:10Z","url":"https://github.com/voidzero-dev/void/issues/833"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7e04ca42-111d-7c94-649d-a0deb22b7c8b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E396:35E137:1FB508:2B3D82:6AFB8BB0 |
| html-safe-nonce | 7b5ab8456c4a1b1d34078cd9540b3693ac4b007be38d762b62b609254fa66e57 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzk2OjM1RTEzNzoxRkI1MDg6MkIzRDgyOjZBRkI4QkIwIiwidmlzaXRvcl9pZCI6IjQ4NjA0OTM5NDcwOTk5MDMyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | be5a091353c8803e9e82dd945671e3c57f00f577d3482f8a58e734073eb7b461 |
| hovercard-subject-tag | issue:6397200453 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/voidzero-dev/void/833/issue_layout |
| twitter:image | https://opengraph.githubassets.com/edbf0c155ec32d7a23075f8dc9f233628ab49636f41372f02e2f2a5eba2fe60e/voidzero-dev/void/issues/833 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/edbf0c155ec32d7a23075f8dc9f233628ab49636f41372f02e2f2a5eba2fe60e/voidzero-dev/void/issues/833 |
| og:image:alt | Void version: 1.9.1, affecting every adapter Use case The simplest that I hit: A page has multiple side panels with info. Which panel is open depends on the query string (/page?panel=X), so the vie... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TheAlexLichter |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9694464143465782ecae2a97650b2a2b0708d5c31c74f41ee86da57e315e2735 |
| turbo-cache-control | no-preview |
| go-import | github.com/voidzero-dev/void git https://github.com/voidzero-dev/void.git |
| octolytics-dimension-user_id | 149750581 |
| octolytics-dimension-user_login | voidzero-dev |
| octolytics-dimension-repository_id | 1164437080 |
| octolytics-dimension-repository_nwo | voidzero-dev/void |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1164437080 |
| octolytics-dimension-repository_network_root_nwo | voidzero-dev/void |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 05d967182208691fc7f2e6af52e82fa7fabf6bd5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width