Uh oh!
There was an error while loading. Please reload this page.
feat(app-shell): DeclaredActionsBar — server-declared actions in the approvals inbox (#2678 P2-4) - #2692
Merged
Conversation
…ctions on bespoke pages (#2678 P2-4) The generic missing piece behind the "hand-edit the inbox per feature" anti-pattern: a reusable bar that renders + executes an object's DECLARED actions for any (objectName, record, location), reusing the console action runtime end-to-end (param/confirm/result dialogs, {id} target interpolation via the _rowRecord dispatch shape ObjectGrid uses, visible CEL fail-closed, refreshAfter -> onDone). Object metadata comes from the app-shell MetadataProvider (or an explicit `actions` prop); no matching actions renders nothing. Mounted additively in the approvals inbox drawer under an "Actions" divider: the three sys_approval_request actions the backend now declares (framework#3282) render and execute with zero inbox-specific per-action code. Browser-verified against a live backend: declared Approve collected its comment param in the generic dialog, executed the REST route, and the per_group request advanced exactly as the hardcoded button would. A follow-up can retire the hardcoded buttons once the declared set covers them all. Tests: 5 new for the bar (location filtering, visible gating, execution dispatch, graceful degrade, label rendering); app-shell suite green; console build clean; eslint delta zero. 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
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 19, 2026 16:20
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Frontend half of #2678 P2-4. Backend half (declared
approval_approve/approval_reject/approval_reassignonsys_approval_request) merged as framework#3282.What
DeclaredActionsBar(new,packages/app-shell/src/views/) — a reusable component that renders + executes an object's server-declared actions for any(objectName, record, location):actions[]) from the app-shellMetadataProvider(or an explicitactionsprop)._rowRecorddispatch shapeObjectGriduses (so{id}intype:'api'targets resolves from the record), generic param/confirm/result dialogs,visibleCEL fail-closed,refreshAfter→onDone.Approvals inbox: the drawer mounts the bar additively under an "Actions" divider — the three declared decision actions render and execute with zero inbox-specific per-action code. The hardcoded composer stays for now; a follow-up retires it once the declared set covers everything.
Why
This is the structural fix from the #2678 audit: the inbox was a 1961-line hand-written page where every new approval capability meant new buttons. With this bar + framework#3282, decision capabilities ship as backend metadata — enterprise act-as (cloud#861) included — and render on any surface that mounts the bar.
Verification
/api/v1/approvals/requests/{id}/approve, and the per_group request held exactly as the hardcoded path does (audit row:approve · "Approved via declared SDUI action"; progress manager ✓ 1/1, finance 0/1).Refs
#2678 (P2-4) · framework#3282 (backend half, merged)
🤖 Generated with Claude Code
Generated by Claude Code