(".chat-browser-panel-toggle");
+ expect(button).not.toBeNull();
+ button?.click();
+ expect(events).toHaveLength(1);
+
+ (pane as typeof pane & { narrow: boolean }).narrow = true;
+ renderHeader();
+ expect(container.querySelector(".chat-browser-panel-toggle")).toBeNull();
+ expect(panelActionIds()).toContain("browser");
+ } finally {
+ window.removeEventListener(BROWSER_PANEL_TOGGLE_EVENT, listener);
+ }
+ });
});
diff --git a/ui/src/pages/chat/chat-view.test.ts b/ui/src/pages/chat/chat-view.test.ts
index 6b77c2c95d7a..2406ca7b719d 100644
--- a/ui/src/pages/chat/chat-view.test.ts
+++ b/ui/src/pages/chat/chat-view.test.ts
@@ -1793,6 +1793,9 @@ describe("chat composer workbench", () => {
const container = renderChatView({
sessionWorkspace: createSessionWorkspace({
narrowLayout: true,
+ onToggleTerminal: vi.fn(),
+ onToggleBrowser: vi.fn(),
+ onOpenDiff: vi.fn(),
}),
});
@@ -1801,6 +1804,8 @@ describe("chat composer workbench", () => {
expect(container.querySelector(".chat-workspace-rail")).not.toBeNull();
expect(container.querySelector(".chat-workspace-rail__dock")).toBeNull();
expect(container.querySelector(".chat-workspace-rail__grip")).toBeNull();
+ expect(container.querySelector(".chat-workspace-rail__terminal")).toBeNull();
+ expect(container.querySelector(".chat-session-diff-toggle")).toBeNull();
});
it("moves the background-tasks rail to a bottom strip on narrow panes", () => {
diff --git a/ui/src/pages/chat/components/chat-session-workspace.test.ts b/ui/src/pages/chat/components/chat-session-workspace.test.ts
index f87c9384e42e..6d9ece9d4d17 100644
--- a/ui/src/pages/chat/components/chat-session-workspace.test.ts
+++ b/ui/src/pages/chat/components/chat-session-workspace.test.ts
@@ -43,25 +43,6 @@ describe("toggleSessionWorkspace", () => {
});
});
-describe("custodian panel toggle", () => {
- it("is available only while the gateway is connected and advertises chat", () => {
- const state = {
- client: null,
- connected: false,
- handleOpenSidebar: vi.fn(),
- hello: gatewayHello(["openclaw.chat"]),
- requestUpdate: vi.fn(),
- sessionKey: "agent:main:current",
- sessions: {},
- } as unknown as SessionWorkspaceHost;
-
- expect(createSessionWorkspaceProps(state).onToggleCustodian).toBeUndefined();
-
- state.connected = true;
- expect(createSessionWorkspaceProps(state).onToggleCustodian).toBeTypeOf("function");
- });
-});
-
describe("session workspace artifacts", () => {
function createArtifactHost(params: { data: string; mimeType: string; title?: string }) {
const handleOpenSidebar = vi.fn();
diff --git a/ui/src/pages/chat/components/chat-session-workspace.ts b/ui/src/pages/chat/components/chat-session-workspace.ts
index d8a20eceda38..c975f5ea0c81 100644
--- a/ui/src/pages/chat/components/chat-session-workspace.ts
+++ b/ui/src/pages/chat/components/chat-session-workspace.ts
@@ -20,7 +20,6 @@ import {
import { icons } from "../../../components/icons.ts";
import {
BROWSER_PANEL_TOGGLE_EVENT,
- CUSTODIAN_PANEL_TOGGLE_EVENT,
TERMINAL_PANEL_TOGGLE_EVENT,
} from "../../../components/panel-toggle-contract.ts";
import "../../../components/tooltip.ts";
@@ -65,7 +64,6 @@ export type SessionWorkspaceProps = {
onOpenArtifact: (artifactId: string) => void;
onToggleTerminal?: () => void;
onToggleBrowser?: () => void;
- onToggleCustodian?: () => void;
/** Opens the session diff panel; absent until a usable checkout is known. */
onOpenDiff?: () => void;
};
@@ -828,10 +826,6 @@ export function createSessionWorkspaceProps(
window.dispatchEvent(new CustomEvent(BROWSER_PANEL_TOGGLE_EVENT, {}));
}
: undefined,
- onToggleCustodian:
- state.connected && isGatewayMethodAdvertised(state, "openclaw.chat") === true
- ? () => window.dispatchEvent(new CustomEvent(CUSTODIAN_PANEL_TOGGLE_EVENT))
- : undefined,
onOpenDiff: canOpenDiff
? () => state.handleOpenSidebar(buildSessionDiffSidebarContent(state))
: undefined,
@@ -961,62 +955,6 @@ export function renderSessionWorkspaceRail(
// Narrow panes always present the rail as a bottom strip; a side column
// would crush the thread below its readable minimum.
const dock = sessionWorkspace.narrowLayout ? "bottom" : sessionWorkspace.dock;
- const terminalButton = sessionWorkspace.onToggleTerminal
- ? html`
-
-
-
- `
- : nothing;
- const browserButton = sessionWorkspace.onToggleBrowser
- ? html`
-
-
-
- `
- : nothing;
- const custodianButton = sessionWorkspace.onToggleCustodian
- ? html`
-
-
-
- `
- : nothing;
- const diffButton = sessionWorkspace.onOpenDiff
- ? html`
-
-
-
- `
- : nothing;
const files = sessionWorkspace.list?.files ?? [];
const modifiedFiles = files.filter((file) => file.kind === "modified");
const readFiles = files.filter((file) => file.kind === "read");
@@ -1306,7 +1244,6 @@ export function renderSessionWorkspaceRail(
${t("chat.workspaceFiles.files")}
- ${diffButton} ${terminalButton} ${browserButton} ${custodianButton}
${sessionWorkspace.narrowLayout
? nothing
: html`
diff --git a/ui/src/styles/chat/sidebar.css b/ui/src/styles/chat/sidebar.css
index 6370835c8ce2..92ad14b082e9 100644
--- a/ui/src/styles/chat/sidebar.css
+++ b/ui/src/styles/chat/sidebar.css
@@ -454,7 +454,6 @@ openclaw-chat-sidebar-region,
gap: 6px;
}
-.chat-workspace-rail__terminal,
.chat-workspace-rail__refresh,
.chat-workspace-rail__dock,
.chat-workspace-rail__collapse-toggle {
@@ -476,24 +475,6 @@ openclaw-chat-sidebar-region,
cursor: grabbing;
}
-.chat-workspace-rail__terminal {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- /* Chromeless at rest like the sibling ghost buttons; chrome on hover only. */
- border: 1px solid transparent;
- border-radius: var(--radius-md);
- background: transparent;
- color: var(--muted);
-}
-
-.chat-workspace-rail__terminal:hover,
-.chat-workspace-rail__terminal:focus-visible {
- color: var(--text);
- border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
- background: color-mix(in srgb, var(--accent) 8%, transparent);
-}
-
/* Overrides the shared .nav-collapse-toggle chrome (border, elevated
background, inset highlight): rail header buttons only show chrome on
hover. */
@@ -510,7 +491,6 @@ openclaw-chat-sidebar-region,
transform: none;
}
-.chat-workspace-rail__terminal svg,
.chat-workspace-rail__refresh svg,
.chat-workspace-rail__dock svg,
.chat-workspace-rail__collapse-toggle svg,