Repository navigation
Description
What happened
After an Agent tab is dragged into a new area and the operator clicks back into the first area, part of the line typed there goes to the other area's pane.
desktop/e2e/agent-tab-groups.spec.ts "Agent edge drag splits the desktop column into two live tab groups" fails at line 40 this way.
In main 987778a (run 37182041622, job 111376392409) the typed printf 'desktop-group-live\n' ran as printf 'desktop-grouve\n'.
Reproduced locally with a debug hided and the pinned Herdr, 1 of 8 runs with 4 busy CPU processes on 14 cores: the first pane ran printf 'desktogroup-live\n' and the missing p- sat on the dropped tab's pane prompt.
So the bytes were sent to the wrong pane, not lost.
Event order in that run (renderer, core diagnostics and Herdr server log on one clock):
- The drop sends
tab.focus w1:t2; Herdr applies it. - The click into the first area sends
tab.focus w1:t1about 70 ms later, before Hide has read Herdr's answer to the drop. - The next session reconcile still shows t1 active from before the drop, and
reconcile_visible_tabsreads that as confirmation of the t1 request, so nothing is pending.
This step is inferred from the code and the deterministic reproduction below; the live run's log does not record the confirmation itself. - Herdr's answer to the drop (t2) then arrives; with nothing pending it is treated as an operator focusing t2 outside Hide (
tab.focus.followedt1 to t2), the keyboard pane moves to t2's pane, andPaneViewmoves DOM focus there mid-line. - Herdr's answer to the click follows (
tab.focus.followedt2 to t1) and the keyboard comes back.
The renderer record shows data-focused flipping between the two panes five times within 54 ms while the keys were being sent, and the WebSocket key frames for p and - naming the other pane.
#303 tracks a different signature in the web suite (output stopping in the area that lost the keyboard, with herdr pane run, no typed input); its 2026-10-01 comment already suspected this focus bounce for the desktop test.
What you expected
Every byte typed after the click reaches the clicked pane exactly once.
Herdr's late answer to a tab focus Hide itself replaced does not move the keyboard.
Steps to reproduce
- Build a debug
hidedand the desktop app, and use the pinned Herdr. - Run
desktop/e2e/agent-tab-groups.spec.tsrepeatedly while the machine is moderately busy; it fails in a minority of runs.
Deterministic core reproduction: focus tab t2, focus tab t1, then ingest sessions naming t1, t2, t1 in that order; on main the visible tab and keyboard pane move to t2 at the second session.
Versions
- hide: main 987778a (CI failure), 494ee5b (local reproduction)
- Herdr: v0.9.1 (the pin)
- macOS: GitHub macOS runner; local macOS 15.1
Diagnostics
Not confirmed: whether the same bounce explains any web-suite failure; #303 remains about the output stall.
Activity
Confirm a tab or pane focus only after it has left (#635)
Derive tab focus authority from one list of sent, unanswered requests (…
Answer tab requests from Herdr's moves, not the folded session (#674)