fix(simulate): make the run viewer page-scrollable so long content fits short terminals#899
Merged
Conversation
…ts short terminals The list view rendered the run summary (and job list chrome) with no height budget, so on short terminals (e.g. 31 rows) the view exceeded the screen and the header plus the top of the job list scrolled off - a 10-job run showed only jobs 7-10. Instead of clamping individual sections, compose the whole page (header, description, counts, full job list, summary, logs) and window it to the terminal height with overflow markers, keeping the toast and hint bar pinned at the bottom. - mouse wheel and PgUp/PgDn scroll the page when no pane (detail, description, logs) has focus - arrow keys still move the job cursor; the page auto-scrolls to keep the cursor row visible - the job list's internal two-thirds-height window is gone - the full list renders and the page scrolls instead - the hint bar advertises PgUp/PgDn only when the page actually overflows
theomonnom
reviewed
Jul 9, 2026
Member
There was a problem hiding this comment.
Not sure about this file, idk if it's useful for UI stuff
theomonnom
approved these changes
Jul 9, 2026
8643775 to
da510b4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
lk agent simulate/--view <run>rendered the run summary below the job list with no height budget. On short terminals (e.g. 31 rows) the view exceeded the screen and the header plus the top of the job list scrolled off — a 10-job run showed only jobs 7–10 at all times.Replaces #898, which clamped just the summary; this makes the whole viewer scrollable instead.
Fix
Compose the full page (header, description, counts, full job list, summary, logs) and window it to the terminal height with
↑/↓ N more linesmarkers, keeping the toast and hint bar pinned at the bottom.PgUp/PgDn scrollonly when the page actually overflows.Testing
New
simulate_tui_layout_test.goreproduces the report: a 31×156 terminal with 10 jobs and a long summary fits in 31 rows anchored to the top (header + Scenario 1 visible, overflow advertised); scrolling reaches the bottom of the summary with the hint pinned; cursor movement pulls the cursor row into view; content that fits renders unwindowed. Fullgo test ./cmd/lk/passes.