Skip to content

Approvals: read the native pending list and resolve names from the run view - #424

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-7113-drop-needs-you
Aug 29, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-7113-drop-needs-you

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes CL-7113 (parent CL-7103). Wave 1 of the Interchange re-pin prep (CL-7107).

What changed

The needs-you read surface is gone. It existed to turn Interchange's pending approval rows into names a person can read. Both names are already served natively: the run view returns definitionName (the agent), and the bench name is on the client from membership. apps/web now reads native GET /approvals and GET /approvals/:approvalId through one composer (apps/web/src/pending-approvals.ts) — one cached run-view read per distinct runId, headline from the approvals package's new browser-safe ./headline subpath. The chat approve card's status poll keeps its ready / forbidden / not-found / error shape (native 403 → forbidden, 404 → not-found); the "N waiting on you" chip is the native pending count.

@corbits/approvals stays for its grant-allowance gate (withGrantAllowance, used by the hub) and headlineFor (used by chat). The needs-you routes, view model, their tests, and the hub mount are deleted. The e2e harnesses (scripts/e2e/play.ts, cl-6324-launch-proof.ts) page the native list and fail loud on a non-200 instead of silently skipping — they were reading the deleted route.

Vendored @intx/hub-api shrinks. The three {^(?!needs-you$)[^/]+} param patterns return to upstream's plain /:approvalId; a full diff against the pinned upstream now leaves only the null-principal resolveApproval export and the bearer deploy mirror. VENDORED.md, VENDORED-FROM, and the kill-date tree hash are updated. docs/needs-you.md rewritten.

Verification

bun run check green: typecheck, 6493 tests / 0 fail, structural checks, lint 0 errors. New tests: two pending rows from one run render with the run view's definitionName and issue exactly one run-view fetch; a 403 on the list renders the no-permission state, not an empty queue; getStatus maps pending → ready/canAct, 403 → forbidden, 404 → not-found.

Notes for review

  • benchName is composed but no current consumer renders it (check:ui-vocabulary bans "bench"/"workspace" in copy); it is an optional omitted key, not a placeholder.
  • No browser pass on this branch; the change is data-path only and the rendered card markup is unchanged.

…n view

The needs-you read surface duplicated what Interchange already serves. The
web now reads the native pending-approvals list and single-approval routes
through one composer that adds the agent's display name from the run view,
the headline from the approvals package's browser-safe subpath, and the
bench name from membership. The chat approve card's status poll keeps its
ready / forbidden / not-found / error shape, and the e2e harnesses page the
native list and fail loud on a non-200 instead of silently skipping.

The approvals package keeps its grant-allowance gate and headline helper;
the needs-you routes, view model and their tests are gone, as is the hub
mount. The vendored hub-api approval routes return to upstream's plain
/:approvalId patterns, leaving that vendored copy with two deltas.
@TheGreatAxios
TheGreatAxios merged commit 5078024 into main Aug 29, 2026
5 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