Improve review commands workflow

Changes

This MR improves the Claude-based code review workflow in two areas:

1. Sequential finding approval with AskUserQuestion

The approval loop in sr-create-review-report was presenting all findings at once instead of processing them one at a time. This change explicitly instructs Claude to:

  • Show one finding at a time (severity, lens, file/line, comment text)
  • Call AskUserQuestion immediately after each finding. Instead of having to type "yes", "no", etc, the user sees an arrow-key navigable menu:
    ? How would you like to proceed?
    ❯ Yes - Approve this finding
      No - Skip this finding
      Edit - Suggest changes to the comment text
      Other
  • Wait for the user's response before proceeding to the next finding

2. Accurate line positioning for draft notes

The sr-submit-review-report command now includes improved guidance for positioning line-level comments:

  • Fetch the full diff to determine line categories (added/deleted/unchanged)
  • Calculate old_line from hunk headers for unchanged/context lines
  • Use correct position fields based on line type:
    • Added lines: new_path + new_line only
    • Deleted lines: old_path + old_line only
    • Unchanged lines: all four fields with calculated offset
Edited by Cameron Swords

Merge request reports

Loading