Skip to content

Harden TUI transcript scroll and pin reporting - #3391

Merged
breznknecht merged 1 commit into
mainfrom
codex/issue-2715-tui-scroll-pin
Sep 16, 2026
Merged

breznknecht merged 1 commit into
mainfrom
codex/issue-2715-tui-scroll-pin

Conversation

@breznknecht

Copy link
Copy Markdown
Collaborator

TL;DR

The Go TUI now keeps local transcript scroll state and BEAM follow-bottom state synchronized across direct input, content shrink, replacement, and epoch changes. It also exposes truncated history at the resident top and sizes page navigation to the actual transcript viewport.

Closes #2715

Changes

  • Route j, k, Ctrl+d, Ctrl+u, G, Page Up, and Page Down through exact local-scroll mapping when the transcript owns focus, while forwarding those keys when the composer owns focus.
  • Emit one pin-intent edge from Model.Update when the reader leaves or returns to the bottom, including exact-fit shrink and near-tail clamp cases.
  • Preserve stable same-epoch anchors and silently re-pin on authoritative epoch changes.
  • Show earlier messages hidden at the resident top without exceeding the transcript content budget, including the exact-fit resident-row case.
  • Derive page navigation from the actual main-column message budget after panel chrome, status, composer, pending notice, and details-rail layout.
  • Add explicit pinEdge, pending-scroll consumption, and received-frame semantics for an empty resident transcript.
  • Forward Page Up and Page Down with the existing key-press packet and Kitty key codepoints. This PR does not change the protocol schema or opcodes.

Acceptance coverage

  • Exact away (0x5C) and returned (0x5D) action packets are covered by encoder and update-level tests.
  • Local navigation is modifier-exact and gated by composer focus.
  • Agent-chat section 0x09 decodes true, explicit false, and absent-as-false.
  • Replacement shrink, exact-fit shrink, and removed-anchor clamp re-pin once.
  • Truncated resident history has an in-budget top affordance.
  • Same-epoch replacement retains a stable anchor; epoch changes clear stale local intent.
  • Page keys use the rendered transcript content budget.

Verification

  • cd go/tui && go test ./...
  • mix protocol.gen --check
  • mix conformance (162 passed)
  • make lint
  • Focused code and test review: pass after the exact-fit shrink regression fix.
  • Final acceptance review: pass with no critical issues or warnings.

Visual evidence

Render-level tests verify that the truncation affordance appears only at the resident top, stays inside the content budget, and remains reachable when retained rows exactly fill the viewport.

@breznknecht
breznknecht merged commit 4b6e7c8 into main Sep 16, 2026
11 checks passed
@breznknecht
breznknecht deleted the codex/issue-2715-tui-scroll-pin branch September 16, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI resident transcript: scroll/pin behavior is untested at the Update level and has three stuck-view gaps

1 participant