Skip to content

fix(navigation): prevent duplicate Sheet key crash#689

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/duplicate-sheet-key
May 11, 2026
Merged

fix(navigation): prevent duplicate Sheet key crash#689
bmc08gt merged 1 commit into
code/cashfrom
fix/duplicate-sheet-key

Conversation

@bmc08gt
Copy link
Copy Markdown
Collaborator

@bmc08gt bmc08gt commented May 11, 2026

Broaden sheet dedup in CodeNavigator.navigate() to match on toString() (which mirrors SaveableStateProvider contentKey) instead of structural equality. This prevents the race where pendingSheetDismiss callbacks push a duplicate Sheet entry onto the NavBackStack.

Also wrap the pendingSheetDismiss callback in a single Snapshot.withMutableSnapshot for atomicity.

Broaden sheet dedup in CodeNavigator.navigate() to match on toString()
(which mirrors SaveableStateProvider contentKey) instead of structural
equality. This prevents the race where pendingSheetDismiss callbacks
push a duplicate Sheet entry onto the NavBackStack.

Also wrap the pendingSheetDismiss callback in a single
Snapshot.withMutableSnapshot for atomicity.

Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
@bmc08gt bmc08gt self-assigned this May 11, 2026
@github-actions github-actions Bot added area: ui Compose UI, theme, components, resources area: deeplinks Deep link handling, URL routing, and link parsing type: fix Bug fix labels May 11, 2026
@bmc08gt bmc08gt merged commit 87f63bd into code/cash May 11, 2026
3 checks passed
@bmc08gt bmc08gt deleted the fix/duplicate-sheet-key branch May 11, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: deeplinks Deep link handling, URL routing, and link parsing area: ui Compose UI, theme, components, resources type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant