Leaderboard panel missing modal scrim guard #77
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?
Bug
toggle_leaderboard_screeninleaderboard_plugin.rsis missing theother_modal_scrimsguard that every other panel has. Pressing L (or clicking the leaderboard HUD button) while any other modal is open (Settings, Stats, Profile, etc.) spawns a secondModalScrimon top of the existing one.This violates the constraint in CLAUDE.md §14.2:
Root cause
The function has these parameters:
The early-return guard
if !other_modal_scrims.is_empty() { return; }beforespawn_leaderboard_screen(...)was never added.Fix
Add
other_modal_scrimsquery parameter and guard — same pattern asstats_plugin.rs(fixed in #75),settings_plugin.rs,help_plugin.rs, etc.Labels
Fix applied — commit
ccf280eRoot cause:
toggle_leaderboard_screenlacked theother_modal_scrimsquery that prevents a secondModalScrimfrom stacking on top of an already-open panel.Change made (
solitaire_engine/src/leaderboard_plugin.rs):This is the same pattern already present in every other panel toggle (Settings, Stats, Help, Profile, Achievements). The leaderboard was the only panel missing it.
Verified: all 1,401 tests pass, clippy clean.