Repository navigation
feat(web): serve the console from / with hash routing - #4
Merged
oglassdev merged 2 commits intoSep 21, 2026
Merged
Conversation
Switch the console to HashRouter so console pages live at /#/... and share the origin with root repository mappings. The Worker serves the console HTML from /, keeps hashed assets under /console/assets/, and redirects old /console/... bookmarks and /invite links to their hash routes. The client canonicalizes / and /# to /#/ with replaceState, and sign-out, invitation URLs, and the interop script use the new routes. Vite serves the console page at / in development while forwarding other paths to the Worker. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Stacked on #3.
Summary
BrowserRouterwithHashRouter, so console routes are/#/...and share the origin with root repository mappings./on theAPP_URLorigin; other origins redirect to the console. Assets stay isolated under/console/assets/./console/...bookmarks (including query strings) and/invite/:secretlinks to the equivalent/#/...route, server-side./and/#to/#/client-side withhistory.replaceState, which also covers/console/...paths served by the Vite dev server./through a proxy bypass and keeps forwarding other paths to the Worker with the original host.Test plan
pnpm vitest run -t "repository URL mappings|restricts invitations"inapps/worker(console served at/, other-origin redirect,/console/*and/inviteredirects, asset passthrough, invitation URL shape)pnpm typecheck,vp fmt,vp lint/returns the console HTML,/console/testfalls back to it, other paths proxy to the Workerjust interop(needs Chromium) for the browser flow🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.