Multiple modals can stack — sync_setup, achievements, and leaderboard guard by plugin marker not ModalScrim #30
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Files
solitaire_engine/src/sync_setup_plugin.rs(~line 219open_sync_setup_modal, ~line 549open_delete_confirm_modal)solitaire_engine/src/achievement_plugin.rs(toggle_achievements_screen)solitaire_engine/src/leaderboard_plugin.rs(handle_set_display_name_button)Description
CLAUDE.md §14.2 requires checking
scrims.is_empty()before spawning any modal. Each of these openers guards only with its own plugin-specific marker (e.g.With<SyncSetupScreen>,With<AchievementsScreen>,With<DisplayNameModal>). Triggering two of these in rapid succession — or triggering any one while another modal is already open — produces concurrentModalScrimentities and stacked overlays.Fix
Add
Query<(), With<ModalScrim>>to each opener and return early when!scrims.is_empty().