mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 16:02:32 +00:00
Found in review of this PR by rc-ssh-remoting. chooseRemoteTerminalLayout rebuilds a mirrored tab's layout from the host's picture and never carried buffersByLeafId or scrollbackRefsByLeafId forward, though it already receives existingLayout. The host publishes no scrollback of its own, so ANY session-inventory frame landing between park and reveal dropped the only client-side copy: the rebuild is bufferless, terminalLayoutEqual compares buffers so the write is not bailed out, and apply-terminal-records assigns it wholesale. Measured before the fix: 336 bytes captured at park, 0 after one forced frame, blank pane on reveal. After: 411 bytes survive the frame and the reveal repaints. The e2e passed either way because no frame happened to land in its window, so it was not covering the destroying event. It now forces one inside the park -> reveal window and asserts the capture survives it. An identical fix was written and reverted earlier in this branch as 'no measurable effect' — that measurement ran on a harness deleting the client profile between launches, so nothing downstream of persistence could register. It was never actually tested.