Skip to content

Fix sidebar nagging Connect when the single-connection fallback applies#148

Merged
ryw merged 1 commit into
mainfrom
sidebar-connection-fallback
Jun 14, 2026
Merged

Fix sidebar nagging Connect when the single-connection fallback applies#148
ryw merged 1 commit into
mainfrom
sidebar-connection-fallback

Conversation

@ryw

@ryw ryw commented Jun 14, 2026

Copy link
Copy Markdown
Member

Symptom

After removing duplicate connections, the sidebar's Action needed cards still showed "Attio (tembo) for 3 agents — Connect" and "Pylon (tembo) for day-planner — Connect", even though those agents run fine.

Cause

The sidebar (workspace layout.tsx) reimplemented the missing-connection check with a strict slot-name match and was missing the native single-connection fallback that the run-blocking pre-flight (findMissingConnections) has. So when an agent pins attio:tembo but the user has exactly one Attio connection (named e.g. default), the runtime uses it and the agent runs — but the sidebar's strict attio:tembo lookup missed and kept nagging. The two had drifted (despite a comment claiming "same slot logic").

Fix

Extract the slot inventory + the missing-slot predicate into shared helpers in connection-checks.ts:

  • buildConnectionSlotSets(composio, native, secrets) — the bucketed lookups (incl. per-provider active-native counts).
  • isAgentConnectionMissing(source, toolkit, name, sets) — the single predicate, including the single-connection fallback.

Both findMissingConnections (run pre-flight) and the sidebar now call these, so they can't drift again. The existing single-connection-fallback tests now cover the sidebar path through the shared predicate.

Verification

  • vitest (connection-checks) ✓ · tsc --noEmit + eslint + next build

🤖 Generated with Claude Code

…lies

The sidebar's "Action needed" list (workspace layout) reimplemented the
missing-connection check with a strict slot-name match and lacked the native
single-connection fallback that the run-blocking pre-flight has. So an agent
that pins `attio:tembo` while the user has exactly one Attio connection named
`default` would run fine, yet the sidebar kept showing "Attio (tembo) Connect".

Extracts the slot inventory + the missing-slot predicate into shared helpers
(buildConnectionSlotSets + isAgentConnectionMissing) in connection-checks.ts
and routes both findMissingConnections and the sidebar through them, so they
can't drift again. The existing single-connection fallback tests now cover the
sidebar path too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ryw ryw merged commit 1503b1a into main Jun 14, 2026
10 checks passed
@ryw ryw deleted the sidebar-connection-fallback branch June 14, 2026 18:50
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