WinSummaryOverlay bypasses spawn_modal / ModalScrim — invisible to all modal guards #24

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

File

solitaire_engine/src/win_summary_plugin.rs lines 757–899

Description

spawn_overlay builds the win summary as a manually-spawned full-screen node without using spawn_modal or attaching ModalScrim. CLAUDE.md §14 requires all full-screen overlays to use the spawn_modal / ModalScrim pattern.

Because WinSummaryOverlay is not a ModalScrim:

  • toggle_pause's !other_modal_scrims.is_empty() guard will not block Esc from opening Pause on top of it.
  • auto_resume_on_overlay will not clear pause state when it appears.
  • No other spawning system will see the Win Summary as an active modal.

Fix

Refactor spawn_overlay to use spawn_modal(commands, WinSummaryOverlay, Z_WIN_CASCADE, ...) and attach ModalScrim so the win summary participates in the global modal guard system.

## File `solitaire_engine/src/win_summary_plugin.rs` lines 757–899 ## Description `spawn_overlay` builds the win summary as a manually-spawned full-screen node without using `spawn_modal` or attaching `ModalScrim`. CLAUDE.md §14 requires all full-screen overlays to use the `spawn_modal` / `ModalScrim` pattern. Because `WinSummaryOverlay` is not a `ModalScrim`: - `toggle_pause`'s `!other_modal_scrims.is_empty()` guard will not block Esc from opening Pause on top of it. - `auto_resume_on_overlay` will not clear pause state when it appears. - No other spawning system will see the Win Summary as an active modal. ## Fix Refactor `spawn_overlay` to use `spawn_modal(commands, WinSummaryOverlay, Z_WIN_CASCADE, ...)` and attach `ModalScrim` so the win summary participates in the global modal guard system.
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#24