Skip to content

feat: add hardReload and hardNavigate for bypassing router interception#126

Merged
uhyo merged 1 commit intomasterfrom
feat/bypass-interception
Feb 25, 2026
Merged

feat: add hardReload and hardNavigate for bypassing router interception#126
uhyo merged 1 commit intomasterfrom
feat/bypass-interception

Conversation

@uhyo
Copy link
Copy Markdown
Owner

@uhyo uhyo commented Feb 25, 2026

Summary

  • Add hardReload() and hardNavigate(url) utility functions that bypass the router's navigation interception and blockers entirely
  • Uses a private Symbol marker in navigation.navigate()/navigation.reload() info to signal the navigate handler to skip interception
  • The onNavigate callback is still called with intercepting: false so users can observe the navigation event
  • Add API documentation for both functions

Test plan

  • hardNavigate calls navigation.navigate with bypass marker
  • Bypass marker skips interception (event.intercept not called) while onNavigate is still called
  • Bypass marker skips blockers
  • hardReload calls navigation.reload with bypass marker
  • Normal navigations without bypass marker are still intercepted
  • pnpm build — clean
  • pnpm typecheck — no errors
  • pnpm test:run — 260 tests pass

🤖 Generated with Claude Code

The Navigation API intercepts all navigations including location.reload()
and location.href assignments. These new functions allow users to perform
full page reloads and navigations that bypass the router's interception
and blockers entirely, while still firing the onNavigate callback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@uhyo uhyo merged commit bf014a5 into master Feb 25, 2026
1 check passed
@uhyo uhyo deleted the feat/bypass-interception branch February 25, 2026 13:36
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.

1 participant