Skip to content

fix(cli): expanding an off-screen block triggers a full redraw that clears pre-Maka scrollback #1097

Closed

Description

@Astro-Han

Problem

tui.setClearOnShrink(false) keeps the transcript shrink path from wiping terminal scrollback, but a documented known limit remains (pi-tui-runner.ts, "Known limit" comment): a global Ctrl+O / Ctrl+T toggle that resizes a block sitting above the live viewport top makes pi-tui's differential renderer fall back to a full redraw (its firstChanged < viewportTop path), which emits a scrollback-clearing sequence. Transcript content is rebuilt into fresh scrollback, so nothing is lost from the transcript itself — but the user's scroll position resets and any pre-Maka terminal scrollback is cleared.

Verified 2026-07-16 against main: the other half of the original #549 gate — 80×24 truncation semantics — is already satisfied by the #1082 compact-row grammar (assembleCompactToolRow preserves the tool head, truncates the free-text target first, and reserves protected fixed-shape annotations; the remaining unprotected-annotation gap is #1086).

Desired outcome

Expanding or collapsing blocks must never clear pre-Maka terminal scrollback or reset the user's scroll position. The clean fix is a preserve-scrollback render path inside pi-tui (upstream, not owned by this repo); evaluate an upstream patch against a maka-side avoidance strategy (e.g. anchoring expansion so resizes stay inside the live viewport). Add behavioral coverage for long runtime-resource paths and off-screen expansion.

(Split out of the retired #549 tracker.)

Activity

  1. added a commit that references this issue on Jul 16, 2026
    1426853
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions