Skip to content

Add a workflow detail page exposing definition behavior and access (CL-7371) - #561

Merged
TheGreatAxios merged 8 commits into
cl-7363-agent-builder-nativefrom
cl-7371-workflow-detail
Sep 2, 2026
Merged

Add a workflow detail page exposing definition behavior and access (CL-7371)#561
TheGreatAxios merged 8 commits into
cl-7363-agent-builder-nativefrom
cl-7371-workflow-detail

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds GET /api/tenants/:tenantId/workflows/definitions/:definitionAssetId/detail (@corbits/workflow-catalog), authorized per-definition (requireGrant(idResource("workflow-definition", ...), "read")) with a 404 on an unknown or cross-tenant asset. Answers lifecycle (source-only/pending-approval/deployed/superseded/build-failed, a pure function unit-tested in isolation), steps in execution order off the frozen wire projection, and declared-vs-approved grants plus credential binding names — never a credential value.
  • Adds the read-only /workflows/:definitionAssetId page in apps/web (header with lifecycle badge + source sha7, steps table, access section, a "why not launchable" strip for anything short of deployed).
  • Docs: docs/workflow-detail.md.

First useful version, not exhaustive — see that doc's own "left out" section. In particular: the target-picker/agents-settings cross-links the ticket named don't exist yet on this branch (cl-7362-deploy-approval), so this ships with no inbound links yet; wiring those in is a natural follow-up once those surfaces land.

Linear: https://linear.app/abklabs/issue/CL-7371

Test plan

  • bunx tsc --noEmit -p packages/workflow-catalog, -p apps/hub, -p apps/web — clean
  • bunx eslint on every touched file — clean
  • bun run scripts/checks/browser-safe-subpaths.ts and scripts/checks/report-error.ts — clean, no new findings
  • Unit test: deriveWorkflowLifecycle (all five lifecycle states)
  • DB-gated route test against real Postgres: denied → 403, unknown asset → 404, deployed definition → full shape (ran locally with docker compose -f docker-compose.test.yml up -d + bun scripts/db-setup.ts)
  • Page render test: deployed/pending-approval/source-only fixtures

Resolves CL-7371

@TheGreatAxios
TheGreatAxios force-pushed the cl-7371-workflow-detail branch from f907d04 to 6c76493 Compare September 2, 2026 07:44
@TheGreatAxios
TheGreatAxios changed the base branch from cl-7362-deploy-approval to cl-7363-agent-builder-native September 2, 2026 07:45
@TheGreatAxios
TheGreatAxios force-pushed the cl-7371-workflow-detail branch from 6c76493 to 36d8f6d Compare September 2, 2026 08:50
@TheGreatAxios
TheGreatAxios force-pushed the cl-7371-workflow-detail branch from 36d8f6d to fc17285 Compare September 2, 2026 09:14
@TheGreatAxios
TheGreatAxios force-pushed the cl-7371-workflow-detail branch from fc17285 to 9d24860 Compare September 2, 2026 09:33
A create or PATCH-carried retarget now must clear the same two gates
before it is persisted: resolveLaunchableDefinition must resolve the
asset, and the acting principal must be authorized for
workflow-definition:<id>/read — the same verb listRoutineTargets
already checks per row. A denial is a typed 403 alongside the
existing 400/404/409 target envelopes, on both the tenant-session and
Myra's workflow-run-authenticated routine surfaces.

Also routes a pre-existing catch in postRoutineEnabledNotice through
reportError, since this change's diff now touches that line and
check:report-error requires it.
Covers the pure lifecycle derivation (source-only, pending-approval,
deployed, superseded, build-failed) and the detail route's authz-first,
404-on-unknown-asset, and happy-path shape, against a real Postgres.
Adds GET .../workflows/definitions/:definitionAssetId/detail
(@corbits/workflow-catalog), authorized per-definition and 404 on an
unknown or cross-tenant asset, answering lifecycle, steps, and declared
vs. approved grants plus credential binding names (never a value) from
native workflow_definition/workflow_definition_version rows and
@corbits/workflow-deploy-source. Adds the read-only /workflows/:id page
in apps/web with a header, step table, access section, and a
why-not-launchable strip for anything short of deployed.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7371-workflow-detail branch from e95ce7b to 8bbc6d3 Compare September 2, 2026 10:58
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review September 2, 2026 11:09
@TheGreatAxios
TheGreatAxios merged commit 82efb86 into main Sep 2, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant