feat(approvals): server-computed decision progress + notification deep links (#3266 / objectui#2678 P1.5)#3274
Merged
Conversation
…p links (#3266, objectui#2678 P1.5) UX follow-ups on quorum/per_group, both SDUI-shaped (server computes, any client renders): - getRequest now attaches `decision_progress` for PENDING multi-approver requests: unanimous/quorum report approvals got/need (quorum against the clamped threshold); per_group reports satisfied-groups got/need plus a per-group {group, got, need, satisfied} breakdown computed from the open-time approver-group snapshot. Single-read enrichment only, display-only (decideNode's tally stays authoritative), best-effort. Typed on the ApprovalRequestRow contract. - Approval notifications now deep-link the inbox: `notify()` centrally rewrites the bare `/system/approvals` actionUrl to `/system/approvals?request=<id>` from the notification's source, so all twelve call sites — and any future one — land the recipient on the exact request (the console inbox consumes the param and auto-opens the drawer). Tests: 4 new (per-group progress updates per approval, quorum clamped threshold, first_response carries no progress, deep-link rewrite). 136 green in plugin-approvals. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ypkQikZ55oWUHUnMebwXA
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 102 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
…contract mapping (#3266) Browser verification caught a #3268 gap: the `attachments` column landed on sys_approval_action and decide() persisted it, but rowFromAction never mapped it — every listActions consumer (REST /actions, the console timeline) saw none while the raw engine row carried the fileIds. Map it (and type it on the ApprovalActionRow contract) so the audit trail actually exposes what was attached. Regression test added: 137 green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ypkQikZ55oWUHUnMebwXA
os-zhuang
marked this pull request as ready for review
July 19, 2026 13:19
This was referenced Jul 19, 2026
os-zhuang
added a commit
that referenced
this pull request
Jul 20, 2026
…#3332) * feat(approvals): declare file attachments on approve/reject decisions Add an optional multi-file `attachments` param to the declared `approval_approve` / `approval_reject` actions on sys_approval_request. The console now renders `type:'file'` action params through the shared upload widget (objectui ADR-0059) and POSTs the resolved `attachments: string[]`, so a reviewer can attach supporting files to a decision through the generic declared-action dialog — no bespoke composer. No service/route change: the decision route already forwards `body.attachments` to `ApprovalService.decide`, and the `sys_approval_action.attachments` column (file, multiple) already persists them (#3266/#3274). This just surfaces the capability as declared metadata so the approvals inbox can retire its hand-wired attachment composer (objectui#2698). Contract test pins the new param (type file, multiple, optional). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ypkQikZ55oWUHUnMebwXA * chore(changeset): plugin-approvals decision attachments Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ypkQikZ55oWUHUnMebwXA --------- Co-authored-by: Claude <noreply@anthropic.com>
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.
Backend half of objectui#2678 P1.5 (the two highest-ROI UX items from the post-P1 assessment). UI counterpart rides objectui#2681. Both are SDUI-shaped: the server computes, any client renders.
Changes
1.
decision_progresson single-request readsgetRequestattaches a server-computed aggregation progress for PENDING multi-approver requests (unanimous/quorum/per_group):{ behavior, got, need }(quorumneed= the clamped threshold);got/needplus per-group{group, got, need, satisfied}detail, tallied against the open-time approver-group snapshot (OOO-substituted members count for their group).Single-read enrichment only (same pattern as
attachFlowSteps), display-only —decideNode's finalization tally stays authoritative. Typed on theApprovalRequestRowcontract. This means "2 of 3 approved" / per-group ticks render identically in the console drawer, a future mobile client, or anything else — and a futureweightedbehavior needs zero client changes.2. Notification deep links
notify()centrally rewrites the bare/system/approvalsactionUrl to/system/approvals?request=<id>from the notification's source, so all twelve call sites — and any future one — land the recipient on the exact request. The console inbox consumes the param and auto-opens the drawer (objectui#2681).Tests
4 new: per-group progress updates per approval; quorum reports against the clamped threshold;
first_responsecarries no progress; the deep-link rewrite. 136 green inplugin-approvals.Refs
🤖 Generated with Claude Code
Generated by Claude Code