Skip to content

Tighten vf-tui info preview formatting and typing checks#830

Merged
willccbb merged 5 commits intomainfrom
codex/fix-vf-tui-info-viewing-bugs-hpuft0
Feb 6, 2026
Merged

Tighten vf-tui info preview formatting and typing checks#830
willccbb merged 5 commits intomainfrom
codex/fix-vf-tui-info-viewing-bugs-hpuft0

Conversation

@willccbb
Copy link
Member

@willccbb willccbb commented Feb 5, 2026

Motivation

  • The rollout details panel could display poorly when info was a JSON-encoded string or a very large payload, causing the details pane to dominate the UI or show only an opening brace.
  • The goal is to present info as a compact, readable preview in the TUI while preserving access to the full data and maintaining robust typing/lint checks.

Description

  • Added _coerce_info_value to parse JSON-encoded info strings into Python objects when appropriate and kept support for native dict/list values.
  • Reworked format_info_for_details to 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.
  • Updated the rollout details rendering in the TUI to use format_info_for_details, append a dim hint (full info available in results.jsonl), and ensure a newline is preserved before showing the Task field.
  • Updated tests in tests/test_tui_info_formatting.py to assert the compact rendering, JSON-string parsing, and newline-free truncation behavior.

Testing

  • Ran unit tests with uv run pytest tests/test_tui_info_formatting.py, which passed (3 passed).
  • Ran lint checks with uv run ruff check verifiers/scripts/tui.py tests/test_tui_info_formatting.py, which passed.
  • Ran static type checks with 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 info is displayed or scrolled in the terminal UI.

Overview
Improves how rollout info is rendered in the TUI details panel by adding format_info_for_details() (with JSON-string coercion) and using it in ViewRunScreen.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 showing Task. 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 request request_type fields.

Written by Cursor Bugbot for commit 2e3bf28. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@willccbb willccbb merged commit e203811 into main Feb 6, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant