Skip to content

Mark current nav from the live request URL - #26

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/complete-visual-audit-b166
Sep 15, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/complete-visual-audit-b166

Conversation

@MylesMCook

@MylesMCook MylesMCook commented Sep 15, 2026

Copy link
Copy Markdown
Owner

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 requestInfo proxy does not expose path, so requestInfo.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?

  • Live HTML on https://tempus.funnydomainname.com/: grouped fieldsets and quiet headings present; /developers and /privacy had no aria-current; privacy footer still linked to itself
  • Local SSR after the fix: home wordmark aria-current="page"; developers link current + font-medium; privacy footer is a current-page span
  • pathnameFromUrl unit 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)
  • Playwright screenshots plus assertions: steps closed after parse, Clear pinned to the input at 320, no horizontal overflow, developers current nav, privacy footer has no self-link

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.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 15, 2026 14:53
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>
@MylesMCook
MylesMCook marked this pull request as ready for review September 15, 2026 14:56
Copilot AI lite review requested due to automatic review settings September 15, 2026 14:56
@cursor
cursor Bot merged commit 73a4625 into main Sep 15, 2026
1 check passed
@cursor
cursor Bot deleted the cursor/complete-visual-audit-b166 branch September 15, 2026 14:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

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.

3 participants