Repository navigation
fix(mosaic): coordinate pending identifier actions - #10481
austincalvelage wants to merge 17 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 0f6ee0b 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 |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
1e8a5d2 to
85e56c4
Compare
85e56c4 to
625bbc3
Compare
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
16b22da to
c724da6
Compare
API design concern:
|
|
Thanks, agreed on all points. Done in the last four commits:
On One case has no section-level test: a cancelled reverification keeping set-primary disabled until the removal settles. In the real flow that window lasts only a moment, so a feature test can't hold it open without a fake request. The controller test covers it. |
usePendingAction gains guard(), which runs a confirmation's confirm under the section lock, replacing runExternal and the wrapper each section copied. Section controllers put verify and primary pending flags on the rows they return, so views no longer compare pending keys. Confirmation drops the disabled prop, which no reachable state could set.
Set as primary stayed pending while the session verification dialog was open, so its menu stayed open with a spinner behind the dialog. The pending status now ends when the dialog appears, as ActionMenu expects.
Email, phone and web3 wallet rows list the primary first when the section loads, then keep their positions when a new primary is set, so only the Primary badge moves. The new primary leads on the next load.
…te in sections Identifier sections disable their controls from both the pending action and the removal confirmation instead of decorating the confirm controller, and confirm returns void again.
Closing the dialog during reverification now moves the confirm machine to a cancelling state that waits for the in-flight run, so isPending stays true and a reopened dialog cannot start a second run until it settles.
a78e3c5 to
0f6ee0b
Compare


Description
Setting an email address, phone number, or wallet as primary now keeps its menu open with a pending indicator, then updates the Primary badge without moving rows. If the change needs session verification, the menu closes when the verification dialog opens. A shared section lock prevents primary changes and removal from running at the same time. Failed removals keep their confirmation dialog open with the error.
Each section controller disables its controls while either its pending action or its removal confirmation is pending, and the rows it returns carry their own pending state, so views no longer compare pending keys. A confirmation closed during session verification now stays pending until the interrupted action settles, so a second removal cannot start in that window.
Fixes CORE-4051.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change