fix(desktop,trpc,cli): stop the Google Calendar Connect loop and make plugins public
Problem
Connecting Google Calendar succeeds in OAuth but the desktop ends up on the Connect dialog again, every time. Root-cause write-up: https://app.superset.sh/page/google-calendar-plugin-why-connect-loops-154e04
Changes
plugins.list: an installed first-party plugin (Gmail) no longer hides the sharedgoogleconnection from a sibling plugin (Google Calendar). Only third-party installs claim a connector. Without this,connectionswas[], so Install reopened the dialog anduseInstallAfterConnectnever installed.- Deep links:
superset://plugins/x?connected=1lost its query string because TanStack Router does not parse?into/href. NewparseDeepLinkPathsplits path and search, so the connected toast and?error=toasts fire. - Connect dialog: closes when the
?connected=outcome arrives, so re-authorizing an account you already have no longer leaves it open. - CLI:
superset pluginsis no longeraudience: "internal", so it shows withoutSUPERSET_CLI_AUDIENCE=internal(the only workaround for this loop). Added tocli-reference.mdx, asapps/docs/AGENTS.mdrequires.mcpandskillsstay internal; allpluginssubcommands, including the authoring ones, become public.
Not changed: routing deep-link logs through electron-log.
Validation
Ran in the real desktop app from this branch (local stack: Postgres 18, API, Electron, driven over CDP). The Google consent screen was not driven: a google connection row with the calendar scopes stands in for a finished OAuth, and the deep link is sent with open -a.
| Journey | Base code | This branch |
|---|---|---|
Gmail installed, live google connection, Calendar → Install plugin | Connect dialog opens, nothing installed | Installs, "Google Calendar installed" toast, plugin_installs row |
Deep link …/plugins/google-calendar?connected=1 | Not run on base | "Connected Google Calendar" toast; installs a not-yet-installed plugin |
Deep link …?error=oauth_denied | Not run on base | "You declined the Google Calendar authorization request." toast |
| Dialog open on an installed plugin, then the connected deep link | Not run on base | Dialog closes |
Also: new parseDeepLinkPath tests (3) and the plugins.list regression test pass (fails on the base code); biome clean on the changed files. For the CLI change, bun test in packages/cli (438 pass) and packages/cli-framework (76 pass), and the schema lists plugins without the env var.
Not done: a real Google consent round trip, and typecheck is not clean repo-wide (existing better-auth type errors in packages/trpc; none in the changed files).
Review notes
The page suggested dropping the connector-claim exclusion entirely. I kept it for third-party installs because plugins.test.ts ("a connection another install claims stays on that install only") relies on it.
Summary by CodeRabbit
-
New Features
- Added a comprehensive
pluginsCLI command group for installing, connecting, enabling, disabling, syncing, validating, publishing, and managing plugin marketplaces. - Deep links now preserve destination paths and query parameters, including authentication error details.
- Added a comprehensive
-
Bug Fixes
- Plugin connection dialogs now close automatically after a successful connection.
- Shared connections remain available across compatible first-party plugins without being incorrectly blocked.
Summary by cubic
Fixes the Google Calendar connect loop so OAuth completes without reopening the Connect dialog, and makes superset plugins available without an internal audience flag.
Bug Fixes
- Only third-party installs claim a connector, so Gmail no longer hides shared Google connections from Google Calendar.
- Deep links now split path and query string, so
?connected=and?error=outcomes reach the plugin page. - The Connect dialog closes when a connected outcome arrives, including for re-authorization of an existing account.
CLI
superset pluginsis now public (removedaudience: "internal") and documented in the CLI reference.