Skip to content

fix(router): settle custom dialogs on replacement and unmount - #26

Merged
okyrychenko-dev merged 2 commits into
mainfrom
fix/dialog-settlement
Oct 3, 2026
Merged

okyrychenko-dev merged 2 commits into
mainfrom
fix/dialog-settlement

Conversation

@okyrychenko-dev

Copy link
Copy Markdown
Owner

Summary

The adapter passed an incompatible callback to TanStack history, causing real navigation attempts to fail. Use native useBlocker so confirmation allows the requested transition once and keeps subsequent transitions protected.

  • Add confirmation ownership utilities, their type, and a core export to prevent stale, superseded, or unmounted attempts from allowing navigation.
  • Preserve silent denial, sync/async confirmation, scope conditions, and independent unload protection without duplicate handlers.
  • Remove the custom history interface and use the public core entry for shared types.
  • Replace mocked-history tests with 14 real-router integration cases.
  • Raise TanStack peer/dev ranges to ^1.170.28 and update the lockfile specifier.
  • Document the behavior and compatibility limits; add a minor changeset.
  • Apply statement-spacing fixes in the core confirmation tests.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-03T17:49:41.867321Z 7208a77 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1839f92427

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/router/src/core/useDialogState.ts
@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@okyrychenko-dev
okyrychenko-dev merged commit 691ea3e into main Oct 3, 2026
4 checks passed
@okyrychenko-dev
okyrychenko-dev deleted the fix/dialog-settlement branch October 3, 2026 17:51
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