Wire keyboard selection into transcript overlays (#57223)

## What changed

- Add `tui.keymap.global.select_transcript` with an implicit `leader [` shortcut that follows the configured leader, respects explicit remapping or unbinding, and yields to existing bindings.
- Connect transcript overlays to keyboard selection, including Find, mouse selection, and navigation to the beginning of paged history. Give selection commands priority over remapped pager shortcuts.
- Close selection overlays on exit or after a confirmed copy-and-follow operation, preserving the pending close decision while clipboard confirmation is asynchronous.
- Show selection navigation and copy hints that adapt to the available footer width.

## Testing

Add coverage for shortcut dispatch, remapping, unbinding, and conflicts; overlay exit behavior; selection across history paging; mouse and keyboard selection interaction; and cursor and footer rendering snapshots.

GitOrigin-RevId: 8a920e5fa2b06ff0544d829ba30f8ecb654db0ee
This commit is contained in:
Felipe Coury
2026-10-26 20:09:54 +00:00
committed by copyberry
parent 285fc74305
commit 9f622c2abb
15 changed files with 869 additions and 99 deletions
+19 -1
View File
@@ -262,7 +262,25 @@ impl TranscriptView {
event: MouseEvent,
cells: &[Arc<dyn HistoryCell>],
) -> Option<ViewAction> {
self.handle_mouse_with_mode(event, cells, MouseMode::Selection)
let endpoint_changed = matches!(
event.kind,
MouseEventKind::Down(MouseButton::Left)
| MouseEventKind::Drag(MouseButton::Left)
| MouseEventKind::Up(MouseButton::Left)
);
let before = self
.selection
.as_ref()
.map(|selection| (selection.start, selection.end, selection.unit()));
let action = self.handle_mouse_with_mode(event, cells, MouseMode::Selection);
let after = self
.selection
.as_ref()
.map(|selection| (selection.start, selection.end, selection.unit()));
if endpoint_changed && before != after {
self.adopt_select_mouse_range();
}
action
}
fn handle_mouse_with_mode(