feat(plugins): connect before install, one place for accounts, no enable/disable
Merged
SA
1mo ago+551+551+012345678901234567890123456789-721-721-012345678901234567890123456789
What
A plugin that needs an account now installs only once the account is connected — on the desktop and in the CLI. Plus plugin-page polish: accounts live in one place, Enable/Disable is gone, and the header is cleaned up.
Why
Installing first put the plugin's tools into every agent, where they failed until someone finished OAuth. Cancelling the connect dialog left the plugin "installed but not connected". The plugin page also showed accounts in two places (the Apps row and the Connected accounts card), and Enable/Disable did the same thing as Remove for agents.
Desktop
- Connect, then install. Install on a plugin that needs an account opens the connect dialog instead of installing. "Continue" sends
plugin=<name>to/api/connectors/<slug>/connect; the API keeps it in the signed OAuth state (only when that plugin's connector is the one being connected) and, on success, returns the browser to/plugins/<name>?connected=1, which already deep links tosuperset://plugins/<name>?connected=1. The plugin page installs there, and also when the still-open dialog sees the account land. Both paths re-readplugins.listand install only if the connector now has an account, so a crafted link cannot install anything. The catalog card's Install goes to the plugin page with the dialog open. Plugins with no account, or whose connector already has one, install on click as before. Released desktop builds don't sendplugin, so their callback still lands on the web connect page. - One place for accounts. The Apps row is name + description only. The Connected accounts card is where you connect, rename, reconnect and disconnect. "Connect another account" opens the dialog on the connect step, not the account list (the automations trigger editor still gets the list).
- Hidden when empty. No Connected accounts section for a plugin that isn't installed and has no accounts.
- No Enable/Disable. Removed from the detail menu and the catalog card. A plugin disabled before this shows as not installed, and installing it turns it back on (machine and account). The
setEnabledprocedures and the CLIenable/disablecommands stay for released builds. - Remove warns. The toast is a warning, and says when the removal disconnected accounts.
- Header. Title is 28px (same as the pull request page), the description is full width under the title row, and the buttons are centred on the title.
CLI
superset plugins install <name>connects first. API-key plugins check--inputsand connect before anything is installed (before: install, then error on missing inputs). OAuth plugins open the browser and wait up to 5 minutes, the same pattern assuperset connections github connect; nothing is installed if it times out.- New
--method(pick between auth methods) and--no-wait(print the link and exit; run install again afterwards). --updateskips the connect step: the desktop runsinstall <name> --updateto materialize plugins and must never wait on a browser.plugins connectandplugins installshare method choice and the authorize URL inlib/plugins/connect.ts.
Verification
- Driven in the dev app over CDP: Install on Superhuman opens "Connect Superhuman" without installing; "Continue" builds
/api/connectors/superhuman_mcp/connect?method=oauth2&plugin=superhuman(caughtwindow.open); a craftedsuperset://…/plugins/superhuman?connected=1with no account installs nothing; catalog-card Install lands on the page with the dialog open. Apps row, hidden section, menu with only Remove, and the header layout checked on Linear/Superhuman. check:i18npasses (one new string, translated in all 16 locales). Biome clean. CLI plugin tests (51), API connector tests (12) and shared plugin tests (16) pass. Desktop, API and CLI typecheck clean in the changed files.- Not exercised end to end: a real OAuth sign-in completing (the deep-link return, the dialog-detected install, or the CLI wait), the Remove toast, and reinstalling a previously disabled plugin — each needs real account changes. The web
/plugins/<name>page hard-codessuperset://, so in a dev build the return link opens the installed app, not the dev one; the dialog path still installs there.
Summary by CodeRabbit
- New Features
- Installing a connector plugin now guides you through connecting an account first. After authorization, the plugin can be installed automatically.
- You can connect accounts directly from a plugin’s page, including when the plugin is already installed.
- The CLI can connect accounts as part of plugin installation, with options to choose an authentication method or return an authorization link without waiting.
- Bug Fixes
- Connection and reconnection flows now return you to the relevant plugin page.
- Uninstall warnings clarify when connected accounts were disconnected.