Repository navigation
fix(terminal): end a pane's recovery wait when its terminal leaves it, and cover the recovering edges (#1473) - #1990
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CodeRabbit hit its review limit on this PR, so no CodeRabbit review ran. Here are the code-review agent reviews and how each finding was resolved. omo-native-code-reviewer, first pass (on the earlier
omo-native-code-reviewer, re-review of the fix commits: APPROVE. The LOW notes are left as they are:
Codex Sol (gpt-6.1-sol, xhigh): on the earlier version it found the same two MEDIUMs (the round trip, and the switch case not failing without the fix). Both are resolved above. Its re-review of the fix commits did not run because of a host stall. |
|
Merge pass review of 62f94b3: the Astra gate (omo-native-gate-reviewer, gpt-6-astra) rejected it on one blocker. What holds: the restore fix itself works. A quiet restored pane whose attachment recovered meanwhile is shown as current again. The server lifecycle tests pass 7/7. Astra also reviewed the mutation logs and the desktop and mobile screenshots. BLOCKER C2: a recovering pane stays unpresented when its replacement joins an attachment that is already ready (
Astra could not get the full browser run's completion receipt, so it claims no independent full-suite pass. This PR is client only, so it can merge during the release once it is approved and CI is green. The re-review will cover only the new commits. |
|
Re the Astra gate's C2 on 62f94b3: fixed, not narrowed. Cause: the server announces a recovering join with Change (18ee551,
Browser regression:
Other evidence:
Remaining LOW notes (not fixed):
Codex Sol did not run on this delta (host stall). |
…not on two frames (#1473)
…terminal still waits (#1473) Review follow-up: retireOutput also runs when the same pane's terminal is replaced, so clearing the mark there let that pane's late replay be presented as current before its new attach took. The mark now names the pane it was received for: the next pane's output is its own, and the same pane keeps waiting for its attach. The sidebar-activity demo adds a case that opens the next pane after a recovering one and expects its screen, the recovering-joiner case uses the shared output wait, and the docs say transport credit is still acknowledged and the input row is not read from the replay.
…ring-switch case (#1473)
…pane (#1473) A pane herdr could not restore takes its terminal to no pane; restored, it attaches afresh, and the server tells it again while the attachment still recovers. The mark kept from before suppressed the healthy replay, so a quiet restored pane kept its DONE dot until new output. A replaced terminal of the same pane still keeps the mark.
…recovery demo cases (#1473) The recovering-switch case passed with the fix reverted: each pane has its own keyed terminal, so a sidebar switch never reused one. recovering-restored fails on main; recovering-replaced fails when retiring the output always clears the mark.
…recovered meanwhile (#1473) A recovering pane's replaced terminal attaches again. When that join reaches an attachment that already recovered, the server sends its replay and readiness without output-recovering; the mark carried from the old attach suppressed the replay and the readiness revoked it, so the screen waited for new output. The recovering join's own replay (announced by output-recovering) still stays the screen from before; a replay it did not announce ends the wait.
…s replay, then join a recovered attachment (#1473)
9bec42c to
c69f644
Compare
|
Merge pass review report. Overall: PASSED. This is a client change in the terminal attach path. An Astra gate (omo-native-gate-reviewer, gpt-6-astra) approved 9bec42c on its second round. What holds: a quiet restored pane whose attachment recovered in the meantime is shown as current again (#1473). The server lifecycle tests pass 7/7. C2 (62f94b3), fixed in 18ee551 and 1ed9c45:
Bridge traps still hold: no Minor note: the rewritten replacement test uses a late frame marked as a replay where the old test used an unmarked one. The production guard is unchanged. |
Fixes #1473
What changes for the user
A pane that comes back after herdr could not restore it, or whose terminal herdr replaced, now shows its screen as current again when its attachment recovered meanwhile. Before, such a quiet pane kept its DONE dot until new output arrived.
Items
recoveringedges: already on main from test(terminal): cover the recovering joiner flag edges #1738 (server/core/terminals.test.ts).PaneTerminalsince feat(ui): align pane controls and navigation with herdr TUI #747, and pane frames are filtered per renderer. So a sidebar pane switch never carries the wait over; the issue's "switching panes inside the same terminal component" no longer happens. One renderer still changes pane in two ways, andsrc/lib/useTerminalMount.tsnow handles both:retireOutput); a rejoin is toldoutput-recoveringagain while the attachment still recovers. Before, the old mark suppressed the healthy replay.recoveringPane), until the new attach answers:output-recoveringagain, the join's replay (joinReplay) is still the screen from before, even when it arrives after the replacement.output-recoveringdid not announce (rejoin) joined an attachment that recovered meanwhile. That replay ends the wait and is shown as the current screen, while output queued before it is not.scripts/sidebar-activity-demo-regression.ts, the "recovery" case's two-frame waits now wait until the terminal's output probe shows the text parsed, with nothing queued or in flight (outputParsed).docs/terminal-input.mddocumentsoutput-recoveringunder "Readiness and failures": what the client does not do with the replay, that output credit is still acknowledged, and how the wait ends.New demo cases:
recovering-restored: the restore round trip.recovering-replaced: the terminal is replaced before the recovering join's replay comes. The late replay stays unshown, and the new attach's replay of the recovered attachment is shown.The fixture gains
hold,attaches,replaceTerminalandunrestored, and marks the recovering replay asreplay, as the server does.Verification
bun run typecheckpasses, andbun test src/lib server/core/terminals.test.tspasses: 2352 pass, 0 fail (rerun on the C2 fix).bun scripts/sidebar-activity-demo-regression.tspasses: exit 0, 44 PASS lines, includingrecovery,recovering-joiner,recovering-restoredandrecovering-replaced(rerun on the C2 fix).recovering-restoredfails on main'suseTerminalMount.ts, and on this branch before the last fix commit (the restored screen never presents).recovering-replacedfails in three variants:retireOutputalways clearing the mark, the late replay is shown.joinReplayconsumption, the late replay is shown.recovering-switchcase passed with the fix reverted, so it was replaced.recovering-restoredat 1440x900 and 390x844: the restored pane's screen shows as current in the terminal lens, with no blank or overlapping area.bun run check fast: passes before the rebase (unit 7188 pass, 0 fail). After the rebase onto 0.4.18, the only failure is the known flake Flaky: grok exact store lookup misses the held session beside an older events file on CI #1994 (server/grok.test.ts, untouched here; 3/3 passes alone). Every other step is ok, and the full demo regression passes again (44 PASS).Reviews
omo-native-code-reviewer: