Repository navigation
Fix page refresh 404s with wildcard frontend fallback - #381
Merged
Merged
Conversation
asselstine
force-pushed
the
fix/spa-refresh-fallback
branch
from
November 11, 2026 17:25
dfb2dc9 to
9594a35
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.
Refreshing frontend routes such as
/projects/:id/runsand/projects/:id/settingsreturns 404 because the Worker maintains a stale page allowlist. Serve the frontend entry for GET/HEAD requests outside reserved backend and asset namespaces, letting the frontend router handle page matching and its not-found screen.Preserve API, health, OAuth, callback, webhook, internal, MCP and asset routing, with explicit exceptions for browser auth screens. Update unit/runtime regressions and public deployment verification to require wildcard fallback for new and nested page paths.
Validation: ran root
npm testwith Node 24.12.0 and npm 11.19.0 against isolated local PostgreSQL. All backend checks, compiled app/API integration, and six functional browser checks passed. Frontend unit checks had 77 passes, one skip, and one unrelated failure:all-runs status header supports multi-select filtering, independent sorting and clearing(packages/app/test/runs.browser.test.mjs:91). It also fails when rerun alone; that test serves the frontend through its own server and mocks API requests without using the changed Worker routing.git diff --checkpassed.