[critical] toggle_help_screen spawns second ModalScrim while another modal is open #9

Closed
opened 2026-05-19 18:42:00 +00:00 by funman300 · 0 comments
Owner

File

solitaire_engine/src/help_plugin.rs lines 65–83

Description

toggle_help_screen only checks whether a HelpScreen marker already exists. It does not check other_modal_scrims.is_empty() before spawning. Pressing F1 or dispatching HelpRequestEvent while any other modal (Settings, Pause, Profile, Home, Win Summary) is open spawns a second ModalScrim concurrently, violating CLAUDE.md §14.2 and §11.

Every other toggle handler in the codebase (toggle_home_screen, toggle_profile_screen, etc.) has an explicit other-modal guard — Help is the only one missing it.

Fix

Add a Query<(), With<ModalScrim>> parameter and return early when !scrims.is_empty(), matching the pattern in toggle_home_screen.

## File `solitaire_engine/src/help_plugin.rs` lines 65–83 ## Description `toggle_help_screen` only checks whether a `HelpScreen` marker already exists. It does **not** check `other_modal_scrims.is_empty()` before spawning. Pressing F1 or dispatching `HelpRequestEvent` while any other modal (Settings, Pause, Profile, Home, Win Summary) is open spawns a second `ModalScrim` concurrently, violating CLAUDE.md §14.2 and §11. Every other toggle handler in the codebase (`toggle_home_screen`, `toggle_profile_screen`, etc.) has an explicit other-modal guard — Help is the only one missing it. ## Fix Add a `Query<(), With<ModalScrim>>` parameter and return early when `!scrims.is_empty()`, matching the pattern in `toggle_home_screen`.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#9