Fix dead Home "Delete meeting" confirmation#1126
Merged
r3dbars merged 1 commit intoJun 15, 2026
Merged
Conversation
The recent-meeting overflow (⋯) menu's Delete action set homeDeleteConfirmation but no confirmation dialog ever appeared. Two stacked defects on the Home row path: 1. ClosureMenuItem invoked its handler synchronously, inside NSMenu.popUp's modal tracking loop. SwiftUI does not present an alert/sheet from that nested loop, so the state was set but nothing showed. PR r3dbars#1110 made the handler fire at all (it previously no-op'd on a deallocated weak target), which exposed this next layer. Defer the handler to the next main-runloop turn, keeping it owned by the item so it cannot deallocate first. 2. Three legacy .alert(item:) modifiers (homeDeleteConfirmation, homeDeleteFailure, pendingAudioRetentionWindow) were stacked on the settings root view. SwiftUI keeps only the last, so the delete confirmation (first) and the delete-failure alert were shadowed. Route all three through one .alert(item: rootAlertBinding); every call site is unchanged. "Report issue" opens a .sheet and needed only fix 1, since stacked sheets do not shadow each other. Add source-contract guards for both fixes.
Owner
|
Thanks Alfonso — this is the right area and the CI/fast suite is green, but I'm holding merge for one issue from codex-review. The new shared alert binding clears all three alert states when SwiftUI writes nil. If a confirmation action fails synchronously during dismissal, for example dictation delete throws or failed-meeting delete returns false, the follow-up homeDeleteFailure can be cleared before it presents. Could you adjust the dismissal path to clear only the dismissed alert, or defer the failure alert until after dismissal? Proof run here: codex-review --mode branch against origin/main; inside that, bash run-tests.sh passed 5353/5353. |
15 tasks
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.
Why
The Home recent-meeting ⋯ menu's Delete meeting action did nothing: no confirmation dialog, no deletion. Fixes #1125.
Two stacked defects on the Home row path:
ClosureMenuItem.invoke()ran its handler synchronously, insideNSMenu.popUp's modal tracking loop. SwiftUI won't present an.alert(item:)/.sheet(item:)from that nested loop, so the Delete handler sethomeDeleteConfirmationbut nothing showed. Fix Home dashboard row actions, hover reveal, and stats focus ring #1110 made the menu handler fire at all (it previously no-op'd on a deallocated weak target), which uncovered this layer.Three legacy
.alert(item:)modifiers (homeDeleteConfirmation,homeDeleteFailure,pendingAudioRetentionWindow) were stacked on the settings root view. SwiftUI keeps only the last stacked legacy alert, so the delete confirmation (first) and the delete-failure alert were both shadowed. Only the audio-retention alert (last) could ever present.The tell while debugging: Report issue (a
.sheet) started working once the defer landed, but Delete (an.alert) still didn't, because stacked sheets don't shadow each other and stacked legacy alerts do.Product Impact
meetingsmeeting reliabilityWhat changed
ClosureMenuItem.invoke()now defers its handler to the next main-runloop turn viaDispatchQueue.main.async { [handler] in handler() }, off theNSMenu.popUptracking loop. The handler stays owned by the item (the capture keeps it alive), so the deallocation trap Fix Home dashboard row actions, hover reveal, and stats focus ring #1110 fixed does not come back..alert(item: rootAlertBinding)instead of three stacked.alert(item:). A small privateRootAlertenum plusactiveRootAlert/rootAlertBindingpick the active state and clear it on dismiss. All seven existing assignment sites are unchanged.UIAutomationSurfaceContractTests.swift: the menu handler must defer, the three alerts must share one presenter, and no.alert(item: $homeDelete…)/$pendingAudioRetentionWindowmay be re-stacked.How I checked it
scripts/dev/agent-preflight.sh.agents/test-matrix.ymlfor the files changed (Sources/UI/**+ rootTests/*.swiftmap to build + fast tests)bash build.sh --no-openbash run-tests.sh(5353/5353)build.sh --no-openbundle gate: "Performance budget OK")bash run-integration-smoke.sh(N/A, noSources/Meeting/orSources/TranscriptedCore/changes)swift test(N/A, noPackage.swift/ core seam changes)Risk Review
HomeMeetingDeletionpath; no migration)HomeDeleteConfirmationPolicy).agent-review/visuals/evidence (not attached; this makes an existing dialog present with unchanged copy, and the live Home list shows private meeting titles. Happy to add a cropped capture of just the confirmation dialog if wanted.)Notes