fix(workspace): support jump and auto-follow in agent terminal views - #838
Merged
Conversation
…lign harnesses @xterm/xterm v6 exposes buffer.active.viewportY as readonly (v5 allowed assignment), so the tail-restore path typechecks only through Terminal.scrollToLine with an explicit clamp. The submit and dimension-ownership harness mocks also needed the scroll surface (onScroll/scrollToBottom/scrollToLine) and a tailAllMode store slice: the follow wiring subscribes to viewport movement at mount, and a mock without onScroll aborts xterm init inside the leaf's try block, taking those suites down with a missing-method TypeError.
…utput Resolve Claude and Codex review findings with fire-time callback guards, deferred viewport re-pinning, session-local markers and real Electron/xterm coverage. Markers preserve content across scrollback trimming where numeric offsets and baseY arithmetic cannot. Update the execution plan and command contracts to match verified behavior. Refs #837
This was referenced Sep 8, 2026
Owner
Author
|
Delivery complete: both reviewers approved 25eabfc, then quality-gate (10m19s) and minimum-node-fixture-gate (47s) passed on that exact head. CI covered typechecks, core/system/renderer tests, coverage, and distributable verification. Merged with an exact-head fence under the user explicit review-then-merge authorization; merge commit 31e81ef. Issue #837 closed via this PR. Local main was fast-forwarded without altering the unrelated untracked user plan. The separate local source-retention test issue remains tracked in #839. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #837.
Jump to Latest, Auto-follow Focused Agent, and Tail All now operate on raw agent terminal viewports, including OpenCode Terminal and Claude/Codex terminal views, without switching into the rendered feed. Plain shell panes remain excluded.
Implementation
Review
One Claude and one Codex reviewer ran through Agent Code MCP orchestration. Both initially requested fixes. Deferred-write races, replay timing, reentrant scrolling, trim drift, session-state leakage, and a tautological command test were corrected. Both independently approved integrated revision 25eabfc with no remaining blocker. These are agent reviews, not GitHub account approvals.
Verification
Node 24.14.1, fresh npm ci, origin/main integrated and submodules updated.
Limits
Raw follow controls xterm scrollback, not an alternate-screen TUI internal history/keybindings. If anchored content is evicted or removed during reflow, restore falls back to the oldest retained line. No new provider, no plain-shell follow, no shared-checkout changes.
The user explicitly authorized merge after Claude/Codex review. Merge remains gated on passing CI; no bypass or auto-merge requested.