Skip to content

Use the Navigation API in the client router#72

Merged
kentcdodds merged 4 commits intomainfrom
cursor/navigation-api-router-dc10
Apr 22, 2026
Merged

Use the Navigation API in the client router#72
kentcdodds merged 4 commits intomainfrom
cursor/navigation-api-router-dc10

Conversation

@kentcdodds
Copy link
Copy Markdown
Member

@kentcdodds kentcdodds commented Apr 22, 2026

Summary

  • switch the client router to prefer the web standard Navigation API for same-document routing
  • keep form submissions on the explicit submit-handler path so skipped forms and browsers without precommitHandler support still submit correctly
  • preserve reload behavior by skipping Navigation API interception for browser reloads and add focused router tests for the review-reported edge cases

Testing

  • bunx vitest run client/client-router.test.ts client/app-session-refresh.test.ts
  • bun run typecheck
  • bunx oxlint client/client-router.tsx client/client-router.test.ts
  • PLAYWRIGHT_PORT=8802 bun run test:e2e e2e/home.spec.ts e2e/account.spec.ts

Walkthrough

navigation-api-router-demo.mp4
Navigation API login link marker persistence
Navigation API logout marker persistence

Open in Web Open in Cursor 

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kentcdodds kentcdodds marked this pull request as ready for review April 22, 2026 00:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 22, 2026

🔎 Preview deployed: https://epicflare-pr-72.kentcdodds.workers.dev

Worker: epicflare-pr-72
D1: epicflare-pr-72-db
KV: epicflare-pr-72-oauth-kv

Mocks:

Comment thread client/client-router.tsx
Comment thread client/client-router.tsx Outdated
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@cursor cursor Bot temporarily deployed to preview-72 April 22, 2026 01:03 Inactive
Comment thread client/client-router.tsx
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@cursor cursor Bot temporarily deployed to preview-72 April 22, 2026 01:14 Inactive
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b288cd1. Configure here.

Comment thread client/client-router.tsx
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kentcdodds kentcdodds merged commit 08763b6 into main Apr 22, 2026
8 checks passed
@kentcdodds kentcdodds deleted the cursor/navigation-api-router-dc10 branch April 22, 2026 01:41
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.

2 participants