Show hidden output line counts in compact terminal activity (#48761)

## What changed

Replace generic output disclosure labels with counts such as `+ 5 lines (ctrl+t to expand)` for compact command activity, both live and in history. Count retained output lines hidden or clipped by the preview, excluding output discarded by storage limits.

Use the configured `open_transcript` shortcut and omit the hint when it does not fit or the action is unbound. Invalidate cached layouts when keybindings change. Keep generic `Show details` labels for other hidden details and keep disclosure controls outside copyable and searchable text.

## Testing

Add regression tests for live/history consistency, remapped and disabled shortcuts, and exclusion of hints from source text. Add snapshot coverage for fully visible output, hidden and clipped lines, command-only details, and storage-truncated output.

GitOrigin-RevId: c468be9b88b69dc3ca1abdb6b7be023244d32a57
This commit is contained in:
Felipe Coury
2026-09-27 18:09:34 +00:00
committed by copyberry
parent 71b38795d8
commit e75b6b1e0c
12 changed files with 263 additions and 34 deletions
+5 -1
View File
@@ -287,8 +287,12 @@ impl TranscriptView {
expanded: bool,
lines: impl FnOnce(u16) -> Option<ActivityTranscriptLines>,
) -> bool {
let shortcut = self
.disclosure
.keymap
.primary_hint(crate::keymap::KeymapContext::Global, "open_transcript");
self.sync_live_layout(width, key, |width| {
lines(width).map(|lines| layout::activity_layout(lines, width, expanded))
lines(width).map(|lines| layout::activity_layout(lines, width, expanded, shortcut))
})
}