bug(ui): profile panel can stack over other modals — missing ModalScrim guard #57

Closed
opened 2026-05-28 01:50:32 +00:00 by funman300 · 0 comments
Owner

Bug

profile_plugin.rs spawns a modal overlay without first checking whether a ModalScrim already exists. This means the Profile panel can be layered on top of an already-open Settings, Help, or Sync panel, breaking the modal stack.

Affected file

solitaire_engine/src/profile_plugin.rs

Fix

Add the standard guard before spawning (per CLAUDE.md §14.2):

fn open_profile(
    mut commands: Commands,
    scrims: Query<(), With<ModalScrim>>,
    // ...
) {
    // ... spawn_modal(...)
}

Relevant rule

CLAUDE.md §11: spawning a second ModalScrim while one already exists without first dismissing the existing one

## Bug `profile_plugin.rs` spawns a modal overlay without first checking whether a `ModalScrim` already exists. This means the Profile panel can be layered on top of an already-open Settings, Help, or Sync panel, breaking the modal stack. ## Affected file `solitaire_engine/src/profile_plugin.rs` ## Fix Add the standard guard before spawning (per CLAUDE.md §14.2): ```rust fn open_profile( mut commands: Commands, scrims: Query<(), With<ModalScrim>>, // ... ) { // ... spawn_modal(...) } ``` ## Relevant rule CLAUDE.md §11: *spawning a second ModalScrim while one already exists without first dismissing the existing one*
funman300 added the bugui labels 2026-05-28 01:50:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#57