Skip to content

fix(composio): preload connected account state - #445

Merged
milind-soni merged 1 commit into
mainfrom
codex/faster-connected-apps
Aug 24, 2026
Merged

fix(composio): preload connected account state#445
milind-soni merged 1 commit into
mainfrom
codex/faster-connected-apps

Conversation

@milind-soni

@milind-soni milind-soni commented Aug 24, 2026

Copy link
Copy Markdown
Owner

What changed

  • preload connected-app state as soon as the app server is ready
  • preserve the last known account inventory when the modal closes and revalidate it in the background
  • query only connected Composio toolkits instead of scanning the full marketplace
  • show a real checking/error state and disable misleading Connect actions until inventory is known
  • preserve Included behavior for no-auth toolkits and recover into the alias form if an account is discovered late

Why

The Connected tab was rendering an empty state while Composio scanned 1,372 toolkits across 28 pages. During that window Gmail incorrectly showed Connect, and clicking it produced the account-alias guard error.

Measured locally: /api/connectors/connected dropped from about 18–19 seconds to about 1.3 seconds.

Verification

  • pnpm typecheck
  • targeted Composio, broker, and PluginsPanel tests
  • full pnpm test: 1,782 passed, 12 skipped
  • changed production files pass Oxlint (repository-wide lint still has pre-existing anti-slop failures)

Summary by CodeRabbit

  • New Features

    • Connected services now display only apps already connected to your account.
    • Added clearer loading, ready, and error states while connected services load.
    • Added retry and refresh actions for connection inventory issues.
    • Services that require account aliases now reopen the alias setup flow automatically.
    • Apps that do not require authentication are shown as included.
  • Bug Fixes

    • Improved connected-service status persistence when panels are reopened.

@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openmausbot-docs Ready Ready Preview Aug 24, 2026 9:32pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 978bfceb-4671-449c-97b3-eb46d48c378a

📥 Commits

Reviewing files that changed from the base of the PR and between 7fbbd22 and deb5442.

📒 Files selected for processing (7)
  • cloudflare/composio-broker/src/index.test.ts
  • cloudflare/composio-broker/src/index.ts
  • server/composio.test.ts
  • server/composio.ts
  • src/App.tsx
  • src/components/PluginsPanel.test.ts
  • src/components/PluginsPanel.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The PR restricts toolkit discovery to connected services, exposes no-auth toolkit metadata, and adds cached connected-app inventory handling. The plugins panel now tracks loading states, retries failed inventory requests, handles account-alias errors, and preloads status after server connection.

Changes

Connected toolkit inventory

Layer / File(s) Summary
Connected toolkit filtering and metadata
cloudflare/composio-broker/src/index.ts, cloudflare/composio-broker/src/index.test.ts, server/composio.ts, server/composio.test.ts
Toolkit requests now include is_connected=true. API toolkit cards now preserve no_auth metadata as noAuth. Tests verify the connected-only query parameter.
Connected inventory cache and loading
src/components/PluginsPanel.tsx, src/App.tsx
The panel caches connected status for 30 seconds, coalesces concurrent requests, tracks loading phases, and supports forced refresh. The app preloads inventory after the server reports a connected state.
Connector states and recovery
src/components/PluginsPanel.tsx, src/components/PluginsPanel.test.ts
Connector labels, empty-state text, retries, disabled actions, no-auth inclusion, and account-alias error handling now use the connected inventory phase. Tests cover these states and helpers.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to deb54

The change preloads and revalidates connected-app state, improves loading and error handling, and narrows toolkit queries without any actionable merge-blocking risk remaining beyond normal checks and review.

Suggested reviewers: willsigmon

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant PluginsPanel
  participant Server
  participant ComposioAPI
  App->>PluginsPanel: preload connected apps
  PluginsPanel->>Server: request connected-app status
  Server->>ComposioAPI: request toolkits with is_connected=true
  ComposioAPI-->>Server: return connected toolkit data
  Server-->>PluginsPanel: return connector inventory
  PluginsPanel-->>App: cache inventory and update UI
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: preloading connected account state for Composio.
Description check ✅ Passed The description covers the changes, rationale, performance impact, and verification, but omits the template's Screenshots and Checklist sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/faster-connected-apps

Comment @coderabbitai help to get the list of available commands.

@milind-soni
milind-soni merged commit f71c763 into main Aug 24, 2026
7 of 8 checks passed
milind-soni added a commit that referenced this pull request Aug 25, 2026
…#442)

* feat(ui): composer attach button and per-bot permission mode selector

Adds a paperclip button that opens a file picker feeding the shared
attachment pipeline, and an Approve-for-me / Ask-for-approval pill that
toggles autoApprove per bot without opening settings. The composer is
restructured into two rows — text on top, controls below — matching
common chat-app layouts.

* feat(ui): remove the Always allow button from approval cards

The per-bot permission mode selector in the composer (Ask for approval /
Approve for me) is the single mechanism for reducing approval prompts;
the per-program Always-allow grant duplicated it with a worse model.
Allow-once and Deny remain.

* Paint the resting face when a mascot mounts paused (#444)

#425 made sidebar mascots mount paused — and exposed that the parked
loop never draws: the SVG layers hold no expression until the first
draw() positions them, so an idle bot's avatar rendered blank. The
paused branch now paints the still face once, re-painting only when
what it shows changes (state, pinned expression, gradient), then parks
on the same 4Hz wake-poll. Animation stays opt-in; the resting pose is
simply visible again.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* fix(composio): preload connected account state (#445)

* chore(release): bump version to 0.1.33 (#446)

* Add portable BotMRR Markdown playbooks (#426)

* Add portable BotMRR package installs

* Keep package link tests out of Vitest discovery

* Add universal BotMRR Markdown imports

* Document portable team playbooks

* fix(composio): accept empty authorization bodies (#451)

* ci: stop retaining disposable Linux packages (#452)

* fix(linux): harden Ubuntu upgrades and Xorg local control (#346)

* fix(linux): fail closed on unsafe local control startup

* fix(desktop): keep optional connected apps off startup path

* fix(linux): repair inherited DEB upgrade permissions

* docs(linux): document the local-control safety hold

* fix(ci): configure dependencies in DEB upgrade smoke

* fix(linux): configure DEB Chromium sandbox

* fix(linux): restore safe Xorg local control

* fix(desktop): close review security and refresh races

* fix(linux): isolate local control safety opt-in

* docs(linux): explain private CUA cursor behavior

* fix(linux): clean CUA runtime on termination signals

* fix(linux): reap stale AppImage CUA stages

* docs(linux): clarify release CUA coverage

* test(linux): preserve packaged smoke diagnostics

* ci(linux): normalize runner package parent

* fix(linux): close final Ubuntu review gaps

* fix(ci): fail closed before Ubuntu package install

* fix(composio): enforce broker URL parity

* Let Antigravity models control computers (mount the computer MCP) (#447)

* Let Antigravity models control computers (mount the computer MCP)

agy has no per-turn MCP flag and provably no project-level MCP config
(1.1.19: embedded docs list only the global
~/.gemini/config/mcp_config.json and per-plugin files; agy mcp list
ignores .gemini/{settings,mcp_config}.json in the cwd). So each turn
upserts one key — openmausbot-computer — into the global file right
before the spawn, preserving every other byte of the user's config and
tolerating malformed JSON, and removes that key on the next
computer-less turn so tools and box/control tokens cannot leak into
later turns or the user's own agy sessions.

Cloud boxes mount OpenMausBot's REST-to-MCP computer proxy (resolved
via SPAWNED_PROXIES — never relative to the module, the 0.1.24
lesson); Local VM and VPS connections pass through as the stdio Cua
command they already are.

computerMcp is advertised only by full-auto instances: print mode has
no interactive approval channel, and outside
--dangerously-skip-permissions agy auto-denies tools that would
prompt, so a non-fullAuto mount could never fire. localComputerMcp
stays unset — the host desktop requires per-action human approval,
which print mode cannot deliver in any mode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: isolate Antigravity computer mounts

* fix: reap settled Antigravity children

* fix: keep MCP lease until child exit

* fix: preserve Antigravity MCP ownership

* fix: clear failed Antigravity turns

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Milind Soni <46266943+milind-soni@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Kesley David <39314443+KesleyDavid@users.noreply.github.com>
Co-authored-by: milind-soni <milindsoni201@gmail.com>
milind-soni added a commit that referenced this pull request Aug 30, 2026
The implementations already landed: Ubuntu upgrade hardening via #346/#445/#470, Sarvam through the OpenAI-compatible driver in #386, and Windows titlebar cleanup via #530/#543. The incremental locale plan in #558 remains tracked canonically by #453.

Closes #345

Closes #347

Closes #454

Closes #558
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