Tinker
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Home
Epics
Fix approvals page reject - add rejection reason modal
Edit
Fix approvals page reject - add rejection reason modal
Cancel
Save
Title
*
Project
*
Choose an option
alpha
tinker
Create new project
Description
## Problem The approvals page reject functionality is incomplete: 1. Reject button works but doesn't capture WHY the ticket was rejected 2. No modal/dialog for entering rejection reason 3. Rejection reason is not stored or displayed ## Context The proposals page has a working rejection modal with: - Dialog modal with textarea for reason - Quick reason chips (Duplicate, Hallucination, Too Risky, Trivial, Already Implemented) - Rejection reason stored in database and displayed The approvals page should follow the same pattern. ## Implementation Plan ### 1. Backend (`app/controllers/api/v1/tickets_controller.rb`) - Modify `transition` action to accept optional `rejection_reason` parameter - Follow the pattern already used for `block_reason` (lines 130-131) - Store rejection reason in `working_memory` hash ### 2. Frontend Modal (`app/views/dashboard/approvals.html.haml`) - Add a `<dialog>` modal for rejection (similar to proposals) - Include textarea for rejection reason - Add quick reason chips (optional but helpful) ### 3. JavaScript Controller (`app/javascript/controllers/approval_controller.js`) - Add `showRejectModal()` action - Add `submitReject()` action to send reason with API call - Modify existing `reject()` to trigger modal instead of direct API call ### 4. Display Rejection Reason - Show rejection reason on the ticket card when ticket is rejected - Similar to how proposals display rejection reason ## Acceptance Criteria - [ ] Clicking Reject on approvals page opens a modal - [ ] Modal has a textarea for rejection reason - [ ] Rejecting with a reason stores it in the ticket's working_memory - [ ] Rejection reason is displayed on the ticket card - [ ] API tests pass for reject transition with reason parameter - [ ] Existing functionality (approve) still works
Avo
· © 2026 AvoHQ ·
v3.27.0
Close modal
Are you sure?
Yes, I'm sure
No, cancel