Repository navigation
feat(ui): keyboard shortcuts; fix e2e locator collisions (WI-1721) - #246
Conversation
|
Review of 6412c75: 1 blocker: the PR's own new e2e test fails in CI. The scoped locators (510236f) work. Main's two #239 regressions now pass:
The 4.6 change, which limits Blocker
Correctness otherwise
Nits
|
|
Re-review of f5ec497: no blockers. GitHub The blocker is fixed, and the cause was the one I suspected. The overlay guard
Snackbars, tooltips and detached CDK panes no longer disable shortcuts. The coverage is good:
In the CI run, Earlier nits fixed: the dead Nits (unchanged or new, none blocking)
|
The sr-only announcer added in b98ca89 mirrors two user-visible strings (selection count, upload result) into always-mounted live regions, so an unscoped text match resolves to both the real node and the announcement and Playwright's strict mode fails. Scope the selection count to .filter-bar .bulk-count, the upload toast to .mdc-snackbar__label, and the upload-feedback fallback past the persistent [role=alert] region.
One window-level keydown handler in the shell, so the bindings are the same on every page: p pauses/resumes, u adds an NZB, / focuses header search, g d / g h / g s navigate, w toggles layout width, and ? opens the list. A shared registry is the single source for matching and for the help sheet, so the table cannot drift from what the handler accepts. Two-key chords get 1.5 s. The handler leaves events alone when a modifier is held, the target is a field, or a CDK overlay is open, and it ignores a bare Shift press. / and g h need help from pages that own the destination: the shortcut service carries a consumable focus request (a lazy route can mount after the request), and the queue view expands and scrolls to History on #history. The Groups search box gained a #searchInput hook and an accessible name. Also fixes two e2e locators that collided with the shell's always-mounted sr-only live regions, and makes the smoke status-pill assertion wait for the real daemon state instead of the removed "Daemon running" string. The shortcut pause journey now waits on the API and restores the seeded pause state so it cannot leak into later specs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The window-level keydown handler skipped every shortcut whenever any `.cdk-overlay-pane` existed. Material snackbars, tooltips and select panels share that container, and CDK can leave a detached pane behind, so after the first toast (a failed poll raises one) `p` and the other bindings silently did nothing. CI's shortcuts journey presses `p` straight after loading /downloads, which is exactly that state. Gate on what actually owns keys instead: the dialog service's open dialogs, this shell's own pause/speed menus, and only those overlay panes that hold a dialog, menu, select or autocomplete panel. Snackbars and tooltips no longer swallow letters. Also `event.key` for a bare modifier is `'Shift'`, so the lowercased `'shift'` comparison never matched; compare the original key. And drop the duplicate `scrollIntoView` from `goHistory`: the queue view already expands and scrolls through the fragment subscription. Tests: a unit test with a real snackbar pane in the overlay container proves `p` still posts /queue/pause, plus coverage for an open dialog, a menu panel and a bare Shift. A new Playwright journey raises a real speed-limit snackbar and toggles the pause twice. Reverting the guard makes both fail.
f5ec497 to
8dc5fd1
Compare
WI-1721:
All 94 e2e tests pass. Written by a DeepSeek worker.
🤖 Generated with Claude Code