Skip to content

RFC: Refine Single Commit from TUI #130

@mniehoff

Description

@mniehoff

Summary

Add the ability to refine a single commit directly from the TUI using s (solve), and extend the roborev refine CLI command to accept a single commit SHA as a target.

Motivation

Currently, roborev refine operates on an entire branch (from merge-base or --since to HEAD). When viewing a failed review in the TUI, users should be able to trigger a targeted refine for just that specific commit without running the full branch refinement loop.

Proposed Changes

1. CLI: Add single-commit support to roborev refine

Extend the command to accept an optional commit SHA argument:

roborev refine <commit>       # Refine a specific commit
roborev refine                # Existing behavior: refine branch
roborev refine --since <sha>  # Existing behavior: refine from base

When a commit SHA is provided:

  • Skip branch-level logic (merge-base calculation, iterating through commits)
  • Find the failed review for that specific commit
  • Run the agent to address findings for that commit only
  • Default to 3 max iterations (branch refine remains at 10)
  • Exit after addressing or after max iterations

2. Config: Add refine_max_iterations setting

Add optional config in .roborev.toml:

refine_max_iterations = 5  # Override default for single-commit refine

Resolution priority:

  1. --max-iterations CLI flag (explicit)
  2. refine_max_iterations in .roborev.toml
  3. Default: 3 for single-commit, 10 for branch refine

3. TUI: Add s keybinding to trigger single-commit refine

Add keybinding s (solve) that:

  • Is available in queue view when a failed review is selected
  • Is available in review detail view when viewing a failed review
  • Spawns roborev refine <commit-sha> for the selected job's commit
  • Shows status feedback (e.g., flash message "Solving commit abc1234...")

Acceptance Criteria

  • roborev refine <sha> refines only the specified commit
  • Single-commit refine defaults to 3 max iterations
  • Branch refine remains at 10 max iterations (unchanged)
  • refine_max_iterations config option works in .roborev.toml
  • Error if commit has no failed review or review is already addressed
  • TUI s key triggers refine for selected failed review
  • TUI shows appropriate feedback during/after refine
  • Help view (?) updated: s - Solve (refine commit)
  • Documentation updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions