feat(engine): group HUD menu into Play/You/Community/System + Esc dismissal audit #165

Merged
funman300 merged 2 commits from feat/menu-grouping into master 2026-07-09 05:10:03 +00:00
Owner

Phase C of docs/ui-redesign-2026-07.md. Stacked on #163 (feat/you-hub), which is stacked on #160 — merge order: #160#163 → this.

What

  • Modes dropped from the Menu popover. MenuOption::ModesMenuOption::Home; the Play section's Home row fires a new ToggleHomeRequestEvent into the same toggle system as the M accelerator (Home previously had no visible control outside launch auto-show — §3.3 satisfied). The action-bar "Modes ↓" button stays until Phase B gives Home its Continue/New-Game hierarchy.
  • Grouping: popover rows render under quiet caption-size section headers inside the existing panel — Play (Home) · You (Profile, Stats, Achievements → You-hub tabs) · Community (Leaderboard) · System (Settings, Help). Tooltips preserved.
  • Dismissal audit: Settings, Help, Leaderboard, the display-name dialog, and the theme store had no Esc path at all. Each now closes on Esc, using the topmost-modal gate where stacking is possible (Settings yields to sync-setup/theme-store; Leaderboard yields to the display-name dialog). Scrim-tap opt-ins unchanged.

Verification

  • 919/919 engine tests green (3 new: hub-open-via-event, Esc-closes-Help, Esc-closes-Settings), clippy --all-targets -D warnings clean, fmt (re-verified during review on 2026-07-08).

Deliberately out of scope

  • Action-bar Modes button removal (Phase B).
  • Onboarding's Esc-skips-flow semantic (intentional, not a straggler).
  • No new scrim-dismiss on confirm-style modals.

🤖 Generated with Claude Code

Phase C of `docs/ui-redesign-2026-07.md`. **Stacked on #163 (feat/you-hub), which is stacked on #160** — merge order: #160 → #163 → this. ## What - **Modes dropped from the Menu popover.** `MenuOption::Modes` → `MenuOption::Home`; the Play section's Home row fires a new `ToggleHomeRequestEvent` into the same toggle system as the `M` accelerator (Home previously had no visible control outside launch auto-show — §3.3 satisfied). The action-bar "Modes ↓" button stays until Phase B gives Home its Continue/New-Game hierarchy. - **Grouping:** popover rows render under quiet caption-size section headers inside the existing panel — Play (Home) · You (Profile, Stats, Achievements → You-hub tabs) · Community (Leaderboard) · System (Settings, Help). Tooltips preserved. - **Dismissal audit:** Settings, Help, Leaderboard, the display-name dialog, and the theme store had no Esc path at all. Each now closes on Esc, using the topmost-modal gate where stacking is possible (Settings yields to sync-setup/theme-store; Leaderboard yields to the display-name dialog). Scrim-tap opt-ins unchanged. ## Verification - 919/919 engine tests green (3 new: hub-open-via-event, Esc-closes-Help, Esc-closes-Settings), clippy `--all-targets -D warnings` clean, fmt (re-verified during review on 2026-07-08). ## Deliberately out of scope - Action-bar Modes button removal (Phase B). - Onboarding's Esc-skips-flow semantic (intentional, not a straggler). - No new scrim-dismiss on confirm-style modals. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
funman300 changed target branch from feat/you-hub to master 2026-07-09 05:09:47 +00:00
funman300 added 2 commits 2026-07-09 05:09:47 +00:00
Phase C of docs/ui-redesign-2026-07.md. The Modes row is gone — Home
owns mode selection, so the popover's Play section carries a Home row
firing the new ToggleHomeRequestEvent (read by toggle_home_screen
alongside the existing M accelerator). Section headers are quiet
caption-size labels inside the existing panel widget, not a new
widget. The action-bar Modes button and its popover are untouched
(their removal is Phase B territory when Home gains hierarchy).

- MenuOption: Modes variant replaced by Home; rows grouped Play (Home)
  · You (Profile, Stats, Achievements) · Community (Leaderboard) ·
  System (Settings, Help)
- handle_menu_option_click no longer chains into spawn_modes_popover
- Tests: tooltip sweep updated (7 rows still), new
  toggle_home_event_opens_home_screen covers the popover's open path

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Phase C dismissal audit: Esc / scrim-tap / Done must behave the same
on every modal. Stragglers found and fixed — none of these had any
Esc path (pause's toggle guard swallowed the key while they were
open):

- Settings: Esc clears SettingsScreen, gated on being the topmost
  modal so a stacked sync-setup / theme-store dialog owns Esc
- Help: Esc closes alongside F1/Done (the code comment already
  claimed an Esc path existed — now it does)
- Leaderboard: Esc closes when topmost; the display-name dialog
  stacked above it now Esc-cancels like sync-setup's dialog
- Theme store: Esc closes (always topmost when open)

Scrim-tap opt-ins are unchanged — ui_modal documents which modals
deliberately stay non-dismissible on outside clicks.

Tests: escape_closes_help_screen, escape_closes_settings_screen_flag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
funman300 merged commit 255b781420 into master 2026-07-09 05:10:03 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#165