🙌 OpenHands: AI-Driven Development
fix(ui): left navigation rail, mobile drawer, and responsive chrome (#623)
FraterCCCLXIII59058c76097e
diff --git a/__tests__/components/features/conversation-panel/conversation-panel.test.tsx b/__tests__/components/features/conversation-panel/conversation-panel.test.tsxindex e8bb236b9b..283bc5f53b 100644--- a/__tests__/components/features/conversation-panel/conversation-panel.test.tsx+++ b/__tests__/components/features/conversation-panel/conversation-panel.test.tsx@@ -148,6 +148,20 @@ describe("ConversationPanel", () => {expect(emptyState).toBeInTheDocument();});+ it("does not show load more when the visible list is empty even if another page exists", async () => {+ vi.spyOn(AgentServerConversationService, "searchConversations").mockResolvedValue({+ items: [],+ next_page_id: "page-2",+ });++ renderConversationPanel();++ await screen.findByText("CONVERSATION$NO_CONVERSATIONS");+ expect(+ screen.queryByTestId("load-more-conversations"),+ ).not.toBeInTheDocument();+ });+it("does not flash the loading skeleton during a background refetch when the list is empty", async () => {// Arrange: first call (initial load) resolves with an empty list.// Second call (the background refetch) is kept in-flight so we can@@ -1289,6 +1303,22 @@ describe("ConversationPanel", () => {).toBeInTheDocument();});+ it("shows icons on hide and delete-all filter menu actions", async () => {+ const user = userEvent.setup();+ renderConversationPanel();++ await user.click(screen.getByTestId("older-conversations-filter-toggle"));++ const hideRow = await screen.findByTestId("toggle-older-conversations");+ expect(hideRow.querySelector("svg")).toBeInTheDocument();+ expect(hideRow).toHaveClass("group");++ const deleteAllRow = screen.getByTestId("delete-all-conversations");+ expect(deleteAllRow.querySelector("svg")).toBeInTheDocument();+ expect(deleteAllRow).toHaveClass("text-[var(--oh-foreground)]");+ expect(deleteAllRow).not.toHaveClass("text-danger");+ });+it("toggles older conversations visibility via the filter dropdown", async () => {const user = userEvent.setup();vi.spyOn(diff --git a/__tests__/components/features/conversation-panel/conversation-status-dot.test.tsx b/__tests__/components/features/conversation-panel/conversation-status-dot.test.tsxindex a7c5d4bc76..dd0abc5b15 100644--- a/__tests__/components/features/conversation-panel/conversation-status-dot.test.tsx+++ b/__tests__/components/features/conversation-panel/conversation-status-dot.test.tsx@@ -52,4 +52,21 @@ describe("ConversationStatusDot", () => {"COMMON$STOPPED",);});++ it("renders archive icon when sandbox is MISSING (archived)", () => {+ renderWithProviders(+ <ConversationStatusDot+ executionStatus={ExecutionStatus.PAUSED}+ sandboxStatus="MISSING"+ />,+ );++ expect(+ screen.getByTestId("conversation-status-archived"),+ ).toBeInTheDocument();+ expect(screen.getByTestId("styled-tooltip")).toHaveAttribute(+ "data-content",+ "COMMON$ARCHIVED",+ );+ });});diff --git a/__tests__/components/features/conversation-panel/new-conversation-button.test.tsx b/__tests__/components/features/conversation-panel/new-conversation-button.test.tsxindex 0d41206364..d443741e28 100644--- a/__tests__/components/features/conversation-panel/new-conversation-button.test.tsx+++ b/__tests__/components/features/conversation-panel/new-conversation-button.test.tsx@@ -66,6 +66,17 @@ describe("NewConversationButton", () => {useWorkspacesStore.getState().clearAll();});+ it("shows a divider above the workspace footer actions", async () => {+ const user = userEvent.setup();+ renderWithProviders(<NewConversationButton />);++ await user.click(screen.getByTestId("new-conversation-button"));++ expect(+ screen.getByTestId("new-conversation-menu-footer-divider"),+ ).toBeInTheDocument();+ });+it("toggles the popover and dismisses it on outside click", async () => {const user = userEvent.setup();renderWithProviders(<NewConversationButton />);diff --git a/__tests__/components/features/conversation/conversation-main.test.tsx b/__tests__/components/features/conversation/conversation-main.test.tsxindex 58e0bb5537..966905fdb7 100644--- a/__tests__/components/features/conversation/conversation-main.test.tsx+++ b/__tests__/components/features/conversation/conversation-main.test.tsx@@ -1,5 +1,6 @@import { render, screen } from "@testing-library/react";import { describe, it, expect, vi, beforeEach } from "vitest";+import { SidebarMobileNavProvider } from "#/components/features/sidebar/sidebar-mobile-nav-context";// Mutable mock state for controlling breakpointlet mockIsMobile = false;@@ -11,6 +12,7 @@ const chatInterfaceUnmount = vi.fn();vi.mock("#/hooks/use-breakpoint", () => ({useBreakpoint: () => mockIsMobile,+ SIDEBAR_RAIL_COLLAPSE_MAX_WIDTH: 767,}));vi.mock("#/hooks/use-resizable-panels", () => ({@@ -71,6 +73,14 @@ vi.mock(import { ConversationMain } from "#/components/features/conversation/conversation-main/conversation-main";+function renderConversationMain() {+ return render(+ <SidebarMobileNavProvider>+ <ConversationMain />+ </SidebarMobileNavProvider>,+ );+}+describe("ConversationMain - Layout Transition Stability", () => {beforeEach(() => {mockIsMobile = false;@@ -81,24 +91,28 @@ describe("ConversationMain - Layout Transition Stability", () => {it("renders ChatInterface at desktop width", () => {mockIsMobile = false;- render(<ConversationMain />);+ renderConversationMain();expect(screen.getByTestId("chat-interface")).toBeInTheDocument();});it("renders ChatInterface at mobile width", () => {mockIsMobile = true;- render(<ConversationMain />);+ renderConversationMain();expect(screen.getByTestId("chat-interface")).toBeInTheDocument();});it("does not unmount ChatInterface when crossing from desktop to mobile", () => {mockIsMobile = false;- const { rerender } = render(<ConversationMain />);+ const { rerender } = renderConversationMain();expect(chatInterfaceUnmount).not.toHaveBeenCalled();// Cross the breakpoint to mobilemockIsMobile = true;- rerender(<ConversationMain />);+ rerender(+ <SidebarMobileNavProvider>+ <ConversationMain />+ </SidebarMobileNavProvider>,+ );// ChatInterface must NOT have been unmounted and remountedexpect(chatInterfaceUnmount).not.toHaveBeenCalled();@@ -107,12 +121,16 @@ describe("ConversationMain - Layout Transition Stability", () => {it("does not unmount ChatInterface when crossing from mobile to desktop", () => {mockIsMobile = true;- const { rerender } = render(<ConversationMain />);+ const { rerender } = renderConversationMain();expect(chatInterfaceUnmount).not.toHaveBeenCalled();// Cross the breakpoint to desktopmockIsMobile = false;- rerender(<ConversationMain />);+ rerender(+ <SidebarMobileNavProvider>+ <ConversationMain />+ </SidebarMobileNavProvider>,+ );// ChatInterface must NOT have been unmounted and remountedexpect(chatInterfaceUnmount).not.toHaveBeenCalled();@@ -121,12 +139,16 @@ describe("ConversationMain - Layout Transition Stability", () => {it("survives rapid back-and-forth resize without unmounting ChatInterface", () => {mockIsMobile = false;- const { rerender } = render(<ConversationMain />);+ const { rerender } = renderConversationMain();// Simulate rapid resize back and forth across the breakpointfor (const mobile of [true, false, true, false, true]) {mockIsMobile = mobile;- rerender(<ConversationMain />);+ rerender(+ <SidebarMobileNavProvider>+ <ConversationMain />+ </SidebarMobileNavProvider>,+ );}expect(chatInterfaceUnmount).not.toHaveBeenCalled();diff --git a/__tests__/components/features/conversation/right-panel-toggle.test.tsx b/__tests__/components/features/conversation/right-panel-toggle.test.tsxindex 6d4cd39a21..8d05cfba35 100644--- a/__tests__/components/features/conversation/right-panel-toggle.test.tsx+++ b/__tests__/components/features/conversation/right-panel-toggle.test.tsx@@ -6,6 +6,23 @@ import { useConversationStore } from "#/stores/conversation-store";const CONVERSATION_ID = "conv-abc123";+const { mockNavigate, breakpointIsMobile } = vi.hoisted(() => ({+ mockNavigate: vi.fn(),+ breakpointIsMobile: { value: false },+}));++vi.mock("react-router", async (importOriginal) => {+ const actual = await importOriginal<typeof import("react-router")>();+ return {+ ...actual,+ useNavigate: () => mockNavigate,+ };+});++vi.mock("#/hooks/use-breakpoint", () => ({+ useBreakpoint: () => breakpointIsMobile.value,+}));+vi.mock("#/hooks/use-conversation-id", () => ({useOptionalConversationId: () => ({ conversationId: "test-conversation-id" }),useConversationId: () => ({ conversationId: CONVERSATION_ID }),@@ -14,6 +31,8 @@ vi.mock("#/hooks/use-conversation-id", () => ({describe("RightPanelToggle", () => {beforeEach(() => {localStorage.clear();+ mockNavigate.mockClear();+ breakpointIsMobile.value = false;useConversationStore.setState({selectedTab: "files",isRightPanelShown: true,@@ -37,8 +56,6 @@ describe("RightPanelToggle", () => {const storeState = useConversationStore.getState();expect(storeState.hasRightPanelToggled).toBe(false);- // The drawer's open/closed state is session-only — the toggle must- // not write a `rightPanelShown` field into the persisted blob.const raw = localStorage.getItem(`conversation-state-${CONVERSATION_ID}`);if (raw !== null) {expect(JSON.parse(raw)).not.toHaveProperty("rightPanelShown");@@ -67,7 +84,7 @@ describe("RightPanelToggle", () => {}});- it("should have aria-pressed attribute reflecting panel state", () => {+ it("should have aria-pressed attribute reflecting panel state on desktop", () => {const { unmount } = render(<RightPanelToggle />);expect(screen.getByTestId("right-panel-toggle")).toHaveAttribute("aria-pressed",@@ -83,4 +100,25 @@ describe("RightPanelToggle", () => {"false",);});++ it("navigates to the full-screen panel route on mobile", async () => {+ breakpointIsMobile.value = true;+ const user = userEvent.setup();++ useConversationStore.setState({+ isRightPanelShown: false,+ hasRightPanelToggled: false,+ });++ render(<RightPanelToggle />);++ await user.click(screen.getByTestId("right-panel-toggle"));++ expect(mockNavigate).toHaveBeenCalledWith(+ `/conversations/${CONVERSATION_ID}/panel`,+ );+ const storeState = useConversationStore.getState();+ expect(storeState.hasRightPanelToggled).toBe(true);+ expect(storeState.isRightPanelShown).toBe(true);+ });});diff --git a/__tests__/components/features/settings/settings-navigation.test.tsx b/__tests__/components/features/settings/settings-navigation.test.tsxindex 260a72d02b..4ce3b4a70a 100644--- a/__tests__/components/features/settings/settings-navigation.test.tsx+++ b/__tests__/components/features/settings/settings-navigation.test.tsx@@ -29,7 +29,7 @@ vi.mock("#/components/shared/buttons/styled-tooltip", () => ({),}));-const llmItem = OSS_NAV_ITEMS.find((item) => item.to === "/settings")!;+const llmItem = OSS_NAV_ITEMS.find((item) => item.to === "/settings/llm")!;const condenserItem = OSS_NAV_ITEMS.find((item) => item.to === "/settings/condenser",)!;@@ -138,7 +138,7 @@ describe("SettingsNavigation", () => {// SidebarNavLink renders disabled items as a non-link span with// ``aria-disabled="true"`` and ``opacity-50`` styling.const llmLink = within(desktopNav).getByTestId(- "sidebar-settings-/settings",+ "sidebar-settings-/settings/llm",);const condenserLink = within(desktopNav).getByTestId("sidebar-settings-/settings/condenser",@@ -157,7 +157,7 @@ describe("SettingsNavigation", () => {);const desktopNav = screen.getByTestId("settings-navbar-desktop");const llmLink = within(desktopNav).getByTestId(- "sidebar-settings-/settings",+ "sidebar-settings-/settings/llm",);expect(llmLink).not.toHaveAttribute("aria-disabled", "true");});diff --git a/__tests__/components/features/sidebar/sidebar.test.tsx b/__tests__/components/features/sidebar/sidebar.test.tsxindex 711089fd58..2427024b67 100644--- a/__tests__/components/features/sidebar/sidebar.test.tsx+++ b/__tests__/components/features/sidebar/sidebar.test.tsx@@ -1,7 +1,9 @@-import { render, screen, fireEvent } from "@testing-library/react";+import { render, screen, fireEvent, within, waitFor } from "@testing-library/react";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import { Sidebar } from "#/components/features/sidebar/sidebar";+import { SidebarMobileNavProvider } from "#/components/features/sidebar/sidebar-mobile-nav-context";+import { SidebarMobileMenuBar } from "#/components/features/sidebar/sidebar-mobile-menu-bar";import {NavigationProvider,type NavigationContextValue,@@ -175,6 +177,18 @@ vi.mock("#/hooks/use-settings-nav-items", () => ({useSettingsNavItems: () => [],}));+function getDesktopSidebar(collapsed?: boolean): HTMLElement {+ const selector =+ collapsed === undefined+ ? "aside[data-collapsed]"+ : `aside[data-collapsed="${collapsed ? "true" : "false"}"]`;+ const sidebar = document.querySelector(selector);+ if (!(sidebar instanceof HTMLElement)) {+ throw new Error(`Desktop sidebar not found: ${selector}`);+ }+ return sidebar;+}+function renderSidebar(currentPath: string) {const navigate = vi.fn();const value: NavigationContextValue = {@@ -187,7 +201,10 @@ function renderSidebar(currentPath: string) {const rendered = render(<QueryClientProvider client={new QueryClient()}><NavigationProvider value={value}>- <Sidebar />+ <SidebarMobileNavProvider>+ <Sidebar />+ <SidebarMobileMenuBar />+ </SidebarMobileNavProvider></NavigationProvider></QueryClientProvider>,);@@ -204,22 +221,39 @@ describe("Sidebar", () => {window.localStorage.clear();});+ it("opens and closes the mobile navigation drawer from the menu button", async () => {+ renderSidebar("/conversations");++ expect(screen.queryByTestId("sidebar-mobile-drawer")).not.toBeInTheDocument();++ fireEvent.click(screen.getByTestId("sidebar-mobile-menu-toggle"));+ const drawer = screen.getByTestId("sidebar-mobile-drawer");+ expect(drawer).toBeInTheDocument();+ expect(+ within(drawer).getByTestId("sidebar-conversation-list"),+ ).toBeInTheDocument();++ fireEvent.click(within(drawer).getByTestId("sidebar-mobile-drawer-close"));+ await waitFor(() => {+ expect(screen.queryByTestId("sidebar-mobile-drawer")).not.toBeInTheDocument();+ });+ });+it("toggles between expanded and collapsed states and persists the choice", () => {const { unmount } = renderSidebar("/conversations");- const sidebar = screen.getByRole("navigation").parentElement;- expect(sidebar?.dataset.collapsed).toBe("false");+ const sidebar = getDesktopSidebar(false);+ expect(sidebar.dataset.collapsed).toBe("false");const toggle = screen.getByTestId("sidebar-collapse-toggle");fireEvent.click(toggle);- expect(sidebar?.dataset.collapsed).toBe("true");+ expect(sidebar.dataset.collapsed).toBe("true");// The choice survives a remount via localStorage.unmount();renderSidebar("/conversations");- const remountedSidebar = screen.getByRole("navigation").parentElement;- expect(remountedSidebar?.dataset.collapsed).toBe("true");+ expect(getDesktopSidebar(true).dataset.collapsed).toBe("true");});it("expands the sidebar when the toggle is clicked from the collapsed state", () => {@@ -231,20 +265,15 @@ describe("Sidebar", () => {fireEvent.click(screen.getByTestId("sidebar-collapse-toggle"));// Assert: state flips back to expanded.- const sidebar = screen.getByRole("navigation").parentElement;- expect(sidebar?.dataset.collapsed).toBe("false");+ expect(getDesktopSidebar(false).dataset.collapsed).toBe("false");});it("expands the sidebar when collapsed rail empty space is clicked", () => {window.localStorage.setItem("openhands-sidebar-collapsed", "true");renderSidebar("/conversations");- const sidebar = screen.getByRole("navigation").parentElement;- expect(sidebar?.dataset.collapsed).toBe("true");-- if (!sidebar) {- throw new Error("Sidebar root not found");- }+ const sidebar = getDesktopSidebar(true);+ expect(sidebar.dataset.collapsed).toBe("true");fireEvent.click(sidebar);expect(sidebar.dataset.collapsed).toBe("false");@@ -288,8 +317,7 @@ describe("Sidebar", () => {window.localStorage.setItem("openhands-sidebar-collapsed", "true");renderSidebar("/conversations");- const sidebar = screen.getByRole("navigation").parentElement;- if (!sidebar) throw new Error("Sidebar not found");+ const sidebar = getDesktopSidebar(true);expect(sidebar.dataset.collapsed).toBe("true");const trigger = screen.getByTestId("collapsed-backend-selector-link");@@ -402,7 +430,7 @@ describe("Sidebar", () => {// Act + Assert: each top-level nav link surfaces its new user-facing label.expect(screen.getByTestId("sidebar-conversations-link")).toHaveTextContent(- "Code",+ "New Chat",);expect(screen.getByTestId("sidebar-skills-link")).toHaveTextContent("Customize",diff --git a/__tests__/hooks/use-settings-nav-items.test.tsx b/__tests__/hooks/use-settings-nav-items.test.tsxindex 8cbd1dc74c..0b4ce21395 100644--- a/__tests__/hooks/use-settings-nav-items.test.tsx+++ b/__tests__/hooks/use-settings-nav-items.test.tsx@@ -60,24 +60,20 @@ describe("useSettingsNavItems", () => {});});- it("renames the LLM settings item to LLM profiles on local backends", () => {+ it("returns the LLM settings item unchanged on local backends", () => {useConfigMock.mockReturnValue({ data: createConfig() });const { result } = renderHook(() => useSettingsNavItems());const llmItem = result.current.find(- (item) => item.type === "item" && item.item.to === "/settings",+ (item) => item.type === "item" && item.item.to === "/settings/llm",);- // ``OSS_NAV_ITEMS[0]`` is the Agent settings entry now; look up the- // LLM entry by path rather than index.- const baseLlm = OSS_NAV_ITEMS.find((item) => item.to === "/settings")!;+ const baseLlm = OSS_NAV_ITEMS.find(+ (item) => item.to === "/settings/llm",+ )!;expect(llmItem).toEqual({type: "item",- item: {- ...baseLlm,- text: "SETTINGS$LLM_PROFILES",- subtitle: "SETTINGS$PAGE_LLM_PROFILES_SUBLINE",- },+ item: baseLlm,});});@@ -105,7 +101,7 @@ describe("useSettingsNavItems", () => {.filter((item) => item.type === "item").map((item) => (item.type === "item" ? item.item.to : null));- expect(paths).not.toContain("/settings");+ expect(paths).not.toContain("/settings/llm");expect(paths).toContain("/settings/app");expect(paths).toContain("/settings/secrets");});@@ -138,7 +134,7 @@ describe("useSettingsNavItems", () => {),);- const llm = byPath.get("/settings");+ const llm = byPath.get("/settings/llm");expect(llm?.type).toBe("item");if (llm?.type === "item") {expect(llm.disabled).toBe(true);@@ -172,7 +168,7 @@ describe("useSettingsNavItems", () => {const { result } = renderHook(() => useSettingsNavItems());const llm = result.current.find(- (r) => r.type === "item" && r.item.to === "/settings",+ (r) => r.type === "item" && r.item.to === "/settings/llm",);if (llm?.type === "item") {expect(llm.disabledAgentName).toBe("ACP Agent");diff --git a/__tests__/routes/settings.test.tsx b/__tests__/routes/settings.test.tsxindex 818866f451..0eb3aa10d0 100644--- a/__tests__/routes/settings.test.tsx+++ b/__tests__/routes/settings.test.tsx@@ -17,7 +17,7 @@ vi.mock("#/hooks/use-settings-nav-items", () => ({// navigates to via `/settings/app`).useSettingsNavItems: () =>OSS_NAV_ITEMS.filter((item) =>- ["/settings", "/settings/app"].includes(item.to),+ ["/settings/llm", "/settings/app"].includes(item.to),).map((item) => ({ type: "item", item })),}));@@ -48,15 +48,15 @@ describe("settings route", () => {).toBe("/settings/agent");});- it("still prefers /settings/agent even when LLM settings are visible", () => {- // The Agent page is the single place to switch kinds, so it wins- // the fallback unconditionally.+ it("prefers /settings/llm when LLM settings are visible", () => {+ // ``/settings/llm`` is the first non-hidden entry in the fallback+ // order when ``hide_llm_settings`` is off.expect(getFirstAvailablePath({hide_llm_settings: false,hide_users_page: true,}),- ).toBe("/settings/agent");+ ).toBe("/settings/llm");});it("redirects hidden OSS settings pages to the first available route", async () => {@@ -75,7 +75,7 @@ describe("settings route", () => {});const response = (await clientLoader({- request: new Request("http://localhost/settings"),+ request: new Request("http://localhost/settings/llm"),params: {},context: {},} as never)) as Response;@@ -160,7 +160,7 @@ describe("settings route", () => {});const response = (await clientLoader({- request: new Request("http://localhost/settings"),+ request: new Request("http://localhost/settings/llm"),params: {},context: {},} as never)) as Response;diff --git a/__tests__/utils/mobile-section-nav.test.ts b/__tests__/utils/mobile-section-nav.test.tsnew file mode 100644index 0000000000..0b601840a5--- /dev/null+++ b/__tests__/utils/mobile-section-nav.test.ts@@ -0,0 +1,35 @@+import { describe, expect, it } from "vitest";+import { getMobileTopBarState } from "#/utils/mobile-section-nav";+import { I18nKey } from "#/i18n/declaration";++describe("getMobileTopBarState", () => {+ it("shows menu on settings and customize hubs", () => {+ expect(getMobileTopBarState("/settings")).toEqual({ mode: "menu" });+ expect(getMobileTopBarState("/customize")).toEqual({ mode: "menu" });+ });++ it("backs from settings detail pages to the settings hub", () => {+ expect(getMobileTopBarState("/settings/llm")).toEqual({+ mode: "back",+ backTo: "/settings",+ backLabelKey: I18nKey.SETTINGS$TITLE,+ });+ });++ it("backs from extension detail pages to the customize hub", () => {+ expect(getMobileTopBarState("/skills")).toEqual({+ mode: "back",+ backTo: "/customize",+ backLabelKey: I18nKey.NAV$EXTENSIONS,+ });+ expect(getMobileTopBarState("/mcp")).toEqual({+ mode: "back",+ backTo: "/customize",+ backLabelKey: I18nKey.NAV$EXTENSIONS,+ });+ });++ it("shows menu on main app routes", () => {+ expect(getMobileTopBarState("/conversations")).toEqual({ mode: "menu" });+ });+});diff --git a/scripts/dev-safe.mjs b/scripts/dev-safe.mjsindex 32cfecab8c..372b63ee51 100644--- a/scripts/dev-safe.mjs+++ b/scripts/dev-safe.mjs@@ -25,7 +25,10 @@ import {// ── Centralized config (single source of truth for versions, ports, etc.) ───const __dev_safe_dirname = path.dirname(fileURLToPath(import.meta.url));const SHARED_DEFAULTS = JSON.parse(- readFileSync(path.join(__dev_safe_dirname, "..", "config", "defaults.json"), "utf-8"),+ readFileSync(+ path.join(__dev_safe_dirname, "..", "config", "defaults.json"),+ "utf-8",+ ),);const DEFAULT_BACKEND_PORT = SHARED_DEFAULTS.ports.agentServer;diff --git a/scripts/dev-static.mjs b/scripts/dev-static.mjsindex 9bdf675b35..166440192f 100644--- a/scripts/dev-static.mjs+++ b/scripts/dev-static.mjs@@ -214,12 +214,16 @@ const processes = new Map();let shuttingDown = false;function spawnService(name, command, args, options = {}) {- const proc = spawn(command, args, getProcessTreeSpawnOptions({- stdio: ["ignore", "pipe", "pipe"],- env: { ...process.env, ...options.env },- cwd: options.cwd,- shell: process.platform === "win32",- }));+ const proc = spawn(+ command,+ args,+ getProcessTreeSpawnOptions({+ stdio: ["ignore", "pipe", "pipe"],+ env: { ...process.env, ...options.env },+ cwd: options.cwd,+ shell: process.platform === "win32",+ }),+ );const color = options.color || c.reset;diff --git a/scripts/static-build.mjs b/scripts/static-build.mjsindex 46df1e0927..f3c130895e 100644--- a/scripts/static-build.mjs+++ b/scripts/static-build.mjs@@ -24,6 +24,11 @@ export function buildFrontend(config, args = {}) {}logStep("build", "Skipping frontend build (--skip-build)");logService("build", `Reusing existing build/ at ${buildDir}`, c.dim);+ logService(+ "build",+ "Source edits will NOT appear until you run without --skip-build (or `npm run build`).",+ c.yellow,+ );return;}diff --git a/src/components/features/backends/backend-selector.tsx b/src/components/features/backends/backend-selector.tsxindex b315acd7db..e35b67cc28 100644--- a/src/components/features/backends/backend-selector.tsx+++ b/src/components/features/backends/backend-selector.tsx@@ -21,6 +21,9 @@ import {ENVIRONMENT_SWITCH_SETACTIVE_DELAY_MS,triggerEnvironmentSwitch,} from "#/components/features/backends/environment-switch-store";+import { StyledTooltip } from "#/components/shared/buttons/styled-tooltip";+import { useSidebarCollapsed } from "#/components/features/sidebar/sidebar-collapse-context";+import { useConversationStore } from "#/stores/conversation-store";import { AddBackendModal } from "./add-backend-modal";import { BackendStatusDot } from "./backend-status-dot";import { ManageBackendsModal } from "./manage-backends-modal";@@ -163,6 +166,18 @@ export function BackendSelector({const activeValue = makeOptionValue(active.backend.id, active.orgId);const activeOption = options.find((o) => o.value === activeValue);const isSettingsActive = Boolean(settingsMatch || settingsSubrouteMatch);+ const settingsLabel = t(I18nKey.SIDEBAR$SETTINGS);+ const sidebarCollapsed = useSidebarCollapsed();+ const isRightPanelShown = useConversationStore(+ (state) => state.isRightPanelShown,+ );+ // When the sidebar rail is expanded, `placement="left"` hugs the main+ // canvas and reads awkwardly; prefer above the control. When the rail is+ // collapsed, keep left except on active conversation + open right drawer.+ const settingsTooltipPlacement =+ !sidebarCollapsed || (conversationMatch && isRightPanelShown)+ ? "top"+ : "left";const someCloudLoading = Object.values(cloudOrgs).some((c) => c.isLoading);@@ -220,7 +235,7 @@ export function BackendSelector({);const addBackendFooter = (- <div className="flex flex-col gap-1">+ <div className="flex flex-col"><buttontype="button"data-testid="add-backend-menu-item"@@ -304,24 +319,31 @@ export function BackendSelector({placeholder={active.backend.name}loading={someCloudLoading}options={options}- className="bg-transparent border-transparent hover:bg-[var(--oh-surface-raised)] focus-within:bg-[var(--oh-surface-raised)]"+ italicPlaceholder={false}+ className="h-10 px-2 py-0 bg-transparent border-transparent hover:bg-[var(--oh-surface-raised)] focus-within:bg-[var(--oh-surface-raised)]"/></div>{!hideTrigger ? (- <button- type="button"- data-testid="backend-selector-settings-link"- data-active={isSettingsActive}- aria-label={t(I18nKey.SIDEBAR$SETTINGS)}- onClick={() => navigate("/settings")}- className={- isSettingsActive- ? "inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md bg-tertiary text-white font-medium transition-colors cursor-pointer"- : "inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)] transition-colors cursor-pointer"- }+ <StyledTooltip+ content={settingsLabel}+ placement={settingsTooltipPlacement}+ offset={10}>- <Settings width={16} height={16} />- </button>+ <button+ type="button"+ data-testid="backend-selector-settings-link"+ data-active={isSettingsActive}+ aria-label={settingsLabel}+ onClick={() => navigate("/settings")}+ className={+ isSettingsActive+ ? "inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md bg-tertiary text-white font-medium transition-colors cursor-pointer"+ : "inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)] transition-colors cursor-pointer"+ }+ >+ <Settings width={16} height={16} />+ </button>+ </StyledTooltip>) : null}</div>{addBackendModalOpen ? (diff --git a/src/components/features/chat/change-agent-context-menu.tsx b/src/components/features/chat/change-agent-context-menu.tsxindex cc6d87783b..a4c79276b2 100644--- a/src/components/features/chat/change-agent-context-menu.tsx+++ b/src/components/features/chat/change-agent-context-menu.tsx@@ -7,11 +7,6 @@ import { ContextMenu } from "#/ui/context-menu";import { ContextMenuListItem } from "../context-menu/context-menu-list-item";import { ContextMenuIconTextWithDescription } from "../context-menu/context-menu-icon-text-with-description";import { useClickOutsideElement } from "#/hooks/use-click-outside-element";-import { cn } from "#/utils/utils";--const contextMenuListItemClassName = cn(- "cursor-pointer p-0 h-auto hover:bg-transparent",-);interface ChangeAgentContextMenuProps {onClose: () => void;@@ -49,22 +44,14 @@ export function ChangeAgentContextMenu({alignment="left"className="min-h-fit mb-2 min-w-[195px] max-w-[195px] gap-0">- <ContextMenuListItem- testId="code-option"- onClick={handleCodeClick}- className={contextMenuListItemClassName}- >+ <ContextMenuListItem testId="code-option" onClick={handleCodeClick}><ContextMenuIconTextWithDescriptionicon={CodeTagIcon}title={t(I18nKey.COMMON$CODE)}description={t(I18nKey.COMMON$CODE_AGENT_DESCRIPTION)}/></ContextMenuListItem>- <ContextMenuListItem- testId="plan-option"- onClick={handlePlanClick}- className={contextMenuListItemClassName}- >+ <ContextMenuListItem testId="plan-option" onClick={handlePlanClick}><ContextMenuIconTextWithDescriptionicon={LessonPlanIcon}title={t(I18nKey.COMMON$PLAN)}diff --git a/src/components/features/chat/chat-interface.tsx b/src/components/features/chat/chat-interface.tsxindex 28ccba0147..67f9a329f2 100644--- a/src/components/features/chat/chat-interface.tsx+++ b/src/components/features/chat/chat-interface.tsx@@ -408,7 +408,7 @@ export function ChatInterface() {return (<ScrollProvider value={scrollProviderValue}><div- className="h-full flex flex-col justify-between pl-0 md:pl-4 pr-0 md:pr-4 relative"+ className="relative flex h-full flex-col justify-between px-4"data-testid="chat-interface">{!hasSubstantiveAgentActions &&@@ -430,7 +430,7 @@ export function ChatInterface() {maybeLoadOlder(e.currentTarget);}}onWheel={handleWheelForPagination}- className="custom-scrollbar-always flex flex-col grow overflow-y-auto overflow-x-hidden px-4 pt-4 gap-2"+ className="custom-scrollbar-always flex grow flex-col gap-2 overflow-x-hidden overflow-y-auto px-0 pt-4 md:px-4">{isChatLoading && isReturningToConversation && (<ChatMessagesSkeleton />diff --git a/src/components/features/chat/chat-suggestions.tsx b/src/components/features/chat/chat-suggestions.tsxindex b76ab92b66..0c5bf1774a 100644--- a/src/components/features/chat/chat-suggestions.tsx+++ b/src/components/features/chat/chat-suggestions.tsx@@ -22,7 +22,7 @@ export function ChatSuggestions({ onSuggestionsClick }: ChatSuggestionsProps) {animate={{ opacity: 1 }}exit={{ opacity: 0 }}transition={{ duration: 0.3, ease: "easeInOut" }}- className="absolute top-0 left-0 right-0 bottom-[151px] flex flex-col items-center justify-center pointer-events-auto"+ className="pointer-events-auto absolute inset-x-4 bottom-[151px] top-0 flex flex-col items-center justify-center md:inset-x-8"><div className="flex flex-col items-center p-4 rounded-xl w-full"><span className="text-[32px] font-bold leading-5 text-white pb-6">diff --git a/src/components/features/chat/components/chat-input-actions.tsx b/src/components/features/chat/components/chat-input-actions.tsxindex 0e93bf1f9a..544cb81b6a 100644--- a/src/components/features/chat/components/chat-input-actions.tsx+++ b/src/components/features/chat/components/chat-input-actions.tsx@@ -38,7 +38,6 @@ import { ContextMenu } from "#/ui/context-menu";import { Divider } from "#/ui/divider";import { useClickOutsideElement } from "#/hooks/use-click-outside-element";import { cn } from "#/utils/utils";-import { CONTEXT_MENU_ICON_TEXT_CLASSNAME } from "#/utils/constants";interface ChatInputActionsProps {disabled: boolean;@@ -268,11 +267,6 @@ export function ChatInputActions({setIsOverflowOpen(false);};- const contextMenuListItemClassName = cn(- "cursor-pointer p-0 h-auto hover:bg-transparent",- CONTEXT_MENU_ICON_TEXT_CLASSNAME,- );-React.useLayoutEffect(() => {if (!isOverflowOpen || !overflowTriggerRef.current) {return;@@ -319,13 +313,11 @@ export function ChatInputActions({current === "tools" ? null : "tools",)}- className={contextMenuListItemClassName}><ToolsContextMenuIconTexticon={<Wrench width={16} height={16} strokeWidth={2} />}text={t(I18nKey.MICROAGENTS_MODAL$TOOLS)}rightIcon={<CarretRightFillIcon width={10} height={10} />}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem><div@@ -358,7 +350,6 @@ export function ChatInputActions({)}isDisabled={isAgentSwitcherDisabled}- className={contextMenuListItemClassName}><ToolsContextMenuIconTexticon={<CodePillIcon className="h-[11px] w-[11px]" />}@@ -368,7 +359,6 @@ export function ChatInputActions({: t(I18nKey.COMMON$PLAN)}rightIcon={<CarretRightFillIcon width={10} height={10} />}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>{!isAgentSwitcherDisabled && (@@ -383,7 +373,7 @@ export function ChatInputActions({><ContextMenutestId="overflow-agent-submenu"- className="overflow-visible min-w-[195px]"+ className="overflow-visible min-w-[195px] gap-0"><ContextMenuListItemtestId="overflow-agent-code"@@ -393,12 +383,10 @@ export function ChatInputActions({setConversationMode("code");closeOverflowMenus();}}- className={contextMenuListItemClassName}><ToolsContextMenuIconTexticon={<CodePillIcon className="h-[11px] w-[11px]" />}text={t(I18nKey.COMMON$CODE)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem><ContextMenuListItem@@ -407,7 +395,6 @@ export function ChatInputActions({handlePlanClick(event);closeOverflowMenus();}}- className={contextMenuListItemClassName}><ToolsContextMenuIconTexticon={@@ -418,7 +405,6 @@ export function ChatInputActions({/>}text={t(I18nKey.COMMON$PLAN)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem></ContextMenu>@@ -435,13 +421,11 @@ export function ChatInputActions({current === "model" ? null : "model",)}- className={contextMenuListItemClassName}><ToolsContextMenuIconTexticon={<Cpu width={16} height={16} strokeWidth={2} aria-hidden />}text="Model"rightIcon={<CarretRightFillIcon width={10} height={10} />}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem><div@@ -455,24 +439,24 @@ export function ChatInputActions({><ContextMenutestId="overflow-model-submenu"- className="overflow-visible min-w-[220px] max-w-[320px]"+ className="overflow-visible min-w-[220px] max-w-[320px] gap-0"><li className="text-sm">- <div className="p-2 leading-5 text-white break-all">+ <div className="p-2 leading-5 text-[var(--oh-foreground)] break-all">{conversation?.llm_model}</div></li>- <Divider />+ <Divider inset="menu" /><li className="text-sm"><NavigationLinkto="/settings"onClick={closeOverflowMenus}- className="flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-white hover:bg-[var(--oh-interactive-hover)] transition-colors"+ className="group flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors"><SettingsGearIconwidth={16}height={16}- className="shrink-0"+ className="shrink-0 text-[var(--oh-muted)] transition-colors group-hover:text-[var(--oh-foreground)]"aria-hidden/><span>{llmDestinationLabel}</span>diff --git a/src/components/features/chat/components/chat-input-grip.tsx b/src/components/features/chat/components/chat-input-grip.tsxindex 10389af545..a2f2325a54 100644--- a/src/components/features/chat/components/chat-input-grip.tsx+++ b/src/components/features/chat/components/chat-input-grip.tsx@@ -20,11 +20,11 @@ export function ChatInputGrip({}: ChatInputGripProps) {return (<div- className="absolute top-0 left-0 w-full h-6 lg:h-3 z-20 group"+ className="absolute top-0 left-0 w-full h-3 z-20 group"id="resize-grip"onClick={handleTopEdgeClick}>- {/* Tall hit target; 1px line is drawn at top-0 (flush with chat input box) */}+ {/* Resize hit target; 1px line is drawn at top-0 (flush with chat input box) */}<divclassName="absolute inset-0 z-[1] cursor-ns-resize select-none"onMouseDown={handleGripMouseDown}diff --git a/src/components/features/chat/git-control-bar.tsx b/src/components/features/chat/git-control-bar.tsxindex 6117565c76..dc2f442461 100644--- a/src/components/features/chat/git-control-bar.tsx+++ b/src/components/features/chat/git-control-bar.tsx@@ -209,7 +209,7 @@ export function GitControlBar({ onSuggestionsClick }: GitControlBarProps) {return (<div className="flex flex-row items-center">- <div className="flex flex-row gap-2.5 items-center overflow-x-auto flex-wrap md:flex-nowrap relative scrollbar-hide">+ <div className="flex flex-row gap-2.5 items-center overflow-x-auto flex-nowrap relative scrollbar-hide">{showRepoButton ? (<GitControlBarRepoButtonselectedRepository={selectedRepository}diff --git a/src/components/features/chat/interactive-chat-box.tsx b/src/components/features/chat/interactive-chat-box.tsxindex e1c5a2d5f1..b530066f41 100644--- a/src/components/features/chat/interactive-chat-box.tsx+++ b/src/components/features/chat/interactive-chat-box.tsx@@ -178,7 +178,7 @@ export function InteractiveChatBox({onSubmit={handleSubmit}onFilesPaste={handleUpload}/>- <div className="mt-3 md:pb-3">+ <div className="mt-3 pb-3"><GitControlBar onSuggestionsClick={handleSuggestionsClick} /></div></div>diff --git a/src/components/features/context-menu/context-menu-icon-text-with-description.tsx b/src/components/features/context-menu/context-menu-icon-text-with-description.tsxindex ff3d46a0f6..2f52866df2 100644--- a/src/components/features/context-menu/context-menu-icon-text-with-description.tsx+++ b/src/components/features/context-menu/context-menu-icon-text-with-description.tsx@@ -21,7 +21,7 @@ export function ContextMenuIconTextWithDescription({return (<divclassName={cn(- "flex flex-col gap-1 justify-center hover:bg-[var(--oh-interactive-hover)] rounded p-2",+ "flex min-w-0 w-full flex-col justify-center gap-1",className,)}>diff --git a/src/components/features/context-menu/context-menu-icon-text.tsx b/src/components/features/context-menu/context-menu-icon-text.tsxindex 896e4ac5dc..9ecbc79331 100644--- a/src/components/features/context-menu/context-menu-icon-text.tsx+++ b/src/components/features/context-menu/context-menu-icon-text.tsx@@ -14,9 +14,14 @@ export function ContextMenuIconText({iconClassName,}: ContextMenuIconTextProps) {return (- <div className={cn("flex items-center gap-3 px-1", className)}>- <Icon className={cn("w-4 h-4 shrink-0", iconClassName)} />- {text}+ <div className={cn("flex min-w-0 items-center gap-2", className)}>+ <Icon+ className={cn(+ "h-4 w-4 shrink-0 text-[var(--oh-muted)] transition-colors group-hover:text-[var(--oh-foreground)] group-focus-visible:text-[var(--oh-foreground)]",+ iconClassName,+ )}+ />+ <span className="min-w-0 flex-1 leading-5">{text}</span></div>);}diff --git a/src/components/features/context-menu/context-menu-list-item.tsx b/src/components/features/context-menu/context-menu-list-item.tsxindex 8c9d9006a6..1c96d4532b 100644--- a/src/components/features/context-menu/context-menu-list-item.tsx+++ b/src/components/features/context-menu/context-menu-list-item.tsx@@ -21,8 +21,9 @@ export function ContextMenuListItem({onClick={onClick}disabled={isDisabled}className={cn(- "text-sm px-4 h-10 w-full text-start hover:bg-white/10 cursor-pointer",- "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent text-nowrap",+ "group w-full cursor-pointer rounded px-2 py-2 text-start text-nowrap text-sm font-normal",+ "text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]",+ "disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent",className,)}>diff --git a/src/components/features/controls/git-tools-submenu.tsx b/src/components/features/controls/git-tools-submenu.tsxindex 34002865bd..a2411cc40d 100644--- a/src/components/features/controls/git-tools-submenu.tsx+++ b/src/components/features/controls/git-tools-submenu.tsx@@ -17,10 +17,9 @@ import ArrowDownIcon from "#/icons/u-arrow-down.svg?react";import PrIcon from "#/icons/u-pr.svg?react";import CodeBranchIcon from "#/icons/u-code-branch.svg?react";import { I18nKey } from "#/i18n/declaration";-import { CONTEXT_MENU_ICON_TEXT_CLASSNAME } from "#/utils/constants";-const contextMenuListItemClassName =- "cursor-pointer p-0 h-auto hover:bg-transparent !w-auto whitespace-nowrap";+const submenuListItemClassName = "!w-auto whitespace-nowrap";+interface GitToolsSubmenuProps {onClose: () => void;}@@ -53,55 +52,48 @@ export function GitToolsSubmenu({ onClose }: GitToolsSubmenuProps) {};return (- <ContextMenu- testId="git-tools-submenu"- className="text-white bg-tertiary rounded-[6px] py-[6px] px-1 flex flex-col gap-2 w-max"- >+ <ContextMenu testId="git-tools-submenu" className="w-max gap-0"><ContextMenuListItemtestId="git-pull-button"onClick={onGitPull}- className={contextMenuListItemClassName}+ className={submenuListItemClassName}><ToolsContextMenuIconTexticon={<ArrowDownIcon width={16} height={16} />}text={t(I18nKey.COMMON$GIT_PULL)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem><ContextMenuListItemtestId="git-push-button"onClick={onGitPush}- className={contextMenuListItemClassName}+ className={submenuListItemClassName}><ToolsContextMenuIconTexticon={<ArrowUpIcon width={16} height={16} />}text={t(I18nKey.COMMON$GIT_PUSH)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem><ContextMenuListItemtestId="create-pr-button"onClick={onCreatePR}- className={contextMenuListItemClassName}+ className={submenuListItemClassName}><ToolsContextMenuIconTexticon={<PrIcon width={16} height={16} />}text={t(I18nKey.COMMON$CREATE_PR)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem><ContextMenuListItemtestId="create-new-branch-button"onClick={onCreateNewBranch}- className={contextMenuListItemClassName}+ className={submenuListItemClassName}><ToolsContextMenuIconTexticon={<CodeBranchIcon width={16} height={16} />}text={t(I18nKey.COMMON$CREATE_NEW_BRANCH)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem></ContextMenu>diff --git a/src/components/features/controls/macros-submenu.tsx b/src/components/features/controls/macros-submenu.tsxindex be89ffe313..3d1110a6e3 100644--- a/src/components/features/controls/macros-submenu.tsx+++ b/src/components/features/controls/macros-submenu.tsx@@ -10,10 +10,8 @@ import WaterIcon from "#/icons/u-water.svg?react";import { I18nKey } from "#/i18n/declaration";import { useConversationStore } from "#/stores/conversation-store";import { REPO_SUGGESTIONS } from "#/utils/suggestions/repo-suggestions";-import { CONTEXT_MENU_ICON_TEXT_CLASSNAME } from "#/utils/constants";-const contextMenuListItemClassName =- "cursor-pointer p-0 h-auto hover:bg-transparent !w-auto whitespace-nowrap";+const submenuListItemClassName = "!w-auto whitespace-nowrap";interface MacrosSubmenuProps {onClose: () => void;@@ -41,52 +39,48 @@ export function MacrosSubmenu({ onClose }: MacrosSubmenuProps) {};return (- <ContextMenu testId="macros-submenu" className="overflow-visible">+ <ContextMenu testId="macros-submenu" className="overflow-visible gap-0"><ContextMenuListItemtestId="increase-test-coverage-button"onClick={onIncreaseTestCoverage}- className={contextMenuListItemClassName}+ className={submenuListItemClassName}><ToolsContextMenuIconTexticon={<TachometerFastIcon width={16} height={16} />}text={t(I18nKey.INCREASE_TEST_COVERAGE)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem><ContextMenuListItemtestId="fix-readme-button"onClick={onFixReadme}- className={contextMenuListItemClassName}+ className={submenuListItemClassName}><ToolsContextMenuIconTexticon={<DocumentIcon width={16} height={16} />}text={t(I18nKey.FIX_README)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem><ContextMenuListItemtestId="auto-merge-prs-button"onClick={onAutoMergePRs}- className={contextMenuListItemClassName}+ className={submenuListItemClassName}><ToolsContextMenuIconTexticon={<PrStatusIcon width={16} height={16} />}text={t(I18nKey.AUTO_MERGE_PRS)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem><ContextMenuListItemtestId="clean-dependencies-button"onClick={onCleanDependencies}- className={contextMenuListItemClassName}+ className={submenuListItemClassName}><ToolsContextMenuIconTexticon={<WaterIcon width={16} height={16} />}text={t(I18nKey.CLEAN_DEPENDENCIES)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem></ContextMenu>diff --git a/src/components/features/controls/tools-context-menu-icon-text.tsx b/src/components/features/controls/tools-context-menu-icon-text.tsxindex 0eeb89adbc..3058aa4597 100644--- a/src/components/features/controls/tools-context-menu-icon-text.tsx+++ b/src/components/features/controls/tools-context-menu-icon-text.tsx@@ -16,15 +16,27 @@ export function ToolsContextMenuIconText({return (<divclassName={cn(- "flex items-center justify-between p-2 hover:bg-[var(--oh-interactive-hover)] rounded",+ "flex min-w-0 w-full items-center justify-between gap-2",className,)}>- <div className="flex items-center gap-2">- {icon}+ <div className="flex min-w-0 items-center gap-2">+ <span+ className="flex shrink-0 items-center text-[var(--oh-muted)] transition-colors group-hover:text-[var(--oh-foreground)] group-focus-visible:text-[var(--oh-foreground)] [&_svg]:text-current"+ aria-hidden+ >+ {icon}+ </span><span className="text-sm font-normal leading-5">{text}</span></div>- {rightIcon && <div className="flex items-center">{rightIcon}</div>}+ {rightIcon ? (+ <span+ className="flex shrink-0 items-center text-[var(--oh-muted)] transition-colors group-hover:text-[var(--oh-foreground)] group-focus-visible:text-[var(--oh-foreground)] [&_svg]:text-current"+ aria-hidden+ >+ {rightIcon}+ </span>+ ) : null}</div>);}diff --git a/src/components/features/controls/tools-context-menu.tsx b/src/components/features/controls/tools-context-menu.tsxindex 531ef3ec3d..b27087001e 100644--- a/src/components/features/controls/tools-context-menu.tsx+++ b/src/components/features/controls/tools-context-menu.tsx@@ -17,12 +17,6 @@ import CarretRightFillIcon from "#/icons/carret-right-fill.svg?react";import { ToolsContextMenuIconText } from "./tools-context-menu-icon-text";import { GitToolsSubmenu } from "./git-tools-submenu";import { MacrosSubmenu } from "./macros-submenu";-import { CONTEXT_MENU_ICON_TEXT_CLASSNAME } from "#/utils/constants";--const contextMenuListItemClassName = cn(- "cursor-pointer p-0 h-auto hover:bg-transparent",- CONTEXT_MENU_ICON_TEXT_CLASSNAME,-);interface ToolsContextMenuProps {onClose: () => void;@@ -78,13 +72,11 @@ export function ToolsContextMenu({<ContextMenuListItemtestId="git-tools-button"onClick={() => handleSubmenuClick("git")}- className={contextMenuListItemClassName}><ToolsContextMenuIconTexticon={<CodeBranchIcon width={16} height={16} />}text={t(I18nKey.COMMON$GIT_TOOLS)}rightIcon={<CarretRightFillIcon width={10} height={10} />}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem><div@@ -106,13 +98,11 @@ export function ToolsContextMenu({<ContextMenuListItemtestId="macros-button"onClick={() => handleSubmenuClick("macros")}- className={contextMenuListItemClassName}><ToolsContextMenuIconTexticon={<SettingsIcon width={16} height={16} />}text={t(I18nKey.COMMON$MACROS)}rightIcon={<CarretRightFillIcon width={10} height={10} />}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem><div@@ -128,31 +118,21 @@ export function ToolsContextMenu({</div></div>- {shouldShowAgentTools && <Divider />}+ {shouldShowAgentTools && <Divider inset="menu" />}- <ContextMenuListItem- testId="show-skills-button"- onClick={onShowSkills}- className={contextMenuListItemClassName}- >+ <ContextMenuListItem testId="show-skills-button" onClick={onShowSkills}><ToolsContextMenuIconTexticon={<RobotIcon width={16} height={16} />}text={t(I18nKey.CONVERSATION$SHOW_SKILLS)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>{/* Show Hooks - Only show for V1 conversations */}{shouldShowHooks && (- <ContextMenuListItem- testId="show-hooks-button"- onClick={onShowHooks}- className={contextMenuListItemClassName}- >+ <ContextMenuListItem testId="show-hooks-button" onClick={onShowHooks}><ToolsContextMenuIconTexticon={<ToolsIcon width={16} height={16} />}text={t(I18nKey.CONVERSATION$SHOW_HOOKS)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>)}@@ -162,12 +142,10 @@ export function ToolsContextMenu({<ContextMenuListItemtestId="show-agent-tools-button"onClick={onShowAgentTools}- className={contextMenuListItemClassName}><ToolsContextMenuIconTexticon={<ToolsIcon width={16} height={16} />}text={t(I18nKey.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>)}diff --git a/src/components/features/conversation-panel/cloud-new-conversation-menu.tsx b/src/components/features/conversation-panel/cloud-new-conversation-menu.tsxindex b43eb15839..6d8b9fc13a 100644--- a/src/components/features/conversation-panel/cloud-new-conversation-menu.tsx+++ b/src/components/features/conversation-panel/cloud-new-conversation-menu.tsx@@ -14,7 +14,9 @@ import { cn } from "#/utils/utils";import { GitRepository } from "#/types/git";import { Provider } from "#/types/settings";import RepoIcon from "#/icons/repo.svg?react";+import SearchIcon from "#/icons/search.svg?react";import { GitProviderIcon } from "#/components/shared/git-provider-icon";+import { Divider } from "#/ui/divider";import { NEW_CONVERSATION_DROPDOWN_SURFACE } from "./new-conversation-dropdown-styles";import { usePopoverFixedPlacement } from "#/hooks/use-popover-fixed-placement";@@ -238,7 +240,6 @@ export function CloudNewConversationMenu({data-testid={popoverTestId}className={cn(NEW_CONVERSATION_DROPDOWN_SURFACE,- "gap-1",!useFixedPlacement &&cn("absolute top-full mt-0", popoverClassName),)}@@ -246,7 +247,7 @@ export function CloudNewConversationMenu({>{providers.length > 1 && (<div- className="flex items-center gap-1 px-1 pt-1"+ className="flex items-center gap-1 px-1 py-1"data-testid="cloud-provider-tabs">{providers.map((provider) => {@@ -273,24 +274,34 @@ export function CloudNewConversationMenu({</div>)}- <div className="px-1">- <input- type="text"- data-testid="cloud-repo-search-input"- value={query}- onChange={(e) => setQuery(e.target.value)}- placeholder={t(I18nKey.COMMON$SEARCH_REPOSITORIES)}- disabled={!selectedProvider}- className={cn(- "w-full rounded-md border border-[var(--oh-border-subtle)] bg-[var(--oh-surface-raised)] px-2 py-1.5 text-sm text-white",- "outline-none placeholder:text-[var(--oh-muted)]",- "focus:border-[var(--oh-border-subtle)]",- "disabled:cursor-not-allowed disabled:opacity-60",- )}- />+ <div className="px-2">+ <div className="relative">+ <SearchIcon+ width={16}+ height={16}+ aria-hidden+ className="pointer-events-none absolute left-0 top-1/2 -translate-y-1/2 text-[var(--oh-muted)]"+ />+ <input+ type="text"+ data-testid="cloud-repo-search-input"+ value={query}+ onChange={(e) => setQuery(e.target.value)}+ placeholder={t(I18nKey.COMMON$SEARCH_REPOSITORIES)}+ disabled={!selectedProvider}+ className={cn(+ "w-full border-0 bg-transparent py-1.5 pl-6 pr-0 text-sm text-white",+ "outline-none placeholder:text-[var(--oh-muted)]",+ "focus:outline-none focus:ring-0",+ "disabled:cursor-not-allowed disabled:opacity-60",+ )}+ />+ </div></div>- <ul className="flex flex-col max-h-[40vh] sm:max-h-[280px] overflow-y-auto">+ <Divider inset="menu" />++ <ul className="flex max-h-[40vh] flex-col overflow-y-auto custom-scrollbar-always sm:max-h-[280px]">{isListLoading && repositories.length === 0 && (<liclassName="px-2 py-2 text-sm text-[var(--oh-muted)] italic"diff --git a/src/components/features/conversation-panel/conversation-card/conversation-card-context-menu.tsx b/src/components/features/conversation-panel/conversation-card/conversation-card-context-menu.tsxindex b617d992f0..985ea08eb4 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-card-context-menu.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-card-context-menu.tsx@@ -35,9 +35,6 @@ interface ConversationCardContextMenuProps {ignoreOutsideClickRef?: React.RefObject<HTMLElement | null>;}-const contextMenuListItemClassName =- "cursor-pointer p-0 h-auto hover:bg-transparent";-export function ConversationCardContextMenu({onClose,onDelete,@@ -71,7 +68,7 @@ export function ConversationCardContextMenu({return !isLast ? (<React.Fragment key={sectionKey}>{filteredItems}- <Divider />+ <Divider inset="menu" /></React.Fragment>) : (<React.Fragment key={sectionKey}>{filteredItems}</React.Fragment>@@ -106,7 +103,6 @@ export function ConversationCardContextMenu({key="edit-button"testId="edit-button"onClick={onEdit}- className={contextMenuListItemClassName}><ConversationNameContextMenuIconTexticon={<EditIcon width={16} height={16} />}@@ -124,7 +120,6 @@ export function ConversationCardContextMenu({key="show-agent-tools-button"testId="show-agent-tools-button"onClick={onShowAgentTools}- className={contextMenuListItemClassName}><ConversationNameContextMenuIconTexticon={<ToolsIcon width={16} height={16} />}@@ -137,7 +132,6 @@ export function ConversationCardContextMenu({key="show-skills-button"testId="show-skills-button"onClick={onShowSkills}- className={contextMenuListItemClassName}><ConversationNameContextMenuIconTexticon={<RobotIcon width={16} height={16} />}@@ -155,7 +149,6 @@ export function ConversationCardContextMenu({key="stop-button"testId="stop-button"onClick={onStop}- className={contextMenuListItemClassName}><ConversationNameContextMenuIconTexticon={<CloseIcon width={16} height={16} />}@@ -168,7 +161,6 @@ export function ConversationCardContextMenu({key="download-vscode-button"testId="download-vscode-button"onClick={onDownloadViaVSCode}- className={contextMenuListItemClassName}><ConversationNameContextMenuIconTexticon={<DownloadIcon width={16} height={16} />}@@ -181,7 +173,6 @@ export function ConversationCardContextMenu({key="download-trajectory-button"testId="download-trajectory-button"onClick={onDownloadConversation}- className={contextMenuListItemClassName}><ConversationNameContextMenuIconTexticon={<DownloadIcon width={16} height={16} />}@@ -199,7 +190,6 @@ export function ConversationCardContextMenu({key="display-cost-button"testId="display-cost-button"onClick={onDisplayCost}- className={contextMenuListItemClassName}><ConversationNameContextMenuIconTexticon={<CreditCardIcon width={16} height={16} />}@@ -212,7 +202,6 @@ export function ConversationCardContextMenu({key="delete-button"testId="delete-button"onClick={onDelete}- className={contextMenuListItemClassName}><ConversationNameContextMenuIconTexticon={<DeleteIcon width={16} height={16} />}diff --git a/src/components/features/conversation-panel/conversation-card/conversation-card.tsx b/src/components/features/conversation-panel/conversation-card/conversation-card.tsxindex f34615081a..5b5d04afb2 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-card.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-card.tsx@@ -157,13 +157,7 @@ export function ConversationCard({executionStatus={executionStatus}sandboxStatus={sandboxStatus}/>- {(sandboxStatus === "MISSING" || sandboxStatus === "ERROR") && (- <ConversationStatusBadges- conversationStatus={- sandboxStatus === "MISSING" ? "ARCHIVED" : "ERROR"- }- />- )}+ {sandboxStatus === "ERROR" && <ConversationStatusBadges />}</div><div className="relative ml-auto pl-2 flex items-center justify-end shrink-0">diff --git a/src/components/features/conversation-panel/conversation-card/conversation-status-badges.tsx b/src/components/features/conversation-panel/conversation-card/conversation-status-badges.tsxindex a8f2217083..9e0c837556 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-status-badges.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-status-badges.tsx@@ -1,41 +1,18 @@-import { FaArchive } from "react-icons/fa";import { useTranslation } from "react-i18next";-import { ConversationStatus } from "#/types/conversation-status";import { I18nKey } from "#/i18n/declaration";import CircleErrorIcon from "#/icons/circle-error.svg?react";-interface ConversationStatusBadgesProps {- conversationStatus: ConversationStatus;-}--export function ConversationStatusBadges({- conversationStatus,-}: ConversationStatusBadgesProps) {+/** Error sandbox pill beside the conversation title (archived uses the status column icon only). */+export function ConversationStatusBadges() {const { t } = useTranslation("openhands");- if (conversationStatus === "ARCHIVED") {- return (- <span- data-testid="archived-badge"- className="flex items-center gap-1 px-1.5 py-0.5 bg-[var(--oh-text-dim)] text-white text-xs font-medium rounded-full opacity-60"- >- <FaArchive size={10} className="text-white" />- <span>{t(I18nKey.COMMON$ARCHIVED)}</span>- </span>- );- }-- if (conversationStatus === "ERROR") {- return (- <span- data-testid="error-badge"- className="flex items-center gap-1 px-1.5 py-0.5 bg-[var(--oh-status-error)] text-white text-xs font-medium rounded-full"- >- <CircleErrorIcon className="text-white w-3 h-3" />- <span>{t(I18nKey.COMMON$ERROR)}</span>- </span>- );- }-- return null;+ return (+ <span+ data-testid="error-badge"+ className="flex items-center gap-1 px-1.5 py-0.5 bg-[var(--oh-status-error)] text-white text-xs font-medium rounded-full"+ >+ <CircleErrorIcon className="text-white w-3 h-3" />+ <span>{t(I18nKey.COMMON$ERROR)}</span>+ </span>+ );}diff --git a/src/components/features/conversation-panel/conversation-panel-filter-menu.tsx b/src/components/features/conversation-panel/conversation-panel-filter-menu.tsxindex b385518e9c..e3a785b516 100644--- a/src/components/features/conversation-panel/conversation-panel-filter-menu.tsx+++ b/src/components/features/conversation-panel/conversation-panel-filter-menu.tsx@@ -6,14 +6,18 @@ import {Check,Clock3,ClockArrowDown,+ Eye,+ EyeOff,Folder,GitBranch,ListFilter,MessageCircle,Star,+ Trash2,} from "lucide-react";import { I18nKey } from "#/i18n/declaration";import type { BackendKind } from "#/api/backend-registry/types";+import { Divider } from "#/ui/divider";import { cn } from "#/utils/utils";import type {ConversationSortField,@@ -24,11 +28,43 @@ import type {const capitalizeLabel = (label: string) =>label.length > 0 ? label.charAt(0).toUpperCase() + label.slice(1) : label;-function MenuHeading({ children }: { children: React.ReactNode }) {+const MENU_SECTION_HEADING_PADDING = "px-2 pb-1 pt-1";+const MENU_SECTION_HEADING_TEXT =+ "text-[11px] font-semibold uppercase tracking-wide text-[var(--oh-muted)]";++function MenuHeading({+ children,+ suffix,+}: {+ children: React.ReactNode;+ suffix?: React.ReactNode;+}) {+ if (suffix != null) {+ return (+ <div+ role="presentation"+ className={cn(+ "flex items-baseline justify-between gap-2",+ MENU_SECTION_HEADING_PADDING,+ )}+ >+ <span+ className={cn(+ "min-w-0 truncate text-left",+ MENU_SECTION_HEADING_TEXT,+ )}+ >+ {children}+ </span>+ {suffix}+ </div>+ );+ }+return (<divrole="presentation"- className="px-2 py-1 text-[11px] font-semibold uppercase tracking-wide text-[var(--oh-muted)]"+ className={cn(MENU_SECTION_HEADING_PADDING, MENU_SECTION_HEADING_TEXT)}>{children}</div>@@ -36,12 +72,7 @@ function MenuHeading({ children }: { children: React.ReactNode }) {}function MenuSeparator() {- return (- <div- className="-mx-1 my-1 h-px shrink-0 bg-[var(--oh-border)]"- role="separator"- />- );+ return <Divider inset="menu" />;}function MenuRow({@@ -50,12 +81,14 @@ function MenuRow({selected,onClick,testId,+ disabled,}: {icon: React.ComponentType<{ className?: string; "aria-hidden"?: boolean }>;label: string;selected?: boolean;onClick: () => void;testId?: string;+ disabled?: boolean;}) {// Rows that show a selection checkmark are toggleable preferences, so// they get `role="menuitemradio"` when they're part of a selectable@@ -70,19 +103,23 @@ function MenuRow({role={role}aria-checked={selected === undefined ? undefined : Boolean(selected)}data-testid={testId}+ disabled={disabled}onClick={onClick}className={cn(- "flex w-full items-center gap-2 rounded px-2 py-2 text-left text-sm text-white",- "hover:bg-[var(--oh-interactive-hover)]",+ "group flex w-full items-center gap-2 rounded px-2 py-2 text-left text-sm text-[var(--oh-foreground)]",+ "hover:bg-[var(--oh-interactive-hover)] disabled:cursor-not-allowed disabled:opacity-50",)}><Icon- className="h-3.5 w-3.5 shrink-0 text-[var(--oh-muted)]"+ className="h-3.5 w-3.5 shrink-0 text-[var(--oh-muted)] transition-colors group-hover:text-[var(--oh-foreground)] group-focus-visible:text-[var(--oh-foreground)]"aria-hidden/><span className="min-w-0 flex-1 truncate">{label}</span>{selected ? (- <Check className="ml-auto h-3.5 w-3.5 shrink-0" aria-hidden />+ <Check+ className="ml-auto h-3.5 w-3.5 shrink-0 text-[var(--oh-foreground)]"+ aria-hidden+ />) : null}</button>);@@ -222,7 +259,7 @@ export function ConversationPanelFilterMenu({tabIndex={-1}data-testid="older-conversations-filter-menu"onKeyDown={handleMenuKeyDown}- className="absolute right-0 top-full z-50 mt-0 w-64 rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-white shadow-lg"+ className="absolute right-0 top-full z-50 mt-0 w-64 rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-[var(--oh-foreground)] shadow-lg"><MenuHeading>{t(I18nKey.CONVERSATION_PANEL$ORGANIZE)}</MenuHeading><MenuRow@@ -310,52 +347,41 @@ export function ConversationPanelFilterMenu({/><MenuSeparator />- <div- role="presentation"- className="flex items-baseline justify-between gap-2 px-2 py-1"+ <MenuHeading+ suffix={+ <span className="shrink-0 text-right text-[10px] font-medium normal-case tracking-normal text-[var(--oh-muted)]/70">+ {t(I18nKey.CONVERSATION_PANEL$OLDER_OVER_ONE_HOUR)}+ </span>+ }>- <span className="min-w-0 truncate text-left text-[11px] font-semibold uppercase tracking-wide text-[var(--oh-muted)]">- {t(I18nKey.CONVERSATION_PANEL$OLDER_SECTION)}- </span>- <span className="shrink-0 text-right text-[10px] font-medium normal-case tracking-normal text-[var(--oh-muted)]/70">- {t(I18nKey.CONVERSATION_PANEL$OLDER_OVER_ONE_HOUR)}- </span>- </div>- <button- type="button"- role="menuitem"- data-testid="toggle-older-conversations"+ {t(I18nKey.CONVERSATION_PANEL$OLDER_SECTION)}+ </MenuHeading>+ <MenuRow+ testId="toggle-older-conversations"+ icon={showOlderConversations ? EyeOff : Eye}+ label={+ showOlderConversations+ ? capitalizeLabel(t(I18nKey.CONVERSATION$HIDE))+ : capitalizeLabel(t(I18nKey.CONVERSATION$SHOW_ALL))+ }onClick={() => {toggleShowOlderConversations();setFilterMenuOpen(false);}}- className="block w-full rounded px-2 py-2 text-left text-sm text-white hover:bg-[var(--oh-interactive-hover)]"- >- {showOlderConversations- ? capitalizeLabel(t(I18nKey.CONVERSATION$HIDE))- : capitalizeLabel(t(I18nKey.CONVERSATION$SHOW_ALL))}- </button>+ /><MenuSeparator />- <button- type="button"- role="menuitem"- data-testid="delete-all-conversations"+ <MenuRow+ testId="delete-all-conversations"+ icon={Trash2}+ label={capitalizeLabel(t(I18nKey.CONVERSATION$DELETE_ALL))}disabled={totalConversationsCount === 0}onClick={() => {if (totalConversationsCount === 0) return;onRequestDeleteAll();setFilterMenuOpen(false);}}- className={cn(- "block w-full rounded px-2 py-2 text-left text-sm hover:bg-[var(--oh-interactive-hover)]",- totalConversationsCount === 0- ? "cursor-not-allowed text-[var(--oh-muted)]"- : "text-danger",- )}- >- {capitalizeLabel(t(I18nKey.CONVERSATION$DELETE_ALL))}- </button>+ /></div>) : null}</div>diff --git a/src/components/features/conversation-panel/conversation-panel.tsx b/src/components/features/conversation-panel/conversation-panel.tsxindex f8964c8650..4c9c29fa81 100644--- a/src/components/features/conversation-panel/conversation-panel.tsx+++ b/src/components/features/conversation-panel/conversation-panel.tsx@@ -158,7 +158,9 @@ export function ConversationPanel({setCollapsedGroupIds(new Set());}}, [organizeMode]);+const scrollContainerRef = React.useRef<HTMLDivElement>(null);+const [selectedConversationId, setSelectedConversationId] = React.useState<string | null>(null);@@ -260,6 +262,11 @@ export function ConversationPanel({return conversationGroups.reduce((n, g) => n + g.conversations.length, 0);}, [conversationGroups]);+ const listIsEffectivelyEmpty =+ organizeMode === "grouped" && !compact+ ? visibleGroupedCount === 0+ : visibleFlatCount === 0;+const { mutate: deleteConversation, mutateAsync: deleteConversationAsync } =useDeleteConversation();const { mutate: pauseConversation } = useUnifiedPauseConversation();@@ -272,7 +279,10 @@ export function ConversationPanel({const olderHidden = olderScoped.length > 0 && !showOlderConversations;// Compact mode also hides "Load more" — paginating into archived// conversations contradicts the "active only" intent of the icon rail.- const showLoadMore = !!hasNextPage && !olderHidden && !compact;+ // Do not show when the visible list is empty (e.g. filters hide every+ // loaded conversation) — that state already shows "No conversations found".+ const showLoadMore =+ !!hasNextPage && !olderHidden && !compact && !listIsEffectivelyEmpty;const { mutate: createConversation } = useCreateConversation();const isCreatingConversationFlow = useIsCreatingConversation();@@ -470,10 +480,6 @@ export function ConversationPanel({// background refetch, causing the skeleton/empty-state to flicker when// the list is empty.const showInitialSkeleton = isLoading;- const listIsEffectivelyEmpty =- organizeMode === "grouped" && !compact- ? visibleGroupedCount === 0- : visibleFlatCount === 0;const showEmptyState =!isLoading && !compact && listIsEffectivelyEmpty && !startTasks?.length;@@ -488,15 +494,17 @@ export function ConversationPanel({{showConversationHeader && (<divclassName={cn(- "-mx-2 border-b",+ // Pull flush to the sidebar edges: `-ml-2.5` matches aside `pl-2.5`;+ // width extends by that inset on the right now that aside is `pr-0`.+ "-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b",isListScrolled ? "border-[var(--oh-border)]" : "border-transparent",)}><divdata-testid="older-conversations-summary"- className="flex flex-wrap items-center gap-x-2 gap-y-1 py-2 pl-4 pr-2 text-[var(--oh-muted)]"+ className="flex min-w-0 flex-nowrap items-center gap-x-2 py-2 pl-4 pr-2.5 text-[var(--oh-muted)]">- <span className="text-sm font-medium text-[var(--oh-muted)]">+ <span className="min-w-0 truncate text-sm font-medium text-[var(--oh-muted)]">{t(I18nKey.SIDEBAR$CONVERSATIONS)}</span><div className="ml-auto flex shrink-0 items-center gap-0.5">@@ -530,10 +538,14 @@ export function ConversationPanel({<divref={scrollContainerRef}+ data-testid="conversation-panel-list-scroll"onScroll={(event) => {setIsListScrolled(event.currentTarget.scrollTop > 0);}}- className="flex min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain custom-scrollbar-always"+ className={cn(+ "flex min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain custom-scrollbar-always",+ !compact && "conversation-panel-list-scroll",+ )}>{showInitialSkeleton && <ConversationCardSkeleton compact={compact} />}diff --git a/src/components/features/conversation-panel/conversation-status-dot.tsx b/src/components/features/conversation-panel/conversation-status-dot.tsxindex 0e6f452eba..0899128678 100644--- a/src/components/features/conversation-panel/conversation-status-dot.tsx+++ b/src/components/features/conversation-panel/conversation-status-dot.tsx@@ -1,4 +1,5 @@import { useTranslation } from "react-i18next";+import { FaArchive } from "react-icons/fa";import { ExecutionStatus } from "#/types/agent-server/core/base/common";import { SandboxStatus } from "#/api/conversation-service/agent-server-conversation-service.types";import { StyledTooltip } from "#/components/shared/buttons/styled-tooltip";@@ -133,7 +134,16 @@ export function ConversationStatusDot({const visual = effectiveVisual;const label = t(labelKeyFor(visual, isArchived));- const indicator = renderIndicator(visual);+ const indicator = isArchived ? (+ <FaArchive+ data-testid="conversation-status-archived"+ size={10}+ className="shrink-0 text-[var(--oh-muted)] opacity-60"+ aria-hidden+ />+ ) : (+ renderIndicator(visual)+ );const dot = (<div className="w-2.5 h-2.5 flex items-center justify-center shrink-0">diff --git a/src/components/features/conversation-panel/ellipsis-button.tsx b/src/components/features/conversation-panel/ellipsis-button.tsxindex f8bf09b1b3..e87c1a3d43 100644--- a/src/components/features/conversation-panel/ellipsis-button.tsx+++ b/src/components/features/conversation-panel/ellipsis-button.tsx@@ -7,10 +7,11 @@ interface EllipsisButtonProps {/*** Optional override classes applied to the button. Use this when a* caller needs to customize layout (e.g. translate, flex), not to- * change the icon size or hover treatment which are intentionally- * shared across the app.+ * replace hover treatment which is intentionally shared.*/className?: string;+ /** Icon box; default `w-4 h-4` (use `mobileTopBarIconClassName` in mobile top bars). */+ iconClassName?: string;ariaLabel?: string;/*** Override the default `ellipsis-button` test id. Most callers@@ -37,7 +38,7 @@ export const EllipsisButton = React.forwardRef<HTMLButtonElement,EllipsisButtonProps>(function EllipsisButton(- { onClick, className, ariaLabel, testId = "ellipsis-button" },+ { onClick, className, iconClassName, ariaLabel, testId = "ellipsis-button" },ref,) {return (@@ -54,7 +55,7 @@ export const EllipsisButton = React.forwardRef<className,)}>- <ThreeDotsVerticalIcon className="w-4 h-4" />+ <ThreeDotsVerticalIcon className={iconClassName ?? "w-4 h-4"} /></button>);});diff --git a/src/components/features/conversation-panel/local-new-conversation-menu.tsx b/src/components/features/conversation-panel/local-new-conversation-menu.tsxindex 7d116b856c..1e18f0c39a 100644--- a/src/components/features/conversation-panel/local-new-conversation-menu.tsx+++ b/src/components/features/conversation-panel/local-new-conversation-menu.tsx@@ -13,6 +13,7 @@ import RepoIcon from "#/icons/repo.svg?react";import { FolderBrowserModal } from "#/components/features/home/workspace-dropdown/folder-browser-modal";import { ManageWorkspacesModal } from "#/components/features/home/workspace-dropdown/manage-workspaces-modal";+import { Divider } from "#/ui/divider";import { NEW_CONVERSATION_DROPDOWN_SURFACE } from "./new-conversation-dropdown-styles";import { usePopoverFixedPlacement } from "#/hooks/use-popover-fixed-placement";@@ -199,7 +200,14 @@ export function LocalNewConversationMenu({))}</ul>- <div className="mt-1 flex flex-col pt-1">+ <div+ className="flex flex-col"+ data-testid="new-conversation-menu-footer"+ >+ <Divider+ inset="menu"+ testId="new-conversation-menu-footer-divider"+ /><buttontype="button"data-testid="add-workspaces-button"diff --git a/src/components/features/conversation/conversation-main/conversation-main.tsx b/src/components/features/conversation/conversation-main/conversation-main.tsxindex bb1f19ae8b..b20fbbe3ea 100644--- a/src/components/features/conversation/conversation-main/conversation-main.tsx+++ b/src/components/features/conversation/conversation-main/conversation-main.tsx@@ -1,4 +1,12 @@+import React from "react";+import { ChevronLeft } from "lucide-react";+import { useTranslation } from "react-i18next";+import { I18nKey } from "#/i18n/declaration";import { cn } from "#/utils/utils";+import {+ mobileTopBarIconButtonClassName,+ mobileTopBarIconClassName,+} from "#/utils/mobile-top-bar-icon-button-classes";import { ChatInterfaceWrapper } from "./chat-interface-wrapper";import { ConversationTabContent } from "../conversation-tabs/conversation-tab-content/conversation-tab-content";import { ConversationNameWithStatus } from "../conversation-name-with-status";@@ -6,11 +14,11 @@ import { ConversationTabs } from "../conversation-tabs/conversation-tabs";import { ResizeHandle } from "../../../ui/resize-handle";import { useResizablePanels } from "#/hooks/use-resizable-panels";import { useConversationStore } from "#/stores/conversation-store";-import { useBreakpoint } from "#/hooks/use-breakpoint";--function getMobileChatPanelClass(isRightPanelShown: boolean) {- return isRightPanelShown ? "h-160" : "flex-1";-}+import {+ useBreakpoint,+ SIDEBAR_RAIL_COLLAPSE_MAX_WIDTH,+} from "#/hooks/use-breakpoint";+import { SidebarMobileMenuToggle } from "#/components/features/sidebar/sidebar-mobile-menu-toggle";function getDesktopTabPanelClass(isRightPanelShown: boolean) {return isRightPanelShown@@ -20,6 +28,7 @@ function getDesktopTabPanelClass(isRightPanelShown: boolean) {export function ConversationMain() {const isMobile = useBreakpoint();+ const isSidebarRailHidden = useBreakpoint(SIDEBAR_RAIL_COLLAPSE_MAX_WIDTH);const { isRightPanelShown } = useConversationStore();const { leftWidth, rightWidth, isDragging, containerRef, handleMouseDown } =@@ -57,9 +66,7 @@ export function ConversationMain() {<divclassName={cn("flex flex-col bg-base overflow-hidden",- isMobile- ? getMobileChatPanelClass(isRightPanelShown)- : "transition-all duration-300 ease-in-out",+ isMobile ? "flex-1" : "transition-all duration-300 ease-in-out",)}// panel width computed at runtime by resize hook; transition toggled by drag statestyle={@@ -73,9 +80,15 @@ export function ConversationMain() {><divdata-testid="chat-pane-header"- className="flex items-center h-10 min-h-10 shrink-0"+ className={cn(+ "flex h-10 min-h-10 shrink-0 items-center",+ isSidebarRailHidden && "gap-2 pl-2.5",+ )}>- <ConversationNameWithStatus />+ {isSidebarRailHidden ? <SidebarMobileMenuToggle /> : null}+ <div className="min-w-0 flex-1">+ <ConversationNameWithStatus />+ </div></div><div className="flex-1 min-h-0 flex flex-col"><ChatInterfaceWrapper@@ -89,52 +102,96 @@ export function ConversationMain() {<ResizeHandle onMouseDown={handleMouseDown} isDragging={isDragging} />)}- {/* Tab Content Panel - always mounted, styled as bottom sheet (mobile)- or side panel (desktop). Owns the tabs header and extends all the- way to the bottom of the viewport (no bottom padding). */}- <div- className={cn(- "transition-all duration-300 ease-in-out overflow-hidden",- isMobile- ? cn(- "absolute bottom-4 left-0 right-0 top-160",- isRightPanelShown- ? "h-160 translate-y-0 opacity-100"- : "h-0 translate-y-full opacity-0",- )- : getDesktopTabPanelClass(isRightPanelShown),- )}- // panel width computed at runtime by resize hook; transition toggled by drag state- style={- !isMobile- ? {- width: isRightPanelShown ? `${rightWidth}%` : "0%",- transitionProperty: isDragging ? "opacity, transform" : "all",- }- : undefined- }- >+ {/* Right panel: desktop side drawer. Mobile opens Files/Tools via /panel route. */}+ {!isMobile && (<divclassName={cn(- isMobile- ? "h-full flex flex-col pb-2 md:pb-0 pt-2"- : "flex flex-col h-full w-full",+ "transition-all duration-300 ease-in-out overflow-hidden",+ getDesktopTabPanelClass(isRightPanelShown),)}+ style={{+ width: isRightPanelShown ? `${rightWidth}%` : "0%",+ transitionProperty: isDragging ? "opacity, transform" : "all",+ }}>- <div className="flex flex-col flex-1 min-h-0 bg-[var(--oh-surface)] border-l border-[var(--oh-border)] overflow-hidden">- <div- data-testid="tabs-pane-header"- className="flex shrink-0 flex-col border-b border-[var(--oh-border)]"- >- <ConversationTabs />- </div>- <div className="flex-1 min-h-0 flex flex-col">- <ConversationTabContent />+ <div className="flex h-full w-full flex-col">+ <div className="flex flex-col flex-1 min-h-0 bg-[var(--oh-surface)] border-l border-[var(--oh-border)] overflow-hidden">+ <div+ data-testid="tabs-pane-header"+ className="flex shrink-0 flex-col border-b border-[var(--oh-border)]"+ >+ <ConversationTabs />+ </div>+ <div className="flex-1 min-h-0 flex flex-col">+ <ConversationTabContent />+ </div></div></div></div>+ )}+ </div>+ </div>+ );+}++export function ConversationMobilePanelPage({+ onNavigateBack,+}: {+ onNavigateBack: () => void;+}) {+ const { t } = useTranslation("openhands");+ const { setIsRightPanelShown, setHasRightPanelToggled, setSelectedTab } =+ useConversationStore();++ React.useLayoutEffect(() => {+ setIsRightPanelShown(true);+ setHasRightPanelToggled(true);+ const st = useConversationStore.getState();+ if (!st.selectedTab) {+ setSelectedTab("files");+ }+ return () => {+ setIsRightPanelShown(false);+ setHasRightPanelToggled(false);+ };+ }, [setIsRightPanelShown, setHasRightPanelToggled, setSelectedTab]);++ const handleBack = () => {+ onNavigateBack();+ };++ return (+ <div className="flex h-full min-h-0 flex-col bg-[var(--oh-surface)]">+ <div+ data-testid="conversation-mobile-panel-top"+ className="flex h-10 min-h-10 shrink-0 items-center gap-1.5 border-b border-[var(--oh-border)] pl-2.5"+ >+ <button+ type="button"+ data-testid="conversation-mobile-panel-back"+ onClick={handleBack}+ aria-label={t(I18nKey.COMMON$BACK)}+ className={mobileTopBarIconButtonClassName}+ >+ <ChevronLeft+ size={20}+ className={mobileTopBarIconClassName}+ aria-hidden+ strokeWidth={2}+ />+ </button>+ <div className="flex min-h-0 min-w-0 flex-1 items-center self-stretch">+ <div+ data-testid="tabs-pane-header"+ className="flex h-full min-h-0 w-full min-w-0 flex-col justify-center"+ >+ <ConversationTabs variant="compact" />+ </div></div></div>+ <div className="flex min-h-0 flex-1 flex-col bg-[var(--oh-surface)]">+ <ConversationTabContent />+ </div></div>);}diff --git a/src/components/features/conversation/conversation-name-context-menu-icon-text.tsx b/src/components/features/conversation/conversation-name-context-menu-icon-text.tsxindex 66e7283d1e..7955c0132a 100644--- a/src/components/features/conversation/conversation-name-context-menu-icon-text.tsx+++ b/src/components/features/conversation/conversation-name-context-menu-icon-text.tsx@@ -12,14 +12,14 @@ export function ConversationNameContextMenuIconText({className,}: ConversationNameContextMenuIconTextProps) {return (- <div- className={cn(- "flex items-center gap-2 p-2 hover:bg-[var(--oh-interactive-hover)] rounded",- className,- )}- >- {icon}- {text}+ <div className={cn("flex min-w-0 w-full items-center gap-2", className)}>+ <span+ className="flex shrink-0 items-center text-[var(--oh-muted)] transition-colors group-hover:text-[var(--oh-foreground)] group-focus-visible:text-[var(--oh-foreground)] [&_svg]:text-current"+ aria-hidden+ >+ {icon}+ </span>+ <span className="min-w-0 flex-1 truncate">{text}</span></div>);}diff --git a/src/components/features/conversation/conversation-name-context-menu.tsx b/src/components/features/conversation/conversation-name-context-menu.tsxindex 229e1c3602..769d716941 100644--- a/src/components/features/conversation/conversation-name-context-menu.tsx+++ b/src/components/features/conversation/conversation-name-context-menu.tsx@@ -21,12 +21,6 @@ import DeleteIcon from "#/icons/u-delete.svg?react";import LinkIcon from "#/icons/link-external.svg?react";import CopyIcon from "#/icons/copy.svg?react";import { ConversationNameContextMenuIconText } from "./conversation-name-context-menu-icon-text";-import { CONTEXT_MENU_ICON_TEXT_CLASSNAME } from "#/utils/constants";--const contextMenuListItemClassName = cn(- "cursor-pointer p-0 h-auto hover:bg-transparent",- CONTEXT_MENU_ICON_TEXT_CLASSNAME,-);interface ConversationNameContextMenuProps {onClose: () => void;@@ -139,45 +133,30 @@ export function ConversationNameContextMenu({)}>{onRename && (- <ContextMenuListItem- testId="rename-button"- onClick={onRename}- className={contextMenuListItemClassName}- >+ <ContextMenuListItem testId="rename-button" onClick={onRename}><ConversationNameContextMenuIconTexticon={<EditIcon width={16} height={16} />}text={t(I18nKey.BUTTON$RENAME)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>)}- {hasTools && <Divider testId="separator-tools" />}+ {hasTools && <Divider testId="separator-tools" inset="menu" />}{onShowSkills && (- <ContextMenuListItem- testId="show-skills-button"- onClick={onShowSkills}- className={contextMenuListItemClassName}- >+ <ContextMenuListItem testId="show-skills-button" onClick={onShowSkills}><ConversationNameContextMenuIconTexticon={<RobotIcon width={16} height={16} />}text={t(I18nKey.CONVERSATION$SHOW_SKILLS)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>)}{onShowHooks && (- <ContextMenuListItem- testId="show-hooks-button"- onClick={onShowHooks}- className={contextMenuListItemClassName}- >+ <ContextMenuListItem testId="show-hooks-button" onClick={onShowHooks}><ConversationNameContextMenuIconTexticon={<ToolsIcon width={16} height={16} />}text={t(I18nKey.CONVERSATION$SHOW_HOOKS)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>)}@@ -186,12 +165,10 @@ export function ConversationNameContextMenu({<ContextMenuListItemtestId="show-agent-tools-button"onClick={onShowAgentTools}- className={contextMenuListItemClassName}><ConversationNameContextMenuIconTexticon={<ToolsIcon width={16} height={16} />}text={t(I18nKey.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>)}@@ -200,34 +177,32 @@ export function ConversationNameContextMenu({<ContextMenuListItemtestId="download-trajectory-button"onClick={onDownloadConversation}- className={contextMenuListItemClassName}><ConversationNameContextMenuIconTexticon={<DownloadIcon width={16} height={16} />}text={t(I18nKey.BUTTON$EXPORT_CONVERSATION)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>)}- {(hasInfo || hasControl) && <Divider testId="separator-info-control" />}+ {(hasInfo || hasControl) && (+ <Divider testId="separator-info-control" inset="menu" />+ )}{onDisplayCost && (<ContextMenuListItemtestId="display-cost-button"onClick={onDisplayCost}- className={contextMenuListItemClassName}><ConversationNameContextMenuIconTexticon={<CreditCardIcon width={16} height={16} />}text={t(I18nKey.BUTTON$DISPLAY_COST)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>)}{shouldShowPublicSharing && onTogglePublic && (- <li className="flex items-center gap-2 justify-between w-full px-4 h-10 hover:bg-white/10">+ <li className="flex w-full items-center justify-between gap-2 px-2 py-2 hover:bg-[var(--oh-interactive-hover)]"><buttontype="button"data-testid="share-publicly-button"@@ -270,29 +245,19 @@ export function ConversationNameContextMenu({)}{onStop && (- <ContextMenuListItem- testId="stop-button"- onClick={onStop}- className={contextMenuListItemClassName}- >+ <ContextMenuListItem testId="stop-button" onClick={onStop}><ConversationNameContextMenuIconTexticon={<CloseIcon width={16} height={16} />}text={t(stopLabelKey)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>)}{onDelete && (- <ContextMenuListItem- testId="delete-button"- onClick={onDelete}- className={contextMenuListItemClassName}- >+ <ContextMenuListItem testId="delete-button" onClick={onDelete}><ConversationNameContextMenuIconTexticon={<DeleteIcon width={16} height={16} />}text={t(I18nKey.COMMON$DELETE_CONVERSATION)}- className={CONTEXT_MENU_ICON_TEXT_CLASSNAME}/></ContextMenuListItem>)}diff --git a/src/components/features/conversation/conversation-tabs/conversation-tabs.tsx b/src/components/features/conversation/conversation-tabs/conversation-tabs.tsxindex 8670193867..bafc37b11c 100644--- a/src/components/features/conversation/conversation-tabs/conversation-tabs.tsx+++ b/src/components/features/conversation/conversation-tabs/conversation-tabs.tsx@@ -23,8 +23,13 @@ import { useHandleBuildPlanClick } from "#/hooks/use-handle-build-plan-click";import { useAgentState } from "#/hooks/use-agent-state";import { AgentState } from "#/types/agent-state";import { Typography } from "#/ui/typography";+import { mobileTopBarIconClassName } from "#/utils/mobile-top-bar-icon-button-classes";-export function ConversationTabs() {+export function ConversationTabs({+ variant = "default",+}: {+ variant?: "default" | "compact";+}) {const { conversationId } = useConversationId();const { setSelectedTab, planContent } = useConversationStore();@@ -227,7 +232,14 @@ export function ConversationTabs() {return (<>- <div className="relative min-h-10 w-full min-w-0 p-1">+ <div+ className={cn(+ "relative w-full min-w-0",+ variant === "compact"+ ? "flex h-full min-h-0 items-center py-0 pl-0 pr-1"+ : "min-h-10 p-1",+ )}+ ><divref={measureRowRef}aria-hidden@@ -266,7 +278,7 @@ export function ConversationTabs() {</div><divref={tabsRowInnerRef}- className="flex w-full min-w-0 flex-nowrap justify-start"+ className="flex w-full min-w-0 flex-nowrap items-center justify-start"><div className="flex w-fit max-w-full min-w-0 flex-nowrap items-center gap-1.5"><div className="flex min-w-0 flex-1 flex-nowrap items-center gap-1.5 overflow-x-hidden">@@ -307,6 +319,9 @@ export function ConversationTabs() {<EllipsisButtononClick={() => setIsMenuOpen(!isMenuOpen)}ariaLabel={t(I18nKey.COMMON$MORE_OPTIONS)}+ iconClassName={+ variant === "compact" ? mobileTopBarIconClassName : undefined+ }/><ConversationTabsContextMenuisOpen={isMenuOpen}diff --git a/src/components/features/conversation/right-panel-toggle.tsx b/src/components/features/conversation/right-panel-toggle.tsxindex 985060dace..5a31a11a87 100644--- a/src/components/features/conversation/right-panel-toggle.tsx+++ b/src/components/features/conversation/right-panel-toggle.tsx@@ -1,9 +1,13 @@+import { useNavigate } from "react-router";import { useTranslation } from "react-i18next";import { useConversationStore } from "#/stores/conversation-store";import { I18nKey } from "#/i18n/declaration";import { cn } from "#/utils/utils";+import { mobileTopBarIconButtonClassName } from "#/utils/mobile-top-bar-icon-button-classes";import BlockDrawerLeftIcon from "#/icons/block-drawer-left.svg?react";import { ChatActionTooltip } from "../chat/chat-action-tooltip";+import { useBreakpoint } from "#/hooks/use-breakpoint";+import { useConversationId } from "#/hooks/use-conversation-id";interface RightPanelToggleProps {className?: string;@@ -19,10 +23,29 @@ interface RightPanelToggleProps {*/export function RightPanelToggle({ className }: RightPanelToggleProps) {const { t } = useTranslation("openhands");- const { isRightPanelShown, setHasRightPanelToggled, setSelectedTab } =- useConversationStore();+ const isMobile = useBreakpoint();+ const navigate = useNavigate();+ const { conversationId } = useConversationId();+ const {+ isRightPanelShown,+ setHasRightPanelToggled,+ setIsRightPanelShown,+ setSelectedTab,+ } = useConversationStore();const handleToggle = () => {+ if (isMobile) {+ if (!conversationId) return;+ setHasRightPanelToggled(true);+ setIsRightPanelShown(true);+ const { selectedTab } = useConversationStore.getState();+ if (!selectedTab) {+ setSelectedTab("files");+ }+ navigate(`/conversations/${conversationId}/panel`);+ return;+ }+const newState = !isRightPanelShown;setHasRightPanelToggled(newState);@@ -34,24 +57,25 @@ export function RightPanelToggle({ className }: RightPanelToggleProps) {}};- const tooltipText = isRightPanelShown- ? t(I18nKey.COMMON$HIDE_PANEL)- : t(I18nKey.COMMON$SHOW_PANEL);+ const tooltipText = isMobile+ ? t(I18nKey.COMMON$SHOW_PANEL)+ : isRightPanelShown+ ? t(I18nKey.COMMON$HIDE_PANEL)+ : t(I18nKey.COMMON$SHOW_PANEL);++ const ariaPressed = isMobile ? false : isRightPanelShown;return (<ChatActionTooltip tooltip={tooltipText} ariaLabel={tooltipText}><buttontype="button"onClick={handleToggle}- className={cn(- "p-1 rounded-md cursor-pointer transition-colors text-[var(--oh-muted)] hover:bg-white/10 hover:text-white",- className,- )}+ className={cn(mobileTopBarIconButtonClassName, className)}aria-label={tooltipText}- aria-pressed={isRightPanelShown}+ aria-pressed={ariaPressed}data-testid="right-panel-toggle">- <BlockDrawerLeftIcon className="w-5 h-5" />+ <BlockDrawerLeftIcon className="w-5 h-5 -scale-x-100" /></button></ChatActionTooltip>);diff --git a/src/components/features/home/home-chat-launcher.tsx b/src/components/features/home/home-chat-launcher.tsxindex 9b4f569adf..54eba7d8b7 100644--- a/src/components/features/home/home-chat-launcher.tsx+++ b/src/components/features/home/home-chat-launcher.tsx@@ -94,9 +94,9 @@ export function HomeChatLauncher() {return (<divdata-testid="home-chat-launcher"- className="w-full max-w-[800px] flex flex-col gap-4 pl-0 md:pl-4 pr-0 md:pr-4"+ className="flex w-full max-w-[800px] flex-col gap-4 md:px-4">- <div className="flex justify-center">+ <div className="flex w-full justify-center"><HomeHeaderTitle /></div>diff --git a/src/components/features/home/home-header/home-header-title.tsx b/src/components/features/home/home-header/home-header-title.tsxindex c5240d72b7..8cc478da47 100644--- a/src/components/features/home/home-header/home-header-title.tsx+++ b/src/components/features/home/home-header/home-header-title.tsx@@ -5,8 +5,10 @@ export function HomeHeaderTitle() {const { t } = useTranslation("openhands");return (- <div className="h-[80px] flex items-center">- <Typography.H1>{t("HOME$LETS_START_BUILDING")}</Typography.H1>+ <div className="flex min-h-[80px] w-full items-center justify-center py-2">+ <Typography.H1 className="w-full text-center font-semibold leading-normal">+ {t("HOME$LETS_START_BUILDING")}+ </Typography.H1></div>);}diff --git a/src/components/features/settings/settings-layout.tsx b/src/components/features/settings/settings-layout.tsxindex 6aaf216b30..395d353cb4 100644--- a/src/components/features/settings/settings-layout.tsx+++ b/src/components/features/settings/settings-layout.tsx@@ -1,10 +1,6 @@-import { useState } from "react";-import { MobileHeader } from "./mobile-header";-import {- SettingsDesktopSidebar,- SettingsMobileDrawer,-} from "./settings-navigation";+import { SettingsDesktopSidebar } from "./settings-navigation";import { SettingsNavRenderedItem } from "#/hooks/use-settings-nav-items";+import { settingsLayoutMainScrollClassName } from "#/utils/settings-like-page-layout-classes";interface SettingsLayoutProps {children: React.ReactNode;@@ -20,28 +16,14 @@ export function SettingsLayout({children,navigationItems,}: SettingsLayoutProps) {- const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);-- const toggleMobileMenu = () => setIsMobileMenuOpen(!isMobileMenuOpen);- const closeMobileMenu = () => setIsMobileMenuOpen(false);-return (- <div className="flex h-full flex-col px-[14px] md:px-0 md:pt-8">- <MobileHeader- isMobileMenuOpen={isMobileMenuOpen}- onToggleMenu={toggleMobileMenu}- />+ <div className="flex h-full flex-col md:pt-8"><div className="flex min-h-0 flex-1 gap-10 md:items-start"><SettingsDesktopSidebar navigationItems={navigationItems} />- <main className="flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto custom-scrollbar-always md:pr-[14px] md:pb-12">+ <main className={settingsLayoutMainScrollClassName}><div className="mx-auto w-full min-w-0 max-w-[800px]">{children}</div></main></div>- <SettingsMobileDrawer- isMobileMenuOpen={isMobileMenuOpen}- onCloseMobileMenu={closeMobileMenu}- navigationItems={navigationItems}- /></div>);}diff --git a/src/components/features/settings/settings-mobile-hub.tsx b/src/components/features/settings/settings-mobile-hub.tsxnew file mode 100644index 0000000000..9aca31b9f4--- /dev/null+++ b/src/components/features/settings/settings-mobile-hub.tsx@@ -0,0 +1,43 @@+import { useTranslation } from "react-i18next";+import { Typography } from "#/ui/typography";+import { I18nKey } from "#/i18n/declaration";+import { SettingsNavRenderedItem } from "#/hooks/use-settings-nav-items";+import { SidebarNavLink } from "#/components/features/sidebar/sidebar-nav-link";+import { BackendSyncedSettingsBadge } from "#/components/features/settings/backend-synced-settings-badge";++interface SettingsMobileHubProps {+ navigationItems: SettingsNavRenderedItem[];+}++export function SettingsMobileHub({ navigationItems }: SettingsMobileHubProps) {+ const { t } = useTranslation("openhands");++ const navItems = navigationItems.filter(+ (item): item is Extract<SettingsNavRenderedItem, { type: "item" }> =>+ item.type === "item",+ );++ return (+ <div+ data-testid="settings-mobile-hub"+ className="flex flex-col gap-4 px-4 py-2 md:hidden"+ >+ <Typography.H2>{t(I18nKey.SETTINGS$TITLE)}</Typography.H2>+ <nav className="flex flex-col gap-0.5">+ {navItems.map((renderedItem) => (+ <SidebarNavLink+ key={renderedItem.item.to}+ to={renderedItem.item.to}+ label={t(renderedItem.item.text as I18nKey)}+ end+ testId={`sidebar-settings-${renderedItem.item.to}`}+ icon={renderedItem.item.icon}+ />+ ))}+ </nav>+ <div className="pt-1">+ <BackendSyncedSettingsBadge />+ </div>+ </div>+ );+}diff --git a/src/components/features/sidebar/sidebar-collapsed-icon-slot.tsx b/src/components/features/sidebar/sidebar-collapsed-icon-slot.tsxnew file mode 100644index 0000000000..d8c8cf0178--- /dev/null+++ b/src/components/features/sidebar/sidebar-collapsed-icon-slot.tsx@@ -0,0 +1,29 @@+import React from "react";+import { cn } from "#/utils/utils";+import {+ SIDEBAR_COLLAPSED_ICON_SLOT_CLASS,+ sidebarCollapsedIconBgClassName,+ sidebarCollapsedIconGlyphClassName,+} from "./sidebar-layout";++interface SidebarCollapsedIconSlotProps {+ active: boolean;+ className?: string;+ children: React.ReactNode;+}++/** Collapsed rail: 40×40 hover/active square aligned with the expanded icon column. */+export function SidebarCollapsedIconSlot({+ active,+ className,+ children,+}: SidebarCollapsedIconSlotProps) {+ return (+ <span className={cn(SIDEBAR_COLLAPSED_ICON_SLOT_CLASS, className)}>+ <span aria-hidden className={sidebarCollapsedIconBgClassName(active)} />+ <span className={sidebarCollapsedIconGlyphClassName(active)}>+ {children}+ </span>+ </span>+ );+}diff --git a/src/components/features/sidebar/sidebar-conversation-list.tsx b/src/components/features/sidebar/sidebar-conversation-list.tsxindex f3a37df2c7..2bc91f4729 100644--- a/src/components/features/sidebar/sidebar-conversation-list.tsx+++ b/src/components/features/sidebar/sidebar-conversation-list.tsx@@ -8,8 +8,8 @@ import { useSidebarCollapsed } from "./sidebar-collapse-context";* In the collapsed sidebar variant the list reduces each row to a status* indicator + hover-preview.*- * Stays within the aside's horizontal padding so row hovers (group headers,- * conversation cards) align with {@link SidebarNavLink} items above.+ * On desktop the aside uses `pr-0` so this list is full width to the rail;+ * nav links above keep their own horizontal padding.*/export function SidebarConversationList() {const collapsed = useSidebarCollapsed();@@ -19,10 +19,11 @@ export function SidebarConversationList() {}return (- <div className="hidden md:flex md:flex-col md:flex-1 md:min-h-0">- {/* Avoid overflow-hidden here: ConversationPanel's header uses `-mx-2` to- full-bleed the scroll divider to the aside edges; clipping would inset- the border. Scrolling stays contained on the panel's inner list. */}+ <div className="flex flex-col flex-1 min-h-0">+ {/* Avoid overflow-hidden here: ConversationPanel's header uses `-ml-2.5` ++ `w-[calc(100%+0.625rem)]` to full-bleed the divider with `md:pr-0` on+ the aside; clipping would inset the border. Scroll stays on the inner+ list. */}<div className="flex min-h-0 w-full flex-1 flex-col"><ConversationPanel /></div>diff --git a/src/components/features/sidebar/sidebar-layout.ts b/src/components/features/sidebar/sidebar-layout.tsnew file mode 100644index 0000000000..f4aebd2011--- /dev/null+++ b/src/components/features/sidebar/sidebar-layout.ts@@ -0,0 +1,90 @@+import { cn } from "#/utils/utils";++/** Expanded sidebar icon column beside labels. */+export const SIDEBAR_ICON_SLOT_CLASS =+ "flex h-10 w-[18px] shrink-0 items-center justify-center";++/** Collapsed rail: 40×40 control; aside `md:px-2.5` is the only horizontal inset. */+export const SIDEBAR_COLLAPSED_ICON_SLOT_CLASS = "relative size-10 shrink-0";++export const SIDEBAR_HEADER_ROW_CLASS =+ "flex h-10 min-h-10 shrink-0 items-center gap-2 pl-2.5 pr-2.5 w-full";++export function sidebarHeaderRowClassName(collapsed: boolean): string {+ return cn(+ "flex h-10 min-h-10 shrink-0 items-center w-full",+ collapsed ? "px-0" : "gap-2 pl-2.5 pr-2.5",+ );+}++export const SIDEBAR_ROW_INTERACTIVE_CLASS = {+ active: "bg-tertiary text-white font-medium",+ idle: "text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]",+} as const;++export function sidebarNavListClassName(collapsed: boolean): string {+ return cn(+ "flex flex-col gap-0.5 w-full shrink-0 items-stretch",+ !collapsed && "pr-2.5",+ );+}++export function sidebarNavRowClassName(options?: {+ indent?: boolean;+ collapsed?: boolean;+}): string {+ const { indent = false, collapsed = false } = options ?? {};+ return cn(+ "flex h-10 min-h-10 min-w-0 items-center rounded-md transition-colors",+ "text-sm leading-5 w-full",+ collapsed+ ? "group gap-0 px-0 overflow-visible bg-transparent hover:bg-transparent"+ : "gap-2 px-2.5 overflow-hidden",+ indent && !collapsed && "pl-7",+ );+}++export function sidebarCollapsedIconBgClassName(active: boolean): string {+ return cn(+ "pointer-events-none absolute inset-0 z-0 rounded-md transition-colors",+ active+ ? "bg-tertiary"+ : "bg-transparent group-hover:bg-[var(--oh-surface-raised)]",+ );+}++/** Matches expanded row `px-2.5` + 18px icon column alignment. */+export function sidebarCollapsedIconGlyphClassName(active: boolean): string {+ return cn(+ // Full width inside the 40×40 slot; `pl-2.5` aligns with expanded `px-2.5` rows.+ // Do not set a narrow `w-[18px]` here — with horizontal padding it shrinks the glyph.+ "relative z-[1] flex h-full w-full items-center justify-start pl-2.5 [&_svg]:shrink-0",+ active+ ? "text-white font-medium"+ : "text-[var(--oh-muted)] group-hover:text-white",+ );+}++export function sidebarNavLabelClassName(collapsed: boolean): string {+ if (collapsed) {+ return "sr-only";+ }+ return "min-w-0 truncate";+}++export const SIDEBAR_ICON_BUTTON_CLASS = cn(+ "inline-flex size-8 shrink-0 items-center justify-center rounded-md",+ "transition-colors cursor-pointer",+);++/** Logo + expand overlay when the desktop rail is collapsed. */+export const SIDEBAR_COLLAPSED_LOGO_WRAPPER_CLASS = cn(+ "relative hidden md:block shrink-0 overflow-visible",+ SIDEBAR_COLLAPSED_ICON_SLOT_CLASS,+);++export const SIDEBAR_COLLAPSE_TOGGLE_OVERLAY_CLASS = cn(+ "absolute left-1/2 top-1/2 hidden size-8 -translate-x-1/2 -translate-y-1/2 md:inline-flex",+ "items-center justify-center rounded-md transition-[opacity,colors] cursor-pointer",+ "text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]",+);diff --git a/src/components/features/sidebar/sidebar-mobile-menu-bar.tsx b/src/components/features/sidebar/sidebar-mobile-menu-bar.tsxnew file mode 100644index 0000000000..5df48b6d66--- /dev/null+++ b/src/components/features/sidebar/sidebar-mobile-menu-bar.tsx@@ -0,0 +1,41 @@+import { ChevronLeft } from "lucide-react";+import { useTranslation } from "react-i18next";+import { I18nKey } from "#/i18n/declaration";+import {+ mobileTopBarIconButtonClassName,+ mobileTopBarIconClassName,+} from "#/utils/mobile-top-bar-icon-button-classes";+import { useNavigation } from "#/context/navigation-context";+import { getMobileTopBarState } from "#/utils/mobile-section-nav";+import { SidebarMobileMenuToggle } from "./sidebar-mobile-menu-toggle";++export function SidebarMobileMenuBar() {+ const { t } = useTranslation("openhands");+ const { currentPath, navigate } = useNavigation();+ const topBar = getMobileTopBarState(currentPath);++ return (+ <header+ className="flex md:hidden h-12 shrink-0 items-center gap-2 px-2.5"+ aria-label={t(I18nKey.SIDEBAR$NAVIGATION_LABEL)}+ >+ <SidebarMobileMenuToggle />+ {topBar.mode === "back" && topBar.backTo ? (+ <button+ type="button"+ data-testid="sidebar-mobile-back-button"+ onClick={() => navigate(topBar.backTo!)}+ aria-label={t(topBar.backLabelKey ?? I18nKey.COMMON$BACK)}+ className={mobileTopBarIconButtonClassName}+ >+ <ChevronLeft+ size={20}+ className={mobileTopBarIconClassName}+ aria-hidden+ strokeWidth={2}+ />+ </button>+ ) : null}+ </header>+ );+}diff --git a/src/components/features/sidebar/sidebar-mobile-menu-toggle.tsx b/src/components/features/sidebar/sidebar-mobile-menu-toggle.tsxnew file mode 100644index 0000000000..a2d7026144--- /dev/null+++ b/src/components/features/sidebar/sidebar-mobile-menu-toggle.tsx@@ -0,0 +1,28 @@+import { useTranslation } from "react-i18next";+import { I18nKey } from "#/i18n/declaration";+import BlockDrawerLeftIcon from "#/icons/block-drawer-left.svg?react";+import {+ mobileTopBarIconButtonClassName,+ mobileTopBarIconClassName,+} from "#/utils/mobile-top-bar-icon-button-classes";+import { useSidebarMobileNav } from "./sidebar-mobile-nav-context";++export function SidebarMobileMenuToggle() {+ const { t } = useTranslation("openhands");+ const { isOpen, toggle } = useSidebarMobileNav();++ return (+ <button+ type="button"+ data-testid="sidebar-mobile-menu-toggle"+ onClick={toggle}+ aria-expanded={isOpen}+ aria-label={+ isOpen ? t(I18nKey.SIDEBAR$CLOSE_MENU) : t(I18nKey.SIDEBAR$OPEN_MENU)+ }+ className={mobileTopBarIconButtonClassName}+ >+ <BlockDrawerLeftIcon className={mobileTopBarIconClassName} aria-hidden />+ </button>+ );+}diff --git a/src/components/features/sidebar/sidebar-mobile-nav-context.tsx b/src/components/features/sidebar/sidebar-mobile-nav-context.tsxnew file mode 100644index 0000000000..ecd68fe67a--- /dev/null+++ b/src/components/features/sidebar/sidebar-mobile-nav-context.tsx@@ -0,0 +1,49 @@+import React from "react";++interface SidebarMobileNavContextValue {+ isOpen: boolean;+ open: () => void;+ close: () => void;+ toggle: () => void;+}++const SidebarMobileNavContext =+ React.createContext<SidebarMobileNavContextValue | null>(null);++export function SidebarMobileNavProvider({+ children,+}: {+ children: React.ReactNode;+}) {+ const [isOpen, setIsOpen] = React.useState(false);++ const open = React.useCallback(() => setIsOpen(true), []);+ const close = React.useCallback(() => setIsOpen(false), []);+ const toggle = React.useCallback(() => setIsOpen((prev) => !prev), []);++ const value = React.useMemo(+ () => ({+ isOpen,+ open,+ close,+ toggle,+ }),+ [isOpen, open, close, toggle],+ );++ return (+ <SidebarMobileNavContext.Provider value={value}>+ {children}+ </SidebarMobileNavContext.Provider>+ );+}++export function useSidebarMobileNav(): SidebarMobileNavContextValue {+ const context = React.useContext(SidebarMobileNavContext);+ if (!context) {+ throw new Error(+ "useSidebarMobileNav must be used within SidebarMobileNavProvider",+ );+ }+ return context;+}diff --git a/src/components/features/sidebar/sidebar-nav-link.tsx b/src/components/features/sidebar/sidebar-nav-link.tsxindex acd951c192..8a30282e77 100644--- a/src/components/features/sidebar/sidebar-nav-link.tsx+++ b/src/components/features/sidebar/sidebar-nav-link.tsx@@ -1,7 +1,27 @@import React from "react";import { NavigationLink } from "#/components/shared/navigation-link";import { StyledTooltip } from "#/components/shared/buttons/styled-tooltip";+import { useNavigation } from "#/context/navigation-context";import { cn } from "#/utils/utils";+import { SidebarCollapsedIconSlot } from "./sidebar-collapsed-icon-slot";+import {+ SIDEBAR_ICON_SLOT_CLASS,+ SIDEBAR_ROW_INTERACTIVE_CLASS,+ sidebarNavLabelClassName,+ sidebarNavRowClassName,+} from "./sidebar-layout";++function isPathActive(currentPath: string, to: string, end: boolean) {+ if (to === "/") {+ return currentPath === to;+ }++ if (end) {+ return currentPath === to;+ }++ return currentPath === to || currentPath.startsWith(`${to}/`);+}interface SidebarNavLinkProps {to: string;@@ -11,16 +31,7 @@ interface SidebarNavLinkProps {testId?: string;disabled?: boolean;icon?: React.ReactElement;- /**- * When true, render only the icon (label is shown via a hover tooltip- * floating to the side). Used by the collapsed sidebar.- */collapsed?: boolean;- /**- * Optional rich-content node shown in the hover tooltip instead of the- * plain label. Useful for rendering an "expanded version" of the item- * while the sidebar is collapsed.- */hoverContent?: React.ReactNode;/*** Pre-formatted human-readable reason for the disabled state, shown@@ -39,12 +50,6 @@ interface SidebarNavLinkProps {forceActive?: boolean;}-function getLayoutClasses(collapsed: boolean, indent: boolean): string {- if (collapsed) return "justify-center w-10 h-10 p-0 mx-auto";- if (indent) return "pl-7 pr-2 py-1.5 w-full";- return "px-2 py-2 w-full";-}-export function SidebarNavLink({to,label,@@ -58,6 +63,9 @@ export function SidebarNavLink({disabledReason,forceActive = false,}: SidebarNavLinkProps) {+ const { currentPath } = useNavigation();+ const active = forceActive || isPathActive(currentPath, to, end);+const link = (<NavigationLinkto={to}@@ -75,24 +83,25 @@ export function SidebarNavLink({e.preventDefault();}}}- className={({ isActive }) =>- cn(- "flex items-center gap-2 rounded-md transition-colors",- "text-sm leading-5 truncate",- getLayoutClasses(collapsed, indent),- isActive || forceActive- ? "bg-tertiary text-white font-medium"- : "text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]",- disabled && "pointer-events-none opacity-50",- )- }+ className={cn(+ sidebarNavRowClassName({ indent, collapsed }),+ !collapsed &&+ (active+ ? SIDEBAR_ROW_INTERACTIVE_CLASS.active+ : SIDEBAR_ROW_INTERACTIVE_CLASS.idle),+ disabled && "pointer-events-none opacity-50",+ )}>{icon ? (- <span className="shrink-0 flex items-center justify-center">- {icon}- </span>+ collapsed ? (+ <SidebarCollapsedIconSlot active={active}>+ {icon}+ </SidebarCollapsedIconSlot>+ ) : (+ <span className={SIDEBAR_ICON_SLOT_CLASS}>{icon}</span>+ )) : null}- {!collapsed && <span className="truncate">{label}</span>}+ <span className={sidebarNavLabelClassName(collapsed)}>{label}</span></NavigationLink>);diff --git a/src/components/features/sidebar/sidebar-rail-body.tsx b/src/components/features/sidebar/sidebar-rail-body.tsxnew file mode 100644index 0000000000..dea08ee8ab--- /dev/null+++ b/src/components/features/sidebar/sidebar-rail-body.tsx@@ -0,0 +1,321 @@+import React from "react";+import { useTranslation } from "react-i18next";+import {+ ChevronLeft,+ ChevronRight,+ Plus,+ Server,+ Settings,+} from "lucide-react";+import { OpenHandsLogoButton } from "#/components/shared/buttons/openhands-logo-button";+import { SidebarCollapsedIconSlot } from "./sidebar-collapsed-icon-slot";+import { SidebarNavLink } from "./sidebar-nav-link";+import { I18nKey } from "#/i18n/declaration";+import { cn } from "#/utils/utils";+import { StyledTooltip } from "#/components/shared/buttons/styled-tooltip";+import { BackendSelector } from "#/components/features/backends/backend-selector";+import { BackendStatusDot } from "#/components/features/backends/backend-status-dot";+import { SidebarConversationList } from "./sidebar-conversation-list";+import AutomationsIcon from "#/icons/automations.svg?react";+import {+ SIDEBAR_COLLAPSE_TOGGLE_OVERLAY_CLASS,+ SIDEBAR_COLLAPSED_LOGO_WRAPPER_CLASS,+ SIDEBAR_ICON_BUTTON_CLASS,+ SIDEBAR_ICON_SLOT_CLASS,+ sidebarHeaderRowClassName,+ sidebarNavLabelClassName,+ sidebarNavListClassName,+ sidebarNavRowClassName,+} from "./sidebar-layout";++const ICON_SIZE = 18;+const SIDEBAR_LOGO_WIDTH = 34;+const SIDEBAR_LOGO_HEIGHT = Math.round((SIDEBAR_LOGO_WIDTH * 30) / 46);++export interface SidebarRailBodyProps {+ collapsed: boolean;+ showCollapseToggle: boolean;+ showMobileCloseButton?: boolean;+ onCloseMobile?: () => void;+ linkDisabled: boolean;+ collapseToggleLabel: string;+ onCollapse: () => void;+ onExpand: () => void;+ showCollapsedExpandButton: boolean;+ isExtensionsActive: boolean;+ currentPath: string;+ navigate: (path: string) => void;+ activeBackendHealth: { isConnected: boolean | null } | undefined;+ collapsedBackendPopoverOpen: boolean;+ setCollapsedBackendPopoverOpen: (open: boolean) => void;+ collapsedBackendPopoverRef: React.RefObject<HTMLDivElement | null>;+ collapsedBackendCloseTimer: React.MutableRefObject<ReturnType<+ typeof setTimeout+ > | null>;+ onOpenAddBackend: () => void;+ onOpenManageBackends: () => void;+}++export function SidebarRailBody({+ collapsed,+ showCollapseToggle,+ showMobileCloseButton = false,+ onCloseMobile,+ linkDisabled,+ collapseToggleLabel,+ onCollapse,+ onExpand,+ showCollapsedExpandButton,+ isExtensionsActive,+ currentPath,+ navigate,+ activeBackendHealth,+ collapsedBackendPopoverOpen,+ setCollapsedBackendPopoverOpen,+ collapsedBackendPopoverRef,+ collapsedBackendCloseTimer,+ onOpenAddBackend,+ onOpenManageBackends,+}: SidebarRailBodyProps) {+ const { t } = useTranslation("openhands");+ const backendCloseTimerRef = collapsedBackendCloseTimer;++ return (+ <div className="flex min-h-0 flex-1 flex-col">+ <div className={sidebarHeaderRowClassName(collapsed)}>+ {collapsed && showCollapseToggle ? (+ <div className={SIDEBAR_COLLAPSED_LOGO_WRAPPER_CLASS}>+ <div+ className={cn(+ "flex h-full w-full items-center justify-start pl-2.5 transition-opacity duration-150",+ showCollapsedExpandButton && "opacity-0",+ )}+ >+ <OpenHandsLogoButton+ logoWidth={SIDEBAR_LOGO_WIDTH}+ logoHeight={SIDEBAR_LOGO_HEIGHT}+ logoClassName="max-w-none"+ className={cn(SIDEBAR_ICON_SLOT_CLASS, "overflow-visible")}+ />+ </div>+ <button+ type="button"+ data-testid="sidebar-collapse-toggle"+ aria-pressed={collapsed}+ aria-label={collapseToggleLabel}+ onClick={onExpand}+ className={cn(+ SIDEBAR_COLLAPSE_TOGGLE_OVERLAY_CLASS,+ showCollapsedExpandButton+ ? "opacity-100 pointer-events-auto"+ : "opacity-0 pointer-events-none",+ )}+ >+ <ChevronRight width={16} height={16} />+ </button>+ </div>+ ) : (+ <>+ <OpenHandsLogoButton+ logoWidth={SIDEBAR_LOGO_WIDTH}+ logoHeight={SIDEBAR_LOGO_HEIGHT}+ logoClassName="max-w-none"+ className={cn(SIDEBAR_ICON_SLOT_CLASS, "overflow-visible")}+ />+ {showCollapseToggle ? (+ <button+ type="button"+ data-testid="sidebar-collapse-toggle"+ aria-pressed={collapsed}+ aria-label={collapseToggleLabel}+ onClick={onCollapse}+ className={cn(+ "hidden md:inline-flex ml-auto",+ SIDEBAR_ICON_BUTTON_CLASS,+ "text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]",+ )}+ >+ <ChevronLeft width={16} height={16} />+ </button>+ ) : null}+ {showMobileCloseButton ? (+ <button+ type="button"+ data-testid="sidebar-mobile-drawer-close"+ onClick={onCloseMobile}+ aria-label={t(I18nKey.SIDEBAR$CLOSE_MENU)}+ className={cn(+ "inline-flex ml-auto",+ SIDEBAR_ICON_BUTTON_CLASS,+ "text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]",+ )}+ >+ <ChevronLeft width={16} height={16} />+ </button>+ ) : null}+ </>+ )}+ </div>++ <nav className={sidebarNavListClassName(collapsed)}>+ <SidebarNavLink+ to="/conversations"+ end+ label="New Chat"+ testId="sidebar-conversations-link"+ disabled={linkDisabled}+ collapsed={collapsed}+ icon={<Plus width={ICON_SIZE} height={ICON_SIZE} />}+ />+ <SidebarNavLink+ to="/customize"+ label="Customize"+ testId="sidebar-skills-link"+ disabled={linkDisabled}+ collapsed={collapsed}+ forceActive={isExtensionsActive}+ icon={+ <svg+ xmlns="http://www.w3.org/2000/svg"+ width={ICON_SIZE}+ height={ICON_SIZE}+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden="true"+ >+ <path d="M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z" />+ <path d="m7 16.5-4.74-2.85" />+ <path d="m7 16.5 5-3" />+ <path d="M7 16.5v5.17" />+ <path d="M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z" />+ <path d="m17 16.5-5-3" />+ <path d="m17 16.5 4.74-2.85" />+ <path d="m17 16.5v5.17" />+ <path d="M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z" />+ <path d="M12 8 7.26 5.15" />+ <path d="m12 8 4.74-2.85" />+ <path d="M12 13.5V8" />+ </svg>+ }+ />+ <SidebarNavLink+ to="/automations"+ label={t(I18nKey.SIDEBAR$AUTOMATIONS)}+ testId="sidebar-automations-link"+ disabled={linkDisabled}+ collapsed={collapsed}+ icon={<AutomationsIcon width={ICON_SIZE} height={ICON_SIZE} />}+ />+ </nav>++ <SidebarConversationList />++ {collapsed && showCollapseToggle ? (+ <nav+ className={cn(+ sidebarNavListClassName(collapsed),+ "mt-auto pb-2 cursor-pointer",+ )}+ >+ <StyledTooltip+ content={t(I18nKey.SIDEBAR$SETTINGS)}+ placement="right"+ >+ <button+ type="button"+ data-testid="collapsed-settings-link"+ aria-label={t(I18nKey.SIDEBAR$SETTINGS)}+ onClick={() => navigate("/settings")}+ className={sidebarNavRowClassName({ collapsed: true })}+ >+ <SidebarCollapsedIconSlot+ active={currentPath.startsWith("/settings")}+ >+ <Settings width={ICON_SIZE} height={ICON_SIZE} />+ </SidebarCollapsedIconSlot>+ <span className={sidebarNavLabelClassName(true)}>+ {t(I18nKey.SIDEBAR$SETTINGS)}+ </span>+ </button>+ </StyledTooltip>+ <div+ className="relative"+ ref={collapsedBackendPopoverRef}+ onMouseEnter={() => {+ if (backendCloseTimerRef.current) {+ clearTimeout(backendCloseTimerRef.current);+ backendCloseTimerRef.current = null;+ }+ setCollapsedBackendPopoverOpen(true);+ }}+ onMouseLeave={() => {+ backendCloseTimerRef.current = setTimeout(+ () => setCollapsedBackendPopoverOpen(false),+ 150,+ );+ }}+ >+ <button+ type="button"+ data-testid="collapsed-backend-selector-link"+ aria-label={t(I18nKey.BACKEND$MANAGE)}+ aria-expanded={collapsedBackendPopoverOpen}+ onMouseDown={(event) => {+ event.preventDefault();+ event.stopPropagation();+ }}+ onMouseUp={(event) => event.stopPropagation()}+ className={cn(+ sidebarNavRowClassName({ collapsed: true }),+ "relative",+ )}+ >+ <SidebarCollapsedIconSlot active={collapsedBackendPopoverOpen}>+ <span className="relative inline-flex size-[18px] shrink-0 items-center justify-center">+ <BackendStatusDot+ isConnected={activeBackendHealth?.isConnected ?? null}+ className="absolute -left-0.5 -top-0.5 z-[1] pointer-events-none"+ />+ <Server width={ICON_SIZE} height={ICON_SIZE} />+ </span>+ </SidebarCollapsedIconSlot>+ <span className={sidebarNavLabelClassName(true)}>+ {t(I18nKey.BACKEND$MANAGE)}+ </span>+ </button>+ {collapsedBackendPopoverOpen ? (+ <div+ className="absolute bottom-[-4px] left-full pl-2.5 z-40 w-[272px]"+ onClick={(event) => event.stopPropagation()}+ >+ <BackendSelector+ hideTrigger+ defaultOpen+ openUpward+ onSelectOption={() => setCollapsedBackendPopoverOpen(false)}+ onOpenAddBackend={onOpenAddBackend}+ onOpenManageBackends={onOpenManageBackends}+ />+ </div>+ ) : null}+ </div>+ </nav>+ ) : null}++ {!collapsed ? (+ <div+ className={cn(+ "flex flex-col items-stretch max-w-none box-border shrink-0",+ "-ml-2.5 w-[calc(100%+0.625rem)] border-t border-[var(--oh-border)] pt-2 px-2.5",+ )}+ >+ <BackendSelector openUpward />+ </div>+ ) : null}+ </div>+ );+}diff --git a/src/components/features/sidebar/sidebar.tsx b/src/components/features/sidebar/sidebar.tsxindex 0fe8a658a3..7c1d7db326 100644--- a/src/components/features/sidebar/sidebar.tsx+++ b/src/components/features/sidebar/sidebar.tsx@@ -1,14 +1,6 @@import React from "react";import { useTranslation } from "react-i18next";-import {- ChevronLeft,- ChevronRight,- Plus,- Server,- Settings,-} from "lucide-react";-import { OpenHandsLogoButton } from "#/components/shared/buttons/openhands-logo-button";-import { SidebarNavLink } from "./sidebar-nav-link";+import { SidebarRailBody } from "./sidebar-rail-body";import { getErrorStatus, useSettings } from "#/hooks/query/use-settings";import { useConfig } from "#/hooks/query/use-config";import { displayErrorToast } from "#/utils/custom-toast-handlers";@@ -16,15 +8,11 @@ import { I18nKey } from "#/i18n/declaration";import { useNavigation } from "#/context/navigation-context";import { useActiveBackendContext } from "#/contexts/active-backend-context";import { cn } from "#/utils/utils";-import { BackendSelector } from "#/components/features/backends/backend-selector";-import { BackendStatusDot } from "#/components/features/backends/backend-status-dot";-import { SidebarConversationList } from "./sidebar-conversation-list";import { SidebarCollapseContext } from "./sidebar-collapse-context";+import { useSidebarMobileNav } from "./sidebar-mobile-nav-context";import { useSidebarCollapsedState } from "#/hooks/use-sidebar-collapsed";import { useClickOutsideElement } from "#/hooks/use-click-outside-element";import { useBackendsHealth } from "#/hooks/query/use-backends-health";-import AutomationsIcon from "#/icons/automations.svg?react";-// The LLM settings modal is only mounted when the settings query 404s and// LLM settings aren't hidden — keep it out of the sidebar's eager graph.const SettingsModal = React.lazy(() =>@@ -47,10 +35,7 @@ const ManageBackendsModal = React.lazy(() =>})),);-const ICON_SIZE = 18;-/** ~74% of the stock 46×30 mark; `max-w-none` keeps it from clamping in the icon column. */-const SIDEBAR_LOGO_WIDTH = 34;-const SIDEBAR_LOGO_HEIGHT = Math.round((SIDEBAR_LOGO_WIDTH * 30) / 46);+const MOBILE_DRAWER_TRANSITION_MS = 250;export function Sidebar() {const { t } = useTranslation("openhands");@@ -79,11 +64,50 @@ export function Sidebar() {const [manageBackendsModalOpen, setManageBackendsModalOpen] =React.useState(false);const [collapsedRailHovered, setCollapsedRailHovered] = React.useState(false);+ const { isOpen: isMobileNavOpen, close: closeMobileNav } =+ useSidebarMobileNav();+ const [mobileDrawerMounted, setMobileDrawerMounted] = React.useState(false);+ const [mobileDrawerVisible, setMobileDrawerVisible] = React.useState(false);const collapsedBackendPopoverRef = useClickOutsideElement<HTMLDivElement>(() => setCollapsedBackendPopoverOpen(false),);const settingsErrorStatus = getErrorStatus(settingsError);+ React.useEffect(() => {+ closeMobileNav();+ }, [currentPath, closeMobileNav]);++ React.useEffect(() => {+ if (isMobileNavOpen) {+ setMobileDrawerMounted(true);+ const frame = requestAnimationFrame(() => {+ setMobileDrawerVisible(true);+ });+ return () => cancelAnimationFrame(frame);+ }++ setMobileDrawerVisible(false);+ const timer = window.setTimeout(() => {+ setMobileDrawerMounted(false);+ }, MOBILE_DRAWER_TRANSITION_MS);+ return () => window.clearTimeout(timer);+ }, [isMobileNavOpen]);++ React.useEffect(() => {+ if (!isMobileNavOpen) {+ return undefined;+ }++ const onKeyDown = (event: KeyboardEvent) => {+ if (event.key === "Escape") {+ closeMobileNav();+ }+ };++ window.addEventListener("keydown", onKeyDown);+ return () => window.removeEventListener("keydown", onKeyDown);+ }, [isMobileNavOpen, closeMobileNav]);+React.useEffect(() => {if (currentPath === "/settings") {setSettingsModalIsOpen(false);@@ -144,10 +168,29 @@ export function Sidebar() {const showCollapsedExpandButton = collapsed && collapsedRailHovered;const isExtensionsActive =+ currentPath === "/customize" ||currentPath.startsWith("/skills") ||currentPath === "/plugins" ||currentPath === "/mcp";+ const railBodyProps = {+ linkDisabled,+ collapseToggleLabel,+ onCollapse: () => setCollapsed(true),+ onExpand: () => setCollapsed(false),+ showCollapsedExpandButton,+ isExtensionsActive,+ currentPath,+ navigate,+ activeBackendHealth,+ collapsedBackendPopoverOpen,+ setCollapsedBackendPopoverOpen,+ collapsedBackendPopoverRef,+ collapsedBackendCloseTimer,+ onOpenAddBackend: () => setAddBackendModalOpen(true),+ onOpenManageBackends: () => setManageBackendsModalOpen(true),+ };+return (<SidebarCollapseContext.Provider value={collapsed}>{/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- the aside acts as a hit-area for the collapsed rail; nested controls handle their own keyboard interactions. */}@@ -164,267 +207,59 @@ export function Sidebar() {setCollapsedRailHovered(false);}}className={cn(- "bg-base flex flex-col transition-[width,min-width] duration-200",- "md:border-r md:border-[var(--oh-border)]",- // Mobile: top bar; Desktop: vertical column. Width responds to- // the collapsed state on md+ screens.- "h-[54px] md:h-full",+ "max-md:hidden flex bg-base flex-col min-h-0 transition-[width,min-width] duration-200",+ "md:border-r md:border-[var(--oh-border)] md:h-full",collapsed- ? "md:w-[64px] md:min-w-[64px]"- : "md:w-[300px] md:min-w-[300px]",- collapsed ? "md:px-2" : "px-2 pb-2 md:px-2",- "flex-row md:flex-col",+ ? "md:w-[60px] md:min-w-[60px] md:px-2.5"+ : "md:w-[300px] md:min-w-[300px] pb-2 md:pl-2.5 md:pr-0",currentPath === "/" && "md:pb-3",)}>- <div- className={cn(- "flex items-center gap-2 h-10 min-h-10 shrink-0",- // Collapsed desktop: stacked logo + chevron needs more than 40px.- collapsed && "md:h-auto md:min-h-0 md:py-2",- // Collapsed: stack the chevron beneath the logo so the 64px rail- // doesn't need to grow to fit two controls in a row. Expanded:- // chevron is right-aligned via ml-auto further down.- // `pl-2` matches SidebarNavLink horizontal inset; no right padding so- // the collapse control can sit flush against the rail edge (outer- // sidebar still provides `px-2`).- collapsed ? "md:flex-col md:gap-2 md:px-0" : "pl-2 pr-0",- )}- >- {collapsed ? (- <div className="relative hidden md:block mx-auto">- <div- className={cn(- "transition-opacity duration-150",- showCollapsedExpandButton && "opacity-0",- )}- >- <OpenHandsLogoButton- logoWidth={SIDEBAR_LOGO_WIDTH}- logoHeight={SIDEBAR_LOGO_HEIGHT}- logoClassName="max-w-none"- className="inline-flex h-10 w-10 items-center justify-center overflow-visible"- />- </div>- <button- type="button"- data-testid="sidebar-collapse-toggle"- aria-pressed={collapsed}- aria-label={collapseToggleLabel}- onClick={() => setCollapsed(false)}- className={cn(- "absolute inset-0 hidden md:inline-flex items-center justify-center",- "rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]",- "transition-colors cursor-pointer",- showCollapsedExpandButton- ? "opacity-100 pointer-events-auto"- : "opacity-0 pointer-events-none",- )}- >- <ChevronRight width={18} height={18} />- </button>- </div>- ) : (- <>- <OpenHandsLogoButton- logoWidth={SIDEBAR_LOGO_WIDTH}- logoHeight={SIDEBAR_LOGO_HEIGHT}- logoClassName="max-w-none"- className="inline-flex w-[18px] shrink-0 items-center justify-center overflow-visible"- />- {/* Desktop-only collapse toggle. Hidden on mobile (the sidebar- there is the top bar and doesn't collapse). No tooltip —- the chevron direction already conveys what the button does. */}- <button- type="button"- data-testid="sidebar-collapse-toggle"- aria-pressed={collapsed}- aria-label={collapseToggleLabel}- onClick={() => setCollapsed(true)}- className={cn(- "hidden md:inline-flex items-center justify-center shrink-0",- "w-7 h-7 rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]",- "transition-colors cursor-pointer",- // Keep the collapse button right-aligned while preserving a- // small gutter from the rail edge.- "ml-auto",- )}- >- <ChevronLeft width={18} height={18} />- </button>- </>- )}- </div>-- {/*- Temporarily hide the dedicated New Conversation button and surface- creation via the first nav entry instead.- */}+ <SidebarRailBody+ collapsed={collapsed}+ showCollapseToggle+ {...railBodyProps}+ />+ </aside>- <nav- className={cn(- "flex flex-row md:flex-col gap-1 md:gap-0.5 w-full md:shrink-0",- collapsed- ? "items-center md:items-center"- : "items-center md:items-stretch",- )}- >- <SidebarNavLink- to="/conversations"- end- label="Code"- testId="sidebar-conversations-link"- disabled={linkDisabled}- collapsed={collapsed}- icon={<Plus width={ICON_SIZE} height={ICON_SIZE} />}+ {mobileDrawerMounted ? (+ <>+ <div+ className={cn(+ "fixed inset-0 z-40 bg-black/50 md:hidden",+ "transition-opacity ease-in-out motion-reduce:transition-none",+ mobileDrawerVisible+ ? "opacity-100"+ : "pointer-events-none opacity-0",+ )}+ style={{ transitionDuration: `${MOBILE_DRAWER_TRANSITION_MS}ms` }}+ onClick={closeMobileNav}+ aria-hidden={!mobileDrawerVisible}/>- <SidebarNavLink- to="/skills"- label="Customize"- testId="sidebar-skills-link"- disabled={linkDisabled}- collapsed={collapsed}- forceActive={isExtensionsActive}- icon={- <svg- xmlns="http://www.w3.org/2000/svg"- width={ICON_SIZE}- height={ICON_SIZE}- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- strokeWidth="2"- strokeLinecap="round"- strokeLinejoin="round"- aria-hidden="true"- >- <path d="M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z" />- <path d="m7 16.5-4.74-2.85" />- <path d="m7 16.5 5-3" />- <path d="M7 16.5v5.17" />- <path d="M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z" />- <path d="m17 16.5-5-3" />- <path d="m17 16.5 4.74-2.85" />- <path d="M17 16.5v5.17" />- <path d="M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z" />- <path d="M12 8 7.26 5.15" />- <path d="m12 8 4.74-2.85" />- <path d="M12 13.5V8" />- </svg>- }- />- <SidebarNavLink- to="/automations"- label={t(I18nKey.SIDEBAR$AUTOMATIONS)}- testId="sidebar-automations-link"- disabled={linkDisabled}- collapsed={collapsed}- icon={<AutomationsIcon width={ICON_SIZE} height={ICON_SIZE} />}- />- </nav>-- <SidebarConversationList />-- {collapsed && (- <div className="hidden md:flex md:flex-col md:items-center mt-auto gap-2 pb-2 cursor-pointer">- <button- type="button"- data-testid="collapsed-settings-link"- aria-label={t(I18nKey.SIDEBAR$SETTINGS)}- onClick={() => navigate("/settings")}- className={cn(- "inline-flex items-center justify-center w-10 h-10 p-0 mx-auto rounded-md transition-colors cursor-pointer",- currentPath.startsWith("/settings")- ? "bg-tertiary text-white font-medium"- : "text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]",- )}- >- <Settings width={16} height={16} />- </button>- <div- className="relative"- ref={collapsedBackendPopoverRef}- onMouseEnter={() => {- if (collapsedBackendCloseTimer.current) {- clearTimeout(collapsedBackendCloseTimer.current);- collapsedBackendCloseTimer.current = null;- }- setCollapsedBackendPopoverOpen(true);- }}- onMouseLeave={() => {- collapsedBackendCloseTimer.current = setTimeout(- () => setCollapsedBackendPopoverOpen(false),- 150,- );- }}- >- <button- type="button"- data-testid="collapsed-backend-selector-link"- aria-label={t(I18nKey.BACKEND$MANAGE)}- aria-expanded={collapsedBackendPopoverOpen}- // The popover this button anchors mounts a downshift-driven- // Dropdown that attaches window-level mousedown/mouseup- // listeners; on mouseup with a target outside its own- // input/menu/toggle it calls handleBlur and closes the menu.- // This button is a sibling of the Dropdown — not one of those- // tracked elements — so without stopping propagation, clicking- // the tray icon would close the popover the user is still- // hovering. preventDefault on mousedown also keeps focus from- // shifting off anything currently focused inside the dropdown.- onMouseDown={(event) => {- event.preventDefault();- event.stopPropagation();- }}- onMouseUp={(event) => event.stopPropagation()}- className={cn(- "relative inline-flex items-center justify-center w-10 h-10 p-0 mx-auto rounded-md transition-colors",- collapsedBackendPopoverOpen- ? "bg-tertiary text-white font-medium"- : "text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]",- )}- >- <BackendStatusDot- isConnected={activeBackendHealth?.isConnected ?? null}- className="absolute top-1 left-1 pointer-events-none"- />- <Server width={16} height={16} />- </button>- {collapsedBackendPopoverOpen ? (- <div- className="absolute bottom-[-4px] left-full pl-2 z-40 w-[272px]"- // Stop click propagation so dropdown option clicks- // (rendered as <li role="option">, which the rail's- // collapse handler does not match against `button/a`)- // don't bubble up to the aside and accidentally expand- // the sidebar mid-selection.- onClick={(event) => event.stopPropagation()}- >- <BackendSelector- hideTrigger- defaultOpen- openUpward- onSelectOption={() => setCollapsedBackendPopoverOpen(false)}- onOpenAddBackend={() => setAddBackendModalOpen(true)}- onOpenManageBackends={() =>- setManageBackendsModalOpen(true)- }- />- </div>- ) : null}- </div>- </div>- )}-- {/* Sidebar footer: keep backend selector pinned to the bottom with a- visual separator above it. Hidden in collapsed mode because the- control needs full-width space. */}- {!collapsed && (- <div className="hidden md:flex md:flex-col md:items-stretch pt-2 border-t border-[var(--oh-border)] md:-mx-2 md:px-2">- <BackendSelector openUpward />- </div>- )}- </aside>+ <aside+ aria-label={t(I18nKey.SIDEBAR$NAVIGATION_LABEL)}+ data-testid="sidebar-mobile-drawer"+ aria-hidden={!mobileDrawerVisible}+ className={cn(+ "fixed inset-y-0 left-0 z-50 flex min-h-0 w-[min(300px,85vw)] flex-col bg-base",+ "border-r border-[var(--oh-border)] pb-2 pl-2.5 pr-0 md:hidden",+ "transition-transform ease-in-out motion-reduce:transition-none",+ mobileDrawerVisible ? "translate-x-0" : "-translate-x-full",+ )}+ style={{ transitionDuration: `${MOBILE_DRAWER_TRANSITION_MS}ms` }}+ >+ <SidebarCollapseContext.Provider value={false}>+ <SidebarRailBody+ collapsed={false}+ showCollapseToggle={false}+ showMobileCloseButton+ onCloseMobile={closeMobileNav}+ {...railBodyProps}+ />+ </SidebarCollapseContext.Provider>+ </aside>+ </>+ ) : null}{settingsModalIsOpen && (<React.Suspense fallback={null}>diff --git a/src/components/features/skills/extensions-mobile-hub.tsx b/src/components/features/skills/extensions-mobile-hub.tsxnew file mode 100644index 0000000000..ee5673753a--- /dev/null+++ b/src/components/features/skills/extensions-mobile-hub.tsx@@ -0,0 +1,35 @@+import { useTranslation } from "react-i18next";+import { Typography } from "#/ui/typography";+import { I18nKey } from "#/i18n/declaration";+import { SidebarNavLink } from "#/components/features/sidebar/sidebar-nav-link";+import { BackendSyncedSettingsBadge } from "#/components/features/settings/backend-synced-settings-badge";+import { EXTENSIONS_NAV_ITEMS } from "./extensions-navigation";++export function ExtensionsMobileHub() {+ const { t } = useTranslation("openhands");++ return (+ <div+ data-testid="extensions-mobile-hub"+ className="flex flex-col gap-4 px-4 py-2 md:hidden"+ >+ <Typography.H2>{t(I18nKey.NAV$EXTENSIONS)}</Typography.H2>+ <nav className="flex flex-col gap-0.5">+ {EXTENSIONS_NAV_ITEMS.map((item) => (+ <SidebarNavLink+ key={item.to}+ to={item.to}+ label={item.label}+ end={item.end}+ testId={`sidebar-extensions-${item.to}`}+ icon={item.icon}+ disabled={item.comingSoon}+ />+ ))}+ </nav>+ <div className="pt-1">+ <BackendSyncedSettingsBadge />+ </div>+ </div>+ );+}diff --git a/src/components/features/skills/extensions-navigation.tsx b/src/components/features/skills/extensions-navigation.tsxindex df3b1c5408..d64d9ccf91 100644--- a/src/components/features/skills/extensions-navigation.tsx+++ b/src/components/features/skills/extensions-navigation.tsx@@ -25,7 +25,7 @@ interface ExtensionNavItem {disabledByAcp?: boolean;}-const EXTENSIONS_NAV_ITEMS: ExtensionNavItem[] = [+export const EXTENSIONS_NAV_ITEMS: ExtensionNavItem[] = [{to: "/skills",label: "Skills",diff --git a/src/components/shared/buttons/styled-tooltip.tsx b/src/components/shared/buttons/styled-tooltip.tsxindex 58da15fbb9..7a1a1e46e2 100644--- a/src/components/shared/buttons/styled-tooltip.tsx+++ b/src/components/shared/buttons/styled-tooltip.tsx@@ -9,6 +9,14 @@ export interface StyledTooltipProps {placement?: TooltipProps["placement"];showArrow?: boolean;closeDelay?: number;+ offset?: number;+}++function getTooltipTriggerChild(children: ReactNode) {+ if (React.Children.count(children) === 1 && React.isValidElement(children)) {+ return children;+ }+ return <span className="inline-flex">{children}</span>;}export function StyledTooltip({@@ -18,6 +26,7 @@ export function StyledTooltip({placement = "right",showArrow = false,closeDelay = 100,+ offset = 7,}: StyledTooltipProps) {const disableAnimation = import.meta.env.MODE === "test";@@ -26,11 +35,18 @@ export function StyledTooltip({content={content}closeDelay={closeDelay}placement={placement}- className={cn("bg-white text-black", tooltipClassName)}+ offset={offset}showArrow={showArrow}disableAnimation={disableAnimation}+ classNames={{+ content: cn(+ "z-[9999] rounded-md px-2 py-1 text-xs font-medium shadow-md",+ "!bg-white !text-black",+ tooltipClassName,+ ),+ }}>- <div className="inline-flex">{children}</div>+ {getTooltipTriggerChild(children)}</Tooltip>);}diff --git a/src/constants/settings-nav.tsx b/src/constants/settings-nav.tsxindex 585adc2985..1debec12e6 100644--- a/src/constants/settings-nav.tsx+++ b/src/constants/settings-nav.tsx@@ -28,7 +28,7 @@ export const OSS_NAV_ITEMS: SettingsNavItem[] = [},{icon: <CircuitIcon width={16} height={16} />,- to: "/settings",+ to: "/settings/llm",text: "SETTINGS$NAV_LLM",subtitle: "SETTINGS$PAGE_LLM_SUBLINE",disabledByAcp: true,diff --git a/src/hooks/use-breakpoint.ts b/src/hooks/use-breakpoint.tsindex c4288e1ab2..49b24b4a58 100644--- a/src/hooks/use-breakpoint.ts+++ b/src/hooks/use-breakpoint.ts@@ -2,6 +2,13 @@ import { useState, useEffect, useRef } from "react";const MOBILE_BREAKPOINT = 1024;+/**+ * Inclusive max width where the primary sidebar rail is hidden (`max-md:hidden`)+ * and the slide-out drawer is used. Matches typical Tailwind `md` (48rem): rail+ * shows from 768px upward, so we treat width <= 767 as drawer-only.+ */+export const SIDEBAR_RAIL_COLLAPSE_MAX_WIDTH = 767;+/*** Returns true when window width is at or below the breakpoint.* Only triggers a re-render when the boolean value changes (i.e., when thediff --git a/src/i18n/translation.json b/src/i18n/translation.jsonindex 080acfa439..2a23c55aa3 100644--- a/src/i18n/translation.json+++ b/src/i18n/translation.json@@ -11253,6 +11253,40 @@"tr": "Kenar çubuğunu daralt","uk": "Згорнути бічну панель"},+ "SIDEBAR$OPEN_MENU": {+ "en": "Open navigation menu",+ "zh-CN": "打开导航菜单",+ "zh-TW": "開啟導覽選單",+ "de": "Navigationsmenü öffnen",+ "ko-KR": "탐색 메뉴 열기",+ "no": "Åpne navigasjonsmeny",+ "it": "Apri menu di navigazione",+ "pt": "Abrir menu de navegação",+ "es": "Abrir menú de navegación",+ "ar": "فتح قائمة التنقل",+ "fr": "Ouvrir le menu de navigation",+ "tr": "Gezinti menüsünü aç",+ "ja": "ナビゲーションメニューを開く",+ "uk": "Відкрити меню навігації",+ "ca": "Obre el menú de navegació"+ },+ "SIDEBAR$CLOSE_MENU": {+ "en": "Close navigation menu",+ "zh-CN": "关闭导航菜单",+ "zh-TW": "關閉導覽選單",+ "de": "Navigationsmenü schließen",+ "ko-KR": "탐색 메뉴 닫기",+ "no": "Lukk navigasjonsmeny",+ "it": "Chiudi menu di navigazione",+ "pt": "Fechar menu de navegação",+ "es": "Cerrar menú de navegación",+ "ar": "إغلاق قائمة التنقل",+ "fr": "Fermer le menu de navigation",+ "tr": "Gezinti menüsünü kapat",+ "ja": "ナビゲーションメニューを閉じる",+ "uk": "Закрити меню навігації",+ "ca": "Tanca el menú de navegació"+ },"SIDEBAR$EXPAND": {"en": "Expand sidebar","ja": "サイドバーを展開",diff --git a/src/routes.ts b/src/routes.tsindex 7958b6461d..7a46b252e8 100644--- a/src/routes.ts+++ b/src/routes.ts@@ -9,13 +9,19 @@ export default [layout("routes/root-layout.tsx", [index("routes/index-redirect.tsx"),route("conversations", "routes/home.tsx"),+ route(+ "conversations/:conversationId/panel",+ "routes/conversation-panel.tsx",+ ),route("conversations/:conversationId", "routes/conversation.tsx"),route("launch", "routes/launch.tsx"),+ route("customize", "routes/extensions-hub.tsx"),route("skills", "routes/skills-settings.tsx"),route("plugins", "routes/skills-plugins.tsx"),route("mcp", "routes/mcp.tsx"),route("settings", "routes/settings.tsx", [- index("routes/llm-settings.tsx"),+ index("routes/settings-index.tsx"),+ route("llm", "routes/llm-settings.tsx"),route("agent", "routes/agent-settings.tsx"),route("condenser", "routes/condenser-settings.tsx"),route("verification", "routes/verification-settings.tsx"),diff --git a/src/routes/conversation-panel.tsx b/src/routes/conversation-panel.tsxnew file mode 100644index 0000000000..df9da627f6--- /dev/null+++ b/src/routes/conversation-panel.tsx@@ -0,0 +1,3 @@+// Separate route module so React Router does not see duplicate ids for+// `conversations/:id` and `conversations/:id/panel` (same handlers as conversation).+export { default, ConversationView } from "./conversation";diff --git a/src/routes/conversation.tsx b/src/routes/conversation.tsxindex 7d86ef2d79..e210ea8798 100644--- a/src/routes/conversation.tsx+++ b/src/routes/conversation.tsx@@ -1,5 +1,5 @@import React from "react";-import { useNavigate, useLocation } from "react-router";+import { useNavigate, useLocation, useMatch } from "react-router";import { useTranslation } from "react-i18next";import { useConversationId } from "#/hooks/use-conversation-id";@@ -21,7 +21,10 @@ import { useTaskPolling } from "#/hooks/query/use-task-polling";import { displayErrorToast } from "#/utils/custom-toast-handlers";import { useIsAuthed } from "#/hooks/query/use-is-authed";-import { ConversationMain } from "#/components/features/conversation/conversation-main/conversation-main";+import {+ ConversationMain,+ ConversationMobilePanelPage,+} from "#/components/features/conversation/conversation-main/conversation-main";import { WebSocketProviderWrapper } from "#/contexts/websocket-provider-wrapper";import { useErrorMessageStore } from "#/stores/error-message-store";@@ -32,6 +35,7 @@ import { resumeCloudSandbox } from "#/api/cloud/conversation-service.api";function AppContent() {const { t } = useTranslation("openhands");const { conversationId } = useConversationId();+ const panelViewMatch = useMatch("/conversations/:conversationId/panel");const clearEvents = useEventStore((state) => state.clearEvents);const { isTask, taskStatus, taskDetail } = useTaskPolling();@@ -176,8 +180,14 @@ function AppContent() {const content = (<EventHandler>- <div data-testid="app-route" className="flex flex-col h-full">- <ConversationMain />+ <div data-testid="app-route" className="flex h-full flex-col">+ {panelViewMatch ? (+ <ConversationMobilePanelPage+ onNavigateBack={() => navigate(`/conversations/${conversationId}`)}+ />+ ) : (+ <ConversationMain />+ )}</div></EventHandler>);diff --git a/src/routes/extensions-hub.tsx b/src/routes/extensions-hub.tsxnew file mode 100644index 0000000000..4032bba2d4--- /dev/null+++ b/src/routes/extensions-hub.tsx@@ -0,0 +1,13 @@+import { Navigate } from "react-router";+import { useBreakpoint } from "#/hooks/use-breakpoint";+import { ExtensionsMobileHub } from "#/components/features/skills/extensions-mobile-hub";++export default function ExtensionsHub() {+ const isMobile = useBreakpoint(768);++ if (isMobile) {+ return <ExtensionsMobileHub />;+ }++ return <Navigate to="/skills" replace />;+}diff --git a/src/routes/home.tsx b/src/routes/home.tsxindex cf714000d8..46a5db6478 100644--- a/src/routes/home.tsx+++ b/src/routes/home.tsx@@ -8,7 +8,7 @@ function HomeScreen() {return (<divdata-testid="home-screen"- className="px-0 bg-transparent h-full flex flex-col overflow-y-auto rounded-xl lg:px-[42px] custom-scrollbar-always"+ className="custom-scrollbar-always flex h-full flex-col overflow-y-auto rounded-xl bg-transparent px-4 md:px-0 lg:px-[42px]"><div className="flex flex-1 min-h-0 flex-col items-center justify-center"><HomeChatLauncher />diff --git a/src/routes/mcp.tsx b/src/routes/mcp.tsxindex a337ff9223..c7019db8bd 100644--- a/src/routes/mcp.tsx+++ b/src/routes/mcp.tsx@@ -15,6 +15,7 @@ import {displaySuccessToast,} from "#/utils/custom-toast-handlers";import { retrieveAxiosErrorMessage } from "#/utils/retrieve-axios-error-message";+import { settingsLikeMainScrollClassName } from "#/utils/settings-like-page-layout-classes";import {findCatalogEntryForServer,findInstalledMatch,@@ -115,7 +116,7 @@ export default function MCPPage() {return (<div data-testid="mcp-page" className="flex h-full gap-10"><ExtensionsNavigation />- <div className="flex h-full flex-1 items-center justify-center">+ <div className="flex h-full flex-1 items-center justify-center px-4 md:px-0"><div className="h-8 w-8 rounded-full border-2 border-[var(--oh-border)] border-t-white animate-spin" /></div></div>@@ -125,7 +126,7 @@ export default function MCPPage() {return (<div data-testid="mcp-page" className="flex h-full gap-10"><ExtensionsNavigation />- <main className="flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto custom-scrollbar-always pr-[14px] pt-8 pb-12">+ <main className={settingsLikeMainScrollClassName}><div className="mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6"><div className="min-w-0"><div className="flex items-start justify-between gap-4">diff --git a/src/routes/root-layout.tsx b/src/routes/root-layout.tsxindex d6306865be..b4117f6f30 100644--- a/src/routes/root-layout.tsx+++ b/src/routes/root-layout.tsx@@ -1,10 +1,17 @@import React from "react";-import { useRouteError, isRouteErrorResponse, Outlet } from "react-router";+import {+ useRouteError,+ isRouteErrorResponse,+ Outlet,+ useLocation,+} from "react-router";import { useTranslation } from "react-i18next";import { I18nKey } from "#/i18n/declaration";import i18n from "#/i18n";import { useConfig } from "#/hooks/query/use-config";import { Sidebar } from "#/components/features/sidebar/sidebar";+import { SidebarMobileNavProvider } from "#/components/features/sidebar/sidebar-mobile-nav-context";+import { SidebarMobileMenuBar } from "#/components/features/sidebar/sidebar-mobile-menu-bar";import { useSettings } from "#/hooks/query/use-settings";import { useMigrateUserConsent } from "#/hooks/use-migrate-user-consent";import { useSyncPostHogConsent } from "#/hooks/use-sync-posthog-consent";@@ -63,6 +70,7 @@ export function ErrorBoundary() {}export default function MainApp() {+ const location = useLocation();const appTitle = useAppTitle();const { data: settings } = useSettings();const { migrateUserConsent } = useMigrateUserConsent();@@ -98,51 +106,60 @@ export default function MainApp() {);}+ // Conversation + full-screen panel routes put the mobile menu control in the+ // chat / panel header; omit the extra top row so we don't duplicate chrome.+ const hideMobileSidebarMenuBar = /^\/conversations\/[^/]+/.test(+ location.pathname,+ );+return (<ReactRouterNavigationProvider>- <div- data-testid="root-layout"- className="h-screen lg:min-w-5xl flex flex-col md:flex-row bg-base overflow-hidden p-0"- >- <title>{appTitle}</title>- <Sidebar />+ <SidebarMobileNavProvider>+ <div+ data-testid="root-layout"+ className="h-screen lg:min-w-5xl flex flex-col md:flex-row bg-base overflow-hidden p-0"+ >+ <title>{appTitle}</title>+ <Sidebar />- <div className="flex flex-col w-full min-w-0 h-[calc(100%-50px)] md:h-full gap-3">- {config.data &&- (config.data.maintenance_start_time ||- (config.data.faulty_models &&- config.data.faulty_models.length > 0) ||- config.data.error_message) && (- <React.Suspense fallback={null}>- <AlertBanner- maintenanceStartTime={config.data.maintenance_start_time}- faultyModels={config.data.faulty_models}- errorMessage={config.data.error_message}- updatedAt={config.data.updated_at}- />- </React.Suspense>- )}- <div- id="root-outlet"- className="flex-1 relative overflow-auto custom-scrollbar"- >- <Outlet />+ <div className="flex min-h-0 flex-col w-full min-w-0 h-full gap-3">+ {!hideMobileSidebarMenuBar ? <SidebarMobileMenuBar /> : null}+ {config.data &&+ (config.data.maintenance_start_time ||+ (config.data.faulty_models &&+ config.data.faulty_models.length > 0) ||+ config.data.error_message) && (+ <React.Suspense fallback={null}>+ <AlertBanner+ maintenanceStartTime={config.data.maintenance_start_time}+ faultyModels={config.data.faulty_models}+ errorMessage={config.data.error_message}+ updatedAt={config.data.updated_at}+ />+ </React.Suspense>+ )}+ <div+ id="root-outlet"+ className="relative flex-1 overflow-auto px-0 custom-scrollbar"+ >+ <Outlet />+ </div></div>- </div>- {consentFormIsOpen && (- <React.Suspense fallback={null}>- <AnalyticsConsentFormModal- onClose={() => {- setConsentFormIsOpen(false);- }}- />- </React.Suspense>- )}- </div>- <React.Suspense fallback={null}>- <EnvironmentSwitchOverlay />- </React.Suspense>+ {consentFormIsOpen && (+ <React.Suspense fallback={null}>+ <AnalyticsConsentFormModal+ onClose={() => {+ setConsentFormIsOpen(false);+ }}+ />+ </React.Suspense>+ )}+ </div>+ <React.Suspense fallback={null}>+ <EnvironmentSwitchOverlay />+ </React.Suspense>+ </SidebarMobileNavProvider></ReactRouterNavigationProvider>);}diff --git a/src/routes/settings-index.tsx b/src/routes/settings-index.tsxnew file mode 100644index 0000000000..d63f059826--- /dev/null+++ b/src/routes/settings-index.tsx@@ -0,0 +1,21 @@+import { Navigate } from "react-router";+import { useBreakpoint } from "#/hooks/use-breakpoint";+import { useConfig } from "#/hooks/query/use-config";+import { useSettingsNavItems } from "#/hooks/use-settings-nav-items";+import { SettingsMobileHub } from "#/components/features/settings/settings-mobile-hub";+import { getFirstAvailablePath } from "#/utils/settings-utils";++export default function SettingsIndex() {+ const isMobile = useBreakpoint(768);+ const navigationItems = useSettingsNavItems();+ const { data: config } = useConfig();++ if (isMobile) {+ return <SettingsMobileHub navigationItems={navigationItems} />;+ }++ const fallbackPath =+ getFirstAvailablePath(config?.feature_flags) ?? "/settings/app";++ return <Navigate to={fallbackPath} replace />;+}diff --git a/src/routes/settings.tsx b/src/routes/settings.tsxindex ec6e887381..47f9e8802e 100644--- a/src/routes/settings.tsx+++ b/src/routes/settings.tsx@@ -8,6 +8,7 @@ import { SettingsLayout } from "#/components/features/settings";import { WebClientConfig } from "#/api/option-service/option.types";import { QUERY_KEYS, CONFIG_CACHE_OPTIONS } from "#/hooks/query/query-keys";import { Typography } from "#/ui/typography";+import { useBreakpoint } from "#/hooks/use-breakpoint";import { useSettingsNavItems } from "#/hooks/use-settings-nav-items";import { OSS_NAV_ITEMS } from "#/constants/settings-nav";import {@@ -56,6 +57,7 @@ function SettingsScreen() {const location = useLocation();const matches = useMatches();const navItems = useSettingsNavItems();+ const isMobile = useBreakpoint(768);const { currentSectionTitle, currentSectionSubtitle } = useMemo(() => {const currentRenderedItem = navItems.find(@@ -82,7 +84,8 @@ function SettingsScreen() {const routeHandle = matches.find((m) => m.pathname === location.pathname)?.handle as { hideTitle?: boolean } | undefined;- const shouldHideTitle = routeHandle?.hideTitle === true;+ const isMobileHub = isMobile && location.pathname === "/settings";+ const shouldHideTitle = routeHandle?.hideTitle === true || isMobileHub;return (<main data-testid="settings-screen" className="min-h-0">diff --git a/src/routes/skills-plugins.tsx b/src/routes/skills-plugins.tsxindex 5fbb5da2f2..c769401c21 100644--- a/src/routes/skills-plugins.tsx+++ b/src/routes/skills-plugins.tsx@@ -1,6 +1,7 @@import { useTranslation } from "react-i18next";import { ExtensionsNavigation } from "#/components/features/skills/extensions-navigation";import { I18nKey } from "#/i18n/declaration";+import { settingsLikeMainScrollClassName } from "#/utils/settings-like-page-layout-classes";export default function SkillsPluginsScreen() {const { t } = useTranslation("openhands");@@ -8,7 +9,7 @@ export default function SkillsPluginsScreen() {return (<div data-testid="skills-plugins-screen" className="flex h-full gap-10"><ExtensionsNavigation />- <main className="flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto custom-scrollbar-always pr-[14px] pt-8 pb-12">+ <main className={settingsLikeMainScrollClassName}><div className="mx-auto w-full min-w-0 max-w-[800px]"><div className="mb-4 min-w-0 space-y-1"><h2 className="text-xl font-semibold leading-6 text-foreground">diff --git a/src/routes/skills-settings.tsx b/src/routes/skills-settings.tsxindex 8916467111..dfddddae53 100644--- a/src/routes/skills-settings.tsx+++ b/src/routes/skills-settings.tsx@@ -10,6 +10,8 @@ import type { SkillTypeFilter } from "#/components/features/skills/skill-type-fiimport { I18nKey } from "#/i18n/declaration";import { displayErrorToast } from "#/utils/custom-toast-handlers";import { retrieveAxiosErrorMessage } from "#/utils/retrieve-axios-error-message";+import { cn } from "#/utils/utils";+import { settingsLikeMainScrollClassName } from "#/utils/settings-like-page-layout-classes";import type { SkillInfo } from "#/types/settings";function matchesSearch(skill: SkillInfo, query: string): boolean {@@ -87,7 +89,7 @@ function SkillsSettingsScreen() {return (<div data-testid="skills-settings-screen" className="flex h-full gap-10"><ExtensionsNavigation />- <main className="flex min-h-0 min-w-0 h-full flex-1 flex-col overflow-y-auto custom-scrollbar-always pr-[14px] pt-8 pb-12">+ <main className={cn(settingsLikeMainScrollClassName, "h-full")}><div className="mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6"><div className="min-w-0 space-y-1"><h2 className="text-xl font-semibold leading-6 text-foreground">diff --git a/src/styles/agent-server-ui-style-scope.ts b/src/styles/agent-server-ui-style-scope.tsindex 9b262f8f63..c5c29d7e8c 100644--- a/src/styles/agent-server-ui-style-scope.ts+++ b/src/styles/agent-server-ui-style-scope.ts@@ -33,7 +33,9 @@ export const AGENT_SERVER_UI_DEFAULT_CSS_VARIABLES = {"--oh-interactive-hover-low": "var(--cool-grey-900)","--oh-interactive-active": "var(--cool-grey-800)","--oh-interactive-selected": "var(--cool-grey-600)",- "--oh-scrollbar": "rgba(208, 217, 250, 0.3)",+ "--oh-scrollbar": "color-mix(in srgb, var(--cool-grey-400) 30%, transparent)",+ "--oh-scrollbar-hover":+ "color-mix(in srgb, var(--cool-grey-400) 50%, transparent)","--oh-default": "var(--cool-grey-800)","--oh-default-foreground": "var(--cool-grey-100)","--oh-accent": "#c9b974",diff --git a/src/tailwind.css b/src/tailwind.cssindex 8e2c02389a..d0b37713e4 100644--- a/src/tailwind.css+++ b/src/tailwind.css@@ -91,7 +91,8 @@--oh-interactive-hover-low: var(--cool-grey-900); /* hover on dark base (950 bg) */--oh-interactive-active: var(--cool-grey-800); /* selected/active on dark base */--oh-interactive-selected: var(--cool-grey-600); /* selected within a panel (on 800/925 bg) */- --oh-scrollbar: rgba(208, 217, 250, 0.3);+ --oh-scrollbar: color-mix(in srgb, var(--cool-grey-400) 30%, transparent);+ --oh-scrollbar-hover: color-mix(in srgb, var(--cool-grey-400) 50%, transparent);--oh-default: var(--cool-grey-800);--oh-default-foreground: var(--cool-grey-100);--oh-accent: #c9b974;@@ -166,11 +167,13 @@}.skeleton {- @apply bg-neutral-700 rounded-md animate-pulse motion-reduce:animate-none;+ @apply rounded-md animate-pulse motion-reduce:animate-none;+ background-color: var(--oh-interactive-active);}.skeleton-round {- @apply bg-neutral-700 rounded-full animate-pulse motion-reduce:animate-none;+ @apply rounded-full animate-pulse motion-reduce:animate-none;+ background-color: var(--oh-interactive-active);}/**@@ -220,12 +223,12 @@/* Show scrollbar on hover */.custom-scrollbar:hover::-webkit-scrollbar-thumb {- background: rgba(208, 217, 250, 0.3);+ background: var(--oh-scrollbar);opacity: 1;}.custom-scrollbar:hover::-webkit-scrollbar-thumb:hover {- background: rgba(208, 217, 250, 0.5);+ background: var(--oh-scrollbar-hover);}/* Firefox scrollbar styling */@@ -236,7 +239,7 @@}.custom-scrollbar:hover {- scrollbar-color: rgba(208, 217, 250, 0.3) transparent;+ scrollbar-color: var(--oh-scrollbar) transparent;}/* Always visible scrollbar for chat interface */@@ -250,19 +253,33 @@}.custom-scrollbar-always::-webkit-scrollbar-thumb {- background: rgba(208, 217, 250, 0.3);+ background: var(--oh-scrollbar);border-radius: 3px;transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);}.custom-scrollbar-always::-webkit-scrollbar-thumb:hover {- background: rgba(208, 217, 250, 0.5);+ background: var(--oh-scrollbar-hover);}/* Firefox scrollbar styling for always visible */.custom-scrollbar-always {scrollbar-width: thin;- scrollbar-color: rgba(208, 217, 250, 0.3) transparent;+ scrollbar-color: var(--oh-scrollbar) transparent;+}++/*+ * Sidebar conversation list: reserve a stable gutter so short lists keep the+ * same right inset as when a vertical scrollbar is present (aligns with nav).+ */+.conversation-panel-list-scroll {+ scrollbar-gutter: stable;+}++@supports not (scrollbar-gutter: stable) {+ .conversation-panel-list-scroll {+ padding-right: 0.5rem;+ }}/* Custom styles for contenteditable */@@ -415,30 +432,30 @@}.xterm-viewport::-webkit-scrollbar-thumb {- background: rgba(71, 74, 84, 0.5);+ background: var(--oh-scrollbar);border-radius: 4px;transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);opacity: 1;}.xterm-viewport:hover::-webkit-scrollbar-thumb {- background: rgba(71, 74, 84, 0.7);+ background: var(--oh-scrollbar-hover);opacity: 1;}.xterm-viewport::-webkit-scrollbar-thumb:hover {- background: rgba(90, 93, 103, 0.7);+ background: var(--oh-scrollbar-hover);}/* Firefox scrollbar styling for xterm */.xterm-viewport {scrollbar-width: thin;- scrollbar-color: rgba(71, 74, 84, 0.5) transparent;+ scrollbar-color: var(--oh-scrollbar) transparent;transition: scrollbar-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);}.xterm-viewport:hover {- scrollbar-color: rgba(71, 74, 84, 0.7) transparent;+ scrollbar-color: var(--oh-scrollbar-hover) transparent;}/* Force text wrapping and proper overflow handling for xterm */diff --git a/src/ui/context-menu.tsx b/src/ui/context-menu.tsxindex f98e5f6ab3..f05faeb008 100644--- a/src/ui/context-menu.tsx+++ b/src/ui/context-menu.tsx@@ -2,51 +2,54 @@ import React from "react";import { cva, type VariantProps } from "class-variance-authority";import { cn } from "#/utils/utils";-const contextMenuVariants = cva("text-white overflow-hidden z-50", {- variants: {- theme: {- default:- "absolute bg-tertiary rounded-[6px] context-menu-box-shadow py-[6px] px-1",- naked: "relative",- /** In document-body portal; coordinates come from inline `style`. */- popover:- "relative bg-tertiary rounded-[6px] context-menu-box-shadow py-[6px] px-1",+const contextMenuVariants = cva(+ "z-50 overflow-hidden text-[var(--oh-foreground)]",+ {+ variants: {+ theme: {+ default:+ "absolute rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg",+ naked: "relative",+ /** In document-body portal; coordinates come from inline `style`. */+ popover:+ "relative rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg",+ },+ size: {+ compact: "py-1 px-1",+ default: "",+ },+ layout: {+ vertical: "flex flex-col gap-0",+ },+ position: {+ top: "bottom-full",+ bottom: "top-full",+ none: "",+ },+ spacing: {+ default: "mt-2",+ none: "",+ },+ alignment: {+ left: "left-0",+ right: "right-0",+ none: "",+ },},- size: {- compact: "py-1 px-1",- default: "",+ compoundVariants: [+ {+ theme: "naked",+ className: "shadow-none",+ },+ ],+ defaultVariants: {+ theme: "default",+ size: "default",+ layout: "vertical",+ spacing: "default",},- layout: {- vertical: "flex flex-col gap-2",- },- position: {- top: "bottom-full",- bottom: "top-full",- none: "",- },- spacing: {- default: "mt-2",- none: "",- },- alignment: {- left: "left-0",- right: "right-0",- none: "",- },- },- compoundVariants: [- {- theme: "naked",- className: "shadow-none",- },- ],- defaultVariants: {- theme: "default",- size: "default",- layout: "vertical",- spacing: "default",},-});+);interface ContextMenuProps {ref?: React.RefObject<HTMLUListElement | null>;diff --git a/src/ui/divider.tsx b/src/ui/divider.tsxindex 9c17cfdfdb..4c790e1356 100644--- a/src/ui/divider.tsx+++ b/src/ui/divider.tsx@@ -1,24 +1,35 @@import { cva, type VariantProps } from "class-variance-authority";import { cn } from "#/utils/utils";-const dividerVariants = cva("w-full", {- variants: {- orientation: {- horizontal: "h-[1px]",- },- color: {- light: "bg-[var(--oh-border)]",+/** 12px slot (4px + 1px line + 4px at default rem) inside `px-1` menus/popovers. */+export const MENU_DIVIDER_VERTICAL_CLASS = "h-3";++const dividerVariants = cva(+ "shrink-0 self-stretch min-w-full bg-[var(--oh-border)]",+ {+ variants: {+ orientation: {+ horizontal: "h-[1px]",+ },+ color: {+ light: "bg-[var(--oh-border)]",+ },+ size: {+ thin: "h-[1px]",+ },+ inset: {+ none: "",+ menu: "",+ },},- size: {- thin: "h-[1px]",+ defaultVariants: {+ orientation: "horizontal",+ color: "light",+ size: "thin",+ inset: "none",},},- defaultVariants: {- orientation: "horizontal",- color: "light",- size: "thin",- },-});+);interface DividerProps extends VariantProps<typeof dividerVariants> {className?: string;@@ -29,13 +40,37 @@ export function Divider({orientation,color,size,+ inset,className,testId,}: DividerProps) {+ if (inset === "menu") {+ return (+ <div+ data-testid={testId}+ role="separator"+ className={cn(+ "relative min-w-full shrink-0 self-stretch",+ MENU_DIVIDER_VERTICAL_CLASS,+ className,+ )}+ >+ <div+ aria-hidden+ className="absolute top-1/2 -left-1 -right-1 h-px -translate-y-1/2 bg-[var(--oh-border)]"+ />+ </div>+ );+ }+return (<divdata-testid={testId}- className={cn(dividerVariants({ orientation, color, size }), className)}+ role="separator"+ className={cn(+ dividerVariants({ orientation, color, size, inset }),+ className,+ )}/>);}diff --git a/src/ui/dropdown/dropdown-input.tsx b/src/ui/dropdown/dropdown-input.tsxindex 14e8d757b0..0054cbf0bb 100644--- a/src/ui/dropdown/dropdown-input.tsx+++ b/src/ui/dropdown/dropdown-input.tsx@@ -4,12 +4,15 @@ interface DropdownInputProps {placeholder?: string;isDisabled: boolean;getInputProps: (props?: object) => object;+ /** When false, placeholder hint keeps upright type (e.g. backend selector). */+ italicPlaceholder?: boolean;}export function DropdownInput({placeholder,isDisabled,getInputProps,+ italicPlaceholder = true,}: DropdownInputProps) {return (<input@@ -17,8 +20,10 @@ export function DropdownInput({placeholder,disabled: isDisabled,className: cn(- "flex-1 min-w-0 outline-none bg-transparent text-white",- "placeholder:italic placeholder:text-tertiary-alt",+ "flex-1 min-w-0 outline-none bg-transparent text-white not-italic",+ italicPlaceholder &&+ "placeholder:italic placeholder:text-tertiary-alt",+ !italicPlaceholder && "placeholder:text-tertiary-alt",),})}/>diff --git a/src/ui/dropdown/dropdown-menu.tsx b/src/ui/dropdown/dropdown-menu.tsxindex a246ad719e..f4d9f76d27 100644--- a/src/ui/dropdown/dropdown-menu.tsx+++ b/src/ui/dropdown/dropdown-menu.tsx@@ -1,4 +1,5 @@import React from "react";+import { Divider } from "#/ui/divider";import { cn } from "#/utils/utils";import { DropdownOption } from "./types";@@ -32,7 +33,7 @@ export function DropdownMenu({className={cn("absolute z-50 w-full overflow-hidden text-white",openUpward ? "bottom-full mb-1" : "mt-1",- "bg-tertiary rounded-[6px] context-menu-box-shadow py-[6px] px-1",+ "bg-tertiary rounded-[6px] context-menu-box-shadow p-1","max-h-60 overflow-auto",!isOpen && "hidden",)}@@ -67,7 +68,7 @@ export function DropdownMenu({</ul>{isOpen && footer ? (<>- <div className="my-1 h-[1px] w-full bg-[var(--oh-border)]" />+ <Divider inset="menu" /><div className="p-0">{footer}</div></>) : null}diff --git a/src/ui/dropdown/dropdown.tsx b/src/ui/dropdown/dropdown.tsxindex 7cec377937..30c15081a6 100644--- a/src/ui/dropdown/dropdown.tsx+++ b/src/ui/dropdown/dropdown.tsx@@ -39,6 +39,8 @@ interface DropdownProps {defaultOpen?: boolean;/** Open the dropdown menu on hover instead of requiring a click. */openOnHover?: boolean;+ /** When false, the combobox placeholder uses normal (non-italic) type. */+ italicPlaceholder?: boolean;}export function Dropdown({@@ -57,6 +59,7 @@ export function Dropdown({hideTrigger = false,defaultOpen = false,openOnHover = false,+ italicPlaceholder = true,}: DropdownProps) {const closeTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null,@@ -179,6 +182,7 @@ export function Dropdown({placeholder={placeholder}isDisabled={isDisabled}getInputProps={getInputPropsWithCursorFix}+ italicPlaceholder={italicPlaceholder}/>{loading && <LoadingSpinner />}{clearable && selectedItem && (diff --git a/src/utils/constants.ts b/src/utils/constants.tsindex 1896831bbd..b22362e652 100644--- a/src/utils/constants.ts+++ b/src/utils/constants.ts@@ -61,8 +61,6 @@ export const GIT_PROVIDER_OPTIONS = [},];-export const CONTEXT_MENU_ICON_TEXT_CLASSNAME = "h-[30px]";-// Chat input constantsexport const CHAT_INPUT = {HEIGHT_THRESHOLD: 100, // Height in pixels when suggestions should be hiddendiff --git a/src/utils/mobile-section-nav.ts b/src/utils/mobile-section-nav.tsnew file mode 100644index 0000000000..eeff3eb7a1--- /dev/null+++ b/src/utils/mobile-section-nav.ts@@ -0,0 +1,57 @@+import { I18nKey } from "#/i18n/declaration";++const SETTINGS_PREFIX = "/settings";+const CUSTOMIZE_HUB = "/customize";+const EXTENSIONS_DETAIL_PATHS = ["/skills", "/mcp", "/plugins"] as const;++export type MobileTopBarMode = "menu" | "back";++export interface MobileTopBarState {+ mode: MobileTopBarMode;+ backTo?: string;+ backLabelKey?: I18nKey;+}++export function getMobileTopBarState(pathname: string): MobileTopBarState {+ if (pathname === SETTINGS_PREFIX) {+ return { mode: "menu" };+ }++ if (+ pathname.startsWith(`${SETTINGS_PREFIX}/`) &&+ pathname.length > SETTINGS_PREFIX.length+ ) {+ return {+ mode: "back",+ backTo: SETTINGS_PREFIX,+ backLabelKey: I18nKey.SETTINGS$TITLE,+ };+ }++ if (pathname === CUSTOMIZE_HUB) {+ return { mode: "menu" };+ }++ if (+ EXTENSIONS_DETAIL_PATHS.some(+ (path) => pathname === path || pathname.startsWith(`${path}/`),+ )+ ) {+ return {+ mode: "back",+ backTo: CUSTOMIZE_HUB,+ backLabelKey: I18nKey.NAV$EXTENSIONS,+ };+ }++ return { mode: "menu" };+}++export function isExtensionsSectionPath(pathname: string): boolean {+ return (+ pathname === CUSTOMIZE_HUB ||+ EXTENSIONS_DETAIL_PATHS.some(+ (path) => pathname === path || pathname.startsWith(`${path}/`),+ )+ );+}diff --git a/src/utils/mobile-top-bar-icon-button-classes.ts b/src/utils/mobile-top-bar-icon-button-classes.tsnew file mode 100644index 0000000000..09af0d1859--- /dev/null+++ b/src/utils/mobile-top-bar-icon-button-classes.ts@@ -0,0 +1,15 @@+import { cn } from "#/utils/utils";++/**+ * Shared control for icon-only buttons in mobile top bars (global nav, chat+ * header, full-screen panel chrome). Matches {@link RightPanelToggle}: `p-1`+ * with a `size-5` icon yields a 28×28px hit target.+ */+export const mobileTopBarIconButtonClassName = cn(+ "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1",+ "text-[var(--oh-muted)] transition-colors",+ "hover:bg-white/10 hover:text-white",+);++/** Lucide / inline SVG wrapper size aligned with `BlockDrawerLeftIcon` (`w-5 h-5`). */+export const mobileTopBarIconClassName = "size-5 shrink-0";diff --git a/src/utils/settings-like-page-layout-classes.ts b/src/utils/settings-like-page-layout-classes.tsnew file mode 100644index 0000000000..0d4c35c90c--- /dev/null+++ b/src/utils/settings-like-page-layout-classes.ts@@ -0,0 +1,11 @@+/**+ * Shared layout tokens for /settings/* and extensions pages (/skills, /mcp,+ * /plugins) so mobile gets horizontal inset while desktop keeps the aside ++ * `gap-10` + right gutter pattern.+ */+export const settingsLikeMainScrollClassName =+ "flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto custom-scrollbar-always px-4 pt-8 pb-12 md:px-0 md:pr-[14px]";++/** Same scroll shell as {@link settingsLikeMainScrollClassName} but desktop top padding comes from the outer `md:pt-8` wrapper ({@link SettingsLayout}). */+export const settingsLayoutMainScrollClassName =+ "flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto custom-scrollbar-always px-4 pt-8 pb-12 md:px-0 md:pt-0 md:pr-[14px]";diff --git a/src/utils/settings-utils.ts b/src/utils/settings-utils.tsindex c92c60d04f..ba64779302 100644--- a/src/utils/settings-utils.ts+++ b/src/utils/settings-utils.ts@@ -53,7 +53,7 @@ export function isSettingsPageHidden(path: string,featureFlags: WebClientFeatureFlags | undefined,): boolean {- if (featureFlags?.hide_llm_settings && path === "/settings") return true;+ if (featureFlags?.hide_llm_settings && path === "/settings/llm") return true;return false;}@@ -67,6 +67,7 @@ export function getFirstAvailablePath(// fallback). For OpenHands-agent users this is also a sensible landing// — the Agent page is the single place to switch kinds.const fallbackOrder = [+ { path: "/settings/llm", hidden: !!featureFlags?.hide_llm_settings },{ path: "/settings/agent", hidden: false },{ path: "/settings", hidden: !!featureFlags?.hide_llm_settings },{ path: "/settings/app", hidden: false },diff --git a/tests/e2e/snapshots/archived-conversation.snapshot.spec.ts b/tests/e2e/snapshots/archived-conversation.snapshot.spec.tsindex 79db1979c3..b1da29d3aa 100644--- a/tests/e2e/snapshots/archived-conversation.snapshot.spec.ts+++ b/tests/e2e/snapshots/archived-conversation.snapshot.spec.ts@@ -10,7 +10,7 @@ import { stubWebSocket } from "./support/stub-websocket";* 5. "Errored Project" — sandbox_status: "ERROR"** Snapshots:- * 1. conversation-panel-with-archived-badges — sidebar badges for MISSING/ERROR+ * 1. conversation-panel-with-archived-badges — archive icon + ERROR pill for MISSING/ERROR* 2. conversation-view-archived — chat interface for conv 4 with the* read-only "Sandbox no longer available" banner (no chat input)* 3. conversation-view-sandbox-error — same for conv 5, "Sandbox error" variant@@ -46,7 +46,7 @@ test.describe("Archived Conversation Visual Snapshots", () => {// ── 1. Sidebar panel ───────────────────────────────────────────────────- test("conversation panel shows archived and error badges for MISSING/ERROR sandboxes", async ({+ test("conversation panel shows archive icon and error badge for MISSING/ERROR sandboxes", async ({page,}) => {await seedLocalStorage(page);@@ -60,7 +60,7 @@ test.describe("Archived Conversation Visual Snapshots", () => {await expect(page.getByTestId("conversation-card")).toHaveCount(6, {timeout: 10_000,});- await expect(page.getByTestId("archived-badge")).toBeVisible({+ await expect(page.getByTestId("conversation-status-archived")).toBeVisible({timeout: 5_000,});await expect(page.getByTestId("error-badge")).toBeVisible({