RFAI-04: Add revision endpoints and edit-before-approve flow#1058
RFAI-04: Add revision endpoints and edit-before-approve flow#1058Chris0Jeky wants to merge 10 commits intomainfrom
Conversation
Expose IProposalRevisionService via three sub-resource endpoints on AutomationProposalsController. EditorUserId is derived from JWT claims.
Wire the "Request edit" action to open an inline revision editor that parses the operations payload into editable fields. Revision badge shows when edits exist. Composable manages revision lifecycle state.
…edit click The edit-before-approve flow now opens a revision editor instead of showing a toast stub. Update the test to verify the editor appears and add the proposalRevisionsApi mock so useProposalRevisions loads cleanly.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0280dea44a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… load errors - Guard onRequestEdit against non-PendingReview and expired proposals - Block editing for multi-operation proposals (not yet supported) - Surface loadRevisionState errors via toast instead of swallowing silently
…oints
Rename {proposalId} to {id} in revision endpoint route templates to match
the convention used by all other sub-resource routes in the controller.
Add missing <summary> XML doc comments for consistency.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c8539295e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Adversarial Review FindingsFixed in
|
When users switch proposals quickly, a slow API response for a previous proposal could overwrite the revision state for the currently selected proposal. Add a monotonic generation counter that discards stale responses. Adds a test verifying stale loads are ignored.
There was a problem hiding this comment.
Code Review
This pull request introduces a proposal revision system, allowing users to modify automation proposals before they are approved. The implementation includes new backend endpoints for managing revisions, a frontend API client, a state management composable, and a revision editor component. Feedback indicates that the ReviewRevisionEditor component needs to reactively handle changes to the operationsPayload prop using a watch effect and the corresponding Vue import. Furthermore, the current logic for editablePayload in PaperReviewView is limited to the first operation of a proposal, which should be expanded to support multiple operations.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7016a46f2b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Taskdeck/frontend/taskdeck-web/src/views/paper/PaperReviewView.vue
Lines 490 to 494 in 0055f51
After a user saves an edit, onApply still calls handleApproveProposal(p.id) / handleExecuteProposal(p.id) with only the proposal ID, so the execution path continues using the original proposal.Operations rather than the revised payload. In this commit, revisions are persisted and shown in the UI, but they are never wired into approval/execution, so users can believe they edited a proposal while production execution still runs the unedited operations.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Scope note
Test plan
Refs #976