Skip to content

Conversation

@snimu
Copy link
Contributor

@snimu snimu commented Jan 8, 2026

Description

Added two new features:

  • the run choice shows a bit extra info about the specific run
  • there is a search function to search inside a rollout (triggered by s)
vf-tui-2026-01-08.mov

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test improvement

Testing

  • All existing tests pass when running uv run pytest locally.
  • New tests have been added to cover the changes

Checklist

  • My code follows the style guidelines of this project as outlined in AGENTS.md
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes


Note

Adds in-run search and richer run selection details to the Textual TUI.

  • New case-insensitive regex search (press s) in ViewRunScreen; displays results in a modal, highlights matches in prompt/completion, auto-scrolls to the selected line, and clears highlight after a short delay
  • Added run details side panel in SelectRunScreen showing metadata like avg reward, metrics, runtime, env_args, and sampling_args; updates as runs are highlighted
  • Introduces helpers for match styling and wrapped-line offset calculation to enable precise scrolling; updates key bindings and layout/CSS for search and details panels

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

elif event.key == "down":
self._move_selection(1)
event.prevent_default()
event.stop()
Copy link

Choose a reason for hiding this comment

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

Arrow keys interfere with search Input cursor navigation

Medium Severity

The on_key handler in SearchScreen unconditionally intercepts all arrow key events at the screen level without checking which widget has focus. Since the Input widget is focused on mount (line 1068), pressing left/right arrow keys to navigate within the search query text also triggers _switch_column(), causing the active result column to change unexpectedly. This makes it difficult for users to edit their search pattern using arrow keys because the UI responds to those keys in ways the user doesn't intend. The handler needs to check if the Input has focus before intercepting arrow keys for column/selection navigation.

🔬 Verification Test

Why verification test was not possible: This is a TUI (Textual Terminal User Interface) application that requires an interactive terminal environment to test. The bug involves keyboard event handling during user interaction, which cannot be easily unit tested without mocking the entire Textual event system and terminal environment. The bug is evident from code inspection: on_key unconditionally intercepts arrow keys at the screen level while the Input widget is focused by default on mount, causing unintended side effects when users try to navigate within their search text.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is intended behavior. This is mostly mean for quick searches, so if there's a mistake, hit the back-key and type again. This override allows for quick and intuitive result selection with the arrow keys.

@willccbb willccbb merged commit e8b72dd into main Jan 8, 2026
6 checks passed
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.

3 participants