Keep fullscreen prompts bounded and scrollable (#50109)

## Why

Long drafts need to remain browsable while leaving room for the transcript. Remote image attachments also need to leave an editable prompt row visible.

## What changed

- Cap the fullscreen composer, including padding and hints, at two-thirds of the screen, with a minimum of eight rows when the screen allows.
- Support mouse-wheel browsing without moving the caret or changing transcript selection, search, or activity focus. Show arrows for hidden prompt rows and hide the cursor when the caret is offscreen.
- Resume caret following on editor input, paste, and external edits.
- Keep the selected remote image visible while reserving space for prompt text.

## Testing

Add regression tests and snapshots for fullscreen scrolling, caret restoration after navigation, paste and external edits, remote image navigation and deletion, resizing at scroll boundaries, and disconnected editing.

GitOrigin-RevId: 9a1e4ce14b3b3747e6d136207546327531339258
This commit is contained in:
Ian MacLeod
2026-10-01 22:00:12 +00:00
committed by copyberry
parent e58b493329
commit 6ece7bfc21
19 changed files with 673 additions and 88 deletions
@@ -83,12 +83,10 @@ async fn owned_bottom_pane_preserves_draft_cursor_and_read_only_notice() {
/*x*/ 0, /*y*/ 8, /*width*/ 60, /*height*/ 8,
);
let render_bottom = |widget: &ChatWidget| {
let bottom = widget.bottom_pane_renderable(
/*footer*/ None,
crate::bottom_pane::CommandPopupPlacement::Overlay,
/*composer_gap*/ None,
/*working_tip*/ None,
);
let bottom = widget.bottom_pane_renderable(crate::bottom_pane::ComposerRenderOptions {
command_popup_placement: crate::bottom_pane::CommandPopupPlacement::Overlay,
..Default::default()
});
let mut buffer = Buffer::empty(area);
bottom.render(area, &mut buffer);
(buffer, bottom.cursor_pos(area), bottom.cursor_style(area))