Skip to content

ui: drop the ctrl+r transcript browser - #127

Merged
hbrooks merged 1 commit into
mainfrom
ui/drop-transcript-browser
Aug 21, 2026
Merged

ui: drop the ctrl+r transcript browser#127
hbrooks merged 1 commit into
mainfrom
ui/drop-transcript-browser

Conversation

@hbrooks

@hbrooks hbrooks commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary

Deletes the ctrl+r transcript browser and everything that existed only to serve it: ~1030 net lines gone.

The browser was a windowed view of the conversation on the alternate screen, where rows could be repainted — entry navigation with ↑/↓, folding tool runs open and shut, app-read wheel scrolling. It cost a scroll-anchor/viewport/selection machine larger than the chat itself, to show what the terminal's own scrollback already shows. The chat's resting view (settled rows printed once into real scrollback via <Static>, plus a live tail and the composer) is untouched.

What went:

  • ConnectApp: the windowed/navKey/openedKeys/scrollAnchor/expanded/sandboxLogOpen state, the alt-screen hop, SGR mouse capture, the wheel and page-key branches, the ~80-line transcript-navigation keybinding block, the marker/scroll/reveal callbacks, and the browser's notice line.
  • transcriptRows: rowViewport, anchorAt, anchorIndex, entryRange, snapToEntry, snapAnchorForEntry, navKeyOf, ScrollAnchor, plus the navKey/parentKey row fields and layOutItems' reveal options.
  • foldRun, the /transcript command, and ctrl+j — esc and the bottom-edge arrow are the ways to the picker now.

Two behavior changes worth calling out:

  • Clamping stays, expanding does not. Long tool results and user turns still cut at six lines, but nothing un-clamps them (expanding was browser-only), so the hint drops its key and reads … +N lines. The full text printed into the scrollback on its way past.
  • A settled sandbox block no longer re-opens its log. The log is fully visible while the session starts, then collapses to its summary for good.

Test plan

  • npm run typecheck
  • npm test (438 passed; the 31 deleted tests all covered removed exports)
  • tsc --noUnusedLocals reports no new dead code
  • Manual: chat renders, sending works, / offers three commands, ctrl+r and ctrl+j are inert, esc reaches the picker, terminal wheel scrolling works over the transcript

Important

Removes the ctrl+r transcript browser and its supporting infrastructure (~1030 net lines deleted).

  • The browser was a windowed view with entry navigation, tool-run folding, and wheel scrolling that replicated what terminal scrollback already shows, at the cost of a large state machine in ConnectApp and viewport machinery in transcriptRows.
  • Removed from ConnectApp: windowed, navKey, openedKeys, scrollAnchor, expanded, sandboxLogOpen state; alt-screen switching; SGR mouse capture; ~80-line transcript navigation keybindings.
  • Removed from transcriptRows: viewport/anchor/reveal/navigation functions (rowViewport, anchorAt, anchorIndex, entryRange, snapToEntry, snapAnchorForEntry, navKeyOf, ScrollAnchor).
  • Removed /transcript command and ctrl+j; esc and bottom-edge arrow now reach the picker.
  • Long tool results and user turns still cut at six lines, but no longer expand — hint shows … +N lines.
  • Settled sandbox logs no longer re-open after session starts.

This description was created by Ellipsis for 6cbd009. It will automatically update as commits are pushed.

The alt-screen browser bought back repaintability -- entry navigation,
folding, app-read scrolling -- at the cost of a scroll/anchor/selection
machine larger than the chat itself, for a screen that showed what the
terminal's own scrollback already shows. It goes, and ctrl+j with it: esc
and the bottom-edge arrow are the ways to the picker.

Long bodies still clamp at six lines. Nothing un-clamps them now, so the
hint drops its key and reads "+N lines" -- the full text is up in the
scrollback where it printed.
@hbrooks
hbrooks merged commit 16540c6 into main Aug 21, 2026
1 check passed

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌ — 2 issues

Reviewed 6cbd009 in 8 minutes, 35 seconds.
  • Reviewed 1 commit with 811 lines of code in 9 files
  • Ran 1 review agent producing 2 comments where 2 were posted
  • This pipeline runs no gatekeeper, so findings are posted as written.
  • View full details on ellipsis.dev

This review was created by Ellipsis. You can tag @ellipsis in this pull request.

Comment thread src/ui/ConnectApp.tsx
Comment on lines +1949 to 1953
// A clamped body says how much it cut, and nothing more: there is no key that
// un-clamps it, and the full text is up in the scrollback where it printed.
const spans: RowSpan[] = row.clampedLines
? [
{
text: `… +${row.clampedLines} lines (${selected ? '→' : 'ctrl+r'} to expand)`,
dim: true,
},
]
? [{ text: `… +${row.clampedLines} lines`, dim: true }]
: row.spans

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clamped body's full text is not in the scrollback, so a long tool result is now unreadable anywhere in the UI — … +N lines names no key and no view has the rest.

<Static> (the scrollback) is fed from flushedRows, which is sliced out of allRows; allRows builds every row via itemRows, and itemRows (transcriptRows.ts:158) now clamps unconditionally. So the rows printed into scrollback are the same 6 lines plus this marker — the hidden lines were never printed. Concretely: a tool_result with 200 lines shows 6 and … +194 lines, and nothing in the chat, the scrollback, or any key can show line 7. Previously → / ctrl+r un-clamped it. The comment on 1949-1950 (and the same claim at 88) is the premise the removal rests on and it does not hold.

Comment thread src/ui/ConnectApp.tsx
Comment on lines +1368 to +1371
// past. Once it settles the block collapses to its summary line; the log
// itself stays up in the scrollback, where it was printed.
if (!sandbox) return rows
const show = settled && !o.expanded ? [] : lastLines(sandbox.log, SANDBOX_LOG_ROWS)
const show = settled ? [] : lastLines(sandbox.log, SANDBOX_LOG_ROWS)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The startup log is erased when the sandbox settles rather than left in the scrollback, because it never gets printed there: it only ever renders in the repainting live region.

While the sandbox is starting, sandboxSettled is false, so SANDBOX_KEY is absent from settledKeys and the log rows render only in the live <Box>, which ink repaints in place. The moment it settles, sandboxRows returns just the header + summary (show = [] here), and those are the rows flushed to <Static>. So the build/setup output is gone for good once the session is up — with the -to-reopen path deleted there is nothing left that can show it.

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.

1 participant