Repository navigation
feat(v2): Tools on the Connectors page — the granted half (piece 4, option A) - #1669
Conversation
0c081c9 to
23c0d92
Compare
|
Refreshed onto main From the catalogue ( One contract note for Vera: the mint's Measured ( Tests: |
…ption A) Tools plan §6: a second list under the channels in the same row grammar, one row per RoomGrant the person can see (live · pulsing when used in the last 10 min · hollow when revoked or expired), the aside from the projected grant (who granted it and when it ends, the agents allowed, the allow-list under its write mode, what asks a person first, budget, two-click Revoke) and the trail from the broker's rows — one muted mono line per ToolCall with the three COUNT(*) numbers in display 22 / mono 11. Heading with the mono count, a search field and a segment on the same line. 390 as the channels list. SEAM (Wren 67724/67725): the not-yet row, the Add form and Change access wait on the builtin GitHub Installable landing in GET /api/installables with its McpServer.enabledTools; the server derives brokerId. Until then `catalog` is empty and those controls do not render — nothing pretends to grant. Reads only /api/pods/:podId/grants, /api/grants/:id/calls, /api/registry/pods/:podId/agents (#1668). GitHub glyph added to the platform set. Layout invariants: trail line is muted mono with no semantic colour; counts are 22/11; the display titles reset under :lang(zh). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5
… from the catalogue (#1670), with direction-A marks The seam closes on Wren's catalogue: GET /api/installables now lists the GitHub tool Installable (list: 'tools') with its projected allow-list and the caller's Connections, so the page draws what the server enforces: - not-yet row per tool Installable with no live grant — dashed dot, muted name, what it does, `read, or read and write`, `not granted`, Add (ink); without a Connection or on an unconfigured instance the row says so and offers no Add. - Add opens in the aside: room, connection (when more than one), a writeMode segment, the allow-list the mode admits (read → read tools; write modes → all), what asks first (the catalogue's irreversible tools under `write`), every non-internal seat in the room checked, expiry 7/30/90 days, Grant (ink). The mint body is the server's: connectionId, installationId, target, tools, writeMode, audience, expiresAt — never a brokerId (Vera 67728). - Change access pre-fills from the grant (effectiveAudience, not the raw snapshot — Vera 67568) and is a new grant plus a revoke of the old one; Grant again on an expired/revoked row only mints. - "what asks first" under `write` lists the catalogue's irreversible tools. - direction A (Sam 2026-09-11): the grant's mode and a trail line's outcome carry a 14px mark with the word in `title`; the granted row no longer repeats the tool's description sentence. glyphs.tsx is the same file #1671 adds (identical content, merges clean). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5
…m the Connection (#1677) Vera 67821 via #1677: a grant on connection A must not be able to name installation B, so the mint derives installationId from the Connection and refuses a client-supplied one. The body is now exactly the six keys the route takes — audience, connectionId, expiresAt, target, tools, writeMode — pinned by key list, with brokerId and installationId both asserted absent. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5
… revoke after Change access is retried alone; the trail says "awaiting a person" Vera 67912 / Wren 67913 on 0368992: - Revoke and Change access render only when grant.grantedBy is the viewer — the route 403s anyone else, so the page never draws a control the server would refuse. A member still reads the grant and its trail. - Change access keeps the minted grant whatever happens next. If the revoke of the old grant fails, the aside says the old one is still live and offers "Revoke the old grant", which retries only the revoke — never a third mint. - A trail line's outcome reads like the count: pending_approval → "awaiting a person" (the mark's title too). Tests: "Revoke renders only for the granter"; the failed-revoke retry pins the three POSTs as mint, revoke, revoke. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5
0368992 to
830e3c8
Compare
…Commonly#1869) * fix(connectors): a list card is as tall as its rows (TASK-156) Team-Commonly#1547 stretched the channel list to fill the page; Team-Commonly#1669 then put Tools under it and the stretch carried on, so at 1200 the channel card was 564px around 262px of rows, and with the GitHub grant open the Tools card was 718px around one 86px row — 630px of empty card. The page scrolls; a card does not hold empty space. - .v2-connectors: drop min-height: calc(100vh - 86px) and its comment. - .v2-connectors__content: drop flex: 1 / min-height: 0 and switch stretch to start; .v2-connectors__rows: drop flex: 1 / min-height: 0 (keep overflow: hidden, it clips the row corners). - The now-dead opt-outs go with them: .v2-tools { flex: none }, and the 1010px and 760px undo rules. - The Slack row names its workspace: a linked Slack stores teamName, never chatTitle, so the row read "Slack · linked to Ops" beside the word Slack. chatTitle still wins when both are set. Guards invert with the decision: v2-layout-invariants asserted the old stretch (and its undo rules); it now asserts no min-height on .v2-connectors, align-items: start with no flex: 1 on the content grid, no flex: 1 on the rows, and that no .v2-tools rule opts out. The Tools opt-out is matched as a regex on the Connectors section rather than through ruleBody, because with the rule gone ruleBody returns '' and the assertion would have passed without reading anything. Three page cases cover the Slack title precedence. * test(connectors): scan every block for the stretch rules, not just the first (TASK-156) sprint-review's gate passed Team-Commonly#1869 at 9e64a12 and named one route it does not cover: `not.toContain('min-height')` reads ruleBody's FIRST line-start `.v2-connectors` match, so a second `.v2-connectors { min-height: … }` written later in the sheet passes every assertion while the browser paints the stretch again — equal specificity, later rule wins. layoutBlocks() instead scans the whole sheet for every declaration block whose last compound carries the class, and the three selectors that hold the decision (`.v2-connectors`, `__content`, `__rows`) are asserted empty of the declarations that would stretch them. A non-vacuity check per selector keeps the filters from passing on an empty scan. Additive only: every assertion sprint-review gated is byte-identical, so their PASS still describes this tree; what is new is a stronger instrument beside it. A rule scoped another way than the last compound (e.g. `.v2-connectors > div`) is still not covered — said in the comment.
Piece 4 of the connectors build, option A — the page half that reads only what is on main (
docs/plans/tools-catalogue-room-grants.md§6). Depends on the read routes in #1668 (/api/pods/:podId/grants,/api/grants/:id/calls); renders nothing until they are live.What renders (
V2ConnectorTools.tsx, mounted under the channels list inV2ConnectorsPage):N granted), search field, segment (All / Granted / Not yet) on one line.200px minmax(0, 1fr) 200px 120px, measured): cobalt dot, pulsing when the newest trail row is <10 min old; hollow when revoked/expired; line 1granted to **{room}** by **{member}**; line 2{agents} may use it · {what asks first}orrevoked/expired {rel}; monogranted {rel}; Manage (bordered, 32 tall).effectiveAudience→ display labels from the pod roster), the allow-list under its write mode as chips, what asks first, budget, Revoke (two-click →POST /api/grants/:id/revoke, then reload).counts(COUNT(*) by outcome), then{agent} · {tool} · {outcome}lines in muted mono, newest first. Outcomes are words, never coloured (invariant pinned).scrollWidth390.SEAM (Wren 67724/67725, Kai 67726): the not-yet row, Add and Change access wait on the builtin GitHub Installable landing in
GET /api/installableswithMcpServer.enabledTools(and the server-derivedbrokerId).catalogis empty until then and those controls do not render — the page draws no control the server does not enforce. Two spec lines I could not source and left as words: "the list of irreversible tools" underwritereadsirreversible writes ask firstuntil the catalogue carries the flags;revoked by {member}readsrevoked {rel}because the grant record has norevokedBy.Proof (fixture-fed build with the real
v2.css,pw/shot-tools.js): before/after at 1440 and 390 — sent to Sam. Measured after: row grid200px 242px 200px 120pxat 1440,minmax(0,1fr) autoat 390; acts 73×32; counts 22px/11px; trail linesrgb(102,112,133)IBM Plex Mono; min font 11 (mono) / 12 (sans); scrollWidth 1440/390.Tests:
V2ConnectorTools.test.tsx4 (states table, aside + trail + counts, two-click Revoke, search/segment/empty),V2ConnectorsPageunchanged 12/12,v2-layout-invariants112/112 (+4 pins: trail muted mono, 22/11 counts, zh reset).tscclean.🤖 Generated with Claude Code
https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5