Skip to content

fix(v2): the add form owns the connectors panel, and the picker skips personal pods (TASK-155) - #1933

Merged
lilyshen0722 merged 5 commits into
mainfrom
kai/task155-add-opens-panel
Sep 27, 2026
Merged

lilyshen0722 merged 5 commits into
mainfrom
kai/task155-add-opens-panel

Conversation

@lilyshen0722

@lilyshen0722 lilyshen0722 commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Why

TASK-155, from the 2026-09-26 live walk: "Add on the Telegram row does nothing while the Slack row is selected. The side panel stays on Slack's 'What the channel sees'", and "the picker defaulted to 'Scout (Default)' (the agent-room) instead of a team pod."

This head is the second one. The gate cleared 84b8fd97, then found that the first head's inversion introduced a mirror regression, so Vera withdrew the code clearance (74624) and connector-ops specified three items (74623). All three are here, and the head they asked about is superseded.

What the first head got wrong, and what fixes it

item the defect the change
1 (connector-ops 74623, vera 74624) adding ? form : selectedAside made the form unconditionally dominant, and nothing that selected a row cleared addingType — so a row click or the row's gear went inert while the form was open. The walk's symptom, pointed the other way. selectItem clears addingType. runAction calls it first and re-arms the type for connect, so Add is unaffected.
2 (connector-ops 74623) At 390 the aside sits below the fold of the page's own scroller (v2-feature__body, not the document), so opening the form still changed nothing on screen — measured on the first head: picker top 992 in an 844-high viewport. The picker takes focus when the form opens. Focus scrolls it into view and is where a keyboard user wants the cursor: picker top 402, inside the viewport.
3 (TASK-154 item 6, wren) The already_installed refusal said "Remove it to bind a different pod", teaching the one-pod model. It points at the gate switches: "Your {{connector}} channel is bound to {{pod}}. Other pods reach it through its gate switches — turn one on in the panel."

The first head's own two changes are unchanged: the aside owns the form while a channel is being added (no left-column duplicate), and the pod picker defaults to the first non-personal pod, mirroring PERSONAL_POD_TYPES (podTypePolicyService.ts:10-14).

One spec-vs-code note, at Vera's request (74621). The row says the picker "should not default to an agent-room pod", absolutely; the code falls back to pods[0] when every pod is personal. The conditional reading is intended — an empty picker is worse, and a DM is a legal target — and it is recorded on the row so the next reader does not file the difference as a miss.

Witnesses

Frontend, V2ConnectorsPage.test.tsx, 56 tests in the file (987 across the suite):

  • selecting a row while the form is open restores that row's detail and removes the picker;
  • the picker has focus after Add;
  • the refusal names the gate switches and no longer says "Remove it to bind";
  • (first head, unchanged) adding a channel moves the panel to the picker, with exactly one picker in the document; the picker defaults to a room pod.

Ledger — each mutation reddens exactly one arm (baseline committed first, every arm reverted with git checkout --):

mutation red
selectItem no longer clears addingType 1 — the row-click witness
the focus effect removed 1 — the focus witness
the old already_installed copy restored 1 — the copy assertion

Baseline and restored runs are green (56/56), tree clean. The first head's ledger stands as it was: reverting only defaultPodForChannel reddens 1, reverting only the aside ownership reddens a different 1 (Vera's independent isolation, 74621), and the Add-path witness survives the walk-revision mutation — a contract guard, not a discriminator, which is why the "Connect a channel" arm is the discriminator (connector-ops, 74623).

Instrument

The capture this row needs did not exist, so it is in this PR: --page-shot viewport (scripts/ui-evidence-shot.mjs, guard in scripts/lib/ui-evidence-args.js, runbook section, and two arms in the args suite). fullPage paints the document, and on this page the document is viewport-high, so the pair came out byte-identical (bcc794f0… on both sides) while the rendered text differed. It takes a value like every other flag — the parser refuses a bare flag, so --viewport is not available — and an unrecognised value is refused rather than defaulted. The run line now prints page-shot full or page-shot viewport.

Evidence

docs/design/evidence/connectors-task-155-{page-*,add-*}.png — same two revisions at both widths (before = 84b8fd97, after = this head), one click on .v2-connectors__connect, non-2xx: none and no console errors on all four runs:

  • 1200, full page: the form is in the panel on both revisions; the only pixel difference is the new focus ring, so a reviewer should not read that pair as a layout change.
  • 390, --page-shot viewport: the before shot is byte-identical to its own full-page capture (bcc794f0…) — the form below the fold was invisible either way — and the after shot has scrolled to the panel (fb2d2d78…, 122676 vs 143782 bytes).

A correction to this body as cleared (vera 74621): it claimed the .selector.txt files were in the PR. They never were — git diff --name-only over the merge-base returns four PNGs and two sources. The earlier aside-scoped pair is now dropped in favour of the viewport pair; the --selector crops answered a different question than the one the row asks.

Real-browser probe (Playwright, 390, one run per revision, same seeded local DB):

reading before 84b8fd97 this head
focused element after Add BUTTON SELECT[Pod to bridge]
picker inside the viewport false (top 992) true (top 402)
picker count after clicking the Slack row 1 — the form still owns the panel 0
panel content after clicking the row "next step" no aside (that row is not connected in the seeded DB, so its aside is empty by design)

The last row is the honest limit of the browser probe: the local Slack row is uninstalled, so the probe witnesses the form closing, and the stronger claim — the row's detail returns — is the jsdom arm with a connected-row fixture. I cannot read PNGs with this model, so no claim here rests on the images; the numbers above are the claims.

Suite: frontend 112 suites / 987 tests; args suite 15 tests; eslint 0 errors on both changed frontend files, with the same 2 pre-existing warnings as at HEAD~1.

Gate: Vera.

… personal pods (TASK-155)

Two walk findings on /v2/connectors, both reproduced in jsdom first.

1. The add form never reached the panel while a live row was selected. The
   row's detail won the aside (`{selectedAside || (adding && …)}`) and the form
   was rendered a second time beside the list, so with Slack selected the panel
   kept "What the channel sees" and the picker appeared elsewhere — the walk's
   "Add does nothing visible". The aside now owns the form whenever a channel is
   being added, and there is exactly one form.

2. The pod picker defaulted to the caller's first pod from `/api/pods`, which is
   their own 1:1 room ("Scout (Default)", an agent-room). Personal pods
   (`agent-admin` / `agent-room` / `agent-dm`, mirroring the backend's
   PERSONAL_POD_TYPES) stay selectable but never become the default.

Witnesses: the panel moves for both the row's Add and "Connect a channel" while
a live row is selected, one picker exists, and the picker defaults to a room
with the agent-room still in its options.
Captured against a local stack (backend :5050, base revision :3001, fixed
revision :3000) with `scripts/ui-evidence-shot.mjs`, one click on
`.v2-connectors__connect`, credentials held in a local dev login:

- page pair at 1200 (full page): the panel keeps "What the channel sees" before,
  and shows the picker after.
- aside pair at 390 (`--selector .v2-connectors__aside`): the full-page pair at
  390 was BYTE-IDENTICAL, because at phone width the panel sits below the visible
  area of an inner scroller (`v2-feature__body` is `overflow: auto; height: 844`,
  `documentElement.scrollHeight` is 844, panel top 1015 before / 859 after), so a
  full-page shot paints the same region on both revisions. Re-captured with the
  selector, which scrolls the panel into view.

All four runs: `non-2xx: none`, `console errors: none`.
… and point the bound-pod refusal at the gate switches (TASK-155)

Three follow-ups from the gate on the first head.

1. selectItem clears addingType. The first head made the add form own the
   aside unconditionally, and nothing that selected a row cleared addingType,
   so the row click and the row's gear went inert while the form was open —
   the walk's symptom pointed the other way (vera 74624, connector-ops 74623
   item 1). runAction calls selectItem first and re-arms the type for
   `connect`, so Add is unaffected.

2. The pod picker takes focus when the form opens. At 390 the aside sits below
   the fold of the page's own scroller, so "opening the form" still changed
   nothing on screen; focus scrolls it into view and is where a keyboard user
   wants the cursor (connector-ops 74623 item 2).

3. The already_installed refusal points at the gate switches instead of
   "Remove it to bind a different pod", which taught the one-pod model
   (TASK-154 item 6, wren).

Witnesses: a row click while the form is open restores that row's detail (with
the Add-while-selected form arm in the same suite as its pair); the picker has
focus after Add; the refusal names the gate switches and no longer says
"Remove it to bind".
…n (TASK-155)

The capture a below-the-fold fix needs. `fullPage` paints the whole document, and
on /v2/connectors the document is viewport-high (`v2-feature__body` is the
scroller), so a full-page before/after came out byte-identical while the rendered
text differed. `--page-shot viewport` captures the viewport instead.

It takes a value like every other flag here — the parser refuses a bare flag, so
`--viewport` is not available — and an unrecognised value is refused from the lib
(`pageShotFor`), which keeps the guard inside the args suite that needs no browser.
The run line prints `page-shot full` or `page-shot viewport`.

Runbook: what the flag is for, and why `--selector` is not the same question.
…fter Add

Both widths on the same two revisions (before = the first head `84b8fd97`, after =
this head), one click on `.v2-connectors__connect`, `non-2xx: none` and no console
errors on all four runs.

- 1200, full page: the form is in the panel, as it was on the first head; the
  pixels differ only by the new focus ring.
- 390, `--page-shot viewport`: the before shot is byte-identical to its own
  full-page capture (`bcc794f0…`) — the document is viewport-high, so the form
  below the fold was invisible either way. After the focus change the viewport has
  scrolled to the panel (`fb2d2d78…`).

The aside-scoped pair is dropped: `--page-shot viewport` is the shape this claim
needs, and the `--selector` crops it answers a different question.
@lilyshen0722
lilyshen0722 added this pull request to the merge queue Sep 27, 2026
Merged via the queue into main with commit 9a6253f Sep 27, 2026
19 checks passed
lilyshen0722 added a commit to thantiklermcirony/commonly that referenced this pull request Oct 9, 2026
…hipped (Team-Commonly#1936)

Records the live Telegram re-walk of 2026-09-27 (02:43–02:47Z): the code
typed exactly as displayed, spaced and with a capitalised group, binds on the
first try (Team-Commonly#1931, Team-Commonly#1932); a second gated pod relays its agent's line to the
chat while a typed line goes only to the active pod; C3 and C5 inbound green.
Marks the 7ccc6ac C1 red as fixed, TASK-151 as shipped (Team-Commonly#1929 on f5eb556)
and TASK-155 as shipped (Team-Commonly#1933 on 9a6253f). Open: TASK-156.


Claude-Session: https://claude.ai/code/session_01MCF2UK3EQ6z6EHdvxAkM44

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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