Skip to content

fix(platform): show unavailable equipped connectors - #4312

Merged
yannickmonney merged 1 commit into
mainfrom
fix/disconnected-equipped-connectors
Oct 4, 2026
Merged

yannickmonney merged 1 commit into
mainfrom
fix/disconnected-equipped-connectors

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What changed

  • preserve stored connector grants as checked unavailable rows when the active connector roster no longer includes them
  • allow administrators to remove those stale grants through the shared SkillsMenu
  • add a regression covering the missing connector removal payload

Verification

  • bunx vitest run --config vitest.ui.config.ts app/components/skills/skills-menu.test.tsx --maxWorkers=1 (6 passed)
  • bunx oxlint --type-aware app/components/skills/skills-menu.tsx app/components/skills/skills-menu.test.tsx (passed)
  • bun run lint:manual (passed)
  • bun run lint:links (passed)
  • focused OpenGrep scan (0 findings)
  • EN/DE/FR existing unavailableOption keys verified; no migration required

Heavy browser/E2E/backend/PostgreSQL proof was not run per task limits.

Closes #3656

@yannickmonney yannickmonney left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review of PR #4312 at 253027b36f512430421e76a8d3972a4572d99ccc: accepted (source-level), CI pending

  • Reviewer: agent #4 5f5307c9, run e1983710 (TALE-688, card 8f5fc03c, dispatched by manager run b4fb3f4d).
  • Author: Codex #9 b7c66e31, run 76919bce (TALE-197 / #3656). TALE-197 was reassigned from agent #4 to Codex #9 before any run of mine on it. Its only run is 76919bce, so I am not the author.
  • Form: a commit-bound COMMENT review, because the fleet's GitHub identity is shared.
  • Head: confirmed at 15:08Z and again at 15:24Z, before posting. Base 9e8f87f68.
  • Composition: the PR merges cleanly with main 3af9e704d, which is the composition I tested. It also merges cleanly with the newer main dcfca9819. That commit (#4277) touches only sandbox files and the manual register, so none of the files reviewed here.

Criteria

  1. A stored grant with no active credentials is a checked, unavailable, removable row, like a skill. Met.
    • skills-menu.tsx:193-198 appends a "slug" (unavailable) row for every stored connector slug that is missing from the roster. It is built the same way as the skills fallback at :187-192.
    • Probe P1 drives the real ProjectAgentDialog with connectors: ['github'] and an empty roster. The row renders with aria-checked="true".
  2. Unticking it persists an empty list. Met.
    • P2: untick the row, make an unrelated instructions edit, then Save. updateAgent is called once with connectors: [].
    • Automation agent node (N1): unticking calls onChange({ connectors: undefined }).
  3. Unrelated saves no longer resubmit a hidden grant. Met.
    • P3: a grant the admin keeps is still submitted (['github']), but only while its checked row is on screen. That is the skills behaviour the issue asks for.
    • P2 covers the removed case.
  4. The selected count matches the visible rows. Met.
    • P1: the trigger reads Skills (1) with one checked row, and Skills after unticking.
    • M1 (mixed state): Skills (5) with exactly five checked rows: Word documents, "gone-skill" (unavailable), Slack, "github" (unavailable), Find tasks. Unticking the stale connector keeps slack.
    • On main, M1 shows four checked rows under Skills (5), which is the reported defect.
  5. The connected-roster control still works. Met.
    • P4: with GitHub connected and equipped there is one checked GitHub row, no unavailable twin, and the trigger reads Skills (1). Untick plus Save sends connectors: [].
    • P4 passes on the head, on main and on the composition.
  6. EN/DE/FR. Met.
    • No new keys. chat.skills.unavailableOption takes only the slug in all three locales (en.yml:1474, de.yml:1518, fr.yml:1530).
    • M2 renders the row as "github" (unavailable), "github" (nicht verfügbar) and "github" (indisponible).
  7. The regression fails on main. Met.
    • The PR's test file on main's source gives 1 failed / 5 passed. Only the new test fails, with: Unable to find role="menuitemcheckbox" and name ""github" (unavailable)".

What I ran

  • Setup: installed Node (bunx vitest follows the node shebang), one worker, the jsdom UI config. Dependencies were hard-linked; nothing was installed.
  • Head: PR suite 6/6; my probes 10/10.
  • main 3af9e704d:
    • PR test file: 1 failed / 5 passed.
    • Probes: 9 failed / 1 passed. Only the P4 control passes.
  • Composition (merge-tree of main + head):
    • Probes: 10/10.
    • PR suite plus four consumer suites: 41/41. The consumer suites are project-agent-dialog, project-agents-tab, agent-node-fields and blank-automation-dialog.
  • Mutants at the head:
    • B (drop the stale rows) and C (raw slug label) are killed by the PR's own test.
    • A (drop the roster filter: .filter(() => true)) survives the PR's suite and all four consumer suites (38/38 at the head). Only my probes M1, P4 and P5 kill it.
  • Static checks:
    • Type-aware oxlint on both files: clean (exit 0). A seeded unused variable proved the linter was live.
    • oxfmt --check: clean.
    • Isolated tsc 6.0.2 over both files: 0 diagnostics.
    • commitlint: clean.
    • bun run lint:manual: exit 0.
    • Local OpenGrep: 0 findings.
  • Author claims I reproduced: UI Vitest 6 passed, type-aware Oxlint, lint:manual and OpenGrep. I did not rerun lint:links.

Findings (none blocking)

  • N1 (LOW, recommended): no committed test covers the connected path.
    • Mutant A survives every committed test.
    • Under that mutant, every connected and equipped connector gets a "github" (unavailable) twin next to its real row.
    • Fix: add one control case to skills-menu.test.tsx with roster [{ slug: 'github', label: 'GitHub' }] and connectors: ['github']. It should assert exactly one checked row and no /unavailable/ row, like my P4 and M1.
  • N2 (LOW, existing behaviour, follow-up): connectors read "(unavailable)" before the catalog loads.
    • project-agents-tab.tsx:105 passes catalogQuery.data?.connectors ?? [] to the dialog.
    • So while the catalog loads, each stored connector now reads "(unavailable)" (P5). It does the same for as long as a catalog read fails, because the tab has no error branch.
    • Before this PR the grant was hidden instead.
    • Equipped skills already behave this way (skills ?? []), so this matches skills; it is not a regression. A follow-up could keep stale rows out until the roster has loaded.
  • N3 (LOW, optional): manual layer.
    • SKILL-F13 documents only the unavailable skill row.
    • Extending its last sentence to connectors, or adding a reference/automation.md row for skills-menu.test.tsx, would follow the rule "ship new behaviour with its box".
  • Scope note: tools have no fallback row, so a stored tool that is missing from the catalog would be counted without a row. That is outside #3656, and I did not check whether such a tool can be stored.

Not run

  • No real browser, visual gate, screen reader, or live backend/PostgreSQL run.
  • No live credential disable on a running stack.
  • No full UI suite and no whole-workspace tsc.
  • CI at 15:24Z: the five Resolve source jobs passed. The other 16 checks are pending (queued). I did not rerun, cancel or wait for them.

Merge lane

Under root's 08:15Z rule this ACCEPT binds only to 253027b3. Merge only after exact-head CI is green, by a merger distinct from the author. A new head needs a fresh review. I did no merge, push or card move.

@yannickmonney
yannickmonney merged commit f4842bc into main Oct 4, 2026
@yannickmonney
yannickmonney deleted the fix/disconnected-equipped-connectors branch October 4, 2026 20:12
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.

bug(platform): disconnected equipped connectors cannot be removed from a project agent

1 participant