Mark current nav from the live request URL - #26
Merged
Merged
Conversation
rwsdk does not expose requestInfo.path on the ALS proxy, so home, developers, and privacy never received current-page chrome after #21. Read the request URL instead, ignore trailing slashes, and mark the privacy footer as the current page rather than a self-link. Co-authored-by: Myles Cook <MylesMCook@users.noreply.github.com>
Keep the request-path assertions on the repo formatter's wrapping. Co-authored-by: Myles Cook <MylesMCook@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes have no unresolved blocking issues.
Pull request overview
This PR fixes SSR current-page navigation by deriving the route from the live request URL and normalizing trailing slashes.
Changes:
- Added pathname extraction and normalization with unit tests.
- Updated navigation and privacy footer current-page behavior.
File summaries
| File | Description |
|---|---|
src/lib/request-path.ts |
Normalizes request URL pathnames. |
src/lib/request-path.test.ts |
Tests URL and trailing-slash handling. |
src/document.tsx |
Applies current navigation and footer semantics. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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 changed?
PR #21 shipped the five visual-audit moves on
main. Live/already has grouped chips (Date math / Named dates / Schedules), a wrapping phrase field with Clear on that row, closed calculation steps, Refresh next to the date meta, quiet headings, and the API sentence folded into Developer tools.Current-page chrome never applied: rwsdk’s
requestInfoproxy does not exposepath, sorequestInfo.path === "/developers"was always false on live. This reads the request URL instead, treats trailing slashes as the same route, marks Build with Tempus current on/developers, marks the wordmark current on/, and turns the privacy footer into a current-page label instead of a self-link.No parser language changes. DatePicker / steps / chips were left as #21 shipped them.
Home empty with grouped chips
Home filled with steps closed
Home at 320 with wrapped phrase and pinned Clear
Developers with quiet heading and current nav
How did you check it?
/developersand/privacyhad noaria-current; privacy footer still linked to itselfaria-current="page"; developers link current +font-medium; privacy footer is a current-page spanpathnameFromUrlunit tests (absolute URLs, trailing slashes, path-only fallback)pnpm check— 0 errors (existing SDK import-closure warning)node examples/app/verify-calculator.mjs—{ status: "passed", runs: 6 }at 320 and 1280 (America/Chicago,2026-01-31 plus 1 month minus 1 day→ Friday, February 27, 2026)Anything that could break?
Nav current-state depends on the incoming request URL. Trailing slashes are normalized, so
/developers/matches/developers.To show artifacts inline, enable in settings.