Skip to content

feat(web): serve the console from / with hash routing - #4

Merged
oglassdev merged 2 commits into
feat/relative-repository-mappingsfrom
feat/hash-console-routing
Sep 21, 2026
Merged

oglassdev merged 2 commits into
feat/relative-repository-mappingsfrom
feat/hash-console-routing

Conversation

@oglassdev

@oglassdev oglassdev commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #3.

Summary

  • Replace BrowserRouter with HashRouter, so console routes are /#/... and share the origin with root repository mappings.
  • Serve the console HTML from / on the APP_URL origin; other origins redirect to the console. Assets stay isolated under /console/assets/.
  • Redirect old /console/... bookmarks (including query strings) and /invite/:secret links to the equivalent /#/... route, server-side.
  • Canonicalize / and /# to /#/ client-side with history.replaceState, which also covers /console/... paths served by the Vite dev server.
  • Update sign-out, invitation URLs, the interop browser script, and the README for hash routing.
  • Vite dev serves the console page at / 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" in apps/worker (console served at /, other-origin redirect, /console/* and /invite redirects, asset passthrough, invitation URL shape)
  • pnpm typecheck, vp fmt, vp lint
  • Vite dev server: / returns the console HTML, /console/test falls back to it, other paths proxy to the Worker
  • just interop (needs Chromium) for the browser flow

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

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>
@oglassdev
oglassdev added this pull request to stack #5 September 21, 2026 04:42
@oglassdev
oglassdev merged commit 717d225 into main Sep 21, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant