Conversation
Wire up the existing requestChanges() API function in the merge queue UI. Adds a "Request Changes" button between Approve and Reject for pending entries. Clicking opens a dialog to enter feedback, which is sent back to the agent session via the /request-changes endpoint. Closes #520 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
The page.tsx Dialog implementation is solid — proper error handling with toast notifications, loading/submitting state, feedback cleared on success, and the changes_requested_feedback display in the row is a nice touch. Core functionality looks correct end-to-end.
Two suggestions worth considering before/after merge:
-
Dead code in
columns.tsx— thecolumnsexport (TanStack Table definitions) isn't consumed anywhere in the current app.page.tsximports only utility functions fromcolumns.tsx. ThehandleRequestChangesusingwindow.prompt()added to this file will never run. If the table view is meant to stay, it should use the same dialog approach and add error handling to matchpage.tsx. -
Feedback state not reset on Cancel — minor UX inconsistency: the success path clears
feedbackbut the Cancel button doesn't. See inline comment for the one-liner fix.
The reasoning and feedback API fields both receiving the same user input is a reasonable simplification for human-originated requests — reasoning ends up in the event log for auditing while feedback is what the agent sees, and for a human entering one text field, duplicating the value is fine.
References:
Reviewed by PR / Review
| } | ||
|
|
||
| async function handleRequestChanges() { | ||
| const feedback = window.prompt("Describe the changes needed:"); |
There was a problem hiding this comment.
[SUGGESTION]
Priority: Code Quality
The columns export (TanStack Table column definitions) is not imported by any active consumer — page.tsx only imports utility functions from this file (statusBadge, lifecyclePhases, etc.), not the columns array. This means handleRequestChanges using window.prompt() is dead code and will never run in the current UI.
If the table view is intended to be revived, this implementation has two problems compared to the page.tsx dialog approach: it uses a blocking native browser prompt (can be suppressed by browsers, unstyled, inconsistent UX) and it has no error handling — if requestChanges() throws, the error propagates silently.
Consider either wiring up the columns export to a table view, or removing the handleRequestChanges from columns.tsx entirely since the dialog in page.tsx handles this correctly.
| <Button | ||
| variant="outline" | ||
| size="sm" | ||
| onClick={() => setRequestChangesOpen(false)} |
There was a problem hiding this comment.
[SUGGESTION]
Priority: Code Quality
The Cancel button closes the dialog but doesn't reset the feedback state:
onClick={() => setRequestChangesOpen(false)}If a user types some feedback, cancels, then reopens the dialog for the same entry, the previous draft text is still present. The success path correctly clears feedback (setFeedback("")), so the Cancel path is inconsistent with that expectation.
Consider resetting on close: onClick={() => { setRequestChangesOpen(false); setFeedback(""); }}. Similarly, you could add a cleanup to onOpenChange: onOpenChange={(open) => { if (!open) setFeedback(""); setRequestChangesOpen(open); }}.
|
Orchestrator Evaluation: Rejected The PR addresses the issue by wiring up the
Feedback for agent:
|
Summary
requestChanges()API function (api.ts:78-88) in the merge queue UI/api/merge-queue/:id/request-changesendpointTest plan
changes_requestedstatusCloses #520
🤖 Generated with Claude Code