feat(approvals): recall endpoint + business-readable inbox contract#1728
Merged
Conversation
The Console approvals inbox surfaced four service-level gaps (found via e2e review of the showcase app): - Recall was advertised in the contract (status 'recalled', action 'recall') and rendered in the Console UI, but never implemented — the button always died with HTTP 404. Implement ApprovalService.recall() (submitter-only, audits a 'recall' action, mirrors the status field, resumes the owning flow run down the reject branch with output.decision='recall' since the engine has no run-cancel primitive) and register POST /approvals/requests/:id/recall. - Rows never carried submitted_at; the inbox showed "—" for every request and its newest-first sort compared empty strings. Expose submitted_at as an alias of created_at on the row mapper. - Requests displayed machine names (flow:manager_review, opaque record ids, raw user ids). Seed $flowName/$flowLabel into engine variables, snapshot authored flow/node labels onto node_config_json (no schema migration), and surface process_label/step_label with a prettified fallback for legacy rows. Enrich listRequests/getRequest with record_title (schema displayNameField, payload-snapshot fallback) and submitter_name (sys_user by id or email), batched per object. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
E2E review of the showcase Approvals Inbox surfaced four service-level gaps. This PR fixes the backend half; the Console UI revamp that consumes it lands in objectui.
recalled/recall, the Console renders a Recall button, but neither the service nor REST implemented it — every click 404'd. AddsApprovalService.recall()(submitter-only, auditedrecallaction, status-field mirror, resumes the owning flow run down therejectbranch withoutput.decision='recall'— the engine has no run-cancel primitive, and leaving the run suspended forever would leak it) plusPOST /approvals/requests/:id/recallwith the same error mapping as approve/reject.submitted_atnever existed. The inbox showed—in every time cell and its newest-first sort compared empty strings. Rows now exposesubmitted_atas an alias ofcreated_at.flow:manager_review, opaque record ids, raw user ids. The engine now seeds$flowName/$flowLabelvariables (mirroring$runId), the approval node snapshots authored flow/node labels ontonode_config_json(no schema migration), and rows surfaceprocess_label/step_labelwith a prettified fallback for legacy rows.listRequests/getRequestnow resolverecord_title(schemadisplayNameField, falling back to the payload snapshot when the record is gone) andsubmitter_name(sys_userby id or email), batched one query per distinct object.Test plan
plugin-approvals: 43 tests (11 new: recall permissions/state/resume/mirror, submitted_at alias, label snapshot + fallback, enrichment incl. payload fallback and email submitter) ✅service-automation: 180 tests ✅recalled, audit trailsubmit → recall, suspended run resumed; new budget-approval requests carryprocess_label: "Project Budget Approval"/step_label: "Manager Review"; legacy rows enrich with record titles and submitter names ✅🤖 Generated with Claude Code