fix(claudbg-4gtn): clamp Space/PageDown scroll to end of transcript content
Compute total rendered lines on each page-down keypress and cap the scroll offset so it cannot scroll past the last line. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
3b209745fc
commit
ae337dcf94
@ -1,10 +1,15 @@
|
|||||||
---
|
---
|
||||||
# claudbg-4gtn
|
# claudbg-4gtn
|
||||||
title: 'TUI: Space/PageDown scrolls past end of transcript'
|
title: 'TUI: Space/PageDown scrolls past end of transcript'
|
||||||
status: todo
|
status: completed
|
||||||
type: bug
|
type: bug
|
||||||
|
priority: normal
|
||||||
created_at: 2026-03-31T23:45:06Z
|
created_at: 2026-03-31T23:45:06Z
|
||||||
updated_at: 2026-03-31T23:45:06Z
|
updated_at: 2026-04-01T05:51:55Z
|
||||||
---
|
---
|
||||||
|
|
||||||
Space/PageDown in the transcript view continues scrolling past the last line. It should stop at the bottom of the transcript content.
|
Space/PageDown in the transcript view continues scrolling past the last line. It should stop at the bottom of the transcript content.
|
||||||
|
|
||||||
|
## Summary of Changes
|
||||||
|
|
||||||
|
In `src/tui/screens/transcript.rs`, the PageDown/Space handler now clamps scroll to the actual content length: computes `total_lines = build_chat_lines(...).len()` and `max_scroll = total_lines.saturating_sub(page_height)`, then applies `.min(max_scroll)` to prevent scrolling into empty space. Updated 3 existing tests to populate entries before testing scroll behavior.
|
||||||
|
|||||||
Loading…
Reference in New Issue