Skip to content

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

Description

@jsmestad

Type: Bug (hardening follow-up)

Part of #2654. Five-agent review of merged #2711 (full findings on that PR); the decode/apply layer was already hardened in #2714. This issue covers the surviving scroll/pin surface.

Implemented in #3391.

What

The TUI's local transcript scroll and pin-intent reporting work on the happy path, but the behavior is untested at the Model.Update level where it actually happens, and three edge paths leave a wrong-or-stuck view (or a desynced BEAM follow state) with no signal.

Why

The pin flag drives BEAM-side auto-follow; a silent desync means "chat stopped following" bug reports with nothing in the logs. The untested seams (key routing, wire bytes, composer gating) are exactly where a refactor regresses silently. The review constructed several green-tests-wrong-behavior scenarios.

Acceptance Criteria

  • Driving Model.Update with real key/wheel input against a live out channel asserts exactly one 0x5C on the scroll-away edge and exactly one 0x5D on the return edge, with no duplicates on repeated same-direction input.
    • Byte-layout tests cover EncodeGUIChatScrolledAwayFromBottom and EncodeGUIChatReturnedToBottom.
    • A table test covers the key-to-scroll mapping for j, k, Ctrl+d, Ctrl+u, G, PgUp, and PgDn, including not-handled modifier combinations.
  • With InputFocused = true, navigation keys reach the composer and do not scroll the transcript, and vice versa. The 0x09 section decode has round-trip coverage including the absent-section default.
  • A transcript that shrinks while the reader is scrolled up reports its automatic re-pin to the BEAM. The maxTop == 0, exact-fit, and clamp-to-bottom paths record pinReturned.
  • The truncated flag is surfaced through an in-budget earlier messages hidden affordance at the top of a capped transcript.
  • Same-epoch full replacement preserves the reading position by stable local message identity. Pin-intent reporting around the transition is covered, including empty-transcript and epoch behavior.
  • Page-size keys scroll by the transcript content budget instead of the full body height.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: renderingRendering pipeline, display list, damage trackingbugSomething isn't working

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions