From 702368ffafa77d71216a25c17aa424e0e979b465 Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Wed, 25 Nov 2026 16:01:38 -0600 Subject: [PATCH] feat(github): graduate GitHub review bots out of experimental (#22996) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - GitHub Code Review Bot connects an agent to a dedicated GitHub App so it reviews pull requests and responds to GitHub mentions > - The feature was gated behind the default-off `enableGitHubReviewBots` experimental instance setting, hiding the catalog card, setup routes, identity links, and channel creation > - People had to find and flip an instance-level experimental switch before they could connect a GitHub review agent > - This pull request graduates GitHub review bots to a normal always-on feature, keeping `enableGitHubReviewBots` only as a deprecated compatibility key that always resolves to `true` > - The benefit is that every Paperclip instance exposes GitHub Code Review Bot setup, discovery, and management by default without requiring feature flags ## Linked Issues or Issue Description **What existing behavior does this improve?** GitHub Code Review Bot discovery, catalog visibility, setup/management routes, identity-link endpoints, and Agent Channels visibility (`enableGitHubReviewBots`). **Subsystem affected** Cross-cutting (`packages/shared`, `server/`, `ui/`, Storybook, E2E specs, docs). **Current behavior** GitHub Code Review Bot is hidden from Connectors, `connections_search`, chat-endpoint creation, identity-link confirmation, and UI setup/settings routes until an instance admin turns on **Settings → Experimental → GitHub review bots** (`enableGitHubReviewBots`). **Proposed behavior** GitHub Code Review Bot is always available as a standard feature on every instance (self-hosted and Cloud), matching AgentMail and graduated features such as Assistant connections (`enablePublicMcp`) and the AWS connector (`enableAwsConnector`). `enableGitHubReviewBots` stays in schemas and the feature catalog only as a deprecated compatibility key that always normalizes to `true`, ignores stored or Cloud-managed `false` values, and does not reject legacy `false` patches. Experimental chat providers (Slack, Discord, Microsoft Teams, Telegram, iMessage Photon, Speko) remain gated by `enableChatConnectors`. **Reason and benefit** Users can connect and manage GitHub review agents directly from Connectors without an admin enabling an experimental flag first, and Cloud stacks no longer require managed feature-flag overrides to expose GitHub review bots. **Breaking changes** No schema migration or breaking API change. Existing rows, API patches, and Cloud managed configs that still carry `enableGitHubReviewBots` continue to parse cleanly, while the effective value is always `true`. Instances that previously kept `enableGitHubReviewBots` off now display GitHub Code Review Bot in Connectors and allow authorized managers (`tools:manage_connections`) to create GitHub review bot endpoints. ## What Changed - `packages/shared`: marked `enableGitHubReviewBots` as a deprecated compatibility key in types, Zod defaults (`true`), and `INSTANCE_FEATURE_CATALOG` (`cloudDefault: true`, `selfHostedDefault: true`); updated `channelMethodEnabled` in `connector-availability.ts` so `github` is always enabled alongside `agentmail`. - `server` instance settings and Cloud staging: `normalizeExperimentalSettings` always returns `enableGitHubReviewBots: true`; `applyManagedExperimentalOverlay` and `updateExperimental` ignore retired `enableGitHubReviewBots` entries so Cloud managed configs cannot turn it off and legacy `false` patches are not rejected; removed `enableGitHubReviewBots` from `CLOUD_STAGING_EXPERIMENTAL_KEYS`. - `server` chat channels, discovery, and OpenAPI: allowed `github` in `assertChatProviderEnabledForCreate`, `assertIdentityProviderEnabled`, `assertIdentityLinkAccess`, and `connection-intents` discovery without experimental flags while keeping `enableChatConnectors` enforcement for experimental chat providers; updated the OpenAPI endpoint description. - `ui` and Storybook: removed the **GitHub review bots** Experimental settings toggle card; simplified `useChatConnectorsEnabled` and `chatProviderVisible` so `github` and `github-code-review-bot` are always visible; bypassed experimental loading wait for `provider=github` in `ChatConnectorsExperimentalGate`; made the classic Agent Detail Channels tab and `AgentChannelsPanel` empty-state copy always reflect available agent identities; updated `canEnterAppsConnect`, `Browse`, `ConnectionSetupFlow`, and `github-connections.stories.tsx`. - Tests, E2E, runner-e2e, docs, and maps: updated unit, integration, managed-overlay, runner-e2e, and Playwright E2E specs; refreshed `tests/runner-e2e/source-sdk-public-inputs.json`; updated `doc/connections/GITHUB.md`, `doc/connections/GITHUB-REVIEW-BOT.md`, and `maps/feature-map/chat-channels.md`. ## Verification - `pnpm --filter @paperclipai/shared build && pnpm --filter @paperclipai/shared typecheck && pnpm --filter @paperclipai/server typecheck && pnpm --filter @paperclipai/ui typecheck` — passed. - `node scripts/check-maps.mjs && node scripts/storybook-catalog.mjs` — passed. - `pnpm vitest run packages/shared/src/validators/instance.test.ts packages/shared/src/connector-availability.test.ts packages/shared/src/feature-catalog.test.ts server/src/__tests__/instance-settings-service.test.ts server/src/__tests__/instance-settings-managed-overlay.test.ts server/src/__tests__/instance-settings-cloud-defaults.test.ts server/src/routes/chat-channels.identity.test.ts server/src/__tests__/connection-intents-service.test.ts server/src/__tests__/chat-channels/slack-ingress-and-threads.integration.test.ts server/src/__tests__/chat-channels/github-setup-and-access.integration.test.ts` — all passed. - `pnpm vitest run ui/src/pages/apps/app-connect-policy.test.ts ui/src/components/chat/ExternallyConnectedTaskBanner.test.tsx ui/src/features/connections/ConnectionSetupFlow.slack-oauth.test.tsx` — 3 files, 62 tests passed. - `pnpm --dir tests/runner-e2e vitest run github-review-journey.test.ts` — 56 tests passed. - `pnpm verify --explain` — confirmed `tests/runner-e2e/source-sdk-public-inputs.json` is current; exited 2 for broad CI coverage (handled by required GitHub CI gates on this PR). ## Risks - Behavioral shift: instances that had `enableGitHubReviewBots` off now show GitHub Code Review Bot in Connectors and allow authorized users with `tools:manage_connections` to configure GitHub review bots. Existing permission boundaries (`tools:manage_connections`, company scoping, GitHub App OAuth/installation consent) are unchanged. - `useIssueChatBinding` now queries `/api/issues/:issueId/chat-binding` for normal tasks even when `enableChatConnectors` is off so GitHub-bound task banners remain visible; experimental chat bindings remain filtered out by `chatProviderVisible` while `enableChatConnectors` is off. - No database migration is required; stored `enableGitHubReviewBots` JSON values become inert. > For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and discuss it in `#dev` before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See `CONTRIBUTING.md`. ## Model Used - Google Gemini (high reasoning) in Antigravity, with tool use (shell, file edits, test execution). ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --- doc/connections/GITHUB-REVIEW-BOT.md | 7 ++-- doc/connections/GITHUB.md | 7 ++-- .../board-operator/github-review-bots.md | 2 +- maps/feature-map/chat-channels.md | 4 +- .../shared/src/connector-availability.test.ts | 3 ++ packages/shared/src/connector-availability.ts | 3 +- packages/shared/src/feature-catalog.ts | 9 +++-- packages/shared/src/types/instance.ts | 2 +- .../shared/src/validators/instance.test.ts | 6 ++- packages/shared/src/validators/instance.ts | 5 ++- ...ck-ingress-and-threads.integration.test.ts | 9 +++-- .../connection-intents-service.test.ts | 9 ++--- .../helpers/connection-management-harness.ts | 1 - .../instance-settings-managed-overlay.test.ts | 37 ++++++++++++++++++- .../instance-settings-service.test.ts | 15 +++++--- .../src/routes/chat-channels.identity.test.ts | 12 ++---- server/src/routes/chat-channels.ts | 23 +++++------- server/src/routes/openapi.ts | 2 +- server/src/services/cloud-instance.ts | 1 - server/src/services/connection-intents.ts | 2 +- server/src/services/instance-settings.ts | 19 +++++++--- tests/e2e/chat-adapters-ui-messaging.spec.ts | 2 +- ...chat-adapters-ui-providers-catalog.spec.ts | 1 - tests/e2e/chat-adapters-ui-providers.spec.ts | 14 +++---- tests/e2e/chat-adapters-ui.shared.ts | 4 +- tests/runner-e2e/github-review-flow.ts | 2 - .../runner-e2e/github-review-journey.test.ts | 1 - .../runner-e2e/source-sdk-public-inputs.json | 12 +++--- ui/src/App.tsx | 4 +- .../ChatConnectorsExperimentalGate.tsx | 10 ++--- ui/src/components/chat/AgentChannelsPanel.tsx | 6 +-- .../ExternallyConnectedTaskBanner.test.tsx | 2 +- .../chat/ExternallyConnectedTaskBanner.tsx | 6 +-- .../ConnectionSetupFlow.slack-oauth.test.tsx | 2 +- .../connections/ConnectionSetupFlow.tsx | 6 +-- ui/src/hooks/useChatConnectorsEnabled.ts | 15 +++----- ui/src/pages/AgentDetail.production.tsx | 11 ++---- ui/src/pages/InstanceExperimentalSettings.tsx | 14 +------ ui/src/pages/apps/Browse.tsx | 21 ++++------- ui/src/pages/apps/app-connect-policy.test.ts | 13 ++++--- ui/src/pages/apps/app-connect-policy.ts | 8 ++-- .../github-connections.stories.tsx | 7 ++-- 42 files changed, 172 insertions(+), 167 deletions(-) diff --git a/doc/connections/GITHUB-REVIEW-BOT.md b/doc/connections/GITHUB-REVIEW-BOT.md index 2f7dd17ed34..7d5281ac399 100644 --- a/doc/connections/GITHUB-REVIEW-BOT.md +++ b/doc/connections/GITHUB-REVIEW-BOT.md @@ -13,10 +13,9 @@ required GitHub checks, read The canonical step-by-step operator setup guide lives in [GitHub Review Bots](../../docs/guides/board-operator/github-review-bots.md). -Enable **GitHub review bots** in instance **Experimental** settings (this -default-off setting is independent of **Chat connectors**; hiding either feature -does not pause existing provider delivery), then follow the Quickstart there to -choose an agent, create and install the dedicated GitHub App, and verify your +Open the **GitHub Code Review Bot** connector from **Connectors** (no +experimental setting is required), then follow the Quickstart there to choose +an agent, create and install the dedicated GitHub App, and verify your identity. The sections below record internal connector semantics and implementation invariants. diff --git a/doc/connections/GITHUB.md b/doc/connections/GITHUB.md index e660b1b036e..d6583b7986b 100644 --- a/doc/connections/GITHUB.md +++ b/doc/connections/GITHUB.md @@ -10,10 +10,9 @@ only in its existing encrypted secret system. **GitHub** connects an account for repository tools, Git, and `gh`, and opens Access → Connect directly. **GitHub Code Review Bot** connects one agent to a GitHub App for pull-request reviews and mentions, and opens Choose agent directly. -The bot entry follows **Settings → Experimental → GitHub review bots** -(`enableGitHubReviewBots`), which defaults to off. It is independent of Chat -connectors: enabling one does not enable the other. Turning off the GitHub -setting hides setup and management; existing bots keep running. +It is available by default in Connectors and does not require turning on +**Chat connectors** or any experimental setting. The legacy +`enableGitHubReviewBots` key is kept for compatibility only and is always on. Both entries reuse the existing GitHub integrations. Bot endpoints retain the `github` provider identity and existing setup, reconnect, and management URLs; diff --git a/docs/guides/board-operator/github-review-bots.md b/docs/guides/board-operator/github-review-bots.md index 239bf98ebae..c61beebe74b 100644 --- a/docs/guides/board-operator/github-review-bots.md +++ b/docs/guides/board-operator/github-review-bots.md @@ -9,7 +9,7 @@ You can run a review bot on any agent, harness, or model supported by Paperclip ## 1. Quickstart -Enable **GitHub review bots** in instance **Experimental** settings before starting setup (this default-off setting is independent of **Chat connectors**, and hiding either feature does not pause existing provider delivery). Setup requires zero GitHub Actions YAML in your repository. +GitHub Code Review Bot is available in **Connectors** by default with no experimental setting required. Setup requires zero GitHub Actions YAML in your repository. ### Step 1: Choose an agent diff --git a/maps/feature-map/chat-channels.md b/maps/feature-map/chat-channels.md index 3fb38d82174..658c4b918f5 100644 --- a/maps/feature-map/chat-channels.md +++ b/maps/feature-map/chat-channels.md @@ -43,8 +43,8 @@ Use `paperclipai email inboxes --company-id `, then `email send --co Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use a test provider account/channel with permission to send messages. Gates differ: -AgentMail bypasses the chat-connectors UI gate, GitHub uses -`enableGitHubReviewBots`, and other chat providers use `enableChatConnectors`. +AgentMail and GitHub bypass the chat-connectors UI gate; other chat providers +use `enableChatConnectors`. Setup is covered in [connection setup](./connection-setup.md). ### `external-thread` diff --git a/packages/shared/src/connector-availability.test.ts b/packages/shared/src/connector-availability.test.ts index eea485b72e5..3176063aced 100644 --- a/packages/shared/src/connector-availability.test.ts +++ b/packages/shared/src/connector-availability.test.ts @@ -53,6 +53,9 @@ describe("native connectors that need a customer-created OAuth app", () => { const slack = getConnectableAppDefinition("slack")!; expect(nativeConnectorRequiresCustomerOAuthApp(slack, {})).toBe(true); expect(nativeConnectorRequiresCustomerOAuthApp(slack, { enableChatConnectors: true })).toBe(false); + const githubBot = getConnectableAppDefinition("github-code-review-bot")!; + expect(nativeConnectorRequiresCustomerOAuthApp(githubBot, {})).toBe(false); + expect(nativeConnectorRequiresCustomerOAuthApp(githubBot, { enableGitHubReviewBots: false })).toBe(false); }); it("does not flag connectors with a managed, dynamic-registration, or credential path", () => { diff --git a/packages/shared/src/connector-availability.ts b/packages/shared/src/connector-availability.ts index 82aec0dfb2e..7797798bc98 100644 --- a/packages/shared/src/connector-availability.ts +++ b/packages/shared/src/connector-availability.ts @@ -17,8 +17,7 @@ function channelMethodEnabled( method: ConnectionMethodDef, settings: Partial | null | undefined, ): boolean { - if (method.provider === "agentmail") return true; - if (method.provider === "github") return settings?.enableGitHubReviewBots === true; + if (method.provider === "agentmail" || method.provider === "github") return true; return settings?.enableChatConnectors === true; } diff --git a/packages/shared/src/feature-catalog.ts b/packages/shared/src/feature-catalog.ts index 468dbae9dba..ee5d2b79ecf 100644 --- a/packages/shared/src/feature-catalog.ts +++ b/packages/shared/src/feature-catalog.ts @@ -129,11 +129,12 @@ export const INSTANCE_FEATURE_CATALOG: Record { } expect(patchInstanceExperimentalSettingsSchema.safeParse({ enablePaperclipNotebook: "true" }).success).toBe(false); }); - it("defaults GitHub review bots off independently of chat and accepts explicit changes", () => { - expect(instanceExperimentalSettingsSchema.parse({ enableChatConnectors: true }).enableGitHubReviewBots).toBe(false); + it("defaults the retired GitHub review bots compatibility key on and accepts explicit patches", () => { + expect(instanceExperimentalSettingsSchema.parse({}).enableGitHubReviewBots).toBe(true); + expect(instanceExperimentalSettingsSchema.parse({ enableChatConnectors: false }).enableGitHubReviewBots).toBe(true); + expect(patchInstanceExperimentalSettingsSchema.parse({ enableGitHubReviewBots: false })).toEqual({ enableGitHubReviewBots: false }); expect(patchInstanceExperimentalSettingsSchema.parse({ enableGitHubReviewBots: true })).toEqual({ enableGitHubReviewBots: true }); }); it("defaults chat connectors off independently of Apps and accepts only explicit boolean patches", () => { diff --git a/packages/shared/src/validators/instance.ts b/packages/shared/src/validators/instance.ts index 1c151c58a13..9cfe716ebf4 100644 --- a/packages/shared/src/validators/instance.ts +++ b/packages/shared/src/validators/instance.ts @@ -60,7 +60,10 @@ export const instanceExperimentalSettingsSchema = z.object({ enableGrokBot: z.boolean().default(false), enableMuse: z.boolean().default(false), enableChatConnectors: z.boolean().default(false), - enableGitHubReviewBots: z.boolean().default(false), + // Deprecated compatibility key. GitHub review bots graduated from + // Experimental and are always enabled; older stored rows, managed configs + // and clients may still send it. + enableGitHubReviewBots: z.boolean().default(true), // Compatibility only: old stored and managed values must still parse. enableMcpAggregators: z.boolean().default(true), enableMemoryConnectors: z.boolean().default(false), diff --git a/server/src/__tests__/chat-channels/slack-ingress-and-threads.integration.test.ts b/server/src/__tests__/chat-channels/slack-ingress-and-threads.integration.test.ts index 6dc4238929b..868881c4765 100644 --- a/server/src/__tests__/chat-channels/slack-ingress-and-threads.integration.test.ts +++ b/server/src/__tests__/chat-channels/slack-ingress-and-threads.integration.test.ts @@ -35,7 +35,7 @@ describeEmbeddedPostgres("chat channels: slack ingress and threads", () => { const { seedCompany, readChatConversationsByEndpointId, readIssueCommentsByIssueId, readChatDeliveriesByEndpointId, readChatDeliveriesById, readIssuesById, readChatPublicationsByEndpointId, readToolConnectionsById, readIssuesByCompanyId, readChatPublicationsByCommentId, readHeartbeatRunsByCompanyId, createService, recordSlackUrlVerification, signedSlackWebhookRequest, chatWakeContext, addSelectedChatFinal, qualifySetupRoundTrip, configuredSlackEndpoint, deliverMessage } = h; const { recordGitHubWebhookVerification, configuredGitHubEndpoint } = gh; - it("refuses to create a chat endpoint while its provider experiment is off", async () => { + it("refuses experimental chat endpoints while chat connectors are off, but always allows GitHub review bots", async () => { const settings = instanceSettingsService(db); const previous = await settings.getExperimental(); try { @@ -43,14 +43,17 @@ describeEmbeddedPostgres("chat channels: slack ingress and threads", () => { const fixture = await seedCompany(); const { service } = createService(); const app = routesApp(db, fixture.companyId, service); - for (const provider of ["imessage-photon", "slack", "github"]) { + for (const provider of ["imessage-photon", "slack"]) { const response = await request(app).post(`/api/companies/${fixture.companyId}/chat-endpoints`) .send({ provider, assignedAgentId: fixture.assignedAgentId }).expect(403); expect(response.body.error).toContain("//company/settings/instance/experimental"); } expect(await service.list(fixture.companyId)).toEqual([]); + const githubResponse = await request(app).post(`/api/companies/${fixture.companyId}/chat-endpoints`) + .send({ provider: "github", assignedAgentId: fixture.assignedAgentId }).expect(201); + expect(githubResponse.body.provider).toBe("github"); } finally { - await settings.updateExperimental({ enableChatConnectors: previous.enableChatConnectors, enableGitHubReviewBots: previous.enableGitHubReviewBots }); + await settings.updateExperimental({ enableChatConnectors: previous.enableChatConnectors }); } }); diff --git a/server/src/__tests__/connection-intents-service.test.ts b/server/src/__tests__/connection-intents-service.test.ts index 299e63cf943..6e3411db42f 100644 --- a/server/src/__tests__/connection-intents-service.test.ts +++ b/server/src/__tests__/connection-intents-service.test.ts @@ -232,25 +232,21 @@ describeEmbeddedPostgres("connectionIntentService", () => { } }); - it("discovers GitHub review bots independently from chat connectors", async () => { + it("always discovers GitHub review bots while keeping experimental chat connectors gated", async () => { const settings = instanceSettingsService(db); const previous = await settings.getExperimental(); const service = connectionIntentService(db); try { - await settings.updateExperimental({ enableChatConnectors: false, enableGitHubReviewBots: true }); + await settings.updateExperimental({ enableChatConnectors: false, enableGitHubReviewBots: false }); expect((await service.search(claims, "github")).results).toEqual(expect.arrayContaining([ expect.objectContaining({ service: "github-code-review-bot" }), expect.objectContaining({ service: "github" }), ])); expect((await service.search(claims, "slack")).results.some(item => item.methods.some(method => method.purpose === "channel"))).toBe(false); - await settings.updateExperimental({ enableChatConnectors: true, enableGitHubReviewBots: false }); - expect((await service.search(claims, "github")).results.some(item => - item.service === "github-code-review-bot")).toBe(false); } finally { await settings.updateExperimental({ enableChatConnectors: previous.enableChatConnectors, - enableGitHubReviewBots: previous.enableGitHubReviewBots, }); } }); @@ -458,6 +454,7 @@ describeEmbeddedPostgres("connectionIntentService", () => { .rejects.toThrow("was not found"); expect((await service.search(claims, "github")).results).toEqual([ expect.objectContaining({ service: "github", state: "available" }), + expect.objectContaining({ service: "github-code-review-bot", state: "available" }), expect.objectContaining({ service: "github-copilot", state: "available" }), ]); await expect(service.request(claims, "github")).resolves.toMatchObject({ diff --git a/server/src/__tests__/helpers/connection-management-harness.ts b/server/src/__tests__/helpers/connection-management-harness.ts index b95ce98f6f6..114ecd4108f 100644 --- a/server/src/__tests__/helpers/connection-management-harness.ts +++ b/server/src/__tests__/helpers/connection-management-harness.ts @@ -56,7 +56,6 @@ export function createConnectionManagementHarness( vi.stubEnv("PAPERCLIP_SECRETS_MASTER_KEY_FILE", join(server.root, "master.key")); await instanceSettingsService(server.db).updateExperimental({ enableChatConnectors: true, - enableGitHubReviewBots: true, enableGoogleWorkspaceConnector: true, }); }, 90_000); diff --git a/server/src/__tests__/instance-settings-managed-overlay.test.ts b/server/src/__tests__/instance-settings-managed-overlay.test.ts index a0a285a88ee..b03dde5a108 100644 --- a/server/src/__tests__/instance-settings-managed-overlay.test.ts +++ b/server/src/__tests__/instance-settings-managed-overlay.test.ts @@ -142,10 +142,16 @@ describe("instanceSettingsService managed overlay", () => { expect((await service.get()).experimental).toMatchObject(features); expect((await service.getExperimental()).managedKeys).toMatchObject( Object.fromEntries(Object.keys(features) - .filter((key) => key !== "enableApps" && key !== "enableMcpAggregators" && key !== "enablePublicMcp" && key !== "enableAwsConnector") + .filter((key) => + key !== "enableApps" + && key !== "enableMcpAggregators" + && key !== "enablePublicMcp" + && key !== "enableAwsConnector" + && key !== "enableGitHubReviewBots") .map((key) => [key, { managed: true, managedBy: "paperclip-cloud" }])), ); - for (const key of Object.keys(features).filter((key) => key !== "enablePublicMcp" && key !== "enableAwsConnector")) { + for (const key of Object.keys(features).filter((key) => + key !== "enablePublicMcp" && key !== "enableAwsConnector" && key !== "enableGitHubReviewBots")) { await expect(service.updateExperimental({ [key]: false })).rejects.toMatchObject({ status: 403, details: { code: "settings_operator_managed" }, @@ -389,4 +395,31 @@ describe("instanceSettingsService managed overlay", () => { expect(persistedSets[0]!.experimental).not.toHaveProperty("managedKeys"); expect(Object.prototype.hasOwnProperty.call(updated.experimental, "managedKeys")).toBe(false); }); + + it("ignores Cloud-managed values for retired enableGitHubReviewBots and allows legacy off patches", async () => { + const managedOff = JSON.stringify({ + v: 1, + mode: "cloud", + catalogVersion: "2026.720.0", + features: { enableGitHubReviewBots: false, enableStatusCards: true }, + plugins: { autoInstall: [] }, + }); + const managedOn = JSON.stringify({ + v: 1, + mode: "cloud", + catalogVersion: "2026.720.0", + features: { enableGitHubReviewBots: true }, + plugins: { autoInstall: [] }, + }); + const { db } = stubDb(settingsRow({ enableGitHubReviewBots: false })); + const offSvc = instanceSettingsService(db, { runtimeEnv: managedEnv(managedOff) }); + const experimental = await offSvc.getExperimental(); + expect(experimental.enableGitHubReviewBots).toBe(true); + expect(experimental.managedKeys?.enableGitHubReviewBots).toBeUndefined(); + + const onSvc = instanceSettingsService(db, { runtimeEnv: managedEnv(managedOn) }); + const updated = await onSvc.updateExperimental({ enableGitHubReviewBots: false }); + expect(updated.experimental.enableGitHubReviewBots).toBe(true); + expect(updated.experimental.managedKeys?.enableGitHubReviewBots).toBeUndefined(); + }); }); diff --git a/server/src/__tests__/instance-settings-service.test.ts b/server/src/__tests__/instance-settings-service.test.ts index f13a39c643f..64569bbd1ae 100644 --- a/server/src/__tests__/instance-settings-service.test.ts +++ b/server/src/__tests__/instance-settings-service.test.ts @@ -93,10 +93,15 @@ describe("instance settings service", () => { const disabled = applyExperimentalSettingsPatch(enabled, { enableChatConnectors: false }); expect(disabled).toMatchObject({ enableApps: true, enableChatConnectors: false }); }); - it("keeps GitHub review bots independent across legacy normalization and persistence", () => { - expect(normalizeExperimentalSettings({ enableChatConnectors: true })).toMatchObject({ enableChatConnectors: true, enableGitHubReviewBots: false }); - const saved = applyExperimentalSettingsPatch({}, { enableGitHubReviewBots: true }); - expect(normalizeExperimentalSettings(JSON.parse(JSON.stringify(saved)))).toMatchObject({ enableChatConnectors: false, enableGitHubReviewBots: true }); + it("always enables GitHub review bots and ignores stored or patched off values", () => { + for (const stored of [undefined, null, {}, { enableChatConnectors: false }, { enableGitHubReviewBots: false }]) { + expect(normalizeExperimentalSettings(stored).enableGitHubReviewBots).toBe(true); + } + const saved = applyExperimentalSettingsPatch({}, { enableGitHubReviewBots: false }); + expect(normalizeExperimentalSettings(JSON.parse(JSON.stringify(saved)))).toMatchObject({ + enableChatConnectors: false, + enableGitHubReviewBots: true, + }); }); it("ignores retired experimental flags without resetting current settings", () => { expect(normalizeExperimentalSettings({ @@ -136,7 +141,7 @@ describe("instance settings service", () => { enableCombinedInboxTasks: false, enableArtifactsV1: true, enableChatConnectors: false, - enableGitHubReviewBots: false, + enableGitHubReviewBots: true, enableMemoryConnectors: false, enablePaperclipNotebook: false, enableGoogleWorkspaceConnector: false, diff --git a/server/src/routes/chat-channels.identity.test.ts b/server/src/routes/chat-channels.identity.test.ts index b50a42396bf..b1d8a5be893 100644 --- a/server/src/routes/chat-channels.identity.test.ts +++ b/server/src/routes/chat-channels.identity.test.ts @@ -54,30 +54,24 @@ function fixture( } describe("chat identity-link preview authority", () => { - it.each([false, undefined])("blocks every identity API when chat rollout is disabled (%s)", async (enabled) => { + it.each([false, undefined])("blocks experimental chat identity APIs when chat rollout is disabled (%s)", async (enabled) => { settings.getExperimental.mockResolvedValue({ enableChatConnectors: enabled }); const f = fixture(); await request(f.app).get("/api/chat-identity-links/preview").query({ token }).expect(403); await request(f.app).post("/api/chat-identity-links/confirm").send({ token }).expect(403); await request(f.app).post("/api/chat-identity-links/request-access").send({ token }).expect(403); - expect(f.previewIdentityLink).not.toHaveBeenCalled(); expect(f.confirmIdentityLink).not.toHaveBeenCalled(); expect(f.requestIdentityAccess).not.toHaveBeenCalled(); }); - it.each(["github", "slack"])("uses the token’s verified provider when only GitHub bots are enabled (%s)", async (provider) => { - settings.getExperimental.mockResolvedValue({ enableChatConnectors: false, enableGitHubReviewBots: true }); + it.each(["github", "slack"])("admits GitHub identity links without experimental flags while gating Slack (%s)", async (provider) => { + settings.getExperimental.mockResolvedValue({ enableChatConnectors: false }); const f = fixture(); f.previewIdentityLink.mockResolvedValue({ ...preview, provider } as typeof preview); await request(f.app).get("/api/chat-identity-links/preview").query({ token }).expect(provider === "github" ? 200 : 403); await request(f.app).post("/api/chat-identity-links/confirm").send({ token }).expect(provider === "github" ? 200 : 403); expect(f.confirmIdentityLink.mock.calls.length).toBe(provider === "github" ? 1 : 0); }); - it("does not admit GitHub links under chat-only opt-in", async () => { - const f = fixture(); - f.previewIdentityLink.mockResolvedValue({ ...preview, provider: "github" } as unknown as typeof preview); - await request(f.app).get("/api/chat-identity-links/preview").query({ token }).expect(403); - }); it("returns the preview to a Board member of its exact company", async () => { const { app, previewIdentityLink } = fixture(); const response = await request(app) diff --git a/server/src/routes/chat-channels.ts b/server/src/routes/chat-channels.ts index d75e0f27acb..19a4404c141 100644 --- a/server/src/routes/chat-channels.ts +++ b/server/src/routes/chat-channels.ts @@ -125,33 +125,28 @@ export function chatChannelRoutes(db: Db, options: ChatChannelRouteOptions) { assertBoard(req); const userId = actorUserId(req); if (!userId) throw badRequest("A signed-in Paperclip user is required"); - // Enforce rollout here: invited nonmembers cannot read the board's - // experimental-settings API. A private token never bypasses this gate. + // Enforce rollout per provider after resolving the token: invited nonmembers + // cannot read the board's experimental-settings API, and GitHub/AgentMail + // links remain available while experimental chat connectors are off. const experimental = await instanceSettingsService(db).getExperimental(); - if (!experimental.enableChatConnectors && !experimental.enableGitHubReviewBots) { - throw forbidden("Chat connectors are not enabled on this instance"); - } return { userId, experimental }; } function assertIdentityProviderEnabled( provider: string, - experimental: { enableChatConnectors: boolean; enableGitHubReviewBots: boolean }, + experimental: { enableChatConnectors: boolean }, ) { - const enabled = provider === "agentmail" || (provider === "github" - ? experimental.enableGitHubReviewBots - : experimental.enableChatConnectors); + const enabled = provider === "agentmail" || provider === "github" || experimental.enableChatConnectors; if (!enabled) throw forbidden("This connector is not enabled on this instance"); } function assertChatProviderEnabledForCreate( provider: string, - experimental: { enableChatConnectors: boolean; enableGitHubReviewBots: boolean }, + experimental: { enableChatConnectors: boolean }, ) { - if (provider === "agentmail") return; - if (provider === "github" ? experimental.enableGitHubReviewBots : experimental.enableChatConnectors) return; - const setting = provider === "github" ? "GitHub review bots" : "Chat connectors"; - throw forbidden(`${setting} is turned off on this instance, so this chat endpoint cannot be created. An instance admin turns it on in Experimental settings at //company/settings/instance/experimental. Agents cannot change instance settings.`); + if (provider === "agentmail" || provider === "github") return; + if (experimental.enableChatConnectors) return; + throw forbidden("Chat connectors is turned off on this instance, so this chat endpoint cannot be created. An instance admin turns it on in Experimental settings at //company/settings/instance/experimental. Agents cannot change instance settings."); } async function assertConnectionManager( diff --git a/server/src/routes/openapi.ts b/server/src/routes/openapi.ts index ff7aa741c8c..649ac809a12 100644 --- a/server/src/routes/openapi.ts +++ b/server/src/routes/openapi.ts @@ -2590,7 +2590,7 @@ registry.registerPath({ summary: "Create a chat endpoint", description: "Creates one provider bot endpoint bound permanently to one Paperclip agent. Provider setup and verification happen in later calls. " - + "Chat providers need Chat connectors, and GitHub needs GitHub review bots, turned on by an instance admin in Experimental settings at //company/settings/instance/experimental. " + + "Experimental chat providers need Chat connectors turned on by an instance admin in Experimental settings at //company/settings/instance/experimental; AgentMail and GitHub are always available. " + "While that setting is off, connections_search shows the provider as unavailable and this call is refused; agents cannot change it. Link that page as [Experimental settings](//company/settings/instance/experimental) and reply.", request: { params: z.object({ companyId: z.string().uuid() }), diff --git a/server/src/services/cloud-instance.ts b/server/src/services/cloud-instance.ts index 108f2df946b..b83e11fb7a4 100644 --- a/server/src/services/cloud-instance.ts +++ b/server/src/services/cloud-instance.ts @@ -19,7 +19,6 @@ const CLOUD_STAGING_EXPERIMENTAL_KEYS: ReadonlySet = new Set([ "enableFastResponses", "enableFirstTaskPlanProposal", "enableCloudTrialInference", - "enableGitHubReviewBots", "enableGoogleWorkspaceConnector", "enableAwsConnector", "enableGoalsSidebarLink", diff --git a/server/src/services/connection-intents.ts b/server/src/services/connection-intents.ts index 16264371345..344c4b42cee 100644 --- a/server/src/services/connection-intents.ts +++ b/server/src/services/connection-intents.ts @@ -531,7 +531,7 @@ export function connectionIntentService(db: Db) { const yieldingServices = new Set(); const discoveryMethods = (app: (typeof APP_STORE_DEFINITIONS)[number]) => getAvailableConnectionMethods(app) .filter(method => method.purpose !== "channel" || app.slug === "agentmail" - || (method.provider === "github" ? settings.enableGitHubReviewBots : settings.enableChatConnectors)); + || method.provider === "github" || settings.enableChatConnectors); const services = [...APP_STORE_DEFINITIONS.filter(app => isConnectorFeatureEnabled(app, settings) && discoveryMethods(app).length).map((app) => app.slug), ...inventory.connections.filter((connection) => diff --git a/server/src/services/instance-settings.ts b/server/src/services/instance-settings.ts index 699dd307416..39b543ae256 100644 --- a/server/src/services/instance-settings.ts +++ b/server/src/services/instance-settings.ts @@ -267,7 +267,8 @@ export function normalizeExperimentalSettings(raw: unknown): InstanceExperimenta enableMuse: parsed.data.enableMuse ?? false, enableGrokBot: parsed.data.enableGrokBot ?? false, enableChatConnectors: parsed.data.enableChatConnectors ?? false, - enableGitHubReviewBots: parsed.data.enableGitHubReviewBots ?? false, + // GitHub review bots graduated from Experimental; ignore historical off values. + enableGitHubReviewBots: true, enableMemoryConnectors: parsed.data.enableMemoryConnectors ?? false, enablePaperclipNotebook: parsed.data.enablePaperclipNotebook ?? false, enableGoogleWorkspaceConnector: parsed.data.enableGoogleWorkspaceConnector ?? false, @@ -330,7 +331,7 @@ export function normalizeExperimentalSettings(raw: unknown): InstanceExperimenta enableMuse: false, enableGrokBot: false, enableChatConnectors: false, - enableGitHubReviewBots: false, + enableGitHubReviewBots: true, enableMemoryConnectors: false, enablePaperclipNotebook: false, enableGoogleWorkspaceConnector: false, @@ -399,9 +400,15 @@ export function applyManagedExperimentalOverlay( >) { // Existing Cloud stack configs may still carry retired flags. Accept the // document during rollout, but never let retired flags disable Apps, Agent Chat, MCP aggregators, - // Assistant connections (MCP) or the AWS connector. - if (key === "enableApps" || key === "enableAgentChat" || key === "enableMcpAggregators" || key === "enablePublicMcp" - || key === "enableAwsConnector") continue; + // Assistant connections (MCP), the AWS connector, or GitHub review bots. + if ( + key === "enableApps" + || key === "enableAgentChat" + || key === "enableMcpAggregators" + || key === "enablePublicMcp" + || key === "enableAwsConnector" + || key === "enableGitHubReviewBots" + ) continue; next[key] = value; managedKeys[key] = { managed: true, managedBy: PAPERCLIP_CLOUD_MANAGED_BY }; } @@ -645,7 +652,7 @@ export function instanceSettingsService(db: Db, options: InstanceSettingsService updateExperimental: async (patch: PatchInstanceExperimentalSettings): Promise => { for (const [key, enabled] of Object.entries(managedConfig?.features ?? {})) { // Retired always-on keys are ignored on read, so an old client's write must not be rejected. - if (key === "enablePublicMcp" || key === "enableAwsConnector") continue; + if (key === "enablePublicMcp" || key === "enableAwsConnector" || key === "enableGitHubReviewBots") continue; if (enabled && patch[key as ManagedExperimentalFeatureKey] === false) { throw forbidden(`${key} is enabled by Paperclip Cloud and cannot be disabled on this instance`, { code: "settings_operator_managed", diff --git a/tests/e2e/chat-adapters-ui-messaging.spec.ts b/tests/e2e/chat-adapters-ui-messaging.spec.ts index 11fc59bcee6..79bc06c2d3d 100644 --- a/tests/e2e/chat-adapters-ui-messaging.spec.ts +++ b/tests/e2e/chat-adapters-ui-messaging.spec.ts @@ -595,7 +595,7 @@ test.describe("Board send delivery refresh", () => { const endpointId = "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"; const conversationId = "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb"; await page.route("**/api/instance/settings/experimental", (route) => - fulfill(route, { enableChatConnectors: false, enableGitHubReviewBots: true }), + fulfill(route, { enableChatConnectors: false }), ); await page.route(`**/api/issues/${issue.id}/chat-binding`, (route) => fulfill(route, { diff --git a/tests/e2e/chat-adapters-ui-providers-catalog.spec.ts b/tests/e2e/chat-adapters-ui-providers-catalog.spec.ts index c18328ddf69..3057ad2e86f 100644 --- a/tests/e2e/chat-adapters-ui-providers-catalog.spec.ts +++ b/tests/e2e/chat-adapters-ui-providers-catalog.spec.ts @@ -151,7 +151,6 @@ test.describe("native chat adapter UI catalog and management", () => { }, testInfo) => { const mock = await installChatControlPlaneMock(page, provider, seed, { enableChatConnectors: provider.provider !== "github", - enableGitHubReviewBots: provider.provider === "github", }); await page.goto(`/${seed.prefix}/apps`); diff --git a/tests/e2e/chat-adapters-ui-providers.spec.ts b/tests/e2e/chat-adapters-ui-providers.spec.ts index 33e79185a20..687b5a6f1d4 100644 --- a/tests/e2e/chat-adapters-ui-providers.spec.ts +++ b/tests/e2e/chat-adapters-ui-providers.spec.ts @@ -330,15 +330,14 @@ test.describe("native chat adapter UI", () => { expect(mock.slackCreations).toBe(0); }); - test("GitHub: the default-off gate keeps direct tool setup and fences chat routes", async ({ + test("GitHub: direct tool setup and GitHub review bot routes stay open while experimental chat routes stay fenced", async ({ page, }) => { const github = PROVIDERS.find( (provider) => provider.provider === "github", )!; const mock = await installChatControlPlaneMock(page, github, seed, { - enableChatConnectors: true, - enableGitHubReviewBots: false, + enableChatConnectors: false, }); await page.goto(`/${seed.prefix}/apps`); @@ -365,12 +364,13 @@ test.describe("native chat adapter UI", () => { ).toHaveCount(0); await page.goto(`/${seed.prefix}/apps/chat/connect?provider=github`); + await expect(page).toHaveURL(new RegExp(`/${seed.prefix}/apps/chat/connect\\?provider=github$`)); + await expect(page.getByRole("heading", { name: "Choose agent" })).toBeVisible(); + await page.goto(`/${seed.prefix}/apps/chat/connect?provider=discord`); await expect(page).toHaveURL(new RegExp(`/${seed.prefix}/apps$`)); await expect( page.getByRole("heading", { name: "Plugins" }), ).toBeVisible(); - await page.goto(`/${seed.prefix}/apps/chat/endpoint-github/settings`); - await expect(page).toHaveURL(new RegExp(`/${seed.prefix}/apps$`)); await expect.poll(() => mock.chatEndpointListReads).toBeGreaterThan(0); await expect(page.getByRole("button", { name: "Connect AgentMail", exact: true })).toBeVisible(); expect(mock.createdWithAgentId).toBeNull(); @@ -402,9 +402,7 @@ test.describe("native chat adapter UI", () => { await expect(agentNavigation.getByRole("link", { name: "Identity", exact: true })).toBeVisible(); await expect(agentNavigation.getByRole("link", { name: "Channels", exact: true })).toHaveCount(0); await expect.poll(() => mock.chatEndpointListReads).toBeGreaterThan(0); - if (!enabled) { - await expect(page.getByText("Connect AgentMail from Connectors.", { exact: true })).toBeVisible(); - } + await expect(page.getByText("Connect an agent identity from Connectors.", { exact: true })).toBeVisible(); }); } }); diff --git a/tests/e2e/chat-adapters-ui.shared.ts b/tests/e2e/chat-adapters-ui.shared.ts index 5022b3afd17..42283c99c8f 100644 --- a/tests/e2e/chat-adapters-ui.shared.ts +++ b/tests/e2e/chat-adapters-ui.shared.ts @@ -352,12 +352,11 @@ export async function installChatControlPlaneMock( seed: Seed, { enableChatConnectors, - enableGitHubReviewBots = false, resourceCount = 2, photonShared = false, automaticSlack = false, managedSlack = false, - }: { enableChatConnectors: boolean; enableGitHubReviewBots?: boolean; resourceCount?: number; photonShared?: boolean; automaticSlack?: boolean; managedSlack?: boolean }, + }: { enableChatConnectors: boolean; resourceCount?: number; photonShared?: boolean; automaticSlack?: boolean; managedSlack?: boolean }, ): Promise { const endpoint = endpointFixture(provider, seed); if (automaticSlack || managedSlack) endpoint.setup.slackSetupMethod = managedSlack ? "managed" : "automatic"; @@ -562,7 +561,6 @@ export async function installChatControlPlaneMock( ) { await fulfill(route, { enableChatConnectors, - enableGitHubReviewBots, enableIsolatedWorkspaces: false, }); return; diff --git a/tests/runner-e2e/github-review-flow.ts b/tests/runner-e2e/github-review-flow.ts index 4e37e48defb..f89f47e0f81 100644 --- a/tests/runner-e2e/github-review-flow.ts +++ b/tests/runner-e2e/github-review-flow.ts @@ -19,8 +19,6 @@ export async function runGitHubReviewFlow(input: { authenticateRegistration?(page: Page): Promise; }) { const { page, github, api, config, resources, evidence } = input; - const capabilities = await api.get('/api/instance/settings/experimental'); - if (capabilities.enableGitHubReviewBots !== true) throw new ConnectionBlock("blocked_target", "github_review_capability_unavailable"); const company = await api.get(`/api/companies/${config.target.companyId}`); const agent = await api.get(`/api/agents/${config.agent.id}`); if (company.id !== config.target.companyId || agent.companyId !== company.id || agent.name !== config.agent.name || !["idle", "running"].includes(agent.status)) throw new ConnectionBlock("blocked_target", "configured_review_agent_unavailable"); diff --git a/tests/runner-e2e/github-review-journey.test.ts b/tests/runner-e2e/github-review-journey.test.ts index 09ce3e869dd..f17ddfa81c6 100644 --- a/tests/runner-e2e/github-review-journey.test.ts +++ b/tests/runner-e2e/github-review-journey.test.ts @@ -121,7 +121,6 @@ describe("reused target ownership", () => { const setup = parseGitHubReviewJourneyConfig(config()); const company = { id: setup.target.companyId, issuePrefix: "QA" }; const rows: Record = { - "/api/instance/settings/experimental": { enableGitHubReviewBots: true }, [`/api/companies/${company.id}`]: company, [`/api/agents/${setup.agent.id}`]: { companyId: company.id, name: setup.agent.name, status: "idle", defaultEnvironmentId: null, adapterConfig: { model: setup.agent.model } }, [`/api/environments/${setup.target.environmentId}`]: { id: setup.target.environmentId, driver: "local", status: "active", config: {} }, diff --git a/tests/runner-e2e/source-sdk-public-inputs.json b/tests/runner-e2e/source-sdk-public-inputs.json index 091ba7d3694..ea73b93d63f 100644 --- a/tests/runner-e2e/source-sdk-public-inputs.json +++ b/tests/runner-e2e/source-sdk-public-inputs.json @@ -233,8 +233,8 @@ "packages/shared/src/connection-search.ts": "6aa86e3fb28a8e32da1aa99b841aacede055e0bf", "packages/shared/src/connection-setup-state.test.ts": "252f1a1627b80f322385a415df4656f8aa9148e9", "packages/shared/src/connection-setup-state.ts": "becd04545f04d601b4292c9b5cec4b737adc5e69", - "packages/shared/src/connector-availability.test.ts": "eea485b72e5163f2d41220b50fa41483c691415e", - "packages/shared/src/connector-availability.ts": "82aec0dfb2e9b8cb04e21c4bcd9aab74b087c76a", + "packages/shared/src/connector-availability.test.ts": "3176063aceda66949f661466fcb5be352265e5af", + "packages/shared/src/connector-availability.ts": "7797798bc989b774e8b6e62748ad689f66ab4193", "packages/shared/src/connector-identity.test.ts": "d58357707faefa7c98bb906cdaeb4db39d31081a", "packages/shared/src/connector-identity.ts": "5ede83c9c5225dbe8af9cf3a49c74e477ef5b955", "packages/shared/src/constants.ts": "3f1500b70505cd586f5430ad1acb1851bf053fb1", @@ -261,7 +261,7 @@ "packages/shared/src/external-objects.ts": "a9953c4e3f77f2bad03cb7832914ffc0b1a1266a", "packages/shared/src/fast-response.ts": "a81332a2b46b59c1f6953cfc4da659eae2326beb", "packages/shared/src/feature-catalog.test.ts": "d3e000c039492daad1fe0b7302b34e7c3816a8ce", - "packages/shared/src/feature-catalog.ts": "468dbae9dba45b45f1a993de9307c5b6409f513c", + "packages/shared/src/feature-catalog.ts": "ee5d2b79ecfb9285326dec314fecccc9b0b4cc7b", "packages/shared/src/frontmatter-runner-contract.test.ts": "cd121330e10aaa9da36c16293bcd9760561b6b41", "packages/shared/src/frontmatter.test.ts": "56635e331c8abca8868da76f23a08e98f20ff07f", "packages/shared/src/frontmatter.ts": "a86e046ce588d2f92d4996122cc2068ec275e89c", @@ -440,7 +440,7 @@ "packages/shared/src/types/inbox-dismissal.ts": "58fb7013847396ac9971eb5799dd0bf0486e0371", "packages/shared/src/types/inbox-mine.ts": "1d302b531d34842189704abd2f75f8743d09490d", "packages/shared/src/types/index.ts": "44184c2badaf7cdf46ab5f574e85e0e3fa7a0b60", - "packages/shared/src/types/instance.ts": "ba01ade6bf1071ab19419b4c60bc062f05f09212", + "packages/shared/src/types/instance.ts": "406736718fa7e8f788d4e963291943d38c16a368", "packages/shared/src/types/issue-tree-control.ts": "75489fffd491b8350b05caf57d7796419797d9df", "packages/shared/src/types/issue.ts": "fe78765782a50faf24e91e76e39846a4ace2cfc5", "packages/shared/src/types/live.ts": "b90e55e4de8600c6fc17d7fa8d89079d4ae655ec", @@ -518,8 +518,8 @@ "packages/shared/src/validators/goal.ts": "602724134915e1e83c50115abba36b288c0abd3d", "packages/shared/src/validators/inbox-agent-policy.ts": "29cef157f4d9b564fd813868038aa8c813df4a7b", "packages/shared/src/validators/index.ts": "25a142aeffc3b395993347c2d7bb0538738fefc3", - "packages/shared/src/validators/instance.test.ts": "3faa9593a9a05f74429d9b1d2251906a03e9a903", - "packages/shared/src/validators/instance.ts": "1c151c58a13a8aedc8ed04b9c07d31f23fd41d40", + "packages/shared/src/validators/instance.test.ts": "a8eac3e9a6eed97d6aa4f54e14e77c44720600af", + "packages/shared/src/validators/instance.ts": "9cfe716ebf4dc1e24324e162ca096cdacbe97c4a", "packages/shared/src/validators/issue-chat-bootstrap.test.ts": "e1ebb9aa94da22c825bc3ddd32ce2cfc98bfe645", "packages/shared/src/validators/issue-tree-control.ts": "7144ef86a83e008ac0626e1d62a1d6164c46f438", "packages/shared/src/validators/issue.test.ts": "7584bcce33a933ebcb02695b439767163e5ef61a", diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 9171af598a8..89d48bd18ce 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -471,8 +471,8 @@ function AppsConnectEntryRoute({ } = {}) { const location = useLocation(); const searchParams = new URLSearchParams(location.search); - const { enabled: chatConnectorsEnabled, githubEnabled: githubReviewBotsEnabled } = useChatConnectorsEnabled(); - return canEnterAppsConnect(searchParams, { chatConnectorsEnabled, githubReviewBotsEnabled }) + const { enabled: chatConnectorsEnabled } = useChatConnectorsEnabled(); + return canEnterAppsConnect(searchParams, { chatConnectorsEnabled }) ? : ; } diff --git a/ui/src/components/ChatConnectorsExperimentalGate.tsx b/ui/src/components/ChatConnectorsExperimentalGate.tsx index 50ff9d5d5cf..0a09a36b3ec 100644 --- a/ui/src/components/ChatConnectorsExperimentalGate.tsx +++ b/ui/src/components/ChatConnectorsExperimentalGate.tsx @@ -21,7 +21,7 @@ function ProviderEndpointGate({ queryFn: () => chatEndpointsApi.get(endpointId), }); const endpointView = useQueryView(endpoint); - const { enabled, githubEnabled } = useChatConnectorsEnabled(); + const { enabled } = useChatConnectorsEnabled(); // A cached endpoint keeps gating the page through an outage; only a real // failure with nothing loaded shows the error. if (endpointView.kind === "error") @@ -36,7 +36,7 @@ function ProviderEndpointGate({ /> ); if (!endpoint.data) return null; - return chatProviderVisible(endpoint.data.provider, enabled, githubEnabled) ? ( + return chatProviderVisible(endpoint.data.provider, enabled) ? ( <>{children} ) : ( @@ -48,10 +48,10 @@ export function ChatConnectorsExperimentalGate({ }: { children: ReactNode; }) { - const { enabled, githubEnabled, loaded } = useChatConnectorsEnabled(); + const { enabled, loaded } = useChatConnectorsEnabled(); const [params] = useSearchParams(); const { endpointId } = useParams<{ endpointId: string }>(); - if (!endpointId && params.get("provider") === "agentmail") + if (!endpointId && (params.get("provider") === "agentmail" || params.get("provider") === "github")) return <>{children}; if (!loaded) return null; if (endpointId) @@ -60,7 +60,7 @@ export function ChatConnectorsExperimentalGate({ {children} ); - return chatProviderVisible(params.get("provider"), enabled, githubEnabled) ? ( + return chatProviderVisible(params.get("provider"), enabled) ? ( <>{children} ) : ( diff --git a/ui/src/components/chat/AgentChannelsPanel.tsx b/ui/src/components/chat/AgentChannelsPanel.tsx index cebc00b8398..1ec98ee42b8 100644 --- a/ui/src/components/chat/AgentChannelsPanel.tsx +++ b/ui/src/components/chat/AgentChannelsPanel.tsx @@ -27,7 +27,7 @@ export function AgentChannelsPanel({ companyId: string; agentId: string; }) { - const { enabled, githubEnabled } = useChatConnectorsEnabled(); + const { enabled } = useChatConnectorsEnabled(); const query = useQuery({ queryKey: queryKeys.chatEndpoints.list(companyId), queryFn: () => chatEndpointsApi.list(companyId), @@ -35,7 +35,7 @@ export function AgentChannelsPanel({ }); const endpoints = (query.data ?? []).filter( (endpoint) => - endpoint.assignedAgentId === agentId && endpoint.status !== "archived" && chatProviderVisible(endpoint.provider, enabled, githubEnabled), + endpoint.assignedAgentId === agentId && endpoint.status !== "archived" && chatProviderVisible(endpoint.provider, enabled), ); return (
@@ -59,7 +59,7 @@ export function AgentChannelsPanel({

No channels connected

- {enabled || githubEnabled ? "Connect an agent identity from Connectors." : "Connect AgentMail from Connectors."} + Connect an agent identity from Connectors.