chore(objectstack): upgrade to 7.6.0 + adopt client.approvals (resume flow); drop dead workflow code#75
Merged
Conversation
… workflow code
Bump all @objectstack/* 7.5.0 → 7.6.0 (mobile + apps/server).
7.6 removed the dead workflow approval API from the client SDK
(`client.workflow.approve/reject` + `Workflow*Response` types) and shipped the
proper `client.approvals` namespace (framework #1515). Adapt:
- Rewire useApprovals to `client.approvals.{listRequests,getRequest,approve,
reject}`. Approve/reject now go through `POST /api/v1/approvals/requests/:id/
{approve,reject}` → the service's `decide()`, which resumes the owning flow run
(ADR-0019) and enforces approver authorization — instead of the old
`data.update(status)` workaround that bypassed both.
- Delete the dead, now-broken workflow cluster (unused, superseded by
StateMachineViewer / useApprovals / useFlowRuns): useAutomation,
useWorkflowState, WorkflowStatePanel, and their tests; drop the useAutomation
barrel export.
Verified in-browser against a local 7.6 server: inbox lists via
`GET /api/v1/approvals/requests`; approve hits `POST .../:id/approve` and the
server enforces approver authorization (403 for a non-approver) — the old
data.update path silently allowed it. typecheck + server validate clean; full
suite green (1164).
Co-Authored-By: Claude Opus 4.8 <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.
Summary
Bump all
@objectstack/*7.5.0 → 7.6.0 (mobile +apps/server).7.6 removed the dead workflow approval API from the client SDK (
client.workflow.approve/reject+Workflow*Responsetypes) and shipped the properclient.approvalsnamespace (framework #1515). Adapt the app:useApprovalstoclient.approvals.{listRequests, getRequest, approve, reject}. Approve/reject now go throughPOST /api/v1/approvals/requests/:id/{approve,reject}→ the service'sdecide(), which resumes the owning flow run (ADR-0019) and enforces approver authorization — instead of the olddata.update(status)workaround that bypassed both. (Closes the workaround flagged in feat(approvals): review screen + cleaner inbox (no raw record id) #74.)useAutomation,useWorkflowState,WorkflowStatePanel+ their tests (unused; superseded byStateMachineViewer/useApprovals/useFlowRuns; broken by the 7.6 client removal). Drop theuseAutomationbarrel export.Verification (in-browser, local 7.6 server)
tsc --noEmitclean (mobile + server);objectstack validatepasses; full jest suite green (1164).GET /api/v1/approvals/requests(notdata.find).POST /api/v1/approvals/requests/:id/approve(the canonical decide endpoint, not adataPATCH).data.updatepath silently allowed it.Notes
pending_approversis server-managed), which isn't fabricable locally with the bundled draft flows — but the endpoint + authorization path is verified.workflowis still advertised asunavailablein discovery on 7.6 (theworkflowCoreServiceName cleanup from #1515 hasn't shipped); harmless, no client refs remain.🤖 Generated with Claude Code