Skip to content

feat(approvals): declare file attachments on approve/reject decisions#3332

Merged
os-zhuang merged 2 commits into
mainfrom
claude/enterprise-delegation-ooo-proxy-1v3m8l
Jul 20, 2026
Merged

feat(approvals): declare file attachments on approve/reject decisions#3332
os-zhuang merged 2 commits into
mainfrom
claude/enterprise-delegation-ooo-proxy-1v3m8l

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Backend half of retiring the approvals inbox's hand-wired attachment composer (objectui#2698). Pairs with the objectui PR that removes the composer and renders decisions purely through DeclaredActionsBar.

What

Add an optional multi-file attachments param to the declared approval_approve / approval_reject actions on sys_approval_request:

{ name: 'attachments', label: 'Attachments', type: 'file', multiple: true, required: false }

The console renders type:'file' action params through the shared upload widget (objectui ADR-0059 / #2700) and POSTs the resolved attachments: string[], so a reviewer attaches supporting files to a decision through the generic declared-action dialog — no bespoke composer.

Why it's this small

No service or route change. The decision route already forwards body.attachments to ApprovalService.decide (packages/rest/src/rest-server.ts), and the sys_approval_action.attachments column (Field.file, multiple) already persists them (#3266 / #3274). This PR only surfaces the capability as declared metadata. The spec already accepts type:'file' + multiple (ActionParamSchema), so no spec change either.

Verification

  • plugin-approvals suite green (144 tests), incl. a new contract test pinning the attachments param (type file, multiple, optional) on both actions.
  • End-to-end (with the objectui PR, against a live backend): the declared Approve dialog renders a file-upload widget, and staging a file + confirming POSTs {comment, attachments:["<fileId>"]} — the upload id serialized correctly. (The persist path is the pre-existing, already-tested decidesys_approval_action.attachments.)

Refs

objectui#2698 (composer retirement) · #3266 / #3274 (attachments column + route passthrough) · framework#3300 (declared action set) · #2678 (P2-4)

🤖 Generated with Claude Code


Generated by Claude Code

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
@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Canceled Canceled Jul 20, 2026 2:09am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/plugin-approvals.

4 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/automation/approvals.mdx (via @objectstack/plugin-approvals)
  • content/docs/plugins/packages.mdx (via @objectstack/plugin-approvals)
  • content/docs/releases/implementation-status.mdx (via @objectstack/plugin-approvals)
  • content/docs/releases/v9.mdx (via @objectstack/plugin-approvals)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling and removed documentation Improvements or additions to documentation tooling labels Jul 20, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review July 20, 2026 02:38
@os-zhuang
os-zhuang merged commit e412fb6 into main Jul 20, 2026
15 of 16 checks passed
@os-zhuang
os-zhuang deleted the claude/enterprise-delegation-ooo-proxy-1v3m8l branch July 20, 2026 02:38
akarma-synetal pushed a commit to akarma-synetal/framework that referenced this pull request Jul 20, 2026
…d + Console)

Continues the v16 page from the latest front/back-end code. Since the rc.0 cut,
9 backend changesets landed and the objectui pin advanced 94d4876 -> af1b0db
(objectui objectstack-ai#2706-objectstack-ai#2736). Sourced from each repo's own changesets.

- Retitles the now-stale 'pending the next console pin' subsection: those 4
  frontend items (objectui#2701/objectstack-ai#2706/objectstack-ai#2707/objectstack-ai#2708) are now bundled as the pin
  advanced; points to the new running section.
- Adds a 'Landed since 16.0.0-rc.0' section:
  - Breaking/behavior: aiStudio/aiSeat alias removal (objectstack-ai#3308); date-arithmetic
    now a build-time error (objectstack-ai#3306); checkboxes per-option visibleWhen + string
    option matching (objectstack-ai#3350).
  - New backend: formula null-guard/floor/ceil (objectstack-ai#3306); engine-owned managedBy
    bucket (ADR-0103 addendum, objectstack-ai#3343); approvals viewer gating (objectstack-ai#3344) +
    decision attachments (objectstack-ai#3332); discovery transactionalBatch bit (objectstack-ai#3298);
    action resultDialog i18n (objectstack-ai#3347); collab-notification/storage localization
    + wired notifications REST routes (objectstack-ai#3354).
  - Console (now bundled): option-widget visibleWhen parity, approvals-inbox
    server-viewer gating + composer retirement, related-list pagination,
    inline-analytics renderer retirement, authenticated api-fetch threading,
    result-dialog i18n, engine-owned bucket UI, write-failure surfacing.
- Adds aiStudio/aiSeat and date-arithmetic to the upgrade checklist; updates
  the Console-section intro for the advanced pin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AHVoqyH9VAjmbyMN1Ri2jf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants