Skip to content

Approvals: show who and where, badge needs-you in the shell - #2

Merged
TheGreatAxios merged 10 commits into
mainfrom
cl-hitl-approval-gates
Aug 9, 2026
Merged

Approvals: show who and where, badge needs-you in the shell#2
TheGreatAxios merged 10 commits into
mainfrom
cl-hitl-approval-gates

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

Resolve pending approvals into display names (never raw IDs) and badge the Approvals row through the shell meta slot.

Test plan

  • needs-you view-model tests
  • Approvals row badge tests
  • Approve/reject still hit native Interchange routes

@TheGreatAxios
TheGreatAxios force-pushed the cl-hitl-approval-gates branch from 913e540 to 1287400 Compare August 9, 2026 01:46
@TheGreatAxios

Copy link
Copy Markdown
Contributor Author

Self-critique (orchestrator)

Verdict: likely merge-ready after CI green + greybeard/bruckheimer

Looks good

  • @corbits/approvals package owns hydrate view-model; no raw ids on NeedsYouItem (agentName/benchName only).
  • arktype at boundary; hub mounts routes.
  • Shell badge via meta slot (not inert count prop) — correct composition.
  • Tests for name resolution + badge; docs for needs-you.

Verify

  1. CI green on rebased branch.
  2. Confirm missing tenant/definition names degrade safely (no blank/undefined leak into UI).
  3. Greybeard + bruckheimer before merge.

@TheGreatAxios
TheGreatAxios force-pushed the cl-hitl-approval-gates branch 3 times, most recently from 23dd39f to 92307d0 Compare August 9, 2026 02:28
@TheGreatAxios

Copy link
Copy Markdown
Contributor Author

Greybeard: MERGE — needs-you resolves display names; Badge via meta slot. Merge after shell-cols if contextual-panel conflicts.

@TheGreatAxios
TheGreatAxios force-pushed the cl-hitl-approval-gates branch from 92307d0 to 6c4bd0b Compare August 9, 2026 03:28
Covers hydrating a pending approval's agent and bench names off its own
run/tenant foreign keys, a grant-holding principal seeing the resolved
list, a principal without the approval grant being refused server-side,
and the approvals page rendering those names instead of a raw agent
address or run id.
A pending approval only carries a deployment id, a run id, and an agent
address with an instance id inside it -- nothing a person should have to
read to decide whether to approve it. @corbits/approvals resolves each
pending approval to the agent's real name and the bench it's running in,
gated by the same approval grant the native approve/reject routes already
require, and never touches resolution itself: approving and rejecting
still go straight through Interchange's own routes.

The bench's second column now shows a live count of what's waiting next
to Approvals, and the approvals page renders "<agent> in <bench>" instead
of a raw agent address.
Renders the real ContextualPanel tree against a mocked hub so a wrong slot name for the trailing badge shows up as a missing count in the DOM, not just a type that happens to check. Covers the count appearing once needs-you resolves, and its absence when nothing is pending.
SidebarItemRow has no count prop — spreading {count} onto it silently dropped the pending number, so the row always looked empty. The trailing slot is meta, a ReactNode, so pass a Badge there instead. Adds a metaProp helper alongside the existing countProp/subtitleProp so the conditional stays a one-liner at the call site.
Notes why the Approvals row uses the meta slot with a Badge rather than a count prop, which this version of the UI library's SidebarItemRow does not have.
The page list left the contextual panel for SidebarRail with labels. Put
the needs-you count on SidebarRailItem.badge and retarget the live-DOM
test at the rail so a wrong prop still fails in the rendered text.
Rail badges must omit the prop when absent; matching the metaProp
helper keeps call sites a one-liner.
@TheGreatAxios
TheGreatAxios force-pushed the cl-hitl-approval-gates branch from ffb16e5 to 8774056 Compare August 9, 2026 03:41
@TheGreatAxios
TheGreatAxios merged commit 93d824f into main Aug 9, 2026
2 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-hitl-approval-gates branch August 9, 2026 03:51
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