R4.1: icon-button rows in menus (component 1b8d678); three rounds used, last fixes tested

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-13 21:25:30 -04:00
1 parent 0c9e2b0cea
commit 962f274cc6
4 files changed
+18 -1

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
FAIL
1. ../Ely-GPUI-Components/src/menus/model.rs:155 — Invalidating the highlighted button silently selects a different command. Highlight Paste in a Cut / disabled Copy / Paste row, then have the owner disable Paste or remove it while the menu remains open. `settled` chooses Cut, so Enter executes Cut without the user selecting it. Both runtime probes reproduced `["cut"]` instead of no command. Separate initial/explicit navigation from selection validation: clear the mark when its button disappears or becomes disabled, and require another navigation action before executing anything. Add regressions for both changes.
2. ../Ely-GPUI-Components/src/menus/menu.rs:241 — Horizontal button navigation does not work in `SearchableMenu`. Open the new test fixture's searchable menu with an empty filter, press Right, then Enter: it runs Cut instead of skipping disabled Copy and running Paste. The focused `TextInput` consumes its bound Left/Right actions before this key listener; the menu captures only Up/Down/Enter. Handle horizontal navigation through the corresponding captured actions when a button row is active, or explicitly move focus to that row. Add an unfiltered keyboard-navigation regression; searching for Paste does not exercise this path.
3. ../Ely-GPUI-Components/src/menus/draw.rs:99 — Disabled icon buttons expose no unavailable state to assistive technology. The rendered properties for disabled Copy are only `Node { role: Button, label: "Copy" }`; disabling affects color and mouse handlers alone. A screen reader cannot distinguish unavailable Copy from an enabled command, contrary to PRD UX-12 and the component library's disabled-control rule. Set the localized unavailable description, as `IconButton` does, and test the disabled button's accessible properties.
+5
View File
@@ -0,0 +1,5 @@
FAIL
1. ../Ely-GPUI-Components/src/menus/draw.rs:181 — A pointer move after an icon button closes the menu can crash the application. Click Paste, then move the pointer over that button before the next repaint. `Open::close` has emptied `levels`, but the old mouse-move handler treats the missing level as a different selection and calls `mark`, which indexes `levels[0]` at menu.rs:157. The runtime probe reproduced an index-out-of-bounds panic with two consecutive window events and no intervening paint. Ignore events whose menu level no longer exists, as ordinary menu rows already do, and add this event-order regression.
2. ../Ely-GPUI-Components/src/menus/menu.rs:38 — The round-one selection-invalidation fix still executes another command when a removed button has a successor. In a Cut / Paste / Delete row, highlight Paste, then remove Paste while the menu stays open. Delete shifts into the same column, passes `runs`, and Enter executes Delete without the user selecting it; the runtime probe recorded `["delete"]`. Validate the highlighted command's identity, or clear the mark when the row's membership changes, and require explicit navigation before executing again. Add a regression for removing a middle button; the committed test only truncates the row.
+5
View File
@@ -0,0 +1,5 @@
FAIL
1. ../Ely-GPUI-Components/src/menus/draw.rs:186 — Enabled icon buttons expose no accessible activation action. The handlers are attached only to mouse-down; GPUI advertises Click through a click handler or an explicit accessibility action. In the native Windows probe, UI Automation reports enabled Cut and Paste as Buttons with no Invoke pattern, while a normal Button in the same window exposes Invoke. A screen reader's activation command therefore cannot run Paste, contrary to PRD UX-12. Connect accessible activation to the same choose-and-close operation and add a regression that invokes the button through accessibility and checks that it runs once and closes.
2. ../Ely-GPUI-Components/src/menus/draw.rs:116 — Keyboard selection is exposed only as visual highlighting. Open the icon row, press Down then Right to select Paste: Enter runs Paste, but the native accessibility tree remains unchanged, with neither a focused/active descendant nor a selected state for the icon. GPUI logs that the focused menu element has no accessibility role and that assistive technology will announce the whole window. A screen reader cannot identify the command selected by arrow navigation, contrary to PRD UX-12. Expose the active icon through the menu's accessible focus/selection semantics, including its focus owner, and add a regression checking the announced item after arrow navigation.