Skip to content

fix(tui): show 'more content available' for view_request over 15 lines#687

Open
sean-kim05 wants to merge 1 commit into
usestrix:mainfrom
sean-kim05:fix/view-request-truncation-hint
Open

fix(tui): show 'more content available' for view_request over 15 lines#687
sean-kim05 wants to merge 1 commit into
usestrix:mainfrom
sean-kim05:fix/view-request-truncation-hint

Conversation

@sean-kim05

Copy link
Copy Markdown

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:

lines = content.split("\n")[:15]
...
if has_more or len(lines) > 15:   # len(lines) is at most 15 after the slice
    ...
    text.append("  ... more content available", ...)

Because lines is already capped at 15, len(lines) > 15 is always False. When a result has more than 15 lines but has_more is 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:

if body_truncated or len(body.split("\n")) > 5:

Change

Measure the original content length: len(lines) > 15len(content.split("\n")) > 15. One expression, confined to ViewRequestRenderer.render.

Tests

Added tests/test_proxy_renderer.py:

  • 30-line content, has_more=False → hint shown (fails on old code, passes with fix)
  • 5-line content → hint not shown
  • has_more=True → hint shown

Full suite: 86 passed; ruff check/format clean; mypy clean on the new test.

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
@greptile-apps

greptile-apps Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the missing TUI truncation hint for long view_request output.

  • Updates ViewRequestRenderer to count the original content lines.
  • Keeps the existing has_more behavior for paginated output.
  • Adds tests for long content, short content, and explicit has_more cases.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
strix/interface/tui/renderers/proxy_renderer.py Changes the ViewRequestRenderer hint condition so long content still shows the more-content marker after display slicing.
tests/test_proxy_renderer.py Adds focused coverage for the corrected truncation hint behavior.

Reviews (1): Last reviewed commit: "fix(tui): show 'more content available' ..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

view_request renderer never shows 'more content available' for >15-line output

1 participant