diff --git a/ui/src/pages/InstanceExperimentalSettings.test.tsx b/ui/src/pages/InstanceExperimentalSettings.test.tsx index be9a97ed..1c8c77b4 100644 --- a/ui/src/pages/InstanceExperimentalSettings.test.tsx +++ b/ui/src/pages/InstanceExperimentalSettings.test.tsx @@ -1,6 +1,5 @@ // @vitest-environment jsdom -import { act } from "react"; import { flushSync } from "react-dom"; import { createRoot, type Root } from "react-dom/client"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; @@ -33,7 +32,7 @@ async function flushReact() { const CONFERENCE_TOGGLE_SELECTOR = 'button[aria-label="Toggle conference room chat experimental setting"]'; -describe("InstanceExperimentalSettings — Conference Room Chat card (PAP-137)", () => { +describe("InstanceExperimentalSettings — Conference Room Chat card (PAP-11233)", () => { let container: HTMLDivElement; let root: Root | null = null; @@ -71,22 +70,16 @@ describe("InstanceExperimentalSettings — Conference Room Chat card (PAP-137)", vi.clearAllMocks(); }); - it("renders the card with the approved copy, placed right after Streamlined Left Navigation Bar", async () => { + it("does not render the Conference Room Chat experimental setting for now", async () => { await renderPage(); - expect(container.textContent).toContain("Conference Room Chat"); - expect(container.textContent).toContain( - "Adds a Conference Room — one chat where you and your whole team work together — plus the live activity feed and the redesigned onboarding. Also restyles task threads as chat bubbles. Turn off anytime to restore the classic UI.", - ); - const headings = [...container.querySelectorAll("section h2")].map((h) => h.textContent); - const streamlinedIndex = headings.indexOf("Streamlined Left Navigation Bar"); - const conferenceIndex = headings.indexOf("Conference Room Chat"); - expect(streamlinedIndex).toBeGreaterThanOrEqual(0); - expect(conferenceIndex).toBe(streamlinedIndex + 1); + expect(headings).toContain("Streamlined Left Navigation Bar"); + expect(headings).not.toContain("Conference Room Chat"); + expect(container.querySelector(CONFERENCE_TOGGLE_SELECTOR)).toBeNull(); }); - it("toggle reflects the loaded flag value", async () => { + it("does not render the toggle even when the stored flag is currently enabled", async () => { mockInstanceSettingsApi.getExperimental.mockResolvedValue({ enableConferenceRoomChat: true, issueGraphLivenessAutoRecoveryLookbackHours: 24, @@ -94,40 +87,7 @@ describe("InstanceExperimentalSettings — Conference Room Chat card (PAP-137)", await renderPage(); const toggle = container.querySelector(CONFERENCE_TOGGLE_SELECTOR); - expect(toggle?.getAttribute("aria-checked")).toBe("true"); - }); - - it("clicking the toggle patches enableConferenceRoomChat on", async () => { - await renderPage(); - - const toggle = container.querySelector(CONFERENCE_TOGGLE_SELECTOR); - expect(toggle?.getAttribute("aria-checked")).toBe("false"); - - await act(async () => { - toggle?.click(); - }); - await flushReact(); - - expect(mockInstanceSettingsApi.updateExperimental).toHaveBeenCalledWith({ - enableConferenceRoomChat: true, - }); - }); - - it("clicking the toggle patches enableConferenceRoomChat off when currently on", async () => { - mockInstanceSettingsApi.getExperimental.mockResolvedValue({ - enableConferenceRoomChat: true, - issueGraphLivenessAutoRecoveryLookbackHours: 24, - }); - await renderPage(); - - const toggle = container.querySelector(CONFERENCE_TOGGLE_SELECTOR); - await act(async () => { - toggle?.click(); - }); - await flushReact(); - - expect(mockInstanceSettingsApi.updateExperimental).toHaveBeenCalledWith({ - enableConferenceRoomChat: false, - }); + expect(toggle).toBeNull(); + expect(mockInstanceSettingsApi.updateExperimental).not.toHaveBeenCalled(); }); }); diff --git a/ui/src/pages/InstanceExperimentalSettings.tsx b/ui/src/pages/InstanceExperimentalSettings.tsx index da3ccbaf..738c74b8 100644 --- a/ui/src/pages/InstanceExperimentalSettings.tsx +++ b/ui/src/pages/InstanceExperimentalSettings.tsx @@ -30,6 +30,9 @@ function formatRecoveryState(state: string) { return state.replace(/_/g, " "); } +// PAP-11233: keep Conference Room code intact, but hide the user-facing opt-in for now. +const SHOW_CONFERENCE_ROOM_EXPERIMENTAL_SETTING = false; + function RecoveryPreviewDialog({ preview, open, @@ -350,28 +353,30 @@ export function InstanceExperimentalSettings() { -
-
-
-

Conference Room Chat

-

- Adds a Conference Room — one chat where you and your whole team work together — plus the live activity - feed and the redesigned onboarding. Also restyles task threads as chat bubbles. Turn off anytime to - restore the classic UI. -

+ {SHOW_CONFERENCE_ROOM_EXPERIMENTAL_SETTING ? ( +
+
+
+

Conference Room Chat

+

+ Adds a Conference Room — one chat where you and your whole team work together — plus the live activity + feed and the redesigned onboarding. Also restyles task threads as chat bubbles. Turn off anytime to + restore the classic UI. +

+
+ + toggleMutation.mutate({ + enableConferenceRoomChat: !enableConferenceRoomChat, + }) + } + disabled={toggleMutation.isPending} + aria-label="Toggle conference room chat experimental setting" + />
- - toggleMutation.mutate({ - enableConferenceRoomChat: !enableConferenceRoomChat, - }) - } - disabled={toggleMutation.isPending} - aria-label="Toggle conference room chat experimental setting" - /> -
-
+ + ) : null}