π OpenHands: AI-Driven Development
fix: refine sidebar and home onboarding layout (#340)
FraterCCCLXIII607ddae7fba5
diff --git a/__tests__/components/backends/backend-selector.test.tsx b/__tests__/components/backends/backend-selector.test.tsxindex a2559d4482..f49b26e4c7 100644--- a/__tests__/components/backends/backend-selector.test.tsx+++ b/__tests__/components/backends/backend-selector.test.tsx@@ -8,7 +8,7 @@ import {within,} from "@testing-library/react";import userEvent from "@testing-library/user-event";-import { createRoutesStub, MemoryRouter, useParams } from "react-router";+import { createRoutesStub, MemoryRouter } from "react-router";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import { __resetActiveStoreForTests } from "#/api/backend-registry/active-store";import {@@ -70,7 +70,11 @@ function TestSeed({async function openDropdown() {const user = userEvent.setup();const wrapper = screen.getByTestId("backend-selector");- await user.click(within(wrapper).getByTestId("dropdown-trigger"));+ // BackendSelector renders Dropdown with `openOnHover` while the trigger is+ // visible β clicking the toggle button would open via hover and then+ // immediately close via the click handler. Hovering the wrapper alone is+ // enough to surface the menu.+ await user.hover(wrapper);return user;}@@ -421,80 +425,6 @@ describe("BackendSelector", () => {expect(await screen.findByTestId("home")).toBeInTheDocument();});- it("jumps to the target backend's most recently selected conversation when switching from a conversation route", async () => {- // Pre-seed two local backends and the per-backend "last selected"- // slot for the target. The BackendSelector reads the remembered- // slot synchronously during `onChange`, so the localStorage write- // has to happen before the snapshot is rebuilt.- const sourceBackendId = "source-local";- const targetBackendId = "target-local";- window.localStorage.setItem(- "openhands-backends",- JSON.stringify([- {- id: sourceBackendId,- name: "Source Local",- host: "http://localhost:9000",- apiKey: "k",- kind: "local",- },- {- id: targetBackendId,- name: "Local 1",- host: "http://localhost:9001",- apiKey: "k",- kind: "local",- },- ]),- );- window.localStorage.setItem(- "openhands-active-backend",- JSON.stringify({ backendId: sourceBackendId, orgId: null }),- );- window.localStorage.setItem(- "openhands-last-conversation-by-backend",- JSON.stringify({ [targetBackendId]: "remembered-convo" }),- );- // Reset the in-memory snapshot so the seeded localStorage is read.- __resetActiveStoreForTests();-- // One conversation route that renders the BackendSelector for the- // initial id and a probe div for the remembered id so we can- // observe the navigation target.- function ConversationRoute() {- const { conversationId } = useParams<{ conversationId: string }>();- if (conversationId === "remembered-convo") {- return <div data-testid="convo-route">{conversationId}</div>;- }- return <BackendSelector />;- }- function HomeRoute() {- return <div data-testid="home" />;- }- const RouterStub = createRoutesStub([- { path: "/conversations/:conversationId", Component: ConversationRoute },- { path: "/conversations", Component: HomeRoute },- ]);- const queryClient = new QueryClient({- defaultOptions: { queries: { retry: false } },- });- render(- <QueryClientProvider client={queryClient}>- <ActiveBackendProvider>- <RouterStub initialEntries={["/conversations/old-convo-on-A"]} />- </ActiveBackendProvider>- </QueryClientProvider>,- );-- const user = await openDropdown();- await user.click(screen.getByText("Local 1"));-- const convo = await screen.findByTestId("convo-route");- expect(convo).toHaveTextContent("remembered-convo");- // The home route should never have been visited.- expect(screen.queryByTestId("home")).not.toBeInTheDocument();- });-it("stays on the current page when switching backends from a non-conversation route", async () => {function SettingsRoute() {return (@@ -802,6 +732,10 @@ describe("BackendSelector", () => {</QueryClientProvider>,);+ const settingsButton = screen.getByTestId("backend-selector-settings-link");+ expect(settingsButton.className).toContain("bg-[#1f1f1f99]");+ expect(settingsButton.className).toContain("text-white");+const user = await openDropdown();await user.click(screen.getByText("Local 1"));diff --git a/__tests__/components/features/conversation-panel/conversation-card.test.tsx b/__tests__/components/features/conversation-panel/conversation-card.test.tsxindex 7f3477f799..5ac9d9cbe9 100644--- a/__tests__/components/features/conversation-panel/conversation-card.test.tsx+++ b/__tests__/components/features/conversation-panel/conversation-card.test.tsx@@ -85,9 +85,6 @@ describe("ConversationCard", () => {within(card).getByText("Conversation 1");- // Just check that the card contains the expected text content- expect(card).toHaveTextContent("ago");-// Use a regex to match the time part since it might have whitespaceconst timeRegex = new RegExp(formatTimeDelta(new Date("2021-10-01T12:00:00Z")),diff --git a/__tests__/components/features/conversation-panel/conversation-panel.test.tsx b/__tests__/components/features/conversation-panel/conversation-panel.test.tsxindex eeaecd30b7..75f74c94a7 100644--- a/__tests__/components/features/conversation-panel/conversation-panel.test.tsx+++ b/__tests__/components/features/conversation-panel/conversation-panel.test.tsx@@ -1,7 +1,6 @@import {screen,waitFor,- waitForElementToBeRemoved,within,} from "@testing-library/react";import {@@ -33,7 +32,7 @@ vi.mock("#/hooks/mutation/use-unified-stop-conversation", () => ({// Helper to create complete AppConversation mock data// Default timestamps use "now" so conversations are considered recent and-// rendered eagerly by the panel (which hides items older than ~1h by default).+// rendered eagerly by the panel.const createMockConversation = (overrides: Partial<AppConversation> = {},): AppConversation => ({@@ -163,17 +162,57 @@ describe("ConversationPanel", () => {renderWithProviders(<CompactRouterStub />);- const skeletons = await screen.findAllByTestId(- "conversation-card-skeleton",- );- await waitForElementToBeRemoved(skeletons);+ await waitFor(() => {+ expect(+ screen.queryByTestId("conversation-card-skeleton-compact"),+ ).not.toBeInTheDocument();+ });expect(screen.queryByText("CONVERSATION$NO_CONVERSATIONS"),).not.toBeInTheDocument();});- it("should handle an error when fetching conversations", async () => {+ it("hides closed conversations in compact mode", async () => {+ vi.spyOn(+ AgentServerConversationService,+ "searchConversations",+ ).mockResolvedValue({+ items: [+ createMockConversation({+ id: "running",+ title: "Running Conversation",+ execution_status: ExecutionStatus.RUNNING,+ }),+ createMockConversation({+ id: "closed",+ title: "Closed Conversation",+ execution_status: ExecutionStatus.PAUSED,+ }),+ ],+ next_page_id: null,+ });++ const CompactRouterStub = createRoutesStub([+ {+ Component: () => <ConversationPanel compact />,+ path: "/",+ },+ {+ Component: () => null,+ path: "/conversations/:conversationId",+ },+ ]);++ renderWithProviders(<CompactRouterStub />);++ expect(+ await screen.findByLabelText("Running Conversation"),+ ).toBeInTheDocument();+ expect(screen.queryByLabelText("Closed Conversation")).not.toBeInTheDocument();+ });++ it("should not render fetch errors in the conversation panel", async () => {const searchConversationsSpy = vi.spyOn(AgentServerConversationService,"searchConversations",@@ -184,8 +223,11 @@ describe("ConversationPanel", () => {renderConversationPanel();- const error = await screen.findByText("Failed to fetch conversations");- expect(error).toBeInTheDocument();+ await waitFor(() => {+ expect(+ screen.queryByText("Failed to fetch conversations"),+ ).not.toBeInTheDocument();+ });});it("should cancel deleting a conversation", async () => {@@ -332,7 +374,7 @@ describe("ConversationPanel", () => {expect(newCards).toHaveLength(3);});- it("keeps invalid timestamps recent and only shows load more after expanding older conversations", async () => {+ it("keeps invalid timestamps recent and shows older conversations by default", async () => {const now = Date.now();const minutesAgo = (minutes: number) =>new Date(now - minutes * 60 * 1000).toISOString();@@ -385,17 +427,13 @@ describe("ConversationPanel", () => {expect(await screen.findByText("Recent Conversation")).toBeInTheDocument();expect(screen.getByText("Invalid Timestamp")).toBeInTheDocument();expect(screen.getByText("Missing Timestamp")).toBeInTheDocument();- expect(screen.queryByText("Older Conversation")).not.toBeInTheDocument();+ expect(screen.getByText("Older Conversation")).toBeInTheDocument();expect(screen.getByTestId("older-conversations-summary"),).toBeInTheDocument();expect(- screen.queryByTestId("load-more-conversations"),- ).not.toBeInTheDocument();-- await user.click(screen.getByTestId("toggle-older-conversations"));-- expect(await screen.findByText("Older Conversation")).toBeInTheDocument();+ screen.getByTestId("load-more-conversations"),+ ).toBeInTheDocument();await user.click(screen.getByTestId("load-more-conversations"));@@ -1014,7 +1052,7 @@ describe("ConversationPanel", () => {const olderIso = () =>new Date(Date.now() - 2 * 60 * 60 * 1000).toISOString();- it("hides conversations older than 1h behind a summary line", async () => {+ it("shows conversations older than 1h and includes a summary line", async () => {vi.spyOn(AgentServerConversationService,"searchConversations",@@ -1042,18 +1080,16 @@ describe("ConversationPanel", () => {renderConversationPanel();const cards = await screen.findAllByTestId("conversation-card");- expect(cards).toHaveLength(1);- expect(within(cards[0]).getByText("Recent")).toBeInTheDocument();+ expect(cards).toHaveLength(3);+ expect(screen.getByText("Recent")).toBeInTheDocument();+ expect(screen.getByText("Old 1")).toBeInTheDocument();+ expect(screen.getByText("Old 2")).toBeInTheDocument();const summary = screen.getByTestId("older-conversations-summary");- expect(summary).toHaveTextContent("2");- expect(summary).toHaveTextContent("CONVERSATION$N_OLDER_CONVERSATIONS");+ expect(summary).toHaveTextContent("SIDEBAR$CONVERSATIONS");expect(- within(summary).getByTestId("toggle-older-conversations"),- ).toHaveTextContent("CONVERSATION$SHOW_ALL");- expect(- within(summary).getByTestId("delete-older-conversations"),- ).toHaveTextContent("CONVERSATION$DELETE_ALL");+ within(summary).getByTestId("older-conversations-filter-toggle"),+ ).toBeInTheDocument();});it("does not render the summary when no conversations are older than 1h", async () => {@@ -1084,7 +1120,7 @@ describe("ConversationPanel", () => {).not.toBeInTheDocument();});- it("toggles older conversations visibility via the show-all link", async () => {+ it("toggles older conversations visibility via the filter dropdown", async () => {const user = userEvent.setup();vi.spyOn(AgentServerConversationService,@@ -1108,19 +1144,67 @@ describe("ConversationPanel", () => {renderConversationPanel();let cards = await screen.findAllByTestId("conversation-card");- expect(cards).toHaveLength(1);+ expect(cards).toHaveLength(2);- const toggle = screen.getByTestId("toggle-older-conversations");- expect(toggle).toHaveTextContent("CONVERSATION$SHOW_ALL");+ await user.click(screen.getByTestId("older-conversations-filter-toggle"));+ let toggle = await screen.findByTestId("toggle-older-conversations");+ expect(toggle).toHaveTextContent("CONVERSATION$HIDE");await user.click(toggle);cards = await screen.findAllByTestId("conversation-card");- expect(cards).toHaveLength(2);- expect(toggle).toHaveTextContent("CONVERSATION$HIDE");+ expect(cards).toHaveLength(1);+ await user.click(screen.getByTestId("older-conversations-filter-toggle"));+ toggle = await screen.findByTestId("toggle-older-conversations");+ expect(toggle).toHaveTextContent("CONVERSATION$SHOW_ALL");await user.click(toggle);cards = await screen.findAllByTestId("conversation-card");- expect(cards).toHaveLength(1);+ expect(cards).toHaveLength(2);+ });++ it("keeps repo/branch metadata hidden by default and toggles it from the filter dropdown", async () => {+ const user = userEvent.setup();+ vi.spyOn(+ AgentServerConversationService,+ "searchConversations",+ ).mockResolvedValue({+ items: [+ createMockConversation({+ id: "recent",+ title: "Recent",+ updated_at: recentIso(),+ }),+ createMockConversation({+ id: "old-with-repo",+ title: "Old With Repo",+ updated_at: olderIso(),+ selected_repository: "openhands/agent-canvas",+ selected_branch: "main",+ git_provider: "github",+ }),+ ],+ next_page_id: null,+ });++ renderConversationPanel();+ await screen.findByText("Old With Repo");++ expect(+ screen.queryByTestId("conversation-card-selected-repository"),+ ).not.toBeInTheDocument();+ expect(+ screen.queryByTestId("conversation-card-selected-branch"),+ ).not.toBeInTheDocument();++ await user.click(screen.getByTestId("older-conversations-filter-toggle"));+ await user.click(screen.getByTestId("toggle-repo-branch-metadata"));++ expect(+ await screen.findByTestId("conversation-card-selected-repository"),+ ).toHaveTextContent("openhands/agent-canvas");+ expect(+ await screen.findByTestId("conversation-card-selected-branch"),+ ).toHaveTextContent("main");});it("delete-all confirms then deletes every older conversation", async () => {@@ -1156,6 +1240,7 @@ describe("ConversationPanel", () => {renderConversationPanel();await screen.findAllByTestId("conversation-card");+ await user.click(screen.getByTestId("older-conversations-filter-toggle"));await user.click(screen.getByTestId("delete-older-conversations"));const confirmButton = await screen.findByRole("button", {@@ -1209,6 +1294,7 @@ describe("ConversationPanel", () => {});await screen.findAllByTestId("conversation-card");+ await user.click(screen.getByTestId("older-conversations-filter-toggle"));await user.click(screen.getByTestId("delete-older-conversations"));await user.click(await screen.findByRole("button", { name: /confirm/i }));@@ -1260,6 +1346,7 @@ describe("ConversationPanel", () => {});await screen.findAllByTestId("conversation-card");+ await user.click(screen.getByTestId("older-conversations-filter-toggle"));await user.click(screen.getByTestId("delete-older-conversations"));await user.click(await screen.findByRole("button", { name: /confirm/i }));@@ -1345,7 +1432,7 @@ describe("ConversationPanel", () => {expect(loadMore).toHaveTextContent("CONVERSATION$LOAD_MORE");});- it("hides the load-more link while older conversations are hidden", async () => {+ it("hides the load-more link after older conversations are hidden from the filter dropdown", async () => {vi.spyOn(AgentServerConversationService,"searchConversations",@@ -1368,13 +1455,23 @@ describe("ConversationPanel", () => {renderConversationPanel();await screen.findAllByTestId("conversation-card");- // Older conversations are present and collapsed β no load-more.+ // Older conversations are visible by default, so load-more is visible.+ expect(+ screen.getByTestId("load-more-conversations"),+ ).toBeInTheDocument();++ // Hide older conversations via the filter dropdown.+ const user = userEvent.setup();+ await user.click(screen.getByTestId("older-conversations-filter-toggle"));+ await user.click(screen.getByTestId("toggle-older-conversations"));++ // Older conversations are hidden β no load-more.expect(screen.queryByTestId("load-more-conversations"),).not.toBeInTheDocument();- // After expanding "show all", the link reappears.- const user = userEvent.setup();+ // After showing older conversations again, the link reappears.+ await user.click(screen.getByTestId("older-conversations-filter-toggle"));await user.click(screen.getByTestId("toggle-older-conversations"));expect(await screen.findByTestId("load-more-conversations"),diff --git a/__tests__/components/features/home/conversation-status-dot.test.tsx b/__tests__/components/features/home/conversation-status-dot.test.tsxindex 8e9430daf2..cedda5ace2 100644--- a/__tests__/components/features/home/conversation-status-dot.test.tsx+++ b/__tests__/components/features/home/conversation-status-dot.test.tsx@@ -25,11 +25,11 @@ describe("ConversationStatusDot", () => {[ExecutionStatus.FINISHED, "conversation-status-check", "COMMON$FINISHED"],[ExecutionStatus.RUNNING, "conversation-status-working", "COMMON$WORKING"],[ExecutionStatus.PAUSED, "conversation-status-paused", "COMMON$PAUSED"],- [ExecutionStatus.IDLE, "conversation-status-paused", "COMMON$PAUSED"],+ [ExecutionStatus.IDLE, "conversation-status-active", "COMMON$WORKING"],[ExecutionStatus.WAITING_FOR_CONFIRMATION,- "conversation-status-paused",- "COMMON$PAUSED",+ "conversation-status-active",+ "COMMON$WORKING",],[ExecutionStatus.ERROR, "conversation-status-error", "COMMON$ERROR"],[ExecutionStatus.STUCK, "conversation-status-error", "COMMON$ERROR"],diff --git a/__tests__/components/features/settings/settings-navigation.test.tsx b/__tests__/components/features/settings/settings-navigation.test.tsxindex c58eaebb2f..b23b34e867 100644--- a/__tests__/components/features/settings/settings-navigation.test.tsx+++ b/__tests__/components/features/settings/settings-navigation.test.tsx@@ -1,4 +1,4 @@-import { render, screen } from "@testing-library/react";+import { render, screen, within } from "@testing-library/react";import userEvent from "@testing-library/user-event";import { describe, expect, it, vi } from "vitest";import { MemoryRouter } from "react-router";@@ -27,8 +27,10 @@ describe("SettingsNavigation", () => {expect(screen.getByTestId("settings-navbar")).toBeInTheDocument();expect(screen.getAllByText("SETTINGS$TITLE").length).toBeGreaterThan(0);- expect(screen.getByText("SETTINGS$NAV_LLM")).toBeInTheDocument();- expect(screen.getByText("SETTINGS$NAV_CONDENSER")).toBeInTheDocument();+ expect(screen.getAllByText("SETTINGS$NAV_LLM").length).toBeGreaterThan(0);+ expect(+ screen.getAllByText("SETTINGS$NAV_CONDENSER").length,+ ).toBeGreaterThan(0);});it("closes the mobile drawer when the close button is clicked", async () => {@@ -62,7 +64,8 @@ describe("SettingsNavigation", () => {</MemoryRouter>,);- await userEvent.click(screen.getByText("SETTINGS$NAV_LLM"));+ const mobileNav = screen.getByTestId("settings-navbar");+ await userEvent.click(within(mobileNav).getByText("SETTINGS$NAV_LLM"));expect(onCloseMobileMenu).toHaveBeenCalledTimes(1);});diff --git a/__tests__/components/features/sidebar/sidebar.test.tsx b/__tests__/components/features/sidebar/sidebar.test.tsxindex aaf36421ca..65690cd5da 100644--- a/__tests__/components/features/sidebar/sidebar.test.tsx+++ b/__tests__/components/features/sidebar/sidebar.test.tsx@@ -21,6 +21,23 @@ vi.mock("#/hooks/query/use-settings", () => ({getErrorStatus: () => undefined,}));+vi.mock("#/contexts/active-backend-context", () => ({+ useActiveBackendContext: () => ({+ backends: [{ id: "local", name: "Local", kind: "local" }],+ active: {+ backend: { id: "local", name: "Local", kind: "local" },+ orgId: null,+ },+ setActive: vi.fn(),+ }),+}));++vi.mock("#/hooks/query/use-backends-health", () => ({+ useBackendsHealth: () => ({+ local: { isConnected: true },+ }),+}));+vi.mock("#/components/shared/buttons/styled-tooltip", () => ({StyledTooltip: ({ children }: { children: unknown }) => children,}));@@ -63,9 +80,84 @@ vi.mock("#/components/shared/modals/settings/settings-modal", () => ({}));vi.mock("#/components/features/backends/backend-selector", () => ({- BackendSelector: () => <div data-testid="backend-selector" />,+ BackendSelector: ({+ onSelectOption,+ onOpenAddBackend,+ onOpenManageBackends,+ }: {+ onSelectOption?: () => void;+ onOpenAddBackend?: () => void;+ onOpenManageBackends?: () => void;+ } = {}) => (+ <div data-testid="backend-selector">+ {/*+ Mimic a backend OPTION row in the dropdown menu β same role/tag the+ real Dropdown emits. Clicking this should not bubble up to the rail+ collapse handler.+ */}+ <ul>+ <li+ data-testid="mock-backend-option"+ role="option"+ aria-selected={false}+ onClick={() => onSelectOption?.()}+ >+ Switch backend+ </li>+ </ul>+ <button+ type="button"+ data-testid="mock-add-backend"+ onClick={() => onOpenAddBackend?.()}+ >+ Add Backend+ </button>+ <button+ type="button"+ data-testid="mock-manage-backends"+ onClick={() => onOpenManageBackends?.()}+ >+ Manage Backends+ </button>+ </div>+ ),}));+vi.mock("#/components/features/backends/add-backend-modal", () => ({+ AddBackendModal: ({ onClose }: { onClose: () => void }) => (+ <div data-testid="add-backend-modal">+ <button+ type="button"+ data-testid="add-backend-modal-close"+ onClick={onClose}+ >+ Close+ </button>+ </div>+ ),+}));++vi.mock("#/components/features/backends/manage-backends-modal", () => ({+ ManageBackendsModal: ({ onClose }: { onClose: () => void }) => (+ <div data-testid="manage-backends-modal">+ <button+ type="button"+ data-testid="manage-backends-modal-close"+ onClick={onClose}+ >+ Close+ </button>+ </div>+ ),+}));++vi.mock(+ "#/components/features/conversation-panel/new-conversation-button",+ () => ({+ NewConversationButton: () => <div data-testid="new-conversation-button" />,+ }),+);+vi.mock("#/components/features/sidebar/sidebar-conversation-list", () => ({SidebarConversationList: () => (<div data-testid="sidebar-conversation-list" />@@ -77,20 +169,23 @@ vi.mock("#/hooks/use-settings-nav-items", () => ({}));function renderSidebar(currentPath: string) {+ const navigate = vi.fn();const value: NavigationContextValue = {currentPath,conversationId: null,isNavigating: false,- navigate: vi.fn(),+ navigate,};- return render(+ const rendered = render(<QueryClientProvider client={new QueryClient()}><NavigationProvider value={value}><Sidebar /></NavigationProvider></QueryClientProvider>,);++ return { ...rendered, navigate };}describe("Sidebar", () => {@@ -118,25 +213,11 @@ describe("Sidebar", () => {},);- it("renders sidebar nav links and the settings toggle with the default text color shared by the settings page nav (text-[#8C8C8C])", () => {+ it("renders sidebar nav links with the default text color (text-[#8C8C8C])", () => {renderSidebar("/skills");const conversationsLink = screen.getByTestId("sidebar-conversations-link");expect(conversationsLink.className).toMatch(/(^|\s)text-\[#8C8C8C\](\s|$)/);-- const settingsToggle = screen.getByTestId("sidebar-settings-toggle");- expect(settingsToggle.className).toMatch(/(^|\s)text-\[#8C8C8C\](\s|$)/);- });-- it("labels the MCP nav item as MCP Directory instead of Integrations", () => {- renderSidebar("/mcp");-- expect(screen.getByRole("link", { name: "SIDEBAR$MCP_DIRECTORY" })).toBe(- screen.getByTestId("sidebar-mcp-link"),- );- expect(- screen.queryByRole("link", { name: "SIDEBAR$INTEGRATIONS" }),- ).not.toBeInTheDocument();});it("toggles between expanded and collapsed states and persists the choice", () => {@@ -144,19 +225,11 @@ describe("Sidebar", () => {const sidebar = screen.getByRole("navigation").parentElement;expect(sidebar?.dataset.collapsed).toBe("false");- // Settings inline toggle is rendered in expanded mode only.- expect(screen.getByTestId("sidebar-settings-toggle")).toBeInTheDocument();const toggle = screen.getByTestId("sidebar-collapse-toggle");fireEvent.click(toggle);expect(sidebar?.dataset.collapsed).toBe("true");- // Inline settings submenu toggle disappears in the collapsed rail; the- // single Settings link remains as the icon entry point.- expect(- screen.queryByTestId("sidebar-settings-toggle"),- ).not.toBeInTheDocument();- expect(screen.getByTestId("sidebar-settings-link")).toBeInTheDocument();// The choice survives a remount via localStorage.unmount();@@ -173,11 +246,125 @@ describe("Sidebar", () => {// ActfireEvent.click(screen.getByTestId("sidebar-collapse-toggle"));- // Assert: state flips back to expanded and the inline settings submenu- // toggle (rendered only when expanded) reappears.+ // Assert: state flips back to expanded.const sidebar = screen.getByRole("navigation").parentElement;expect(sidebar?.dataset.collapsed).toBe("false");- expect(screen.getByTestId("sidebar-settings-toggle")).toBeInTheDocument();+ });++ 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");+ }++ fireEvent.click(sidebar);+ expect(sidebar.dataset.collapsed).toBe("false");+ });++ it("shows collapsed server/settings action icons when sidebar is collapsed", () => {+ window.localStorage.setItem("openhands-sidebar-collapsed", "true");+ renderSidebar("/conversations");++ expect(screen.getByTestId("collapsed-settings-link")).toBeInTheDocument();+ expect(+ screen.getByTestId("collapsed-backend-selector-link"),+ ).toBeInTheDocument();+ expect(screen.getByTestId("backend-status-dot")).toBeInTheDocument();+ });++ it("navigates to settings when collapsed settings icon is clicked", () => {+ window.localStorage.setItem("openhands-sidebar-collapsed", "true");+ const { navigate } = renderSidebar("/conversations");++ fireEvent.click(screen.getByTestId("collapsed-settings-link"));+ expect(navigate).toHaveBeenCalledWith("/settings");+ });++ it("opens the backend popover when hovering the collapsed backend icon", async () => {+ window.localStorage.setItem("openhands-sidebar-collapsed", "true");+ renderSidebar("/conversations");++ expect(screen.queryByTestId("backend-selector")).not.toBeInTheDocument();+ const trigger = screen.getByTestId("collapsed-backend-selector-link");+ const wrapper = trigger.parentElement;+ if (!wrapper) throw new Error("Popover wrapper not found");+ fireEvent.mouseEnter(wrapper);+ expect(await screen.findByTestId("backend-selector")).toBeInTheDocument();+ });++ it("does NOT expand the sidebar when a backend option in the popover is clicked", async () => {+ // Bug: clicking a backend <li role='option'> bubbled up to the aside's+ // rail-collapse handler (which only bails on a/button/[role=button]),+ // so selecting a backend would expand the sidebar mid-switch.+ window.localStorage.setItem("openhands-sidebar-collapsed", "true");+ renderSidebar("/conversations");++ const sidebar = screen.getByRole("navigation").parentElement;+ if (!sidebar) throw new Error("Sidebar not found");+ expect(sidebar.dataset.collapsed).toBe("true");++ const trigger = screen.getByTestId("collapsed-backend-selector-link");+ const popoverContainer = trigger.parentElement;+ if (!popoverContainer) throw new Error("Popover container not found");+ fireEvent.mouseEnter(popoverContainer);+ const option = await screen.findByTestId("mock-backend-option");++ fireEvent.click(option);++ // Sidebar should remain collapsed β selecting a backend should not+ // collapse-toggle the rail.+ expect(sidebar.dataset.collapsed).toBe("true");+ });++ it("keeps the Add Backend modal open after the popover closes", async () => {+ // Bug: modal state lived inside BackendSelector; once the cursor moved+ // out of the popover toward the centred modal, mouseLeave closed the+ // popover, which unmounted BackendSelector and tore the modal down with+ // it. Modal state must live above the popover to survive its unmount.+ window.localStorage.setItem("openhands-sidebar-collapsed", "true");+ renderSidebar("/conversations");++ const trigger = screen.getByTestId("collapsed-backend-selector-link");+ const popoverContainer = trigger.parentElement;+ if (!popoverContainer) throw new Error("Popover container not found");+ fireEvent.mouseEnter(popoverContainer);++ fireEvent.click(await screen.findByTestId("mock-add-backend"));++ // Cursor moves toward the modal -> popover times out and closes.+ fireEvent.mouseLeave(popoverContainer);+ await new Promise((resolve) => {+ setTimeout(resolve, 200);+ });++ expect(screen.queryByTestId("backend-selector")).not.toBeInTheDocument();+ expect(await screen.findByTestId("add-backend-modal")).toBeInTheDocument();+ });++ it("keeps the Manage Backends modal open after the popover closes", async () => {+ window.localStorage.setItem("openhands-sidebar-collapsed", "true");+ renderSidebar("/conversations");++ const trigger = screen.getByTestId("collapsed-backend-selector-link");+ const popoverContainer = trigger.parentElement;+ if (!popoverContainer) throw new Error("Popover container not found");+ fireEvent.mouseEnter(popoverContainer);++ fireEvent.click(await screen.findByTestId("mock-manage-backends"));+ fireEvent.mouseLeave(popoverContainer);+ await new Promise((resolve) => {+ setTimeout(resolve, 200);+ });++ expect(screen.queryByTestId("backend-selector")).not.toBeInTheDocument();+ expect(+ await screen.findByTestId("manage-backends-modal"),+ ).toBeInTheDocument();});it("renders icons for every top-level nav item so they remain meaningful in the collapsed rail", () => {@@ -187,8 +374,6 @@ describe("Sidebar", () => {"sidebar-conversations-link","sidebar-automations-link","sidebar-skills-link",- "sidebar-mcp-link",- "sidebar-settings-toggle",]) {const link = screen.getByTestId(testId);expect(link.querySelector("svg")).not.toBeNull();diff --git a/__tests__/hooks/use-settings-nav-items.test.tsx b/__tests__/hooks/use-settings-nav-items.test.tsxindex 4448f3e583..eae3a41a9a 100644--- a/__tests__/hooks/use-settings-nav-items.test.tsx+++ b/__tests__/hooks/use-settings-nav-items.test.tsx@@ -68,8 +68,5 @@ describe("useSettingsNavItems", () => {expect(paths).not.toContain("/settings/agent-server");expect(paths).not.toContain("/settings/integrations");expect(paths).not.toContain("/settings/skills");- // MCP was elevated to a top-level /mcp nav entry; it must no- // longer appear as a Settings sub-page.- expect(paths).not.toContain("/settings/mcp");});});diff --git a/src/api/backend-registry/active-store.ts b/src/api/backend-registry/active-store.tsindex 15df90e71e..6aeb5cffcc 100644--- a/src/api/backend-registry/active-store.ts+++ b/src/api/backend-registry/active-store.ts@@ -131,7 +131,7 @@ export function subscribeActiveBackend(listener: Listener): () => void {}/** Test-only: re-read storage and clear listeners. */-// eslint-disable-next-line @typescript-eslint/naming-convention+export function __resetActiveStoreForTests(): void {snapshot = computeSnapshot(readStoredBackends(), readStoredActiveBackend());listeners.clear();diff --git a/src/api/cloud/secrets-service.api.ts b/src/api/cloud/secrets-service.api.tsindex 637a1d779f..c5d87baa95 100644--- a/src/api/cloud/secrets-service.api.ts+++ b/src/api/cloud/secrets-service.api.ts@@ -34,7 +34,6 @@ export async function fetchCloudSecrets(): Promise<CustomSecretWithoutValue[]> {const query = new URLSearchParams({ limit: String(PAGE_LIMIT) });if (pageId) query.set("page_id", pageId);- // eslint-disable-next-line no-await-in-loopconst page = await callCloudProxy<CloudSecretsPage>({backend,method: "GET",diff --git a/src/api/cloud/skills-service.api.ts b/src/api/cloud/skills-service.api.tsindex 51d0f5eeef..e7ccad4477 100644--- a/src/api/cloud/skills-service.api.ts+++ b/src/api/cloud/skills-service.api.ts@@ -35,7 +35,6 @@ export async function fetchCloudSkills(): Promise<SkillInfo[]> {const query = new URLSearchParams({ limit: String(PAGE_LIMIT) });if (pageId) query.set("page_id", pageId);- // eslint-disable-next-line no-await-in-loopconst page = await callCloudProxy<CloudSkillsPage>({backend,method: "GET",diff --git a/src/assets/branding/openhands-logo.svg b/src/assets/branding/openhands-logo.svgindex 3aa40d4404..f6938f73a6 100644--- a/src/assets/branding/openhands-logo.svg+++ b/src/assets/branding/openhands-logo.svg@@ -1,9 +1,9 @@<svg width="47" height="30" viewBox="0 0 148 100" fill="none" xmlns="http://www.w3.org/2000/svg">-<path d="M71.754 16.863V2.97414C71.754 1.82355 72.6871 0.890503 73.8377 0.890503C74.9883 0.890503 75.9213 1.82355 75.9213 2.97414V16.863C75.9213 18.0136 74.9883 18.9466 73.8377 18.9466C72.6871 18.9466 71.754 18.0136 71.754 16.863Z" fill="black"/>-<path d="M82.5273 18.9329L89.4717 6.90477C90.047 5.90832 91.3215 5.5668 92.318 6.1421C93.3144 6.7174 93.6559 7.99197 93.0806 8.98841L86.1362 21.0165C85.5609 22.0129 84.2864 22.3545 83.2899 21.7792C82.2935 21.2039 81.952 19.9293 82.5273 18.9329Z" fill="black"/>-<path d="M65.1481 18.9329L58.2037 6.90477C57.6284 5.90832 56.3538 5.5668 55.3574 6.1421C54.3609 6.7174 54.0194 7.99197 54.5947 8.98841L61.5391 21.0165C62.1144 22.0129 63.389 22.3545 64.3854 21.7792C65.3819 21.2039 65.7234 19.9293 65.1481 18.9329Z" fill="black"/>-<path d="M98.5045 92.4969C95.1427 89.7602 90.8793 83.6628 89.0929 77.664C86.8598 70.1655 82.0309 62.777 80.9578 60.9138C80.0056 59.2602 83.0313 53.2605 89.0929 58.0459C93.9421 61.8742 97.3878 68.466 98.5045 71.2833C98.9566 72.4239 103.006 79.2475 101.827 56.6051C101.455 49.445 100.49 44.3126 100.036 33.9388C99.6807 25.7997 101.824 23.057 105.11 23.057C108.396 23.057 111.106 24.1244 111.106 32.4283C111.106 22.8682 113.154 20.7141 117.646 20.7147C121.39 20.7153 123.069 23.9077 123.069 27.0952V32.5084C123.069 27.0952 126.669 26.5896 128.519 26.5896C130.37 26.5896 134.076 28.1957 134.076 32.5084V43.317C134.076 38.116 137.324 36.601 139.773 36.765C142.963 36.9786 144.405 39.2382 143.965 44.3126C143.651 47.9349 142.689 58.5273 142.689 62.0291C142.689 65.1712 143.965 71.6801 142.689 77.664C141.953 81.1168 140.137 90.2628 130.885 94.4102C121.634 98.5575 105.364 98.0807 98.5045 92.4969Z" fill="#FFFF8B"/>-<path d="M140.606 62.0292C140.606 58.409 141.583 47.6748 141.89 44.1323C142.097 41.7374 141.809 40.4247 141.424 39.7542C141.141 39.2626 140.699 38.915 139.634 38.8436C138.865 38.7921 138.027 39.0114 137.401 39.5761C136.814 40.1052 136.159 41.1682 136.159 43.3176L136.155 43.4388L135.198 59.758C135.164 60.3451 134.883 60.8911 134.424 61.2599C133.966 61.6284 133.374 61.7859 132.793 61.6941L122.764 60.1068L111.948 58.6703C110.949 58.5376 110.188 57.7084 110.142 56.7016L109.545 43.8055L109.54 43.6959C109.274 38.5609 109.022 33.8767 109.022 32.4282C109.022 28.3859 108.338 26.6806 107.74 25.9634C107.263 25.3915 106.577 25.1402 105.11 25.1402C104.583 25.1402 104.212 25.2481 103.933 25.4111C103.659 25.5714 103.346 25.8587 103.049 26.4208C102.41 27.6257 101.945 29.891 102.118 33.8479C102.342 38.9804 102.692 42.8146 103.035 46.2718C103.377 49.7231 103.718 52.8561 103.908 56.4971C104.204 62.1966 104.178 66.1256 103.945 68.7924C103.828 70.124 103.656 71.1996 103.423 72.0501C103.202 72.8558 102.871 73.6757 102.296 74.2887C101.6 75.0303 100.608 75.3844 99.577 75.136C98.7592 74.9389 98.1847 74.4215 97.8706 74.0916C97.2141 73.4017 96.7501 72.5106 96.568 72.0512C95.5097 69.3812 92.2352 63.1808 87.8023 59.6811C86.5089 58.6599 85.5666 58.3652 84.9736 58.3204C84.4148 58.2783 84.0094 58.4436 83.6909 58.6967C83.34 58.9756 83.0781 59.3811 82.9479 59.7643C82.9019 59.8999 82.8823 59.9968 82.8741 60.0584C84.0759 62.0865 88.8421 69.5222 91.0896 77.069C92.7648 82.6941 96.8038 88.4259 99.8194 90.8809C102.74 93.258 107.988 94.7313 113.9 95.0218C119.756 95.3095 125.788 94.4121 130.033 92.5092C138.233 88.8334 139.903 80.7382 140.651 77.2292C141.232 74.5057 141.243 71.5987 141.087 68.9009C141.01 67.5551 140.894 66.2969 140.793 65.1373C140.695 64.0105 140.606 62.9215 140.606 62.0292ZM120.986 27.0953C120.986 25.8314 120.648 24.7049 120.089 23.9514C119.583 23.27 118.84 22.7987 117.646 22.7984C116.668 22.7982 116.011 22.9187 115.546 23.1167C115.13 23.2943 114.781 23.5699 114.463 24.0831C113.73 25.2671 113.192 27.6455 113.189 32.384L113.707 43.6021C113.901 47.3443 114.103 51.3994 114.236 54.7707L120.986 55.6666V27.0953ZM125.153 56.2652L131.172 57.218L131.992 43.267V32.5083C131.992 31.031 131.39 30.1275 130.678 29.5489C129.884 28.9039 128.957 28.6731 128.519 28.6731C127.722 28.6731 126.899 28.797 126.306 29.2179C125.849 29.5421 125.153 30.3087 125.153 32.5083V56.2652ZM136.159 35.4278C137.406 34.8069 138.74 34.6083 139.912 34.6868C142.037 34.8292 143.91 35.718 145.037 37.6779C146.06 39.4592 146.273 41.8136 146.041 44.4927C145.72 48.1949 144.772 58.6457 144.772 62.0292C144.772 62.708 144.843 63.6116 144.944 64.7758C145.042 65.907 145.165 67.2389 145.247 68.6606C145.411 71.4987 145.422 74.8383 144.727 78.0987C144.002 81.4953 142.041 91.6918 131.738 96.3108C126.731 98.5551 120.002 99.4936 113.696 99.1838C107.445 98.8767 101.128 97.3189 97.1887 94.1122C93.4809 91.0936 88.9938 84.6307 87.0962 78.2589C84.9529 71.0619 80.3109 63.9646 79.1527 61.9533C78.4706 60.7689 78.684 59.3628 79.0019 58.4258C79.3607 57.3688 80.0554 56.2631 81.0993 55.4337C82.1758 54.5784 83.6043 54.0377 85.2876 54.1647C86.9369 54.2893 88.6462 55.0393 90.3834 56.4107C94.8541 59.9401 98.1342 65.5082 99.7424 68.9231C99.759 68.7664 99.779 68.6024 99.7941 68.4298C100.003 66.0435 100.039 62.3344 99.7467 56.7132C99.5635 53.1942 99.2356 50.1809 98.8888 46.6828C98.5425 43.1904 98.184 39.2713 97.955 34.0302C97.7722 29.8481 98.2012 26.6722 99.3672 24.471C99.9716 23.3302 100.79 22.4223 101.83 21.814C102.866 21.2087 103.995 20.974 105.11 20.974C106.759 20.974 108.813 21.2062 110.448 22.7678C110.593 22.4576 110.75 22.1652 110.921 21.8899C111.676 20.6698 112.681 19.8084 113.912 19.2835C115.095 18.7791 116.378 18.6309 117.646 18.6311C120.195 18.6315 122.165 19.7565 123.435 21.4683C124.257 22.576 124.75 23.8776 124.985 25.1982C126.338 24.5876 127.691 24.5068 128.519 24.5068C129.933 24.5068 131.784 25.0791 133.305 26.3154C134.908 27.6179 136.159 29.6733 136.159 32.5083V35.4278Z" fill="black"/>-<path d="M49.258 92.4969C52.6198 89.7602 56.8832 83.6628 58.6696 77.664C60.9027 70.1655 65.7316 62.777 66.8047 60.9138C67.757 59.2602 64.7312 53.2605 58.6696 58.0459C53.8204 61.8742 50.3747 68.466 49.258 71.2833C48.8059 72.4239 44.7566 79.2475 45.935 56.6051C46.3077 49.445 47.2728 44.3126 47.7261 33.9388C48.0818 25.7997 45.9381 23.057 42.6523 23.057C39.3666 23.057 36.6568 24.1244 36.6568 32.4283C36.6568 22.8682 34.6087 20.7141 30.1168 20.7147C26.3728 20.7153 24.6934 23.9077 24.6934 27.0952V32.5084C24.6934 27.0952 21.0938 26.5896 19.243 26.5896C17.3923 26.5896 13.687 28.1957 13.687 32.5084V43.317C13.687 38.116 10.4388 36.601 7.98968 36.765C4.79943 36.9786 3.3574 39.2382 3.79721 44.3126C4.11115 47.9349 5.07331 58.5273 5.07331 62.0291C5.07331 65.1712 3.79721 71.6801 5.07331 77.664C5.80964 81.1168 7.62551 90.2628 16.8772 94.4102C26.129 98.5575 42.3987 98.0807 49.258 92.4969Z" fill="#FFFF8B"/>-<path d="M7.15667 62.0292C7.15667 58.409 6.18001 47.6748 5.87297 44.1323C5.66546 41.7374 5.95363 40.4247 6.33881 39.7542C6.62122 39.2626 7.06342 38.915 8.1284 38.8436C8.89765 38.7921 9.7355 39.0114 10.3617 39.5761C10.9484 40.1052 11.6032 41.1682 11.6032 43.3176L11.6075 43.4388L12.5644 59.758C12.5989 60.3451 12.8798 60.8911 13.338 61.2599C13.7961 61.6284 14.3888 61.7859 14.9695 61.6941L24.9988 60.1068L35.8144 58.6703C36.8136 58.5376 37.5741 57.7084 37.6208 56.7016L38.2174 43.8055L38.2226 43.6959C38.4887 38.5609 38.7401 33.8767 38.7401 32.4282C38.7401 28.3859 39.4246 26.6806 40.0228 25.9634C40.4997 25.3915 41.1851 25.1402 42.6523 25.1402C43.1795 25.1402 43.5506 25.2481 43.8296 25.4111C44.1038 25.5714 44.416 25.8587 44.7139 26.4208C45.3521 27.6257 45.8174 29.891 45.6445 33.8479C45.4202 38.9804 45.0703 42.8146 44.7276 46.2718C44.3854 49.7231 44.0444 52.8561 43.8549 56.4971C43.5583 62.1966 43.5848 66.1256 43.818 68.7924C43.9345 70.124 44.107 71.1996 44.3397 72.0501C44.5602 72.8558 44.891 73.6757 45.4664 74.2887C46.1626 75.0303 47.1547 75.3844 48.1855 75.136C49.0033 74.9389 49.5779 74.4215 49.8919 74.0916C50.5484 73.4017 51.0124 72.5106 51.1945 72.0512C52.2528 69.3812 55.5273 63.1808 59.9602 59.6811C61.2536 58.6599 62.1959 58.3652 62.7889 58.3204C63.3477 58.2783 63.7531 58.4436 64.0716 58.6967C64.4225 58.9756 64.6844 59.3811 64.8146 59.7643C64.8606 59.8999 64.8802 59.9968 64.8884 60.0584C63.6866 62.0865 58.9205 69.5222 56.6729 77.069C54.9978 82.6941 50.9587 88.4259 47.9431 90.8809C45.0229 93.258 39.7748 94.7313 33.8625 95.0218C28.0069 95.3095 21.9748 94.4121 17.7298 92.5092C9.52994 88.8334 7.85968 80.7382 7.11135 77.2292C6.5306 74.5057 6.51956 71.5987 6.67502 68.9009C6.75257 67.5551 6.86815 66.2969 6.96907 65.1373C7.06713 64.0105 7.15666 62.9215 7.15667 62.0292ZM26.7768 27.0953C26.7768 25.8314 27.1148 24.7049 27.6737 23.9514C28.1793 23.27 28.9221 22.7987 30.1168 22.7984C31.0942 22.7982 31.7519 22.9187 32.2162 23.1167C32.6327 23.2943 32.9818 23.5699 33.2997 24.0831C34.0329 25.2671 34.5706 27.6455 34.5739 32.384L34.0554 43.6021C33.8615 47.3443 33.6592 51.3994 33.5263 54.7707L26.7768 55.6666V27.0953ZM22.6096 56.2652L16.5905 57.218L15.7705 43.267V32.5083C15.7705 31.031 16.3726 30.1275 17.0848 29.5489C17.8786 28.9039 18.8059 28.6731 19.2433 28.6731C20.0405 28.6731 20.8635 28.797 21.4565 29.2179C21.9131 29.5421 22.6095 30.3087 22.6096 32.5083V56.2652ZM11.6032 35.4278C10.3568 34.8069 9.02271 34.6083 7.85016 34.6868C5.72547 34.8292 3.85203 35.718 2.7259 37.6779C1.70253 39.4592 1.4893 41.8136 1.7215 44.4927C2.04237 48.1949 2.99044 58.6457 2.99044 62.0292C2.99043 62.708 2.91997 63.6116 2.81865 64.7758C2.7202 65.907 2.59705 67.2389 2.51511 68.6606C2.35156 71.4987 2.34047 74.8383 3.03576 78.0987C3.76011 81.4953 5.7216 91.6918 16.0245 96.3108C21.0312 98.5551 27.7601 99.4936 34.0669 99.1838C40.3173 98.8767 46.6346 97.3189 50.5738 94.1122C54.2816 91.0936 58.7687 84.6307 60.6663 78.2589C62.8096 71.0619 67.4516 63.9646 68.6099 61.9533C69.292 60.7689 69.0785 59.3628 68.7606 58.4258C68.4018 57.3688 67.7071 56.2631 66.6632 55.4337C65.5867 54.5784 64.1582 54.0377 62.4749 54.1647C60.8256 54.2893 59.1163 55.0393 57.3791 56.4107C52.9084 59.9401 49.6283 65.5082 48.0201 68.9231C48.0035 68.7664 47.9835 68.6024 47.9684 68.4298C47.7597 66.0435 47.7233 62.3344 48.0159 56.7132C48.199 53.1942 48.5269 50.1809 48.8738 46.6828C49.22 43.1904 49.5785 39.2713 49.8076 34.0302C49.9903 29.8481 49.5613 26.6722 48.3953 24.471C47.7909 23.3302 46.9729 22.4223 45.9322 21.814C44.8964 21.2087 43.7676 20.974 42.6523 20.974C41.0038 20.974 38.9498 21.2062 37.3141 22.7678C37.1699 22.4576 37.0125 22.1652 36.842 21.8899C36.0864 20.6698 35.0817 19.8084 33.8509 19.2835C32.668 18.7791 31.3849 18.6309 30.1168 18.6311C27.5676 18.6315 25.5976 19.7565 24.3275 21.4683C23.5057 22.576 23.0121 23.8776 22.7771 25.1982C21.4248 24.5876 20.0718 24.5068 19.2433 24.5068C17.8299 24.5068 15.9789 25.0791 14.4573 26.3154C12.8543 27.6179 11.6033 29.6733 11.6032 32.5083V35.4278Z" fill="black"/>+<path d="M71.754 16.863V2.97414C71.754 1.82355 72.6871 0.890503 73.8377 0.890503C74.9883 0.890503 75.9213 1.82355 75.9213 2.97414V16.863C75.9213 18.0136 74.9883 18.9466 73.8377 18.9466C72.6871 18.9466 71.754 18.0136 71.754 16.863Z" fill="white"/>+<path d="M82.5273 18.9329L89.4717 6.90477C90.047 5.90832 91.3215 5.5668 92.318 6.1421C93.3144 6.7174 93.6559 7.99197 93.0806 8.98841L86.1362 21.0165C85.5609 22.0129 84.2864 22.3545 83.2899 21.7792C82.2935 21.2039 81.952 19.9293 82.5273 18.9329Z" fill="white"/>+<path d="M65.1481 18.9329L58.2037 6.90477C57.6284 5.90832 56.3538 5.5668 55.3574 6.1421C54.3609 6.7174 54.0194 7.99197 54.5947 8.98841L61.5391 21.0165C62.1144 22.0129 63.389 22.3545 64.3854 21.7792C65.3819 21.2039 65.7234 19.9293 65.1481 18.9329Z" fill="white"/>+<path d="M98.5045 92.4969C95.1427 89.7602 90.8793 83.6628 89.0929 77.664C86.8598 70.1655 82.0309 62.777 80.9578 60.9138C80.0056 59.2602 83.0313 53.2605 89.0929 58.0459C93.9421 61.8742 97.3878 68.466 98.5045 71.2833C98.9566 72.4239 103.006 79.2475 101.827 56.6051C101.455 49.445 100.49 44.3126 100.036 33.9388C99.6807 25.7997 101.824 23.057 105.11 23.057C108.396 23.057 111.106 24.1244 111.106 32.4283C111.106 22.8682 113.154 20.7141 117.646 20.7147C121.39 20.7153 123.069 23.9077 123.069 27.0952V32.5084C123.069 27.0952 126.669 26.5896 128.519 26.5896C130.37 26.5896 134.076 28.1957 134.076 32.5084V43.317C134.076 38.116 137.324 36.601 139.773 36.765C142.963 36.9786 144.405 39.2382 143.965 44.3126C143.651 47.9349 142.689 58.5273 142.689 62.0291C142.689 65.1712 143.965 71.6801 142.689 77.664C141.953 81.1168 140.137 90.2628 130.885 94.4102C121.634 98.5575 105.364 98.0807 98.5045 92.4969Z" fill="transparent"/>+<path d="M140.606 62.0292C140.606 58.409 141.583 47.6748 141.89 44.1323C142.097 41.7374 141.809 40.4247 141.424 39.7542C141.141 39.2626 140.699 38.915 139.634 38.8436C138.865 38.7921 138.027 39.0114 137.401 39.5761C136.814 40.1052 136.159 41.1682 136.159 43.3176L136.155 43.4388L135.198 59.758C135.164 60.3451 134.883 60.8911 134.424 61.2599C133.966 61.6284 133.374 61.7859 132.793 61.6941L122.764 60.1068L111.948 58.6703C110.949 58.5376 110.188 57.7084 110.142 56.7016L109.545 43.8055L109.54 43.6959C109.274 38.5609 109.022 33.8767 109.022 32.4282C109.022 28.3859 108.338 26.6806 107.74 25.9634C107.263 25.3915 106.577 25.1402 105.11 25.1402C104.583 25.1402 104.212 25.2481 103.933 25.4111C103.659 25.5714 103.346 25.8587 103.049 26.4208C102.41 27.6257 101.945 29.891 102.118 33.8479C102.342 38.9804 102.692 42.8146 103.035 46.2718C103.377 49.7231 103.718 52.8561 103.908 56.4971C104.204 62.1966 104.178 66.1256 103.945 68.7924C103.828 70.124 103.656 71.1996 103.423 72.0501C103.202 72.8558 102.871 73.6757 102.296 74.2887C101.6 75.0303 100.608 75.3844 99.577 75.136C98.7592 74.9389 98.1847 74.4215 97.8706 74.0916C97.2141 73.4017 96.7501 72.5106 96.568 72.0512C95.5097 69.3812 92.2352 63.1808 87.8023 59.6811C86.5089 58.6599 85.5666 58.3652 84.9736 58.3204C84.4148 58.2783 84.0094 58.4436 83.6909 58.6967C83.34 58.9756 83.0781 59.3811 82.9479 59.7643C82.9019 59.8999 82.8823 59.9968 82.8741 60.0584C84.0759 62.0865 88.8421 69.5222 91.0896 77.069C92.7648 82.6941 96.8038 88.4259 99.8194 90.8809C102.74 93.258 107.988 94.7313 113.9 95.0218C119.756 95.3095 125.788 94.4121 130.033 92.5092C138.233 88.8334 139.903 80.7382 140.651 77.2292C141.232 74.5057 141.243 71.5987 141.087 68.9009C141.01 67.5551 140.894 66.2969 140.793 65.1373C140.695 64.0105 140.606 62.9215 140.606 62.0292ZM120.986 27.0953C120.986 25.8314 120.648 24.7049 120.089 23.9514C119.583 23.27 118.84 22.7987 117.646 22.7984C116.668 22.7982 116.011 22.9187 115.546 23.1167C115.13 23.2943 114.781 23.5699 114.463 24.0831C113.73 25.2671 113.192 27.6455 113.189 32.384L113.707 43.6021C113.901 47.3443 114.103 51.3994 114.236 54.7707L120.986 55.6666V27.0953ZM125.153 56.2652L131.172 57.218L131.992 43.267V32.5083C131.992 31.031 131.39 30.1275 130.678 29.5489C129.884 28.9039 128.957 28.6731 128.519 28.6731C127.722 28.6731 126.899 28.797 126.306 29.2179C125.849 29.5421 125.153 30.3087 125.153 32.5083V56.2652ZM136.159 35.4278C137.406 34.8069 138.74 34.6083 139.912 34.6868C142.037 34.8292 143.91 35.718 145.037 37.6779C146.06 39.4592 146.273 41.8136 146.041 44.4927C145.72 48.1949 144.772 58.6457 144.772 62.0292C144.772 62.708 144.843 63.6116 144.944 64.7758C145.042 65.907 145.165 67.2389 145.247 68.6606C145.411 71.4987 145.422 74.8383 144.727 78.0987C144.002 81.4953 142.041 91.6918 131.738 96.3108C126.731 98.5551 120.002 99.4936 113.696 99.1838C107.445 98.8767 101.128 97.3189 97.1887 94.1122C93.4809 91.0936 88.9938 84.6307 87.0962 78.2589C84.9529 71.0619 80.3109 63.9646 79.1527 61.9533C78.4706 60.7689 78.684 59.3628 79.0019 58.4258C79.3607 57.3688 80.0554 56.2631 81.0993 55.4337C82.1758 54.5784 83.6043 54.0377 85.2876 54.1647C86.9369 54.2893 88.6462 55.0393 90.3834 56.4107C94.8541 59.9401 98.1342 65.5082 99.7424 68.9231C99.759 68.7664 99.779 68.6024 99.7941 68.4298C100.003 66.0435 100.039 62.3344 99.7467 56.7132C99.5635 53.1942 99.2356 50.1809 98.8888 46.6828C98.5425 43.1904 98.184 39.2713 97.955 34.0302C97.7722 29.8481 98.2012 26.6722 99.3672 24.471C99.9716 23.3302 100.79 22.4223 101.83 21.814C102.866 21.2087 103.995 20.974 105.11 20.974C106.759 20.974 108.813 21.2062 110.448 22.7678C110.593 22.4576 110.75 22.1652 110.921 21.8899C111.676 20.6698 112.681 19.8084 113.912 19.2835C115.095 18.7791 116.378 18.6309 117.646 18.6311C120.195 18.6315 122.165 19.7565 123.435 21.4683C124.257 22.576 124.75 23.8776 124.985 25.1982C126.338 24.5876 127.691 24.5068 128.519 24.5068C129.933 24.5068 131.784 25.0791 133.305 26.3154C134.908 27.6179 136.159 29.6733 136.159 32.5083V35.4278Z" fill="white"/>+<path d="M49.258 92.4969C52.6198 89.7602 56.8832 83.6628 58.6696 77.664C60.9027 70.1655 65.7316 62.777 66.8047 60.9138C67.757 59.2602 64.7312 53.2605 58.6696 58.0459C53.8204 61.8742 50.3747 68.466 49.258 71.2833C48.8059 72.4239 44.7566 79.2475 45.935 56.6051C46.3077 49.445 47.2728 44.3126 47.7261 33.9388C48.0818 25.7997 45.9381 23.057 42.6523 23.057C39.3666 23.057 36.6568 24.1244 36.6568 32.4283C36.6568 22.8682 34.6087 20.7141 30.1168 20.7147C26.3728 20.7153 24.6934 23.9077 24.6934 27.0952V32.5084C24.6934 27.0952 21.0938 26.5896 19.243 26.5896C17.3923 26.5896 13.687 28.1957 13.687 32.5084V43.317C13.687 38.116 10.4388 36.601 7.98968 36.765C4.79943 36.9786 3.3574 39.2382 3.79721 44.3126C4.11115 47.9349 5.07331 58.5273 5.07331 62.0291C5.07331 65.1712 3.79721 71.6801 5.07331 77.664C5.80964 81.1168 7.62551 90.2628 16.8772 94.4102C26.129 98.5575 42.3987 98.0807 49.258 92.4969Z" fill="transparent"/>+<path d="M7.15667 62.0292C7.15667 58.409 6.18001 47.6748 5.87297 44.1323C5.66546 41.7374 5.95363 40.4247 6.33881 39.7542C6.62122 39.2626 7.06342 38.915 8.1284 38.8436C8.89765 38.7921 9.7355 39.0114 10.3617 39.5761C10.9484 40.1052 11.6032 41.1682 11.6032 43.3176L11.6075 43.4388L12.5644 59.758C12.5989 60.3451 12.8798 60.8911 13.338 61.2599C13.7961 61.6284 14.3888 61.7859 14.9695 61.6941L24.9988 60.1068L35.8144 58.6703C36.8136 58.5376 37.5741 57.7084 37.6208 56.7016L38.2174 43.8055L38.2226 43.6959C38.4887 38.5609 38.7401 33.8767 38.7401 32.4282C38.7401 28.3859 39.4246 26.6806 40.0228 25.9634C40.4997 25.3915 41.1851 25.1402 42.6523 25.1402C43.1795 25.1402 43.5506 25.2481 43.8296 25.4111C44.1038 25.5714 44.416 25.8587 44.7139 26.4208C45.3521 27.6257 45.8174 29.891 45.6445 33.8479C45.4202 38.9804 45.0703 42.8146 44.7276 46.2718C44.3854 49.7231 44.0444 52.8561 43.8549 56.4971C43.5583 62.1966 43.5848 66.1256 43.818 68.7924C43.9345 70.124 44.107 71.1996 44.3397 72.0501C44.5602 72.8558 44.891 73.6757 45.4664 74.2887C46.1626 75.0303 47.1547 75.3844 48.1855 75.136C49.0033 74.9389 49.5779 74.4215 49.8919 74.0916C50.5484 73.4017 51.0124 72.5106 51.1945 72.0512C52.2528 69.3812 55.5273 63.1808 59.9602 59.6811C61.2536 58.6599 62.1959 58.3652 62.7889 58.3204C63.3477 58.2783 63.7531 58.4436 64.0716 58.6967C64.4225 58.9756 64.6844 59.3811 64.8146 59.7643C64.8606 59.8999 64.8802 59.9968 64.8884 60.0584C63.6866 62.0865 58.9205 69.5222 56.6729 77.069C54.9978 82.6941 50.9587 88.4259 47.9431 90.8809C45.0229 93.258 39.7748 94.7313 33.8625 95.0218C28.0069 95.3095 21.9748 94.4121 17.7298 92.5092C9.52994 88.8334 7.85968 80.7382 7.11135 77.2292C6.5306 74.5057 6.51956 71.5987 6.67502 68.9009C6.75257 67.5551 6.86815 66.2969 6.96907 65.1373C7.06713 64.0105 7.15666 62.9215 7.15667 62.0292ZM26.7768 27.0953C26.7768 25.8314 27.1148 24.7049 27.6737 23.9514C28.1793 23.27 28.9221 22.7987 30.1168 22.7984C31.0942 22.7982 31.7519 22.9187 32.2162 23.1167C32.6327 23.2943 32.9818 23.5699 33.2997 24.0831C34.0329 25.2671 34.5706 27.6455 34.5739 32.384L34.0554 43.6021C33.8615 47.3443 33.6592 51.3994 33.5263 54.7707L26.7768 55.6666V27.0953ZM22.6096 56.2652L16.5905 57.218L15.7705 43.267V32.5083C15.7705 31.031 16.3726 30.1275 17.0848 29.5489C17.8786 28.9039 18.8059 28.6731 19.2433 28.6731C20.0405 28.6731 20.8635 28.797 21.4565 29.2179C21.9131 29.5421 22.6095 30.3087 22.6096 32.5083V56.2652ZM11.6032 35.4278C10.3568 34.8069 9.02271 34.6083 7.85016 34.6868C5.72547 34.8292 3.85203 35.718 2.7259 37.6779C1.70253 39.4592 1.4893 41.8136 1.7215 44.4927C2.04237 48.1949 2.99044 58.6457 2.99044 62.0292C2.99043 62.708 2.91997 63.6116 2.81865 64.7758C2.7202 65.907 2.59705 67.2389 2.51511 68.6606C2.35156 71.4987 2.34047 74.8383 3.03576 78.0987C3.76011 81.4953 5.7216 91.6918 16.0245 96.3108C21.0312 98.5551 27.7601 99.4936 34.0669 99.1838C40.3173 98.8767 46.6346 97.3189 50.5738 94.1122C54.2816 91.0936 58.7687 84.6307 60.6663 78.2589C62.8096 71.0619 67.4516 63.9646 68.6099 61.9533C69.292 60.7689 69.0785 59.3628 68.7606 58.4258C68.4018 57.3688 67.7071 56.2631 66.6632 55.4337C65.5867 54.5784 64.1582 54.0377 62.4749 54.1647C60.8256 54.2893 59.1163 55.0393 57.3791 56.4107C52.9084 59.9401 49.6283 65.5082 48.0201 68.9231C48.0035 68.7664 47.9835 68.6024 47.9684 68.4298C47.7597 66.0435 47.7233 62.3344 48.0159 56.7132C48.199 53.1942 48.5269 50.1809 48.8738 46.6828C49.22 43.1904 49.5785 39.2713 49.8076 34.0302C49.9903 29.8481 49.5613 26.6722 48.3953 24.471C47.7909 23.3302 46.9729 22.4223 45.9322 21.814C44.8964 21.2087 43.7676 20.974 42.6523 20.974C41.0038 20.974 38.9498 21.2062 37.3141 22.7678C37.1699 22.4576 37.0125 22.1652 36.842 21.8899C36.0864 20.6698 35.0817 19.8084 33.8509 19.2835C32.668 18.7791 31.3849 18.6309 30.1168 18.6311C27.5676 18.6315 25.5976 19.7565 24.3275 21.4683C23.5057 22.576 23.0121 23.8776 22.7771 25.1982C21.4248 24.5876 20.0718 24.5068 19.2433 24.5068C17.8299 24.5068 15.9789 25.0791 14.4573 26.3154C12.8543 27.6179 11.6033 29.6733 11.6032 32.5083V35.4278Z" fill="white"/></svg>diff --git a/src/components/features/backends/backend-selector.tsx b/src/components/features/backends/backend-selector.tsxindex 1630eebeed..1cd9ab16af 100644--- a/src/components/features/backends/backend-selector.tsx+++ b/src/components/features/backends/backend-selector.tsx@@ -21,7 +21,6 @@ import {ENVIRONMENT_SWITCH_SETACTIVE_DELAY_MS,triggerEnvironmentSwitch,} from "#/components/features/backends/environment-switch-store";-import { getLastConversationId } from "#/api/backend-registry/last-conversation-store";import { AddBackendModal } from "./add-backend-modal";import { BackendStatusDot } from "./backend-status-dot";import { ManageBackendsModal } from "./manage-backends-modal";@@ -100,10 +99,31 @@ function buildOptions(interface BackendSelectorProps {/** Render the menu above the trigger (e.g. when pinned to bottom of sidebar). */openUpward?: boolean;+ /** Hide the selector input trigger and only render the dropdown menu. */+ hideTrigger?: boolean;+ /** Whether the dropdown menu should start open on mount. */+ defaultOpen?: boolean;+ /** Callback fired after selecting a backend/org option. */+ onSelectOption?: () => void;+ /**+ * Override the internal Add Backend modal handling. When provided,+ * clicking "Add Backend" calls this instead of opening BackendSelector's+ * own modal. Useful when the selector is mounted inside an ephemeral+ * container (e.g. the collapsed-sidebar popover) and the modal must+ * survive the parent unmounting.+ */+ onOpenAddBackend?: () => void;+ /** Same as onOpenAddBackend but for the Manage Backends modal. */+ onOpenManageBackends?: () => void;}export function BackendSelector({openUpward = false,+ hideTrigger = false,+ defaultOpen = false,+ onSelectOption,+ onOpenAddBackend,+ onOpenManageBackends,}: BackendSelectorProps = {}) {const { t } = useTranslation("openhands");const { backends, active, setActive } = useActiveBackendContext();@@ -112,6 +132,8 @@ export function BackendSelector({// Probe each registered backend every 10s.const healthByBackendId = useBackendsHealth(backends);const navigate = useNavigate();+ const settingsMatch = useMatch("/settings");+ const settingsSubrouteMatch = useMatch("/settings/*");const conversationMatch = useMatch("/conversations/:conversationId");const automationDetailMatch = useMatch("/automations/:automationId");const [addBackendModalOpen, setAddBackendModalOpen] = React.useState(false);@@ -140,6 +162,7 @@ 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 someCloudLoading = Object.values(cloudOrgs).some((c) => c.isLoading);@@ -171,12 +194,22 @@ export function BackendSelector({}, [active, cloudOrgs, currentUserIds, setActive]);const openAddBackendModal = React.useCallback(() => {+ if (onOpenAddBackend) {+ onOpenAddBackend();+ onSelectOption?.();+ return;+ }setAddBackendModalOpen(true);- }, []);+ }, [onOpenAddBackend, onSelectOption]);const openManageBackendsModal = React.useCallback(() => {+ if (onOpenManageBackends) {+ onOpenManageBackends();+ onSelectOption?.();+ return;+ }setManageBackendsModalOpen(true);- }, []);+ }, [onOpenManageBackends, onSelectOption]);const preventDropdownMenuClose = React.useCallback((event: React.MouseEvent<HTMLButtonElement>) => {@@ -211,71 +244,85 @@ export function BackendSelector({</div>);- return (- <>- <Dropdown- testId="backend-selector"- key={`${activeValue}-${activeOption?.label ?? ""}`}- defaultValue={- activeOption ?? {- value: activeValue,- label: active.backend.name,- prefix: buildStatusPrefix(healthByBackendId[active.backend.id]),- }- }- footer={addBackendFooter}- openUpward={openUpward}- onChange={async (item) => {- if (!item || item.value === activeValue) return;- const { backendId, orgId } = parseOptionValue(item.value);- const target = backends.find((b) => b.id === backendId);- if (!target) return;+ const handleSelectBackend = React.useCallback(+ async (value: string) => {+ if (value === activeValue) return;++ const { backendId, orgId } = parseOptionValue(value);+ const target = backends.find((b) => b.id === backendId);+ if (!target) return;++ triggerEnvironmentSwitch(+ options.find((option) => option.value === value)?.label ?? target.name,+ );+ await new Promise<void>((resolve) => {+ setTimeout(resolve, ENVIRONMENT_SWITCH_SETACTIVE_DELAY_MS);+ });- triggerEnvironmentSwitch(item.label);- await new Promise<void>((resolve) => {- setTimeout(resolve, ENVIRONMENT_SWITCH_SETACTIVE_DELAY_MS);- });+ if (conversationMatch) navigate("/conversations");+ else if (automationDetailMatch) navigate("/automations");- // Compute where the user should land on the target backend.- // The rule:- // - on `/conversations/:id`: jump to the target backend's- // most recently selected conversation, or to- // `/conversations` if it has none. Either way the URL- // stops referring to the source backend's conversation- // id, which avoids a "conversation not available" 404- // once we re-key backend-scoped queries below.- // - on `/automations/:id`: jump to the automations list- // (automation ids are not portable across backends and- // we don't currently remember a per-backend selection).- // - on any other route (settings, /conversations,- // /skills, β¦): stay on the same path.- //- // `await navigate(...)` waits for the router transition to- // commit before `setActive` notifies its listeners. Without- // that wait, react-router defers the URL change as a- // transition while `useSyncExternalStore`-based backend- // listeners run at sync priority β the conversation route- // would re-render once with `(newBackendId, oldConvoId)` and- // `useUserConversation` would fire a 404 against the new- // backend before unmounting.- let destination: string | null = null;- if (conversationMatch) {- const remembered = getLastConversationId(target.id, orgId);- destination = remembered- ? `/conversations/${remembered}`- : "/conversations";- } else if (automationDetailMatch) {- destination = "/automations";- }- if (destination) await navigate(destination);+ setActive(target.id, orgId);+ onSelectOption?.();+ },+ [+ activeValue,+ backends,+ conversationMatch,+ automationDetailMatch,+ navigate,+ options,+ setActive,+ t,+ onSelectOption,+ ],+ );- setActive(target.id, orgId);- }}- placeholder={active.backend.name}- loading={someCloudLoading}- options={options}- className="bg-[#1F1F1F66] border-[#242424]"- />+ return (+ <>+ <div className="flex items-center gap-2 w-full">+ <div className="flex-1 min-w-0">+ <Dropdown+ testId="backend-selector"+ key={`${activeValue}-${activeOption?.label ?? ""}`}+ defaultValue={+ activeOption ?? {+ value: activeValue,+ label: active.backend.name,+ prefix: buildStatusPrefix(healthByBackendId[active.backend.id]),+ }+ }+ footer={addBackendFooter}+ openUpward={openUpward}+ hideTrigger={hideTrigger}+ defaultOpen={defaultOpen}+ openOnHover={!hideTrigger}+ onChange={(item) => {+ if (!item) return;+ void handleSelectBackend(item.value);+ }}+ placeholder={active.backend.name}+ loading={someCloudLoading}+ options={options}+ className="bg-transparent border-transparent hover:bg-[#1f1f1f99] focus-within:bg-[#1f1f1f99]"+ />+ </div>+ {!hideTrigger ? (+ <button+ type="button"+ data-testid="backend-selector-settings-link"+ 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-[#1f1f1f99] text-white font-medium transition-colors"+ : "inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md text-[#8C8C8C] hover:text-white hover:bg-[#1f1f1f99] transition-colors"+ }+ >+ <Settings width={16} height={16} />+ </button>+ ) : null}+ </div>{addBackendModalOpen ? (<AddBackendModal onClose={() => setAddBackendModalOpen(false)} />) : null}diff --git a/src/components/features/backends/environment-switch-overlay.tsx b/src/components/features/backends/environment-switch-overlay.tsxindex 9635b0df7e..108cd24d9f 100644--- a/src/components/features/backends/environment-switch-overlay.tsx+++ b/src/components/features/backends/environment-switch-overlay.tsx@@ -14,7 +14,6 @@ export {ENVIRONMENT_SWITCH_SETACTIVE_DELAY_MS,triggerEnvironmentSwitch,dismissEnvironmentSwitch,- // eslint-disable-next-line @typescript-eslint/naming-convention__resetEnvironmentSwitchOverlayForTests,} from "./environment-switch-store";diff --git a/src/components/features/backends/environment-switch-store.ts b/src/components/features/backends/environment-switch-store.tsindex 13fe259239..d58129bb25 100644--- a/src/components/features/backends/environment-switch-store.ts+++ b/src/components/features/backends/environment-switch-store.ts@@ -68,7 +68,7 @@ export function getEnvironmentSwitchSnapshot() {}/** Test-only: clear the pending hide timer and reset the snapshot. */-// eslint-disable-next-line @typescript-eslint/naming-convention+export function __resetEnvironmentSwitchOverlayForTests() {if (hideTimeoutId) {clearTimeout(hideTimeoutId);diff --git a/src/components/features/chat/chat-interface.tsx b/src/components/features/chat/chat-interface.tsxindex d62902eded..33e2d63b08 100644--- a/src/components/features/chat/chat-interface.tsx+++ b/src/components/features/chat/chat-interface.tsx@@ -324,7 +324,6 @@ export function ChatInterface() {}// Note: We intentionally exclude autoScroll from deps because we only want// to scroll when message content changes, not when autoScroll state changes.- // eslint-disable-next-line react-hooks/exhaustive-deps}, [renderableEvents.length, hasPendingUserMessages, scrollDomToBottom]);// Auto-load older events when the chat content doesn't overflow the@@ -385,10 +384,7 @@ export function ChatInterface() {return (<ScrollProvider value={scrollProviderValue}>- <div- className="h-full flex flex-col justify-between pr-0 md:pr-4 relative"- data-testid="chat-interface"- >+ <div className="h-full flex flex-col justify-between pl-0 md:pl-4 pr-0 md:pr-4 relative">{!hasSubstantiveAgentActions &&!hasPendingUserMessages &&!userEventsExist &&diff --git a/src/components/features/conversation-panel/compact-conversation-row.tsx b/src/components/features/conversation-panel/compact-conversation-row.tsxindex 8a50341bcf..7550ab70ce 100644--- a/src/components/features/conversation-panel/compact-conversation-row.tsx+++ b/src/components/features/conversation-panel/compact-conversation-row.tsx@@ -17,6 +17,7 @@ interface CompactConversationRowProps {workspaceWorkingDir?: string | null;isActive?: boolean;onClose?: () => void;+ showRepositoryMetadata?: boolean;}/**@@ -34,6 +35,7 @@ export function CompactConversationRow({workspaceWorkingDir,isActive = false,onClose,+ showRepositoryMetadata = true,}: CompactConversationRowProps) {const disableAnimation = import.meta.env.MODE === "test";@@ -54,6 +56,7 @@ export function CompactConversationRow({createdAt={createdAt}executionStatus={executionStatus}workspaceWorkingDir={workspaceWorkingDir}+ showRepositoryMetadata={showRepositoryMetadata}/></div>);diff --git a/src/components/features/conversation-panel/conversation-card/conversation-card-actions.tsx b/src/components/features/conversation-panel/conversation-card/conversation-card-actions.tsxindex f2a0ce0e83..35cabbdbde 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-card-actions.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-card-actions.tsx@@ -34,7 +34,7 @@ export function ConversationCardActions({const isActive = isExecutionActive(executionStatus);return (- <div className="group">+ <div className="relative"><buttondata-testid="ellipsis-button"type="button"@@ -52,8 +52,10 @@ export function ConversationCardActions({</button><divclassName={cn(- "relative opacity-0 invisible group-hover:opacity-100 group-hover:visible",- contextMenuOpen && "opacity-100 visible",+ "relative",+ contextMenuOpen+ ? "opacity-100 visible z-[60]"+ : "opacity-0 invisible pointer-events-none",)}><ConversationCardContextMenudiff --git a/src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsx b/src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsxindex 39c0c97645..5010773363 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsx@@ -14,6 +14,8 @@ interface ConversationCardFooterProps {createdAt?: string;executionStatus?: ExecutionStatus | null;workspaceWorkingDir?: string | null;+ showRepositoryMetadata?: boolean;+ showTimestamp?: boolean;}export function ConversationCardFooter({@@ -22,6 +24,8 @@ export function ConversationCardFooter({createdAt,executionStatus,workspaceWorkingDir,+ showRepositoryMetadata = true,+ showTimestamp = true,}: ConversationCardFooterProps) {const { t } = useTranslation("openhands");@@ -32,17 +36,19 @@ export function ConversationCardFooter({className={cn(// Left padding aligns the repo/workspace icon with the title text in// the header (status dot 10px + gap-2 8px = 18px).- "flex flex-row justify-between items-center mt-1 pl-[18px]",+ "flex flex-row items-center gap-2 mt-0.5 w-full min-w-0",+ showRepositoryMetadata && "pl-[18px]",isPaused && "opacity-60",)}>- {selectedRepository?.selected_repository ? (- <ConversationRepoLink selectedRepository={selectedRepository} />- ) : (- <NoRepository workspaceWorkingDir={workspaceWorkingDir} />- )}- <div className="flex items-center gap-2 flex-1 justify-end">- {(createdAt ?? lastUpdatedAt) && (+ {showRepositoryMetadata &&+ (selectedRepository?.selected_repository ? (+ <ConversationRepoLink selectedRepository={selectedRepository} />+ ) : (+ <NoRepository workspaceWorkingDir={workspaceWorkingDir} />+ ))}+ <div className="flex items-center gap-2 shrink-0 ml-auto">+ {showTimestamp && (createdAt ?? lastUpdatedAt) && (<p className="text-xs text-[#A3A3A3] text-right"><time>{`${formatTimeDelta(lastUpdatedAt ?? createdAt)} ${t(I18nKey.CONVERSATION$AGO)}`}diff --git a/src/components/features/conversation-panel/conversation-card/conversation-card-header.tsx b/src/components/features/conversation-panel/conversation-card/conversation-card-header.tsxindex 2591c9619f..d0f919806c 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-card-header.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-card-header.tsx@@ -16,7 +16,7 @@ export function ConversationCardHeader({executionStatus,}: ConversationCardHeaderProps) {return (- <div className="flex items-center gap-2 flex-1 min-w-0 overflow-hidden mr-2">+ <div className="flex items-center gap-2 flex-1 min-w-0 overflow-hidden">{executionStatus !== undefined && (<div className="flex items-center"><ConversationStatusDot executionStatus={executionStatus} />diff --git a/src/components/features/conversation-panel/conversation-card/conversation-card-skeleton.test.tsx b/src/components/features/conversation-panel/conversation-card/conversation-card-skeleton.test.tsxindex 7301d99aee..db2b5818ff 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-card-skeleton.test.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-card-skeleton.test.tsx@@ -9,4 +9,14 @@ describe("ConversationCardSkeleton", () => {screen.getByTestId("conversation-card-skeleton"),).toBeInTheDocument();});++ it("renders compact skeleton without text placeholders", () => {+ render(<ConversationCardSkeleton compact />);+ expect(+ screen.getByTestId("conversation-card-skeleton-compact"),+ ).toBeInTheDocument();+ expect(+ screen.queryByTestId("conversation-card-skeleton"),+ ).not.toBeInTheDocument();+ });});diff --git a/src/components/features/conversation-panel/conversation-card/conversation-card-skeleton.tsx b/src/components/features/conversation-panel/conversation-card/conversation-card-skeleton.tsxindex a516581183..636c8797e0 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-card-skeleton.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-card-skeleton.tsx@@ -1,6 +1,23 @@import React from "react";-export function ConversationCardSkeleton() {+interface ConversationCardSkeletonProps {+ compact?: boolean;+}++export function ConversationCardSkeleton({+ compact = false,+}: ConversationCardSkeletonProps) {+ if (compact) {+ return (+ <div+ data-testid="conversation-card-skeleton-compact"+ className="flex items-center justify-center px-2 py-2"+ >+ <div className="skeleton-round h-2 w-2" />+ </div>+ );+ }+return (<divdata-testid="conversation-card-skeleton"diff --git a/src/components/features/conversation-panel/conversation-card/conversation-card.tsx b/src/components/features/conversation-panel/conversation-card/conversation-card.tsxindex 41b9d11c31..fa96d4e93e 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-card.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-card.tsx@@ -5,6 +5,7 @@ import { transformVSCodeUrl } from "#/utils/vscode-url-helper";import ConversationService from "#/api/conversation-service/conversation-service.api";import { ExecutionStatus } from "#/types/agent-server/core/base/common";import { RepositorySelection } from "#/api/open-hands.types";+import { formatTimeDelta } from "#/utils/format-time-delta";import { ConversationCardHeader } from "./conversation-card-header";import { ConversationCardActions } from "./conversation-card-actions";import { ConversationCardFooter } from "./conversation-card-footer";@@ -26,6 +27,7 @@ interface ConversationCardProps {onContextMenuToggle?: (isOpen: boolean) => void;isActive?: boolean;workspaceWorkingDir?: string | null;+ showRepositoryMetadata?: boolean;}export function ConversationCard({@@ -44,6 +46,7 @@ export function ConversationCard({onContextMenuToggle,isActive = false,workspaceWorkingDir,+ showRepositoryMetadata = true,}: ConversationCardProps) {const posthog = usePostHog();const [titleMode, setTitleMode] = React.useState<"view" | "edit">("view");@@ -116,6 +119,7 @@ export function ConversationCard({};const hasContextMenu = !!(onDelete || onChangeTitle || showOptions);+ const shouldRenderFooter = showRepositoryMetadata;return (<div@@ -124,12 +128,13 @@ export function ConversationCard({data-active={isActive ? "true" : "false"}onClick={onClick}className={cn(- "relative h-auto w-full px-3 py-2 border-b border-[#1f2228] cursor-pointer",+ "group relative h-auto w-full rounded-md px-3 pt-1 pb-1 cursor-pointer transition-colors","data-[context-menu-open=false]:hover:bg-[#1f2228]","data-[active=true]:bg-[#25272D]",+ "data-[context-menu-open=true]:z-20",)}>- <div className="flex items-center justify-between w-full">+ <div className="flex items-center w-full min-w-0"><div className="flex items-center gap-2 flex-1 min-w-0"><ConversationCardHeadertitle={title}@@ -139,29 +144,56 @@ export function ConversationCard({/></div>- {hasContextMenu && (- <ConversationCardActions- contextMenuOpen={contextMenuOpen}- onContextMenuToggle={onContextMenuToggle || (() => {})}- onDelete={onDelete && handleDelete}- onStop={onStop && handleStop}- onEdit={onChangeTitle && handleEdit}- onDownloadViaVSCode={handleDownloadViaVSCode}- onDownloadConversation={handleDownloadConversation}- executionStatus={executionStatus}- conversationId={conversationId}- showOptions={showOptions}- />- )}+ <div className="relative ml-auto pl-2 flex items-center justify-end shrink-0">+ {(createdAt ?? lastUpdatedAt) && (+ <p+ className={cn(+ "text-xs text-[#A3A3A3] text-right whitespace-nowrap transition-opacity",+ hasContextMenu &&+ "group-hover:opacity-0 group-focus-within:opacity-0",+ contextMenuOpen && "opacity-0",+ )}+ >+ <time>{formatTimeDelta(lastUpdatedAt ?? createdAt)}</time>+ </p>+ )}++ {hasContextMenu && (+ <div+ className={cn(+ "absolute right-0 top-1/2 -translate-y-1/2 transition-opacity",+ "opacity-0 invisible group-hover:opacity-100 group-hover:visible",+ contextMenuOpen && "opacity-100 visible z-[60]",+ )}+ >+ <ConversationCardActions+ contextMenuOpen={contextMenuOpen}+ onContextMenuToggle={onContextMenuToggle || (() => {})}+ onDelete={onDelete && handleDelete}+ onStop={onStop && handleStop}+ onEdit={onChangeTitle && handleEdit}+ onDownloadViaVSCode={handleDownloadViaVSCode}+ onDownloadConversation={handleDownloadConversation}+ executionStatus={executionStatus}+ conversationId={conversationId}+ showOptions={showOptions}+ />+ </div>+ )}+ </div></div>- <ConversationCardFooter- selectedRepository={selectedRepository}- lastUpdatedAt={lastUpdatedAt}- createdAt={createdAt}- executionStatus={executionStatus}- workspaceWorkingDir={workspaceWorkingDir}- />+ {shouldRenderFooter && (+ <ConversationCardFooter+ selectedRepository={selectedRepository}+ lastUpdatedAt={lastUpdatedAt}+ createdAt={createdAt}+ executionStatus={executionStatus}+ workspaceWorkingDir={workspaceWorkingDir}+ showRepositoryMetadata={showRepositoryMetadata}+ showTimestamp={false}+ />+ )}</div>);}diff --git a/src/components/features/conversation-panel/conversation-card/conversation-repo-link.tsx b/src/components/features/conversation-panel/conversation-card/conversation-repo-link.tsxindex c40566aad1..b1f77723f5 100644--- a/src/components/features/conversation-panel/conversation-card/conversation-repo-link.tsx+++ b/src/components/features/conversation-panel/conversation-card/conversation-repo-link.tsx@@ -24,25 +24,25 @@ export function ConversationRepoLink({: null;return (- <div className="flex items-center gap-3 flex-1">- <div className="flex items-center gap-1">+ <div className="flex items-center gap-3 flex-1 min-w-0 overflow-hidden">+ <div className="flex items-center gap-1 min-w-0 flex-1">{Icon && <Icon size={14} className="text-[#A3A3A3]" />}{selectedRepository.git_provider === "azure_devops" && (<AzureDevOpsLogo className="text-[#A3A3A3] w-[14px] h-[14px]" />)}<spandata-testid="conversation-card-selected-repository"- className="text-xs text-[#A3A3A3] whitespace-nowrap overflow-hidden text-ellipsis max-w-44"+ className="text-xs text-[#A3A3A3] truncate min-w-0">{selectedRepository.selected_repository}</span></div>- <div className="flex items-center gap-1">+ <div className="flex items-center gap-1 min-w-0 max-w-[45%] shrink"><FaCodeBranch size={12} className="text-[#A3A3A3]" /><spandata-testid="conversation-card-selected-branch"- className="text-xs text-[#A3A3A3] whitespace-nowrap overflow-hidden text-ellipsis max-w-24"+ className="text-xs text-[#A3A3A3] truncate min-w-0">{selectedRepository.selected_branch}</span>diff --git a/src/components/features/conversation-panel/conversation-card/no-repository.tsx b/src/components/features/conversation-panel/conversation-card/no-repository.tsxindex 6fb6ed0e9d..d9cf9cef65 100644--- a/src/components/features/conversation-panel/conversation-card/no-repository.tsx+++ b/src/components/features/conversation-panel/conversation-card/no-repository.tsx@@ -18,21 +18,21 @@ export function NoRepository({ workspaceWorkingDir }: NoRepositoryProps) {if (folderName) {return (<div- className="flex items-center gap-1 text-xs text-[#A3A3A3]"+ className="flex items-center gap-1 text-xs text-[#A3A3A3] flex-1 min-w-0"title={workspaceWorkingDir ?? undefined}><FaFolder size={12} className="text-[#A3A3A3]" />- <span className="whitespace-nowrap overflow-hidden text-ellipsis max-w-44">- {folderName}- </span>+ <span className="truncate min-w-0">{folderName}</span></div>);}return (- <div className="flex items-center gap-1 text-xs text-[#A3A3A3]">+ <div className="flex items-center gap-1 text-xs text-[#A3A3A3] flex-1 min-w-0 overflow-hidden"><RepoForkedIcon width={14} height={14} className="text-[#A3A3A3]" />- <span>{t(I18nKey.COMMON$NO_REPOSITORY)}</span>+ <span className="truncate min-w-0">+ {t(I18nKey.COMMON$NO_REPOSITORY)}+ </span></div>);}diff --git a/src/components/features/conversation-panel/conversation-panel.tsx b/src/components/features/conversation-panel/conversation-panel.tsxindex 5e53bc5f0f..555668f5ad 100644--- a/src/components/features/conversation-panel/conversation-panel.tsx+++ b/src/components/features/conversation-panel/conversation-panel.tsx@@ -1,5 +1,6 @@import React from "react";import { useTranslation } from "react-i18next";+import { SlidersHorizontal } from "lucide-react";import { I18nKey } from "#/i18n/declaration";import { useNavigation } from "#/context/navigation-context";import { usePaginatedConversations } from "#/hooks/query/use-paginated-conversations";@@ -18,10 +19,12 @@ import {displayErrorToast,displaySuccessToast,} from "#/utils/custom-toast-handlers";+import { isExecutionActive } from "#/utils/status";import { ConversationCard } from "./conversation-card/conversation-card";import { StartTaskCard } from "./start-task-card/start-task-card";import { ConversationCardSkeleton } from "./conversation-card/conversation-card-skeleton";import { CompactConversationRow } from "./compact-conversation-row";+import { cn } from "#/utils/utils";interface ConversationPanelProps {onClose?: () => void;@@ -36,6 +39,8 @@ interface ConversationPanelProps {const noop = () => {};const ONE_HOUR_MS = 60 * 60 * 1000;+const capitalizeLabel = (label: string) =>+ label.length > 0 ? label.charAt(0).toUpperCase() + label.slice(1) : label;const partitionByCutoff = <T extends { updated_at: string }>(items: readonly T[],@@ -82,7 +87,15 @@ export function ConversationPanel({const [confirmDeleteOlderVisible, setConfirmDeleteOlderVisible] =React.useState(false);const [showOlderConversations, setShowOlderConversations] =+ React.useState(true);+ const [olderFilterMenuOpen, setOlderFilterMenuOpen] = React.useState(false);+ const [showRepoBranchMetadata, setShowRepoBranchMetadata] =React.useState(false);+ const [isListScrolled, setIsListScrolled] = React.useState(false);+ const olderFilterMenuRef = useClickOutsideElement<HTMLDivElement>(() => {+ setOlderFilterMenuOpen(false);+ });+ const scrollContainerRef = React.useRef<HTMLDivElement>(null);const [selectedConversationId, setSelectedConversationId] = React.useState<string | null>(null);@@ -92,14 +105,8 @@ export function ConversationPanel({string | null>(null);- const {- data,- isFetching,- error,- hasNextPage,- isFetchingNextPage,- fetchNextPage,- } = usePaginatedConversations();+ const { data, isFetching, hasNextPage, isFetchingNextPage, fetchNextPage } =+ usePaginatedConversations();// Fetch in-progress start tasksconst { data: startTasks } = useStartTasks();@@ -111,6 +118,13 @@ export function ConversationPanel({const { recent: recentConversations, older: olderConversations } =React.useMemo(() => partitionByCutoff(conversations), [conversations]);+ const compactVisibleConversations = React.useMemo(+ () =>+ recentConversations.filter((conversation) =>+ isExecutionActive(conversation.execution_status),+ ),+ [recentConversations],+ );const { mutate: deleteConversation, mutateAsync: deleteConversationAsync } =useDeleteConversation();@@ -223,6 +237,7 @@ export function ConversationPanel({workspaceWorkingDir={conversation.workspace?.working_dir}isActive={conversation.id === currentConversationId}onClose={onClose}+ showRepositoryMetadata={showRepoBranchMetadata}/>);}@@ -231,7 +246,7 @@ export function ConversationPanel({key={conversation.id}to={`/conversations/${conversation.id}`}onClick={onClose}- className="block"+ className="block px-2 py-0.5"><ConversationCardonDelete={() =>@@ -257,6 +272,7 @@ export function ConversationPanel({}isActive={conversation.id === currentConversationId}workspaceWorkingDir={conversation.workspace?.working_dir}+ showRepositoryMetadata={showRepoBranchMetadata}/></NavigationLink>);@@ -269,6 +285,7 @@ export function ConversationPanel({handleStopConversation,onClose,openContextMenuId,+ showRepoBranchMetadata,],);@@ -279,6 +296,7 @@ export function ConversationPanel({const showInitialSkeleton = isFetching && conversations.length === 0;const showEmptyState =!isFetching && conversations.length === 0 && !startTasks?.length;+ const showSummaryBar = !compact && olderConversations.length > 0;return (<div@@ -286,21 +304,93 @@ export function ConversationPanel({data-testid="conversation-panel"className="w-full h-full flex flex-col">- <div className="flex-1 min-h-0 overflow-y-auto overscroll-contain custom-scrollbar-always">+ {showSummaryBar && (+ <div+ data-testid="older-conversations-summary"+ className={cn(+ "pl-4 pr-3 py-2 text-neutral-400 flex flex-wrap items-center gap-x-2 gap-y-1",+ isListScrolled && "border-b border-[#1f2228]",+ )}+ >+ <span className="text-sm font-medium text-neutral-400">+ {t(I18nKey.SIDEBAR$CONVERSATIONS)}+ </span>+ <div ref={olderFilterMenuRef} className="relative ml-auto">+ <button+ type="button"+ data-testid="older-conversations-filter-toggle"+ aria-label="Older conversations filter"+ aria-expanded={olderFilterMenuOpen}+ onClick={() => setOlderFilterMenuOpen((open) => !open)}+ className="inline-flex items-center justify-center rounded-md p-1 text-neutral-400 hover:text-white hover:bg-[#1f1f1f99] transition-colors"+ >+ <SlidersHorizontal size={14} />+ </button>++ {olderFilterMenuOpen && (+ <div+ data-testid="older-conversations-filter-menu"+ className="absolute right-0 top-full mt-0 z-50 min-w-[168px] overflow-hidden rounded-[6px] bg-tertiary px-1 py-[6px] text-white context-menu-box-shadow"+ >+ <button+ type="button"+ data-testid="toggle-older-conversations"+ onClick={() => {+ setShowOlderConversations((value) => !value);+ setOlderFilterMenuOpen(false);+ }}+ className="block w-full rounded px-2 py-2 text-left text-sm text-white hover:bg-[#5C5D62]"+ >+ {showOlderConversations+ ? capitalizeLabel(t(I18nKey.CONVERSATION$HIDE))+ : capitalizeLabel(t(I18nKey.CONVERSATION$SHOW_ALL))}+ </button>+ <button+ type="button"+ data-testid="delete-older-conversations"+ onClick={() => {+ setConfirmDeleteOlderVisible(true);+ setOlderFilterMenuOpen(false);+ }}+ className="block w-full rounded px-2 py-2 text-left text-sm text-danger hover:bg-[#5C5D62]"+ >+ {capitalizeLabel(t(I18nKey.CONVERSATION$DELETE_ALL))}+ </button>+ <div className="my-1 h-[1px] w-full bg-[#5C5D62]" />+ <button+ type="button"+ data-testid="toggle-repo-branch-metadata"+ onClick={() => {+ setShowRepoBranchMetadata((value) => !value);+ setOlderFilterMenuOpen(false);+ }}+ className="block w-full rounded px-2 py-2 text-left text-sm text-white hover:bg-[#5C5D62]"+ >+ {showRepoBranchMetadata+ ? "Hide Repo/Branch"+ : "Show Repo/Branch"}+ </button>+ </div>+ )}+ </div>+ </div>+ )}++ <div+ ref={scrollContainerRef}+ onScroll={(event) => {+ setIsListScrolled(event.currentTarget.scrollTop > 0);+ }}+ className="flex-1 min-h-0 overflow-y-auto overflow-x-hidden overscroll-contain custom-scrollbar-always"+ >{showInitialSkeleton && (<div className="space-y-2">{Array.from({ length: 5 }).map((_, index) => (- <ConversationCardSkeleton key={index} />+ <ConversationCardSkeleton key={index} compact={compact} />))}</div>)}- {error && (- <div className="flex flex-col items-center justify-center h-full">- <p className="text-danger">{error.message}</p>- </div>- )}-{!compact && showEmptyState && (<div className="flex flex-col items-center justify-center h-full"><p className="text-neutral-400">@@ -324,43 +414,12 @@ export function ConversationPanel({))}{/* Recent conversations (last_updated within the past hour) */}- {recentConversations.map(renderConversationCard)}-- {/* Older conversations: full summary in expanded mode, just a flat- list of dots in compact mode (the summary text can't fit). */}- {!compact && olderConversations.length > 0 && (- <div- data-testid="older-conversations-summary"- className="px-3 py-2 text-xs text-neutral-400 flex flex-wrap items-center gap-x-2 gap-y-1 border-b border-[#1f2228]"- >- <span>- {olderConversations.length}{" "}- {t(I18nKey.CONVERSATION$N_OLDER_CONVERSATIONS)}:- </span>- <button- type="button"- data-testid="toggle-older-conversations"- onClick={() => setShowOlderConversations((value) => !value)}- className="underline hover:text-white"- >- {showOlderConversations- ? t(I18nKey.CONVERSATION$HIDE)- : t(I18nKey.CONVERSATION$SHOW_ALL)}- </button>- <button- type="button"- data-testid="delete-older-conversations"- onClick={() => setConfirmDeleteOlderVisible(true)}- className="underline hover:text-danger"- >- {t(I18nKey.CONVERSATION$DELETE_ALL)}- </button>- </div>+ {(compact ? compactVisibleConversations : recentConversations).map(+ renderConversationCard,)}- {/* Older conversations only render when explicitly expanded via- "Show all". Compact mode mirrors expanded's default β recent- only β so the icon rail isn't packed with archive cruft. */}+ {/* Older conversations render by default; users can hide them from the+ summary's filter menu. Compact mode still omits the summary row. */}{!compact &&showOlderConversations &&olderConversations.map(renderConversationCard)}@@ -378,7 +437,7 @@ export function ConversationPanel({type="button"data-testid="load-more-conversations"onClick={() => fetchNextPage()}- className="text-xs text-neutral-400 underline hover:text-white"+ className="text-xs text-neutral-400 hover:text-white">{t(I18nKey.CONVERSATION$LOAD_MORE)}</button>diff --git a/src/components/features/home/git-branch-dropdown/git-branch-dropdown.tsx b/src/components/features/home/git-branch-dropdown/git-branch-dropdown.tsxindex 112ada032f..8a6d5352a5 100644--- a/src/components/features/home/git-branch-dropdown/git-branch-dropdown.tsx+++ b/src/components/features/home/git-branch-dropdown/git-branch-dropdown.tsx@@ -192,7 +192,6 @@ export function GitBranchDropdown({)}</div><input- // eslint-disable-next-line react/jsx-props-no-spreading{...getInputProps({disabled: disabled || !repository,placeholder,diff --git a/src/components/features/home/git-provider-dropdown/git-provider-dropdown.tsx b/src/components/features/home/git-provider-dropdown/git-provider-dropdown.tsxindex f51d65617e..e3ec9253e6 100644--- a/src/components/features/home/git-provider-dropdown/git-provider-dropdown.tsx+++ b/src/components/features/home/git-provider-dropdown/git-provider-dropdown.tsx@@ -168,7 +168,6 @@ export function GitProviderDropdown({)}<input- // eslint-disable-next-line react/jsx-props-no-spreading{...getInputProps({disabled,placeholder,diff --git a/src/components/features/home/recent-conversations/conversation-status-dot.tsx b/src/components/features/home/recent-conversations/conversation-status-dot.tsxindex 902d702575..a3e2f88749 100644--- a/src/components/features/home/recent-conversations/conversation-status-dot.tsx+++ b/src/components/features/home/recent-conversations/conversation-status-dot.tsx@@ -13,7 +13,7 @@ interface ConversationStatusDotProps {showTooltip?: boolean;}-type Visual = "check" | "working" | "paused" | "error" | "unknown";+type Visual = "check" | "working" | "active" | "paused" | "error" | "unknown";const SUCCESS_GREEN = "#1FBD53";const PAUSED_GRAY = "#A3A3A3";@@ -26,9 +26,10 @@ const visualFor = (status: ExecutionStatus | null | undefined): Visual => {return "check";case ExecutionStatus.RUNNING:return "working";- case ExecutionStatus.PAUSED:case ExecutionStatus.IDLE:case ExecutionStatus.WAITING_FOR_CONFIRMATION:+ return "active";+ case ExecutionStatus.PAUSED:return "paused";case ExecutionStatus.ERROR:case ExecutionStatus.STUCK:@@ -43,6 +44,7 @@ const labelKeyFor = (visual: Visual): string => {case "check":return "COMMON$FINISHED";case "working":+ case "active":return "COMMON$WORKING";case "paused":return "COMMON$PAUSED";@@ -79,6 +81,14 @@ function renderIndicator(visual: Visual) {style={{ backgroundColor: SUCCESS_GREEN }}/>);+ case "active":+ return (+ <span+ data-testid="conversation-status-active"+ className="w-1.5 h-1.5 rounded-full"+ style={{ backgroundColor: SUCCESS_GREEN }}+ />+ );case "paused":return (<spandiff --git a/src/components/features/home/shared/dropdown-item.tsx b/src/components/features/home/shared/dropdown-item.tsxindex 36a0e25967..97cb18cc15 100644--- a/src/components/features/home/shared/dropdown-item.tsx+++ b/src/components/features/home/shared/dropdown-item.tsx@@ -42,7 +42,6 @@ export function DropdownItem<T>({});return (- // eslint-disable-next-line react/jsx-props-no-spreading<li key={getItemKey(item)} {...itemProps}><div className="flex items-center gap-2">{renderIcon?.(item)}diff --git a/src/components/features/home/shared/generic-dropdown-menu.tsx b/src/components/features/home/shared/generic-dropdown-menu.tsxindex 2bd0b4dc0a..fa1e575b17 100644--- a/src/components/features/home/shared/generic-dropdown-menu.tsx+++ b/src/components/features/home/shared/generic-dropdown-menu.tsx@@ -63,7 +63,6 @@ export function GenericDropdownMenu<T>({return (<div className="relative"><ul- // eslint-disable-next-line react/jsx-props-no-spreading{...getMenuProps({ref: menuRef,className: "hidden",@@ -84,7 +83,6 @@ export function GenericDropdownMenu<T>({)}><ul- // eslint-disable-next-line react/jsx-props-no-spreading{...getMenuProps({ref: menuRef,className: cn(diff --git a/src/components/features/home/shared/toggle-button.tsx b/src/components/features/home/shared/toggle-button.tsxindex dbbcceb663..b074abb843 100644--- a/src/components/features/home/shared/toggle-button.tsx+++ b/src/components/features/home/shared/toggle-button.tsx@@ -18,7 +18,6 @@ export function ToggleButton({}: ToggleButtonProps) {return (<button- // eslint-disable-next-line react/jsx-props-no-spreading{...getToggleButtonProps({disabled,className: cn(diff --git a/src/components/features/home/workspace-dropdown/workspace-dropdown.tsx b/src/components/features/home/workspace-dropdown/workspace-dropdown.tsxindex 4771faf509..cc72531e98 100644--- a/src/components/features/home/workspace-dropdown/workspace-dropdown.tsx+++ b/src/components/features/home/workspace-dropdown/workspace-dropdown.tsx@@ -173,7 +173,6 @@ export function WorkspaceDropdown({<RepoIcon width={16} height={16} /></div><input- // eslint-disable-next-line react/jsx-props-no-spreading{...getInputProps({disabled,placeholder: placeholder ?? t(I18nKey.HOME$WORKSPACE_PLACEHOLDER),diff --git a/src/components/features/onboarding/onboarding-progress-bar.tsx b/src/components/features/onboarding/onboarding-progress-bar.tsxindex 244c4f37d3..e9911ce180 100644--- a/src/components/features/onboarding/onboarding-progress-bar.tsx+++ b/src/components/features/onboarding/onboarding-progress-bar.tsx@@ -35,7 +35,6 @@ export function OnboardingProgressBar({key={index}data-testid={`onboarding-progress-step-${index}`}data-state={- // eslint-disable-next-line no-nested-ternaryisCompleted ? "completed" : isCurrent ? "current" : "upcoming"}className={cn(diff --git a/src/components/features/settings/settings-navigation.tsx b/src/components/features/settings/settings-navigation.tsxindex 887eb3cfc3..f739938b78 100644--- a/src/components/features/settings/settings-navigation.tsx+++ b/src/components/features/settings/settings-navigation.tsx@@ -8,6 +8,7 @@ import { SettingsNavRenderedItem } from "#/hooks/use-settings-nav-items";import { SettingsNavHeader } from "./settings-nav-header";import { SettingsNavDivider } from "./settings-nav-divider";import { SettingsNavLink } from "./settings-nav-link";+import { SidebarNavLink } from "#/components/features/sidebar/sidebar-nav-link";interface SettingsNavigationProps {isMobileMenuOpen: boolean;@@ -21,9 +22,34 @@ export function SettingsNavigation({navigationItems,}: SettingsNavigationProps) {const { t } = useTranslation("openhands");+ const desktopNavItems = navigationItems.filter(+ (item): item is Extract<SettingsNavRenderedItem, { type: "item" }> =>+ item.type === "item",+ );return (<>+ <aside+ data-testid="settings-navbar-desktop"+ className="hidden md:flex md:w-[260px] md:shrink-0 md:flex-col md:gap-2"+ >+ <Typography.Text className="px-3 text-xs font-semibold uppercase tracking-wider text-[#A3A3A3]">+ {t(I18nKey.SETTINGS$TITLE)}+ </Typography.Text>+ <div className="flex flex-col gap-0.5 pt-0.5">+ {desktopNavItems.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}+ />+ ))}+ </div>+ </aside>+{isMobileMenuOpen && (<divclassName="fixed inset-0 bg-black bg-opacity-50 z-40 md:hidden"diff --git a/src/components/features/sidebar/sidebar-conversation-list.tsx b/src/components/features/sidebar/sidebar-conversation-list.tsxindex 0fd84b2b96..c26c067900 100644--- a/src/components/features/sidebar/sidebar-conversation-list.tsx+++ b/src/components/features/sidebar/sidebar-conversation-list.tsx@@ -1,31 +1,27 @@import { ConversationPanel } from "#/components/features/conversation-panel/conversation-panel";-import { NewConversationButton } from "#/components/features/conversation-panel/new-conversation-button";import { useSidebarCollapsed } from "./sidebar-collapse-context";import { cn } from "#/utils/utils";/*** Conversation list section rendered inside the sidebar nav. The list itself- * scrolls independently from the rest of the nav, while the "+ New" trigger- * stays pinned above it.+ * scrolls independently from the rest of the nav.** In the collapsed sidebar variant the list reduces each row to a status- * indicator + hover-preview, and the new-conversation button collapses to a- * "+" icon.+ * indicator + hover-preview.*/export function SidebarConversationList() {const collapsed = useSidebarCollapsed();++ if (collapsed) {+ return null;+ }+return (<div- className={cn(- "hidden md:flex md:flex-col md:flex-1 md:min-h-0 gap-2",- collapsed ? "items-center -mx-1" : "-mx-3",- )}+ className={cn("hidden md:flex md:flex-col md:flex-1 md:min-h-0", "-mx-2")}>- <div className={cn("w-full", collapsed ? "px-1" : "px-3")}>- <NewConversationButton compact={collapsed} />- </div><div className="flex-1 min-h-0 overflow-hidden w-full">- <ConversationPanel compact={collapsed} />+ <ConversationPanel /></div></div>);diff --git a/src/components/features/sidebar/sidebar-nav-link.tsx b/src/components/features/sidebar/sidebar-nav-link.tsxindex 658b5ff3dc..99be800530 100644--- a/src/components/features/sidebar/sidebar-nav-link.tsx+++ b/src/components/features/sidebar/sidebar-nav-link.tsx@@ -26,8 +26,8 @@ interface SidebarNavLinkProps {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-3 py-1.5 w-full";- return "px-3 py-2 w-full";+ if (indent) return "pl-7 pr-2 py-1.5 w-full";+ return "px-2 py-2 w-full";}export function SidebarNavLink({diff --git a/src/components/features/sidebar/sidebar.tsx b/src/components/features/sidebar/sidebar.tsxindex 4f299d12f8..2fbbfa8905 100644--- a/src/components/features/sidebar/sidebar.tsx+++ b/src/components/features/sidebar/sidebar.tsx@@ -1,6 +1,12 @@import React from "react";import { useTranslation } from "react-i18next";-import { ChevronLeft, ChevronRight } from "lucide-react";+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 { getErrorStatus, useSettings } from "#/hooks/query/use-settings";@@ -8,18 +14,17 @@ import { useConfig } from "#/hooks/query/use-config";import { displayErrorToast } from "#/utils/custom-toast-handlers";import { I18nKey } from "#/i18n/declaration";import { useNavigation } from "#/context/navigation-context";+import { useActiveBackendContext } from "#/contexts/active-backend-context";import { cn } from "#/utils/utils";-import { useSettingsNavItems } from "#/hooks/use-settings-nav-items";import { BackendSelector } from "#/components/features/backends/backend-selector";-import { OSS_NAV_ITEMS } from "#/constants/settings-nav";+import { BackendStatusDot } from "#/components/features/backends/backend-status-dot";import { SidebarConversationList } from "./sidebar-conversation-list";import { SidebarCollapseContext } from "./sidebar-collapse-context";import { useSidebarCollapsedState } from "#/hooks/use-sidebar-collapsed";-import MessageIcon from "#/icons/message.svg?react";+import { useClickOutsideElement } from "#/hooks/use-click-outside-element";+import { useBackendsHealth } from "#/hooks/query/use-backends-health";import AutomationsIcon from "#/icons/automations.svg?react";import SparkleIcon from "#/icons/sparkle.svg?react";-import PuzzleIcon from "#/icons/puzzle.svg?react";-import CogIcon from "#/icons/cog.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.@@ -29,15 +34,25 @@ const SettingsModal = React.lazy(() =>})),);-const SETTINGS_NAV_ICON_BY_PATH = new Map(- OSS_NAV_ITEMS.map((item) => [item.to, item.icon] as const),+// Add/Manage backend modals are lifted into the sidebar (instead of living+// inside BackendSelector) so they survive the collapsed popover unmounting+// when the user moves the cursor out of the popover toward the modal.+const AddBackendModal = React.lazy(() =>+ import("#/components/features/backends/add-backend-modal").then((m) => ({+ default: m.AddBackendModal,+ })),+);+const ManageBackendsModal = React.lazy(() =>+ import("#/components/features/backends/manage-backends-modal").then((m) => ({+ default: m.ManageBackendsModal,+ })),);const ICON_SIZE = 18;export function Sidebar() {const { t } = useTranslation("openhands");- const { currentPath } = useNavigation();+ const { currentPath, navigate } = useNavigation();const { data: config } = useConfig();const {data: settings,@@ -45,23 +60,28 @@ export function Sidebar() {isError: settingsIsError,isFetching: isFetchingSettings,} = useSettings();- const settingsNavItems = useSettingsNavItems();-+ const { backends, active } = useActiveBackendContext();+ const healthByBackendId = useBackendsHealth(backends);+ const activeBackendHealth = healthByBackendId[active.backend.id];const [collapsed, setCollapsed] = useSidebarCollapsedState();const [settingsModalIsOpen, setSettingsModalIsOpen] = React.useState(false);+ const [collapsedBackendPopoverOpen, setCollapsedBackendPopoverOpen] =+ React.useState(false);+ const collapsedBackendCloseTimer = React.useRef<ReturnType<+ typeof setTimeout+ > | null>(null);+ // Lifted out of BackendSelector so opening these modals from the+ // collapsed-sidebar popover doesn't lose state when the popover unmounts+ // (cursor moving toward the modal triggers onMouseLeave -> close).+ const [addBackendModalOpen, setAddBackendModalOpen] = React.useState(false);+ const [manageBackendsModalOpen, setManageBackendsModalOpen] =+ React.useState(false);+ const [collapsedRailHovered, setCollapsedRailHovered] = React.useState(false);+ const collapsedBackendPopoverRef = useClickOutsideElement<HTMLDivElement>(+ () => setCollapsedBackendPopoverOpen(false),+ );const settingsErrorStatus = getErrorStatus(settingsError);- const isSettingsActive = currentPath.startsWith("/settings");- const [settingsExpanded, setSettingsExpanded] =- React.useState<boolean>(isSettingsActive);-- // Auto-expand the settings submenu whenever we navigate into /settings.- React.useEffect(() => {- if (isSettingsActive) {- setSettingsExpanded(true);- }- }, [isSettingsActive]);-React.useEffect(() => {if (currentPath === "/settings") {setSettingsModalIsOpen(false);@@ -91,117 +111,133 @@ export function Sidebar() {const linkDisabled = settings?.email_verified === false;- // Floating panel rendered in the hover tooltip when the (collapsed)- // Settings button is hovered: lists the same submenu the expanded variant- // shows inline.- const settingsHoverPanel = (- <div- data-testid="sidebar-settings-flyout"- className="w-[220px] p-1 bg-[#1f2228] text-white rounded-md"- >- <div className="px-2 py-1 text-xs font-semibold text-[#A3A3A3] uppercase tracking-wider">- {t(I18nKey.SIDEBAR$SETTINGS)}- </div>- <ul className="flex flex-col gap-0.5">- {settingsNavItems.map((rendered) => {- if (rendered.type !== "item") return null;- const navIcon = SETTINGS_NAV_ICON_BY_PATH.get(rendered.item.to);- return (- <li key={rendered.item.to}>- <SidebarNavLink- to={rendered.item.to}- label={t(rendered.item.text as I18nKey)}- end- testId={`sidebar-settings-flyout-${rendered.item.to}`}- disabled={linkDisabled}- icon={- navIcon- ? React.cloneElement(- navIcon as React.ReactElement<{- width?: number;- height?: number;- }>,- { width: 16, height: 16 },- )- : undefined- }- />- </li>- );- })}- </ul>- </div>- );-const collapseToggleLabel = t(collapsed ? I18nKey.SIDEBAR$EXPAND : I18nKey.SIDEBAR$COLLAPSE,);+ const handleCollapsedRailClick = React.useCallback(+ (event: React.MouseEvent<HTMLElement>) => {+ if (!collapsed) {+ return;+ }++ const target = event.target;+ if (!(target instanceof HTMLElement)) {+ return;+ }++ // Keep existing behavior for explicit controls/links and only use+ // this as a convenience hit-area for empty collapsed-rail space.+ if (+ target.closest(+ "a,button,input,textarea,select,[role='button'],[role='link']",+ )+ ) {+ return;+ }++ setCollapsed(false);+ },+ [collapsed, setCollapsed],+ );+ const showCollapsedExpandButton = collapsed && collapsedRailHovered;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. */}<asidearia-label={t(I18nKey.SIDEBAR$NAVIGATION_LABEL)}data-collapsed={collapsed ? "true" : "false"}+ onClick={handleCollapsedRailClick}+ onMouseEnter={() => {+ if (collapsed) {+ setCollapsedRailHovered(true);+ }+ }}+ onMouseLeave={() => {+ setCollapsedRailHovered(false);+ }}className={cn(- "bg-base flex flex-col gap-3 transition-[width,min-width] duration-200",+ "bg-base flex flex-col transition-[width,min-width] duration-200",+ "md:border-r md:border-[#242424]",// Mobile: top bar; Desktop: vertical column. Width responds to// the collapsed state on md+ screens."h-[54px] md:h-full",collapsed? "md:w-[64px] md:min-w-[64px]": "md:w-[300px] md:min-w-[300px]",- collapsed ? "md:px-2 md:pt-4" : "px-3 py-2 md:px-3 md:pt-4",+ collapsed ? "md:px-2 md:pt-4" : "px-2 py-2 md:px-2 md:pt-4","flex-row md:flex-col",currentPath === "/" && "md:pt-6.5 md:pb-3",)}><divclassName={cn(- "flex items-center gap-2 md:py-1",+ "flex items-center gap-2 md:py-1 md:pb-3",// 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.- collapsed ? "md:flex-col md:gap-2 md:px-0" : "md:pl-2 md:pr-0",+ collapsed ? "md:flex-col md:gap-2 md:px-0" : "md:pl-0 md:pr-0",)}>- <OpenHandsLogoButton />- {/* 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((prev) => !prev)}- className={cn(- "hidden md:inline-flex items-center justify-center shrink-0",- "w-7 h-7 rounded-md text-[#8C8C8C] hover:text-white hover:bg-[#1f1f1f99]",- "transition-colors cursor-pointer",- collapsed- ? "mx-auto"- : // ml-auto right-aligns inside the header row; -mr-2 pulls- // past the header's own pr-0 + most of the aside's pr-3 so- // the caret sits flush against the right edge of the rail.- "ml-auto md:-mr-2",- )}- >- {collapsed ? (- <ChevronRight width={18} height={18} />- ) : (- <ChevronLeft width={18} height={18} />- )}- </button>+ {collapsed ? (+ <div className="relative hidden md:block mx-auto">+ <div+ className={cn(+ "transition-opacity duration-150",+ showCollapsedExpandButton && "opacity-0",+ )}+ >+ <OpenHandsLogoButton />+ </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-[#8C8C8C] hover:text-white hover:bg-[#1f1f1f99]",+ "transition-colors cursor-pointer",+ showCollapsedExpandButton+ ? "opacity-100 pointer-events-auto"+ : "opacity-0 pointer-events-none",+ )}+ >+ <ChevronRight width={18} height={18} />+ </button>+ </div>+ ) : (+ <>+ <OpenHandsLogoButton />+ {/* 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-[#8C8C8C] hover:text-white hover:bg-[#1f1f1f99]",+ "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>- {/* Hide the backend selector when collapsed β it is a wide dropdown- that doesn't compress meaningfully into a 56px rail. Users who- want to switch backends can expand the sidebar first. */}- {!collapsed && (- <div className="hidden md:flex md:flex-col md:items-stretch">- <BackendSelector />- </div>- )}+ {/*+ Temporarily hide the dedicated New Conversation button and surface+ creation via the first nav entry instead.+ */}<navclassName={cn(@@ -213,11 +249,12 @@ export function Sidebar() {><SidebarNavLinkto="/conversations"- label={t(I18nKey.SIDEBAR$CONVERSATIONS)}+ end+ label="New"testId="sidebar-conversations-link"disabled={linkDisabled}collapsed={collapsed}- icon={<MessageIcon width={ICON_SIZE} height={ICON_SIZE} />}+ icon={<Plus width={ICON_SIZE} height={ICON_SIZE} />}/><SidebarNavLinkto="/skills"@@ -227,14 +264,6 @@ export function Sidebar() {collapsed={collapsed}icon={<SparkleIcon width={ICON_SIZE} height={ICON_SIZE} />}/>- <SidebarNavLink- to="/mcp"- label={t(I18nKey.SIDEBAR$MCP_DIRECTORY)}- testId="sidebar-mcp-link"- disabled={linkDisabled}- collapsed={collapsed}- icon={<PuzzleIcon width={ICON_SIZE} height={ICON_SIZE} />}- /><SidebarNavLinkto="/automations"label={t(I18nKey.SIDEBAR$AUTOMATIONS)}@@ -243,102 +272,95 @@ export function Sidebar() {collapsed={collapsed}icon={<AutomationsIcon width={ICON_SIZE} height={ICON_SIZE} />}/>- <div className="hidden md:flex flex-col gap-0.5">- {collapsed ? (- // Collapsed: render Settings as a single icon link to /settings- // with a hover-flyout that lists the full submenu.- <SidebarNavLink- to="/settings"- label={t(I18nKey.SIDEBAR$SETTINGS)}- testId="sidebar-settings-link"- disabled={linkDisabled}- collapsed- icon={<CogIcon width={ICON_SIZE} height={ICON_SIZE} />}- hoverContent={settingsHoverPanel}- />- ) : (- <>- <button- type="button"- data-testid="sidebar-settings-toggle"- aria-expanded={settingsExpanded}- onClick={() => setSettingsExpanded((prev) => !prev)}- className={cn(- "flex items-center justify-between w-full text-sm leading-5 px-3 py-2 rounded-md transition-colors cursor-pointer",- isSettingsActive- ? "bg-[#1f1f1f99] text-white font-medium"- : "text-[#8C8C8C] hover:text-white hover:bg-[#1f1f1f99]",- )}- >- <span className="flex items-center gap-2">- <CogIcon width={ICON_SIZE} height={ICON_SIZE} />- {t(I18nKey.SIDEBAR$SETTINGS)}- </span>- <svg- width="14"- height="14"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- strokeWidth="2"- strokeLinecap="round"- strokeLinejoin="round"- aria-hidden="true"- className={cn(- "transition-transform duration-150",- settingsExpanded ? "rotate-180" : "rotate-0",- )}- >- <polyline points="6 9 12 15 18 9" />- </svg>- </button>- {settingsExpanded && (- <div className="flex flex-col gap-0.5 pt-0.5">- {settingsNavItems.map((rendered) => {- if (rendered.type !== "item") return null;- const navIcon = SETTINGS_NAV_ICON_BY_PATH.get(- rendered.item.to,- );- return (- <SidebarNavLink- key={rendered.item.to}- to={rendered.item.to}- label={t(rendered.item.text as I18nKey)}- end- indent- testId={`sidebar-settings-${rendered.item.to}`}- disabled={linkDisabled}- icon={- navIcon- ? React.cloneElement(- navIcon as React.ReactElement<{- width?: number;- height?: number;- }>,- { width: 16, height: 16 },- )- : undefined- }- />- );- })}- </div>- )}- </>- )}- </div>- {/* Mobile: settings as a flat link, no submenu */}- <div className="md:hidden">- <SidebarNavLink- to="/settings"- label={t(I18nKey.SIDEBAR$SETTINGS)}- testId="sidebar-settings-link-mobile"- disabled={linkDisabled}- />- </div></nav><SidebarConversationList />++ {collapsed && (+ <div className="hidden md:flex md:flex-col md:items-center mt-auto gap-2 pb-2">+ <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",+ currentPath.startsWith("/settings")+ ? "bg-[#1f1f1f99] text-white font-medium"+ : "text-[#8C8C8C] hover:text-white hover:bg-[#1f1f1f99]",+ )}+ >+ <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}+ className={cn(+ "relative inline-flex items-center justify-center w-10 h-10 p-0 mx-auto rounded-md transition-colors",+ collapsedBackendPopoverOpen+ ? "bg-[#1f1f1f99] text-white font-medium"+ : "text-[#8C8C8C] hover:text-white hover:bg-[#1f1f1f99]",+ )}+ >+ <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-0 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-[#242424] md:-mx-2 md:px-2">+ <BackendSelector openUpward />+ </div>+ )}</aside>{settingsModalIsOpen && (@@ -349,6 +371,18 @@ export function Sidebar() {/></React.Suspense>)}+ {addBackendModalOpen && (+ <React.Suspense fallback={null}>+ <AddBackendModal onClose={() => setAddBackendModalOpen(false)} />+ </React.Suspense>+ )}+ {manageBackendsModalOpen && (+ <React.Suspense fallback={null}>+ <ManageBackendsModal+ onClose={() => setManageBackendsModalOpen(false)}+ />+ </React.Suspense>+ )}</SidebarCollapseContext.Provider>);}diff --git a/src/components/providers/agent-server-ui-root.tsx b/src/components/providers/agent-server-ui-root.tsxindex cb9d302a36..f8934c7550 100644--- a/src/components/providers/agent-server-ui-root.tsx+++ b/src/components/providers/agent-server-ui-root.tsx@@ -1,4 +1,3 @@-/* eslint-disable react/jsx-props-no-spreading */import React from "react";import { cn } from "#/utils/utils";import {diff --git a/src/components/shared/navigation-link.tsx b/src/components/shared/navigation-link.tsxindex c6edd4dae1..7e551f5906 100644--- a/src/components/shared/navigation-link.tsx+++ b/src/components/shared/navigation-link.tsx@@ -1,4 +1,3 @@-/* eslint-disable react/jsx-props-no-spreading */import React from "react";import {useNavigation,diff --git a/src/constants/settings-nav.tsx b/src/constants/settings-nav.tsxindex 656029c31c..57085270fd 100644--- a/src/constants/settings-nav.tsx+++ b/src/constants/settings-nav.tsx@@ -1,6 +1,7 @@import KeyIcon from "#/icons/key.svg?react";import LockIcon from "#/icons/lock.svg?react";import MemoryIcon from "#/icons/memory_icon.svg?react";+import ServerProcessIcon from "#/icons/server-process.svg?react";import SettingsGearIcon from "#/icons/settings-gear.svg?react";import CircuitIcon from "#/icons/u-circuit.svg?react";@@ -12,27 +13,32 @@ export interface SettingsNavItem {export const OSS_NAV_ITEMS: SettingsNavItem[] = [{- icon: <CircuitIcon width={22} height={22} />,+ icon: <CircuitIcon width={16} height={16} />,to: "/settings",text: "SETTINGS$NAV_LLM",},{- icon: <MemoryIcon width={22} height={22} />,+ icon: <MemoryIcon width={16} height={16} />,to: "/settings/condenser",text: "SETTINGS$NAV_CONDENSER",},{- icon: <LockIcon width={22} height={22} />,+ icon: <LockIcon width={16} height={16} />,to: "/settings/verification",text: "SETTINGS$NAV_VERIFICATION",},{- icon: <SettingsGearIcon width={22} height={22} />,+ icon: <ServerProcessIcon width={16} height={16} />,+ to: "/settings/mcp",+ text: "SETTINGS$NAV_MCP",+ },+ {+ icon: <SettingsGearIcon width={16} height={16} />,to: "/settings/app",text: "SETTINGS$NAV_APPLICATION",},{- icon: <KeyIcon width={22} height={22} />,+ icon: <KeyIcon width={16} height={16} />,to: "/settings/secrets",text: "SETTINGS$NAV_SECRETS",},diff --git a/src/entry.client.tsx b/src/entry.client.tsxindex c93357ca30..a72c607ded 100644--- a/src/entry.client.tsx+++ b/src/entry.client.tsx@@ -1,4 +1,3 @@-/* eslint-disable react/react-in-jsx-scope *//*** By default, Remix will handle hydrating your app on the client for you.* You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` β¨diff --git a/src/hooks/query/use-repository-branches.ts b/src/hooks/query/use-repository-branches.tsindex 7d32199ce6..1b6b2df514 100644--- a/src/hooks/query/use-repository-branches.ts+++ b/src/hooks/query/use-repository-branches.ts@@ -8,7 +8,7 @@ export const useRepositoryBranchesPaginated = (perPage: number = 30,selectedProvider?: Provider,) => {- const result = useInfiniteQuery<+ return useInfiniteQuery<BranchPage,Error,InfiniteData<BranchPage>,@@ -44,8 +44,4 @@ export const useRepositoryBranchesPaginated = (lastPage.next_page_id ? lastPage.next_page_id : undefined,initialPageParam: null,});-- return {- ...result,- };};diff --git a/src/routes/home.tsx b/src/routes/home.tsxindex 41d611dc55..e86c5b1c13 100644--- a/src/routes/home.tsx+++ b/src/routes/home.tsx@@ -1,9 +1,8 @@import { PrefetchPageLinks } from "react-router";-import { HomeHeader } from "#/components/features/home/home-header/home-header";+import { GuideMessage } from "#/components/features/home/home-header/guide-message";+import { HomeHeaderTitle } from "#/components/features/home/home-header/home-header-title";import { RepoConnector } from "#/components/features/home/repo-connector";-import { TaskSuggestions } from "#/components/features/home/tasks/task-suggestions";import { NewConversation } from "#/components/features/home/new-conversation/new-conversation";-import { RecentConversations } from "#/components/features/home/recent-conversations/recent-conversations";import { OnboardingHost } from "#/components/features/onboarding";<PrefetchPageLinks page="/conversations/:conversationId" />;@@ -12,27 +11,25 @@ function HomeScreen() {return (<divdata-testid="home-screen"- className="px-0 pt-4 bg-transparent h-full flex flex-col pt-[35px] overflow-y-auto rounded-xl lg:px-[42px] lg:pt-[42px] custom-scrollbar-always"+ className="px-0 bg-transparent h-full flex flex-col overflow-y-auto rounded-xl lg:px-[42px] custom-scrollbar-always">- <HomeHeader />+ <div className="flex justify-center pt-2">+ <GuideMessage />+ </div>- <div className="pt-[25px] flex justify-center">- <div- className="flex flex-col gap-5 px-6 sm:max-w-full sm:min-w-full md:flex-row lg:px-0 lg:max-w-[703px] lg:min-w-[703px]"- data-testid="home-screen-new-conversation-section"- >- <RepoConnector />- <NewConversation />+ <div className="flex flex-1 min-h-0 flex-col justify-center py-8">+ <div className="flex justify-center">+ <HomeHeaderTitle /></div>- </div>- <div className="pt-4 flex sm:justify-start md:justify-center">- <div- className="flex flex-col gap-5 px-6 md:flex-row min-w-full md:max-w-full lg:px-0 lg:max-w-[703px] lg:min-w-[703px]"- data-testid="home-screen-recent-conversations-section"- >- <RecentConversations />- <TaskSuggestions />+ <div className="pt-[25px] flex justify-center">+ <div+ className="flex flex-col gap-5 px-6 sm:max-w-full sm:min-w-full md:flex-row lg:px-0 lg:max-w-[703px] lg:min-w-[703px]"+ data-testid="home-screen-new-conversation-section"+ >+ <RepoConnector />+ <NewConversation />+ </div></div></div>diff --git a/src/ui/dropdown/dropdown-input.tsx b/src/ui/dropdown/dropdown-input.tsxindex 26af0c3b94..14e8d757b0 100644--- a/src/ui/dropdown/dropdown-input.tsx+++ b/src/ui/dropdown/dropdown-input.tsx@@ -1,4 +1,3 @@-/* eslint-disable react/jsx-props-no-spreading */import { cn } from "#/utils/utils";interface DropdownInputProps {diff --git a/src/ui/dropdown/dropdown-menu.tsx b/src/ui/dropdown/dropdown-menu.tsxindex 4277b83306..f03ad35e98 100644--- a/src/ui/dropdown/dropdown-menu.tsx+++ b/src/ui/dropdown/dropdown-menu.tsx@@ -1,4 +1,3 @@-/* eslint-disable react/jsx-props-no-spreading */import React from "react";import { cn } from "#/utils/utils";import { DropdownOption } from "./types";@@ -31,14 +30,14 @@ export function DropdownMenu({return (<divclassName={cn(- "absolute z-10 w-full",+ "absolute z-50 w-full overflow-hidden text-white",openUpward ? "bottom-full mb-1" : "mt-1",- "bg-[#1F1F1F] border border-[#242424] rounded-lg",+ "bg-tertiary rounded-[6px] context-menu-box-shadow py-[6px] px-1","max-h-60 overflow-auto",!isOpen && "hidden",)}>- <ul {...getMenuProps({ className: "p-1" })}>+ <ul {...getMenuProps({ className: "p-0" })}>{isOpen && filteredOptions.length === 0 && (<li className="px-2 py-2 text-sm text-gray-400 italic">{emptyMessage}@@ -52,7 +51,7 @@ export function DropdownMenu({item: option,index,className: cn(- "px-2 py-2 cursor-pointer text-sm rounded-md",+ "px-2 py-2 cursor-pointer text-sm rounded","text-white focus:outline-none font-normal","flex items-center gap-2",selectedItem?.value === option.value@@ -67,7 +66,10 @@ export function DropdownMenu({))}</ul>{isOpen && footer ? (- <div className="border-t border-[#242424] p-1">{footer}</div>+ <>+ <div className="my-1 h-[1px] w-full bg-[#5C5D62]" />+ <div className="p-0">{footer}</div>+ </>) : null}</div>);diff --git a/src/ui/dropdown/dropdown.tsx b/src/ui/dropdown/dropdown.tsxindex 7ddf138662..e0eded4e6a 100644--- a/src/ui/dropdown/dropdown.tsx+++ b/src/ui/dropdown/dropdown.tsx@@ -8,6 +8,20 @@ import { ToggleButton } from "./toggle-button";import { DropdownMenu } from "./dropdown-menu";import { DropdownInput } from "./dropdown-input";+// Equivalent to Tailwind's `sr-only`, inlined so we don't depend on the+// utility class being preserved by the host project's CSS pipeline.+const visuallyHiddenStyle: React.CSSProperties = {+ position: "absolute",+ width: 1,+ height: 1,+ padding: 0,+ margin: -1,+ overflow: "hidden",+ clip: "rect(0, 0, 0, 0)",+ whiteSpace: "nowrap",+ border: 0,+};+interface DropdownProps {options: DropdownOption[];emptyMessage?: string;@@ -21,6 +35,10 @@ interface DropdownProps {className?: string;footer?: React.ReactNode;openUpward?: boolean;+ hideTrigger?: boolean;+ defaultOpen?: boolean;+ /** Open the dropdown menu on hover instead of requiring a click. */+ openOnHover?: boolean;}export function Dropdown({@@ -36,7 +54,13 @@ export function Dropdown({className,footer,openUpward = false,+ hideTrigger = false,+ defaultOpen = false,+ openOnHover = false,}: DropdownProps) {+ const closeTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(+ null,+ );const [inputValue, setInputValue] = useState(defaultValue?.label ?? "");const [searchTerm, setSearchTerm] = useState("");@@ -48,6 +72,8 @@ export function Dropdown({isOpen,selectedItem,selectItem,+ openMenu,+ closeMenu,getToggleButtonProps,getMenuProps,getItemProps,@@ -61,6 +87,7 @@ export function Dropdown({state.isOpen? { ...actionAndChanges.changes, isOpen: true }: actionAndChanges.changes,+ initialIsOpen: defaultOpen,onInputValueChange: ({ inputValue: newValue }) => {setInputValue(newValue ?? "");setSearchTerm(newValue ?? "");@@ -112,35 +139,79 @@ export function Dropdown({});return (- <div className="relative w-full" data-testid={testId}>- <div- className={cn(- "bg-tertiary border border-[#717888] rounded w-full p-2",- "flex items-center gap-2",- isDisabled && "cursor-not-allowed opacity-60",- className,- )}- >- {liveSelectedOption?.prefix ? (- <span className="flex items-center shrink-0">- {liveSelectedOption.prefix}- </span>- ) : null}- <DropdownInput- placeholder={placeholder}- isDisabled={isDisabled}- getInputProps={getInputPropsWithCursorFix}- />- {loading && <LoadingSpinner />}- {clearable && selectedItem && (- <ClearButton onClear={() => selectItem(null)} />- )}- <ToggleButton- isOpen={isOpen}- isDisabled={isDisabled}- getToggleButtonProps={getToggleButtonProps}- />- </div>+ <div+ className="relative w-full"+ data-testid={testId}+ onMouseEnter={+ openOnHover+ ? () => {+ if (closeTimerRef.current) {+ clearTimeout(closeTimerRef.current);+ closeTimerRef.current = null;+ }+ openMenu();+ }+ : undefined+ }+ onMouseLeave={+ openOnHover+ ? () => {+ closeTimerRef.current = setTimeout(() => closeMenu(), 150);+ }+ : undefined+ }+ >+ {!hideTrigger ? (+ <div+ className={cn(+ "bg-tertiary border border-[#717888] rounded w-full p-2",+ "flex items-center gap-2",+ isDisabled && "cursor-not-allowed opacity-60",+ className,+ )}+ >+ {liveSelectedOption?.prefix ? (+ <span className="flex items-center shrink-0">+ {liveSelectedOption.prefix}+ </span>+ ) : null}+ <DropdownInput+ placeholder={placeholder}+ isDisabled={isDisabled}+ getInputProps={getInputPropsWithCursorFix}+ />+ {loading && <LoadingSpinner />}+ {clearable && selectedItem && (+ <ClearButton onClear={() => selectItem(null)} />+ )}+ <ToggleButton+ isOpen={isOpen}+ isDisabled={isDisabled}+ getToggleButtonProps={getToggleButtonProps}+ />+ </div>+ ) : (+ // downshift's useCombobox always expects getInputProps() (and the+ // toggle button) to be wired up. When the trigger is hidden (e.g.+ // collapsed-sidebar popover) we still need to mount a real input+ // so it stops warning every render. Keep it visually hidden but+ // present in the DOM for accessibility.+ <>+ <input+ {...getInputPropsWithCursorFix({+ "aria-label": placeholder ?? "Filter options",+ tabIndex: -1,+ })}+ style={visuallyHiddenStyle}+ />+ <button+ type="button"+ {...getToggleButtonProps({ tabIndex: -1 })}+ style={visuallyHiddenStyle}+ aria-hidden+ />+ </>+ )}<DropdownMenuisOpen={isOpen}filteredOptions={filteredOptions}diff --git a/src/ui/dropdown/toggle-button.tsx b/src/ui/dropdown/toggle-button.tsxindex 59ab198510..4e9e6c070e 100644--- a/src/ui/dropdown/toggle-button.tsx+++ b/src/ui/dropdown/toggle-button.tsx@@ -1,4 +1,3 @@-/* eslint-disable react/jsx-props-no-spreading */import { ChevronDown } from "lucide-react";import { cn } from "#/utils/utils";diff --git a/src/utils/event-logger.ts b/src/utils/event-logger.tsindex f268d1e4da..c03c63d447 100644--- a/src/utils/event-logger.ts+++ b/src/utils/event-logger.ts@@ -1,5 +1,3 @@-/* eslint-disable no-console */-/*** A utility class for logging events. This class will only log events in development mode.*/diff --git a/src/utils/sdk-settings-field-metadata.ts b/src/utils/sdk-settings-field-metadata.tsindex 7f62c3ab89..66d84e1240 100644--- a/src/utils/sdk-settings-field-metadata.ts+++ b/src/utils/sdk-settings-field-metadata.ts@@ -89,7 +89,6 @@ function resolveSchemaFieldText(// Log warning when falling back to untranslated schema valueif (schemaValue) {- // eslint-disable-next-line no-consoleconsole.warn(`[i18n] Missing translation for key "${conventionalKey}", falling back to: "${schemaValue}"`,);@@ -162,7 +161,7 @@ export function resolveSchemaChoiceLabel(}// Log warning when falling back to untranslated schema label- // eslint-disable-next-line no-console+console.warn(`[i18n] Missing translation for key "${conventionalKey}", falling back to: "${schemaLabel}"`,);