Centralize route event reading - #730
Closed
shawshank-redemp wants to merge 1 commit into
Closed
Conversation
shawshank-redemp
force-pushed
the
main
branch
from
September 2, 2026 10:22
84ed42e to
82f989b
Compare
Signed-off-by: shawshank-redemp <212104328+shawshank-redemp@users.noreply.github.com>
shawshank-redemp
force-pushed
the
main
branch
from
September 2, 2026 10:32
82f989b to
7db6079
Compare
Contributor
|
Closing in favour of #734, which landed the same change (a single The two of you arrived at the same design independently, which is a good sign the design was right. #734 went first because it also carries the hash-router case — the document pathname is Thank you for the PR; sorry it ended up on the losing side of a race. |
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.
What & why
Route reading was duplicated across multiple server code paths by directly reading
data['pathname']. This is incorrect for hash-based routing, where the document pathname can remain/while the application's route is contained in the hash.This change adds a shared
routeOfEventhelper that derives the application route while preserving the document path, hash, search, and full navigable path. The affected call sites now use the shared helper instead of reading route fields directly.Closes #727
How it was verified
Gates run
pnpm --filter @reticlehq/server typecheck