Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions src/renderer/components/thread/ThreadView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ describe("ThreadView", () => {
});
});

it("renders Browser MCP as a read-only header icon in active threads", () => {
// Mid-thread toggles can't re-attach an MCP server to a running session,
// so the active-thread chip is informational only. The toggle lives in
// the draft composer.

it("does not render MCP controls in active-thread headers", () => {
renderThreadView({
thread: {
id: "thread-browser-mcp",
Expand All @@ -109,6 +105,7 @@ describe("ThreadView", () => {
config: {
model: "gpt-5.4",
browserMcp: true,
computerUse: true,
},
status: "idle",
attention: "none",
Expand Down Expand Up @@ -144,11 +141,14 @@ describe("ThreadView", () => {
},
});

const browserIcon = screen.getByLabelText("Browser MCP enabled for this thread");
expect(hasAncestorWithClassFragment(browserIcon, "poracode-overlay-header__controls")).toBe(
true,
);
expect(screen.queryByLabelText("Browser MCP enabled for this thread")).toBeNull();
expect(
screen.queryByLabelText(
"Computer Use enabled — interactive actions take over the desktop; don't use the machine while the agent is controlling it",
),
).toBeNull();
expect(screen.queryByLabelText("Disable Browser MCP")).toBeNull();
expect(screen.queryByLabelText("Disable Computer Use")).toBeNull();
expect(runtimeActions.changeThreadConfig).not.toHaveBeenCalled();
});

Expand Down
24 changes: 0 additions & 24 deletions src/renderer/components/thread/ThreadView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ import { DEFAULT_TERMINAL_SIZE as DEFAULT_HIDDEN_TERMINAL_SIZE } from "@/shared/

import { useAppStore } from "@/renderer/state/appStore";
import { TuxIcon } from "@/renderer/components/common/TuxIcon";
import { ComputerUseChip, McpChip } from "@/renderer/components/composer/AttachmentBar";
import { browserMcpServer } from "@/renderer/components/composer/composerMcpServers";
import { readBridge } from "@/renderer/bridge";
import { performInitialThreadLaunch } from "@/renderer/actions/threadLaunchActions";
import { setRendererRuntimeDiagnosticContext } from "@/renderer/diagnostics/sentry";
import { macosTrafficLightPadClass } from "@/renderer/components/layout/sidebarChrome";
Expand Down Expand Up @@ -69,8 +66,6 @@ function areThreadViewPropsEqual(prev: ThreadViewProps, next: ThreadViewProps):
prev.thread.done === next.thread.done &&
prev.thread.canResumeWithConfig === next.thread.canResumeWithConfig &&
prev.thread.sessionRef?.providerSessionId === next.thread.sessionRef?.providerSessionId &&
prev.thread.config.browserMcp === next.thread.config.browserMcp &&
prev.thread.config.computerUse === next.thread.config.computerUse &&
(!configAffectsLaunch || prev.thread.config === next.thread.config) &&
prev.agentStatus === next.agentStatus &&
prev.projectLocation === next.projectLocation &&
Expand Down Expand Up @@ -179,15 +174,6 @@ export const ThreadView = memo(function ThreadView(props: ThreadViewProps) {
(thread.presentationMode ?? agentStatus?.capabilities.presentationMode ?? "terminal") ===
"terminal";
const launchTerminalSize = usesTerminalPresentation ? terminalSize : DEFAULT_HIDDEN_TERMINAL_SIZE;
// Browser MCP is bound at session-create time for every provider (Claude SDK
// `mcpServers` baked into `query()`, Codex `-c` overrides, ACP `newSession`).
// Toggling mid-thread can't re-attach the server, so the indicator in the
// active-thread header is informational only — disabling it would mislead
// the user into thinking the tool is no longer in scope. The toggle lives
// exclusively in the draft composer's ComposerAddMenu.
const showBrowserChip = thread.config.browserMcp === true;
const showComputerUseChip =
thread.config.computerUse === true && !isWsl && readBridge().platform !== "linux";

useEffect(() => {
const presentation =
Expand Down Expand Up @@ -308,16 +294,6 @@ export const ThreadView = memo(function ThreadView(props: ThreadViewProps) {
{thread.title}
</Tooltip.Content>
</Tooltip>
{showBrowserChip ? (
<McpChip
descriptor={browserMcpServer}
variant="header"
{...(thread.agentKind === "opencode"
? { title: t`Browser MCP enabled for OpenCode` }
: {})}
/>
) : null}
{showComputerUseChip ? <ComputerUseChip variant="header" /> : null}
<div className="flex shrink-0 items-center">
{projectName ? (
<span className="px-1 text-sm leading-tight text-muted/60 @max-[560px]:text-xs @max-[360px]:text-[11px]">
Expand Down