Add 'b' bump command to patch management mode#317
Conversation
Lets the operator clear a patch's intervention state without sending a human message — the poller then re-enqueues the appropriate next op on its next cycle. Only offered in the Manage Patch overlay when the patch is currently in needs-intervention; refuses with a log line otherwise. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe PR adds a "bump" feature that lets users press 'b' to reset intervention state on patches. Changes thread a ChangesBump action for intervention recovery
Sequence DiagramsequenceDiagram
participant User
participant InputHandler as Input Handler
participant Orchestrator
participant State
User->>InputHandler: Press 'b' key
InputHandler->>InputHandler: Resolve target patch from view
alt patch needs intervention
InputHandler->>Orchestrator: reset_intervention_state(patch)
Orchestrator->>State: Clear intervention flag
InputHandler->>InputHandler: Log success
else patch not found or no intervention needed
InputHandler->>InputHandler: Log bump not possible
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Review SummaryThis is a
Variant: convergence-v2 Candidates: 1 | Posted: 1 | Suppressed: 0 1 comment posted · Model: |
Review SummaryClean delta. The
Variant: convergence-v2 Candidates: 0 | Posted: 0 | Suppressed: 0 0 comments posted · Model: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/tui.ml`:
- Around line 1166-1179: The code uses the raw selected index when resolving
target_pv (match on view_mode / List.nth views selected), which can go out of
bounds if the views list shrinks; clamp selected to the valid range before any
use. Change usages that call List.nth views selected (and the subsequent
Option.value_map accesses for automerge_enabled and needs_intervention) to use a
clamped_index computed from selected and (List.length views) so List.nth is
always called with a valid index; apply the same clamping wherever selected is
used to resolve a Patch_view to avoid transient None results.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 82ba99d3-edad-4695-9c02-dd21caaa028f
📒 Files selected for processing (3)
lib/tui.mllib/tui.mlilib/tui_fiber.ml
Review SummaryClean push. The
Variant: convergence-v2 Candidates: 0 | Posted: 0 | Suppressed: 0 0 comments posted · Model: |
Summary
baction in the Manage Patch overlay, shown only when the selected patch is inneeds-intervention.session_fallbacktoFresh_availablevia the existingOrchestrator.reset_intervention_state(which also refreshes the base branch). No human message is required; the poller picks the patch back up on its next cycle and re-enqueues the appropriate op (Ci, Merge_conflict, etc.) naturally.Test plan
b, confirm the overlay closes, the activity log shows "Bumped — cleared intervention state", and the patch resumes work on the next poll tick.brow is absent and that pressingblogs "Cannot bump — patch is not in needs-intervention".🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.Summary by cubic
Add a new 'b' bump command in the Manage Patch overlay to clear a patch’s intervention state and resume automated processing without a human message. The option only shows for patches in needs-intervention.
New Features
Bug Fixes
Written for commit c4fdfac. Summary will update on new commits. Review in cubic
Summary by CodeRabbit