Skip to content

agent: scroll the transcript from the side margins - #1253

Merged
AnthonyRonning merged 3 commits into
masterfrom
claude/pensive-mendel-07zcqs
Oct 24, 2026
Merged

AnthonyRonning merged 3 commits into
masterfrom
claude/pensive-mendel-07zcqs

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

In the GPUI desktop app (apps/maple-agent), the mouse wheel only scrolled the chat history when the pointer was over the 900px centered text column. The empty areas beside it did nothing. Now a wheel anywhere in the chat pane scrolls the transcript, unless something under the pointer scrolls itself or is window chrome. The layout looks the same.

  • The list keeps its column (ui/chat/transcript.rs): the transcript gpui::list stays inside the 900px content column. gpui drops every measured row height whenever a list's width changes, so a full-width list lost them on every sidebar toggle and on every frame of a window resize: the scrollbar thumb jumped and changed size. Inside the column its width only changes on narrow windows.
  • The pane forwards the wheel (ui/chat/mod.rs, ui/chat/transcript.rs): scroll_transcript_from_pane on the chat pane covers the side margins, the gutter beside the text, the scrollbar strip, the history banners, the message being sent, the waiting dots and the space beside the composer. It scrolls the same way the list's own wheel does: the same 20px line, the view stops following new messages when you scroll up and follows again at the bottom.
  • It reports the rows on screen: rows record when they are prepainted in view, and the pane's wheel reports those rows for history paging and image loading, as the list's own wheel does. At the end of the transcript the list's scroll top names no row, so a range computed from it is empty.
  • What keeps its own wheel: the header (the window's title bar), the composer column with its cards and slash palette, the question card, and the sending bubble, which scrolls itself. Menus already block the pointer.
  • The image lightbox blocks the pointer, so a wheel over an open image no longer scrolls the transcript behind it.

Testing

  • just ci: format, clippy for every feature set, workspace and headless tests.
  • New tests in ui::chat:
    • A wheel over the margins, the gutter, the scrollbar strip or beside the composer moves the transcript exactly as far as the list's own wheel; over the header or the composer it doesn't. Covers line deltas and letting go of / taking back the tail.
    • Opening the sidebar keeps the scroll range, and the thumb dragged to the top reaches the first row.
    • At the bottom, a wheel beside the composer reports the same rows on screen as the list's own wheel.
    • An open lightbox, the sending bubble and the question card keep the transcript still.
  • In the real app (local stack, Pro fixture account, a 1280×815 window, a long conversation):
    • Real mouse-wheel events moved the content 80px for 2 notches over the transcript, both side margins, the gutter, the scrollbar strip and beside the composer. They moved it 0px over the composer and the header. The same held with the sidebar open (40px margins), and the sidebar itself does not scroll the transcript.
    • Sidebar toggle while scrolled up: the scrollbar thumb went from 76px to 143px on the previous head. With this change it stays at 75px (73px measured). Resizing the window from 1280 to 1100 and back left the content and the thumb unchanged. The thumb was photographed in builds whose scrollbar hides after 60s instead of 1s; that change was local only.
    • During a streaming reply, a wheel up beside the composer held the view while the reply grew. Wheeling back down beside the composer followed the stream again.
    • With the composer expanded, the margin beside it scrolls the transcript and the composer does not. A context menu opened in the margin takes the wheel.

🤖 Generated with Claude Code


Generated by Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

claude and others added 3 commits October 24, 2026 06:50
The transcript list was laid out inside the 900px content column, so
the wheel only reached it over the text. The list now spans the full
width and each row carries the centered column and gutter, so the
layout is unchanged while the margins scroll too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QhDzZ7AvSid4KYuis9yv91
The composer row now spans the full width and forwards a wheel over its
side margins to the transcript list, with the same line height, tail
follow release/re-engage and history paging as the list's own wheel.
The centered column still consumes its own wheel, so the composer,
cards and slash palette behave as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QhDzZ7AvSid4KYuis9yv91
A full-width transcript list re-measured every row on each width change:
gpui drops all cached row heights when a list's width changes, so opening
the sidebar or resizing the window collapsed the scroll range, and the
scrollbar thumb jumped and changed size. The list goes back to the content
column, whose width only changes on narrow windows. The chat pane forwards
any wheel that nothing under the pointer takes: the margins and gutters,
the scrollbar strip, the banners, the message being sent and the space
beside the composer. The header, the composer column, the question card
and a scrolling send bubble keep their own wheel.

The forwarded wheel reports the rows the list painted in view, as the
list's own wheel does. At the end of the transcript the list's scroll top
names no row, so the margin wheel reported an empty range and narrowed
image loading to the last five rows.

The image lightbox now blocks the pointer, so a wheel over an open image
no longer scrolls the transcript behind it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning merged commit de92c4a into master Oct 24, 2026
39 checks passed
@AnthonyRonning
AnthonyRonning deleted the claude/pensive-mendel-07zcqs branch October 24, 2026 21:58
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.

2 participants