fix(simulate): keep the job list visible when the summary overflows short terminals#898
Closed
u9g wants to merge 1 commit into
Closed
fix(simulate): keep the job list visible when the summary overflows short terminals#898u9g wants to merge 1 commit into
u9g wants to merge 1 commit into
Conversation
…hort terminals The list view appended the full run summary below the job list with no height budget, so on short terminals (e.g. 31 rows) the rendered 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. Clamp the summary to the height remaining under the list with a "press S to expand" marker, and add an expanded state (S to toggle, arrows/PgUp/PgDn to scroll, esc/q to collapse) that shows the full summary in place of the list, mirroring the detail/description patterns.
5d24248 to
c3f3ea9
Compare
Contributor
Author
|
Superseded — reworking this as whole-view scrolling instead of clamping the summary. |
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>in a short terminal (e.g. 31 rows) rendered the full run summary below the job list with no height budget. The view exceeded the screen, the header and top of the job list scrolled off, and a 10-job run showed only jobs 7–10 at all times.Fix
↓ N more summary lines · press S to expandmarker. The view now always fits the terminal, so the whole job list stays visible.Stoggles an expanded summary rendered in place of the job list, windowed and scrollable (arrows/PgUp/PgDn/mouse wheel), collapsed withS/esc/q— the same pattern as the job-detail and description views. CapitalSavoids the existings(save scenarios) binding.Sbinding and its hint-bar entry appear only when the summary was actually clamped (it stays available to collapse an expanded view).Testing
New
simulate_tui_layout_test.goreproduces the report: a 31×156 terminal with 10 jobs and a long summary must fit in 31 rows with the first and last scenarios visible; expanded mode fits, scrolls, and clamps scroll offsets; short summaries render unclamped with noShint. Fullgo test ./cmd/lk/passes.