refactor(ui): adopt the dialog close confirmation - #9441
Open
maxyinger wants to merge 2 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 40d7533 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
maxyinger
force-pushed
the
max/adopt-close-confirmation
branch
from
August 13, 2026 17:35
3a0462c to
0be4aff
Compare
maxyinger
added a commit
that referenced
this pull request
Aug 13, 2026
Disable `Destructive`'s Cancel while the delete is in flight, so the block enforces the no-dismissal invariant its `closedBy` comment states instead of relying on each consumer's machine to drop the event. Correct a comment that named a corner X this dialog does not render. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
maxyinger
force-pushed
the
max/adopt-close-confirmation
branch
from
August 13, 2026 19:59
0be4aff to
677fdd2
Compare
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Contributor
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
maxyinger
added a commit
that referenced
this pull request
Aug 13, 2026
Disable `Destructive`'s Cancel while the delete is in flight, so the block enforces the no-dismissal invariant its `closedBy` comment states instead of relying on each consumer's machine to drop the event. Correct a comment that named a corner X this dialog does not render. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
maxyinger
force-pushed
the
max/adopt-close-confirmation
branch
from
August 13, 2026 22:24
677fdd2 to
86ed2d0
Compare
This was referenced Aug 13, 2026
Two dialogs that could throw work away, treated differently, because they are
different problems wearing the same description.
The org-profile edit form now guards its close: edits raise "Discard changes?"
instead of vanishing. The predicate is the machine's own `dataChanged`, exported
as `hasUnsavedEdits` rather than restated in the view, so the guard and the
SUBMIT guard cannot come to disagree about what an edit is. Typing a value and
undoing it therefore closes without a question, since nothing changed.
Its Cancel button was the live instance of the bypass the new hook's docs warn
about: wired to a bare `send({ type: 'CANCEL' })`, it went around
`onOpenChange` — so it was the one way out that discarded edits without asking,
including after this change. It is now a `Dialog.Close`, which funnels.
`Destructive` gets no confirmation, and that is the point. Its remaining bug is
closing mid-delete, and a confirmation is the wrong shape for it: the request
cannot be called back, so there is no answer that changes anything. It is simply
not dismissible while the delete is in flight (`closedBy='none'`), and
`closerequest` the rest of the time, as before. Asking "discard your typed text?"
on the way out of a confirmation dialog would be a confirmation to escape a
confirmation.
Neither dialog asks while its request is in flight: `CANCEL` is not a transition
the `saving` state accepts either, so a question there would be one whose answer
changes nothing.
Disable `Destructive`'s Cancel while the delete is in flight, so the block enforces the no-dismissal invariant its `closedBy` comment states instead of relying on each consumer's machine to drop the event. Correct a comment that named a corner X this dialog does not render. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
maxyinger
force-pushed
the
max/adopt-close-confirmation
branch
from
August 13, 2026 23:08
86ed2d0 to
40d7533
Compare
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.
Description
dataChanged, exported ashasUnsavedEditsDialog.Close— was a baresend({ type: 'CANCEL' })that bypassedonOpenChangeDestructivegets no confirmation — a delete in flight can't be called backclosedBy='none'while deleting,closerequestotherwisePreview
Swingset links tbd
/organization/organization-profile-profile-section— real machine, fake 800ms update/organization/organization-profile-delete-section— same for the deleteChecklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change