fix: hide sidebar shortcut hint without a target#447
Conversation
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
bcc058a to
adb8730
Compare
roborev: Combined Review (
|
The sidebar shortcut was registered as a global action and the header rendered its Ctrl+[ badge whenever the persisted sidebar state was collapsed. On Activity, toggling that state has no visible sidebar to affect, so the shortcut only made the header affordance appear or disappear. Gate the shortcut to PR list, issue, workspace, and terminal sidebar routes, and remove the badge from the generic header fallback. Activity now keeps the header stable while pages with real sidebars continue to receive the shortcut.
The current mainline frontend CI is failing deterministically in lint and unit tests. Two test files only needed the checked-in formatter style, while DiffFile.test exposed a Svelte 5 teardown error from a dynamically mounted inline review thread component. Move the inline review thread layout observer from onMount to an element action so imperatively mounted annotations can be cleaned up without creating a new effect during teardown. The action keeps the same resize, scroll, and width calculation behavior while avoiding the effect_in_teardown failure.
The remaining red PR checks were the Firefox and WebKit browser lanes. Their failures were concentrated in diff-view interactions that click through Pierre shadow DOM or virtualized tree nodes, plus a Firefox inline-composer focus race. Dispatch composed mouse events from the e2e helpers after the target is visible so those tests exercise the same delegated app handlers without relying on Playwright's cross-browser hit testing inside the third-party shadow widgets. The inline composer now schedules focus after mount across the next frames and a short timer, with a unit assertion covering the expected focused textarea. The CI dropdown test also waits for the expanded toggle text before asserting expanded row count so the assertion observes the state transition.
Hiding sidebar.toggle by making its when predicate false also removed the dispatcher's preventDefault path. On macOS that left Cmd+[ free to become browser Back on Activity, Repos, Board, and other pages without a sidebar target. Keep the action dispatchable whenever sidebar shortcuts are enabled, but make its handler no-op unless the current route has a sidebar target. UI command lists now use an optional visible predicate so the shortcut stays hidden where it would do nothing.
The sidebar shortcut still used route shape to decide whether it had a target. Compact pulls and issues routes render the focus presentation without a sidebar, so Cmd+[ could be shown and could mutate the persisted sidebar preference on a layout where nothing would change. Add actual sidebar availability to the keyboard context and keep compact pages in the reserved-but-hidden path. Also replace the diff e2e synthetic click helper with real Playwright hover/click interactions so covered or disabled targets still fail the tests.
adb8730 to
e27c51c
Compare
roborev: Combined Review (
|
roborev-ci flagged that the no-target sidebar shortcut behavior was only covered through dispatch and header assertions, leaving the palette and cheatsheet surfaces unprotected. Extend the Activity shortcut e2e flow to open both dialogs, assert Toggle sidebar is absent, and still prove Cmd+[ remains reserved. The diff composer focus retry also needs browser-level coverage, so the git-backed diff flow now checks that each newly opened inline composer has focus before filling it. Local Playwright execution in this workspace still stops at the missing ms-playwright Chromium executable, so CI remains the browser runtime for these assertions.
roborev: Combined Review (
|
Uh oh!
There was an error while loading. Please reload this page.