mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-24 01:41:42 +02:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Instance experimental settings are where operators opt into unstable product surfaces before they become defaults. > - Conference Room Chat is still experimental and is intended to come back later, but users should not be able to enable it right now. > - Removing the setting outright would risk losing the surrounding implementation and stored flag behavior that future work will need. > - This pull request hides the user-facing opt-in toggle behind a temporary local gate while leaving Conference Room functionality and flag plumbing intact. > - The benefit is that operators can no longer enable the feature from Instance Experimental Settings, while the team can restore the control later with a small, explicit change. ## Linked Issues or Issue Description Paperclip issue: PAP-11233 — comment out the conference-room experimental setting _just for now_. Feature request template: **Subsystem affected** ui/ — React + Vite board UI **Problem or motivation** Conference Room Chat is still present in the codebase and is expected to return later, but the Instance Experimental Settings page currently exposes a user-facing toggle that lets operators enable it. For now, that opt-in path should be removed without deleting the underlying feature code, stored flag type, or runtime gates. **Proposed solution** Hide the Conference Room Chat experimental setting card from Instance Experimental Settings behind a temporary local gate set to `false`. Keep the existing JSX, mutation payload, shared flag type, and downstream Conference Room behavior intact so the setting can be restored intentionally later. **Alternatives considered** - Delete the Conference Room setting and related flag plumbing: rejected because the issue explicitly says not to remove Conference Room functionality. - Force-reset `enableConferenceRoomChat` at the API/service layer: rejected because this task is about removing the ability for users to enable it from settings, not changing existing stored instance state. **Roadmap alignment** This is a narrow product-polish and release-control change, not new roadmap-level core feature work. `ROADMAP.md` was checked; it mentions CEO Chat as future direction, but this PR only hides a temporary experimental opt-in for the existing Conference Room surface. **Additional context** No GitHub issue exists for PAP-11233. This PR is opened from the Paperclip internal task at the requester’s direction. ## What Changed - Added a temporary `SHOW_CONFERENCE_ROOM_EXPERIMENTAL_SETTING = false` gate around the Conference Room Chat experimental setting card. - Left the existing Conference Room Chat setting JSX, toggle mutation, stored flag type, and runtime gates intact. - Updated the focused settings-page test to assert that the Conference Room Chat setting and toggle are not rendered, even if the stored flag is currently enabled. ## Verification - `pnpm vitest run ui/src/pages/InstanceExperimentalSettings.test.tsx` - `pnpm --filter @paperclipai/ui typecheck` - PR checks are green for `cd2c54fb087541006eac4fd91ab5ac978d85ba5b`, including `verify`, e2e, build, general tests, serialized server suites, commitperclip review, Greptile, Socket, Snyk, CodeRabbit, and security-review. Screenshots: not included; this change removes a settings-row control and is covered by the focused DOM test above. ## Risks Low risk. The change only hides the user-facing opt-in card. Existing installations with `enableConferenceRoomChat` already set are not force-reset by this PR, and the underlying Conference Room implementation remains in place for later re-enabling work. > 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 OpenAI Codex coding agent based on GPT-5, with terminal, git, and GitHub tool use. Context window details were not exposed in the runtime. ## 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 run tests locally and they pass - [x] I have added or updated tests where applicable - [x] If this change affects the UI, I have included before/after screenshots - [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
94 lines
3.0 KiB
TypeScript
94 lines
3.0 KiB
TypeScript
// @vitest-environment jsdom
|
|
|
|
import { flushSync } from "react-dom";
|
|
import { createRoot, type Root } from "react-dom/client";
|
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
import { InstanceExperimentalSettings } from "./InstanceExperimentalSettings";
|
|
|
|
const mockInstanceSettingsApi = vi.hoisted(() => ({
|
|
getExperimental: vi.fn(),
|
|
updateExperimental: vi.fn(),
|
|
previewIssueGraphLivenessAutoRecovery: vi.fn(),
|
|
runIssueGraphLivenessAutoRecovery: vi.fn(),
|
|
}));
|
|
|
|
vi.mock("@/api/instanceSettings", () => ({
|
|
instanceSettingsApi: mockInstanceSettingsApi,
|
|
}));
|
|
|
|
vi.mock("../context/BreadcrumbContext", () => ({
|
|
useBreadcrumbs: () => ({ setBreadcrumbs: vi.fn() }),
|
|
}));
|
|
|
|
async function flushReact() {
|
|
for (let index = 0; index < 5; index += 1) {
|
|
await Promise.resolve();
|
|
await new Promise((resolve) => window.setTimeout(resolve, 0));
|
|
}
|
|
flushSync(() => {});
|
|
}
|
|
|
|
const CONFERENCE_TOGGLE_SELECTOR =
|
|
'button[aria-label="Toggle conference room chat experimental setting"]';
|
|
|
|
describe("InstanceExperimentalSettings — Conference Room Chat card (PAP-11233)", () => {
|
|
let container: HTMLDivElement;
|
|
let root: Root | null = null;
|
|
|
|
async function renderPage() {
|
|
root = createRoot(container);
|
|
const queryClient = new QueryClient({
|
|
defaultOptions: { queries: { retry: false } },
|
|
});
|
|
flushSync(() => {
|
|
root!.render(
|
|
<QueryClientProvider client={queryClient}>
|
|
<InstanceExperimentalSettings />
|
|
</QueryClientProvider>,
|
|
);
|
|
});
|
|
await flushReact();
|
|
}
|
|
|
|
beforeEach(() => {
|
|
container = document.createElement("div");
|
|
document.body.appendChild(container);
|
|
mockInstanceSettingsApi.getExperimental.mockResolvedValue({
|
|
enableConferenceRoomChat: false,
|
|
issueGraphLivenessAutoRecoveryLookbackHours: 24,
|
|
});
|
|
mockInstanceSettingsApi.updateExperimental.mockResolvedValue({});
|
|
});
|
|
|
|
afterEach(() => {
|
|
flushSync(() => {
|
|
root?.unmount();
|
|
});
|
|
root = null;
|
|
container.remove();
|
|
vi.clearAllMocks();
|
|
});
|
|
|
|
it("does not render the Conference Room Chat experimental setting for now", async () => {
|
|
await renderPage();
|
|
|
|
const headings = [...container.querySelectorAll("section h2")].map((h) => h.textContent);
|
|
expect(headings).toContain("Streamlined Left Navigation Bar");
|
|
expect(headings).not.toContain("Conference Room Chat");
|
|
expect(container.querySelector(CONFERENCE_TOGGLE_SELECTOR)).toBeNull();
|
|
});
|
|
|
|
it("does not render the toggle even when the stored flag is currently enabled", async () => {
|
|
mockInstanceSettingsApi.getExperimental.mockResolvedValue({
|
|
enableConferenceRoomChat: true,
|
|
issueGraphLivenessAutoRecoveryLookbackHours: 24,
|
|
});
|
|
await renderPage();
|
|
|
|
const toggle = container.querySelector(CONFERENCE_TOGGLE_SELECTOR);
|
|
expect(toggle).toBeNull();
|
|
expect(mockInstanceSettingsApi.updateExperimental).not.toHaveBeenCalled();
|
|
});
|
|
});
|