Repository navigation
Conversation
If the mutation resolves while the body still fades out, AnimatePresence
("wait" mode) mounts the processing content as already exiting. It never
removes that content, so the dialog keeps "Sending ..." on screen. The
result now waits until the processing content ends its enter animation.
The success auto close now starts when the success content shows, not
when the phase changes.
|
✅ No security or compliance issues detected. Reviewed everything up to 8db96aa. Security OverviewDetected Code Changes
|
📊 Build Bundle StatsThe latest build generated the following assets: |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Responsive layout changes can skip animation callbacks, leaving completed mutations stuck on processing or preventing success auto-close.
1 open issue
What changed in this PR
Fixes shared mutation dialogs that fail to display results when mutations complete during transitions.
Changes:
- Gates result rendering on the processing entrance animation.
- Starts success auto-close after the success animation completes.
- Uses the visible phase for dismissal and navigation blocking.
| File | Description |
|---|---|
| src/governance-app-frontend/src/common/components/MutationDialog.tsx | Coordinates visible phases, animation completion, and auto-close timing. |
Review effort: Balanced
A remount at the 768px breakpoint (Dialog to Drawer) skips the enter animation. Then onAnimationComplete never fires, and the dialog stays on processing after the mutation ends. The mount of the phase content now sets the flags.
…ast-result # Conflicts: # src/governance-app-frontend/src/common/components/MutationDialog.tsx
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
October 28, 2026 14:32
The mutation ends in the same task as the form leaves, so the result and the swap to the processing content land in one update. The tests also check that the auto close starts when the success content mounts.
…ast-result # Conflicts: # src/governance-app-frontend/src/common/components/MutationDialog.tsx
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
October 29, 2026 09:36
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.


Motivation
On the icp-cli local network with no artificial delay, a mutation can resolve within ~200 ms. If it resolves while the form still fades out,
AnimatePresence(mode="wait") mounts the processing content as already exiting and never swaps in the result. The dialog keeps "Sending 5 ICP to Wallet A ..." on screen after the transfer went through, and the auto close then hides it. #498 setartificial-delay-ms: 1000on thee2enetwork to keep CI stable, which hides the bug.With the
e2edelay at 0 and a temporary spec that throttles the CPU 8x (Emulation.setCPUThrottlingRate) on "Save an address from the send review step", the send or the add address dialog got stuck in 1 to 4 of 8 runs. With the fix, 16 of 16 runs passed at 8x. At 0 delay, the chromium suite passed, except "Modal Opening & URL State", which also fails locally onmain.Changes
MutationDialog, so a success, an error, or a Ledger cancel waits until the processing content mounts.