diff --git a/scripts/control-ui-mock-dev.ts b/scripts/control-ui-mock-dev.ts index 90dcc8c047d1..c60f2166b02f 100644 --- a/scripts/control-ui-mock-dev.ts +++ b/scripts/control-ui-mock-dev.ts @@ -1472,8 +1472,10 @@ async function createChatPickerScenario( // Advertised Gateway methods gate session actions (see // ui/src/lib/session-method-access.ts). Omitting the mutation methods left // every session context-menu row disabled, so the harness could not show - // the menu operators actually see. + // the menu operators actually see. browser.request/terminal.open likewise + // gate the chat header's panel toggles, which stayed invisible here. featureMethods: [ + "browser.request", "chat.metadata", "chat.startup", "question.list", @@ -1493,7 +1495,11 @@ async function createChatPickerScenario( "sessions.catalog.list", "sessions.catalog.read", "system.info", + "terminal.open", ], + // Terminal has a second gate beyond the advertised method (see + // ui/src/lib/terminal-availability.ts). + terminalEnabled: true, historyMessages: buildScrollableChatHistory(baseTime), // Lights up the footer facepile and who's-online roster; the email-only // entry keeps the roster's no-display-name row exercised. @@ -2436,6 +2442,10 @@ function createMockGatewayPlugin(scenario: ControlUiMockGatewayScenario): Plugin res.end(bootstrapBody); }); }, + // ui/vite.config.ts registers a placeholder bootstrap-config middleware and + // config-file plugins load first, so without "pre" its stub answers every + // request and the scenario's bootstrap fields never reach the app. + enforce: "pre", name: "openclaw-control-ui-mock-gateway", transformIndexHtml(html) { return html.replace( diff --git a/ui/src/pages/chat/chat-pane-header.ts b/ui/src/pages/chat/chat-pane-header.ts index 9aa117a6e08a..41407f413b7b 100644 --- a/ui/src/pages/chat/chat-pane-header.ts +++ b/ui/src/pages/chat/chat-pane-header.ts @@ -186,6 +186,18 @@ export abstract class ChatPaneHeader extends ChatPaneSessionMenu { detail: { open: true }, }), ); + const browserPanelAction = sessionWorkspace.onToggleBrowser + ? html` + + ` + : nothing; const desktopPanelAction = desktopPanelAvailable ? 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,