Repository navigation
test(tab-menu): expect the selection to move to the pane selected before a closed one - #3011
Conversation
…ore a closed one #2853 moves a closed pane's selection as herdr's TUI focus would: to the pane selected before it, not to herdr's own focus. The desktop canvas check still waited for herdr's focused pane after closing the third pane, so it timed out on main (scripts/tab-menu-regression.ts:49). The browser had selected the second pane before splitting it, so the selection lands there.
|
Caution Review failedThe pull request is closed. Summary
Merge Risk:
|
|
Local merge gate (owner-approved): test-only; tab-menu-regression now expects the selection rule #2853 introduced on purpose (a closed pane's selection moves to the previously chosen pane). Reproduced on main, passes with this change and when #2853's change is reverted; check fast green; omo CLEAR. Merged without waiting for GitHub CI to unblock main's ui-regression job. |
Problem
Browser regression (ui-regression)is red on main since #2853 (first failing run at 55b2d39; still red at b01e5e1, run 42040477141):#2853 moves a closed pane's selection the way herdr's TUI moves its focus: to the pane selected before it (
src/lib/paneAfterClose.ts). The desktop canvas check still waited for herdr's ownfocused_pane_idafter it closed the third pane. Selecting a pane in the browser never moves herdr's focus, so herdr focused the first pane while the browser correctly selected the second one, which was selected before the split made the third.Change
Test only: after the close, the check now expects the browser's selection on the second pane. No product code changes.
Validation
bun scripts/tab-menu-regression.tsfails at :49. With only fix(selection): move a closed pane's selection as herdr's TUI focus moves #2853'ssrc/lib/useSelection.tshunk reverted, it passes. That confirms the cause.bun scripts/tab-menu-regression.tspasses.bun run check fast: passed (typecheck, build, unit 12155 pass / 0 fail).