fix(tui): show 'more content available' for view_request over 15 lines#687
Open
sean-kim05 wants to merge 1 commit into
Open
fix(tui): show 'more content available' for view_request over 15 lines#687sean-kim05 wants to merge 1 commit into
sean-kim05 wants to merge 1 commit into
Conversation
ViewRequestRenderer sliced content to 15 lines, then guarded the truncation hint with len(lines) > 15 — always false, since lines was already capped at 15. Output longer than 15 lines with has_more falsy was silently truncated with no indicator. Measure the original line count via len(content.split()) instead, matching the sibling RepeatRequestRenderer. Add regression tests. Closes usestrix#685
Contributor
Greptile SummaryThis PR fixes the missing TUI truncation hint for long
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "fix(tui): show 'more content available' ..." | Re-trigger Greptile |
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.
Closes #685
What
In
strix/interface/tui/renderers/proxy_renderer.py,ViewRequestRenderer.render()slices content to 15 lines and then guards the truncation hint with a condition that can never be true:Because
linesis already capped at 15,len(lines) > 15is alwaysFalse. When a result has more than 15 lines buthas_moreis falsy, the first 15 are shown and the rest are dropped with no "more content available" indicator — the reader thinks they saw everything.Why
The sibling
RepeatRequestRenderer.render()in the same file measures the original line count correctly:Change
Measure the original content length:
len(lines) > 15→len(content.split("\n")) > 15. One expression, confined toViewRequestRenderer.render.Tests
Added
tests/test_proxy_renderer.py:has_more=False→ hint shown (fails on old code, passes with fix)has_more=True→ hint shownFull suite: 86 passed;
ruff check/formatclean;mypyclean on the new test.