Repository navigation
feat(den): one-click Gmail, Drive, and Calendar with an OpenWork-provided Google client - #4342
Closed
reachjalil wants to merge 4 commits into
Closed
reachjalil wants to merge 4 commits into
reachjalil wants to merge 4 commits into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
reachjalil
force-pushed
the
feature/connector-catalog-popular-first
branch
from
September 3, 2026 22:12
a1cf769 to
7caf2ce
Compare
reachjalil
force-pushed
the
feature/one-click-google-workspace-connector
branch
from
September 3, 2026 22:12
d7a1bbf to
840bd3a
Compare
reachjalil
force-pushed
the
feature/connector-catalog-popular-first
branch
from
September 4, 2026 18:49
7caf2ce to
f829f34
Compare
reachjalil
force-pushed
the
feature/one-click-google-workspace-connector
branch
from
September 4, 2026 18:49
840bd3a to
c282e32
Compare
… chat handoff The Connectors page now opens on the connectors people actually reach for instead of a wall of MCP tiles above the org's connection list. Den web - Popular section (Gmail, GitHub, Google Drive, Google Calendar, Notion, Slack) as two-column rows with icon, name, description, and a plus. "See Outlook Email, Granola, and more" expands to Microsoft 365 plus every remaining curated preset. The smart search-or-paste bar keeps filtering both sections. - A Configured strip links to the new /dashboard/mcp-connections/configured page, which now owns the connection rows (connect, tools, edit, remove) and can focus one row via ?connectionId=. - Configured rows in the catalog get an options menu: Chat, Manage, Uninstall. Chat opens an openwork://chat deep link carrying the connector name and an "Explain ..." starter prompt; the row menu on the configured page gets the same Chat action. - Plus on a one-click OAuth preset adds it for everyone (per-member accounts) and opens the authorization tab in the same gesture. Instant presets add on the spot; API-key and pre-registered-OAuth presets keep the guided form. Den API - Add the GitHub remote MCP preset (pre-registered OAuth app, like Slack). Desktop app - Parse openwork://chat?connector=…&prompt=… and land on the active workspace's new-task state with the composer seeded; nothing is sent until the person presses send. - New [connector …] composer token renders as a chip ahead of the prompt and expands to a connector steering sentence on send, mirroring skill tokens. - Chat links are taken from the shared deep-link queue without disturbing connect or den-auth links. Tests - Bun: catalog data, render, page contracts (den-web); deep-link parsing and connector token (app); preset schema (den-api). - Testkit: connector-chat-deep-link.test.ts (PR lane); connectors-quick-add and telegram-removed E2E specs updated to the catalog and configured page.
…h the flat header Connectors rows used to be the whole story: a name, a blurb, and a "+" or an options menu. Opening one now lands on /dashboard/mcp-connections/<id>, a page that explains the connector before anyone commits to it and manages it afterwards. - The detail route accepts a configured connection id or a catalog id (gmail, notion, microsoft-365). Configured entries resolve to their connection; Gmail, Drive, and Calendar keep their own identity while the Google Workspace connection keeps Google's. - The page composes what already exists: the feature-complete connection row (connect, disconnect, edit, review OAuth, remove), the live tool catalog, and a new Information table (provider, type, server, sign-in mode, access, added by, plugin ownership, docs). Unconfigured connectors get the same header with Add / Connect / Set up, driven by the preset's effort, plus a plain explanation of what that step does. - Copy link and Chat (the desktop deep link) sit where ChatGPT puts "Copy link" and "Try now"; the catalog "+" and options menu are unchanged. - Catalog rows, the configured strip, and Manage all open the detail page. - The Connectors and Configured pages drop the gradient hero for DenPageHeader, matching OpenWork Models and Workflow detail, with the page's primary action in the header. Tests: connector-detail resolution/facts/copy, catalog render links, and a screen source contract; den-web typecheck and the 182-test allowlist pass.
…ided Google client Every organization had to register its own Google OAuth app before anyone could connect Gmail, Drive, or Calendar: the catalog's "+" opened a client dialog, and getOrgOAuthClient had no default to fall back to. Den API can now carry an OpenWork-provided Google Workspace client (DEN_CONNECTOR_GOOGLE_WORKSPACE_CLIENT_ID / _CLIENT_SECRET, validated as a pair). resolveOAuthClient returns the org's own saved client when it exists and the provided default otherwise, for the literal native provider key only; connector rows and external MCP connections are untouched. Connect start, the callback exchange, token refresh, the org-wide usable entry, and both credential-id resolvers read through it, so the connector appears on Your Connections for every member without admin setup. GET /v1/oauth-providers/:providerId/client reports the client's source. Den web: the popular rows show Connect for a published per-person connection the caller has not signed in to yet; "+" and ?quickAdd=google-workspace start the Google sign-in directly when an org-wide client exists and only open first-time setup when none does. The Google dialog names the OpenWork-provided client and keeps "Use your own client" as the override. Tests: den-api env pairing and resolver precedence (mocked db), den-web decision and render coverage, docs for the two variables and the redirect URL to register.
reachjalil
force-pushed
the
feature/connector-catalog-popular-first
branch
from
September 4, 2026 18:54
f829f34 to
097bf68
Compare
reachjalil
force-pushed
the
feature/one-click-google-workspace-connector
branch
from
September 4, 2026 18:54
c282e32 to
37b65c0
Compare
Member
|
@OmarMcAdam Please review the shared Google OAuth client configuration, secret pairing, scopes, and rollout. The PR is draft and the end-to-end sign-in journey remains incomplete; depends on #4305. Holding for your review under the current merge instructions. |
reachjalil
marked this pull request as ready for review
September 5, 2026 00:19
reachjalil
force-pushed
the
feature/connector-catalog-popular-first
branch
from
September 6, 2026 23:02
4b80d5b to
7e846ca
Compare
reachjalil
force-pushed
the
feature/connector-catalog-popular-first
branch
4 times, most recently
from
September 9, 2026 20:05
7a7563c to
2c19ea5
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #4305 (
feature/connector-catalog-popular-first); review and merge bottom-up. This PR contains only its own commit.Problem
Even with the popular-first catalog, Gmail, Google Drive, and Google Calendar were never one click: every organization had to register its own Google OAuth app first. The catalog's
+opened the client dialog,getOrgOAuthClienthad no default to fall back to, and members saw nothing on Your Connections until an admin had pasted a client.Change
Den API
DEN_CONNECTOR_GOOGLE_WORKSPACE_CLIENT_ID/DEN_CONNECTOR_GOOGLE_WORKSPACE_CLIENT_SECRET(env.connectorOAuthClients). Setting one without the other fails startup. These are distinct fromGOOGLE_CLIENT_ID, which configures Den sign-in.resolveOAuthClient(orgId, providerId)inoauth-credentials.ts: the org's own saved client when it exists, otherwise the OpenWork-provided default — for the literal native provider key only (google-workspace). Connector rows and external MCP connections keep readinggetOrgOAuthClient; writes are unchanged, so an org override is always a real row.getValidAccessToken), the org-wide usable entry inlistNativeProviderUsableEntries, and both credential-id resolvers. Net effect: with the variables set, the connector appears on every member's Your Connections with Connect your account, no admin setup.GET /v1/oauth-providers/:providerId/clientaddssource: "org" | "openwork" | null.OAuthClientCredentials(Pick<OrgOAuthClientRow, "clientId" | "clientSecret" | "extra">) replaces the full row type on the OAuth helpers — a type-only widening.Den web
+on Gmail / Drive / Calendar, and?quickAdd=google-workspace, start the Google sign-in directly when an org-wide client exists (own or provided) and only open first-time setup when none does (popularAddAction).Docs
shared-mcp-connections.mdx: the two variables, the native-provider redirect URL to register (<DEN_API_PUBLIC_URL>/v1/oauth-providers/google-workspace/connect/callback), and the override path.Out of scope (follow-ups)
requiresOAuthClient): their client is loaded by the MCP-SDK persistence layer (enterprise-mcp-oauth-persistence.ts), which reads the table directly and checks the registered redirect URI; a provided-client fallback there is a separate change.normalizeEntraTenantIdrejectscommon/organizations), so a provided multitenant client still needs one admin input; needs its own design.Verification
Head
d7a1bbf20(basea1cf769e7= #4305 rebased ontodevdad6a79e3).Passed
bun test --conditions development test/connector-oauth-client-env.test.ts test/openwork-provided-oauth-client.test.ts test/native-provider-scopes.test.ts— 14 passed (env pairing incl. startup refusal; resolver precedence with a mocked db; no fallback for connector rows, other providers, or prototype names).pnpm test(CI lane) — 21 passed.bun test tests/connector-catalog.test.ts tests/connector-catalog-render.test.tsx— 17 passed (decision table, Connect-button render with/without sign-in, busy state).pnpm test— 165 passed.tsc --noEmitclean.tsc --noEmit: only the three pre-existing@openwork/mcp-apps/*artifact errors, identical on the parent branch.pnpm evals:pr specs/spec-impact.test.ts specs/connector-chat-deep-link.test.ts— 7 passed.Incomplete — remaining verification
connectors-quick-add.e2e.test.tswith a world that setsDEN_CONNECTOR_GOOGLE_WORKSPACE_*against the fake OAuth server pattern used innative-provider-connections.test.ts.Skipped