Skip to content

feat(approvals): thread interactions — reassign, remind, request-info, comment + SLA & step progress#1740

Merged
os-zhuang merged 1 commit into
mainfrom
feat-approvals-thread-interactions
Jun 11, 2026
Merged

feat(approvals): thread interactions — reassign, remind, request-info, comment + SLA & step progress#1740
os-zhuang merged 1 commit into
mainfrom
feat-approvals-thread-interactions

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

Phase 2 of the approvals roadmap (after #1728/#1737): the collaboration layer that mainstream approval centers (ServiceNow, SAP Fiori My Inbox, DingTalk/Feishu) treat as table stakes. None of these move the flow — they operate on approver slots or the audit thread.

  • reassign() — a pending approver hands their slot to someone else. Audit-first write ordering (mirrors decideNode) so a failed audit can never leave a moved slot without a trail; the new approver is notified via the optional messaging service.
  • remind() — submitter nudge to every pending approver, throttled to one per 4 h per request (THROTTLED → HTTP 429).
  • requestInfo() — approver sends the request back for more material; the request stays pending, submitter notified.
  • comment() — free-form thread reply (submitter or pending approver), notifying the other side.
  • sys_approval_action.action enum gains the four new kinds (synced with the new ApprovalActionKind contract type — the first e2e run caught the enum validation rejecting them).
  • Rows expose sla_due_at (created_at + escalation.timeoutHours from the node config; display-only — automatic escalation needs a scheduler pass, called out in the JSDoc) and single reads attach flow_steps (the owning flow's approval trunk with done/current/upcoming states) via the automation surface's getFlow().
  • REST: POST …/reassign|remind|request-info|comment with the shared error mapping; messaging wired in the plugin when installed, degrading to audit-only without it.

Test plan

  • plugin-approvals: 55 tests (12 new: reassign permissions/dup/notify, remind throttle/permission, request-info pending invariant, comment participants, sla_due_at, flow_steps graph walk) ✅
  • E2E against showcase: all four endpoints 200; repeat remind → 429; reassign 403 for non-holders; timeline returns the new kinds with actor_name; flow_steps = Manager Review (current) → Executive Review (upcoming); sla_due_at present only when the node declares an SLA ✅

🤖 Generated with Claude Code

…, comment + SLA & step progress

Closes the collaboration gap vs mainstream approval centers (ServiceNow /
SAP Fiori My Inbox / DingTalk-Feishu). None of these move the flow; they
operate on approver slots or the audit thread:

- reassign(): a pending approver hands their slot to someone else
  (audit-first ordering mirrors decideNode), with the new approver
  notified via the optional `messaging` service.
- remind(): submitter nudge to every pending approver, throttled to one
  per 4h per request (THROTTLED → HTTP 429).
- requestInfo(): approver sends the request back to the submitter for
  more material — request stays pending, submitter notified.
- comment(): free-form thread reply (submitter or pending approver),
  notifying the other side.
- `sys_approval_action.action` enum gains reassign/remind/request_info/
  comment (kept in sync with the new ApprovalActionKind contract type).
- Rows expose `sla_due_at` (created_at + escalation.timeoutHours from
  the node config — display-only; automatic escalation still needs a
  scheduler pass) and single reads attach `flow_steps` (the owning
  flow's approval trunk with done/current/upcoming states) via the
  automation surface's getFlow().
- REST: POST reassign / remind / request-info / comment routes with the
  shared error mapping (+THROTTLED→429); messaging wired in the plugin
  when installed, degrading to audit-only without it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 11, 2026 5:05pm

Request Review

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.

1 participant