Tighten vf-tui info preview formatting and typing checks#830
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
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.
Motivation
infowas a JSON-encoded string or a very large payload, causing the details pane to dominate the UI or show only an opening brace.infoas a compact, readable preview in the TUI while preserving access to the full data and maintaining robust typing/lint checks.Description
_coerce_info_valueto parse JSON-encodedinfostrings into Python objects when appropriate and kept support for nativedict/listvalues.format_info_for_detailsto emit a compact single-line preview (normalizing whitespace), use tighter JSON separators for inline rendering, and produce a concise inline truncation suffix when content is large.format_info_for_details, append a dim hint(full info available in results.jsonl), and ensure a newline is preserved before showing theTaskfield.tests/test_tui_info_formatting.pyto assert the compact rendering, JSON-string parsing, and newline-free truncation behavior.Testing
uv run pytest tests/test_tui_info_formatting.py, which passed (3 passed).uv run ruff check verifiers/scripts/tui.py tests/test_tui_info_formatting.py, which passed.uv run ty check verifiers/scripts/tui.py tests/test_tui_info_formatting.py, which passed.Codex Task
Note
Low Risk
Mostly isolated TUI rendering/layout changes plus small typing cleanup; primary risk is minor regressions in how
infois displayed or scrolled in the terminal UI.Overview
Improves how rollout
infois rendered in the TUI details panel by addingformat_info_for_details()(with JSON-string coercion) and using it inViewRunScreen.update_display()to produce consistent, readable output (including graceful fallback for non-serializable values).Adjusts the details UI to be vertically scrollable (
details-scroll), resets its scroll position when changing records, and ensures proper newline separation before showingTask. Adds unit tests covering dict handling, JSON-string parsing, large payload preservation, and non-serializable values, and removes unnecessary# type: ignore[override]annotations from worker requestrequest_typefields.Written by Cursor Bugbot for commit 2e3bf28. This will update automatically on new commits. Configure here.