🙌 OpenHands: AI-Driven Development
UI polish: drawer tabs, empty states, and browser chrome (#1288)
FraterCCCLXIIIdcf469855a9f
diff --git a/README.md b/README.mdindex 5431b6979f..fe17074f51 100644--- a/README.md+++ b/README.md@@ -73,6 +73,7 @@ agent-canvas --backend-only # agent server + automation backend + ingress only- A host directory for `PROJECTS_PATH` containing the project folders you want the agent to access. Create it before starting the container.**macOS / Linux:**+```shexport PROJECTS_PATH="$HOME/projects" # directory containing your project foldersmkdir -p "$PROJECTS_PATH" "$HOME/.openhands"diff --git a/__tests__/api/agent-server-config.test.ts b/__tests__/api/agent-server-config.test.tsindex 79cc877c6d..c80db9d33e 100644--- a/__tests__/api/agent-server-config.test.ts+++ b/__tests__/api/agent-server-config.test.ts@@ -73,7 +73,6 @@ describe("agent server config", () => {buildConversationWorkingDir("4a8dca37-3bf0-48de-a0af-949d711c3d48"),).toBe("/srv/workspaces/4a8dca373bf048dea0af949d711c3d48");});-});describe("isAuthRequired", () => {diff --git a/__tests__/components/browser.test.tsx b/__tests__/components/browser.test.tsxindex 0f66c4a705..9e20498675 100644--- a/__tests__/components/browser.test.tsx+++ b/__tests__/components/browser.test.tsx@@ -49,6 +49,30 @@ describe("Browser", () => {render(<BrowserPanel />);expect(screen.getByText("BROWSER$NO_PAGE_LOADED")).toBeInTheDocument();+ expect(screen.getByTestId("browser-chrome-bar")).toBeInTheDocument();+ expect(screen.getByTestId("browser-chrome-url")).toHaveTextContent(+ "https://example.com",+ );+ });++ it("keeps the chrome bar height and disables open-in-new-tab when empty", () => {+ useBrowserStore.setState({+ url: "",+ screenshotSrc: "",+ });++ render(<BrowserPanel />);++ expect(screen.getByTestId("browser-chrome-bar")).toHaveClass("min-h-[34px]");+ expect(screen.getByTestId("browser-chrome-url")).toHaveTextContent(+ "BROWSER$URL_PLACEHOLDER",+ );+ expect(+ screen.queryByRole("button", { name: "BUTTON$BACK" }),+ ).not.toBeInTheDocument();+ expect(+ screen.getByRole("button", { name: "BUTTON$OPEN_IN_NEW_TAB" }),+ ).toBeDisabled();});it("renders the url and a screenshot", () => {@@ -60,7 +84,9 @@ describe("Browser", () => {render(<BrowserPanel />);- expect(screen.getByText("https://example.com")).toBeInTheDocument();+ expect(screen.getByTestId("browser-chrome-url")).toHaveTextContent(+ "https://example.com",+ );expect(screen.getByAltText("BROWSER$SCREENSHOT_ALT")).toBeInTheDocument();});diff --git a/__tests__/components/features/conversation/conversation-tab-content.test.tsx b/__tests__/components/features/conversation/conversation-tab-content.test.tsxindex 5d6b49521c..bae5fb21e5 100644--- a/__tests__/components/features/conversation/conversation-tab-content.test.tsx+++ b/__tests__/components/features/conversation/conversation-tab-content.test.tsx@@ -35,12 +35,6 @@ vi.mock("#/routes/browser-tab", () => ({},}));-vi.mock("#/routes/vscode-tab", () => ({- default: () => (- <div data-testid="vscode-tab-content">VSCode Tab Content</div>- ),-}));-vi.mock("#/routes/planner-tab", () => ({default: () => (<div data-testid="planner-tab-content">Planner Tab Content</div>@@ -127,16 +121,6 @@ describe("ConversationTabContent", () => {});});- it("should render vscode tab when selected", async () => {- setSelectedTab("vscode");-- render(<ConversationTabContent />, { wrapper: createWrapper() });-- await waitFor(() => {- expect(screen.getByTestId("vscode-tab-content")).toBeInTheDocument();- });- });-it("should render terminal tab when selected", async () => {setSelectedTab("terminal");diff --git a/__tests__/components/features/conversation/conversation-tabs-context-menu.test.tsx b/__tests__/components/features/conversation/conversation-tabs-context-menu.test.tsxindex 29e8bde626..0046aefd1c 100644--- a/__tests__/components/features/conversation/conversation-tabs-context-menu.test.tsx+++ b/__tests__/components/features/conversation/conversation-tabs-context-menu.test.tsx@@ -26,6 +26,10 @@ vi.mock("#/hooks/use-task-list", () => ({}),}));+vi.mock("#/hooks/use-is-archived-conversation", () => ({+ useIsArchivedConversation: () => false,+}));+function seedActiveBackend(backend: Backend): void {localStorage.setItem(BACKENDS_STORAGE_KEY, JSON.stringify([backend]));localStorage.setItem(@@ -67,24 +71,6 @@ describe("ConversationTabsContextMenu", () => {expect(screen.queryByText("COMMON$PLANNER")).not.toBeInTheDocument();});- it("should show the Code entry when the active backend is cloud", () => {- seedActiveBackend({- id: "cloud-test",- name: "Cloud Test",- host: "https://app.example.com",- apiKey: "secret",- kind: "cloud",- });-- render(- <ActiveBackendProvider>- <ConversationTabsContextMenu isOpen={true} onClose={vi.fn()} />- </ActiveBackendProvider>,- );-- expect(screen.getByText("COMMON$CODE")).toBeInTheDocument();- });-it("should show the Planner entry when the active backend is cloud", () => {seedActiveBackend({id: "cloud-test",diff --git a/__tests__/components/features/conversation/conversation-tabs.test.tsx b/__tests__/components/features/conversation/conversation-tabs.test.tsxindex 4038ea31e0..fd09411bfc 100644--- a/__tests__/components/features/conversation/conversation-tabs.test.tsx+++ b/__tests__/components/features/conversation/conversation-tabs.test.tsx@@ -54,6 +54,14 @@ vi.mock("#/hooks/use-agent-state", () => ({useAgentState: () => ({ curAgentState: mockCurAgentState }),}));+vi.mock("#/hooks/query/use-unified-vscode-url", () => ({+ useUnifiedVSCodeUrl: () => ({+ data: { url: "http://localhost:8001", error: null },+ isLoading: false,+ refetch: vi.fn().mockResolvedValue({ data: { url: "http://localhost:8001" } }),+ }),+}));+const createWrapper = (conversationId: string) =>function ({ children }: { children: React.ReactNode }) {return (@@ -449,12 +457,12 @@ describe("ConversationTabs localStorage behavior", () => {});});- describe("vscode tab visibility by backend kind", () => {+ describe("planner tab visibility by backend kind", () => {beforeEach(() => {mockConversationId = REAL_CONVERSATION_ID;});- it("should hide the vscode tab when the active backend is local", () => {+ it("should hide the planner tab when the active backend is local", () => {// ArrangeseedActiveBackend({id: "local-test",@@ -471,11 +479,11 @@ describe("ConversationTabs localStorage behavior", () => {// Assertexpect(- screen.queryByTestId("conversation-tab-vscode"),+ screen.queryByTestId("conversation-tab-planner"),).not.toBeInTheDocument();});- it("should show the vscode tab when the active backend is cloud", () => {+ it("should show the planner tab when the active backend is cloud", () => {// ArrangeseedActiveBackend({id: "cloud-test",@@ -491,16 +499,18 @@ describe("ConversationTabs localStorage behavior", () => {});// Assert- expect(screen.getByTestId("conversation-tab-vscode")).toBeInTheDocument();+ expect(+ screen.getByTestId("conversation-tab-planner"),+ ).toBeInTheDocument();});});- describe("planner tab visibility by backend kind", () => {+ describe("vscode link visibility by backend kind", () => {beforeEach(() => {mockConversationId = REAL_CONVERSATION_ID;});- it("should hide the planner tab when the active backend is local", () => {+ it("should hide the vscode link when the active backend is local", () => {// ArrangeseedActiveBackend({id: "local-test",@@ -517,11 +527,11 @@ describe("ConversationTabs localStorage behavior", () => {// Assertexpect(- screen.queryByTestId("conversation-tab-planner"),+ screen.queryByTestId("drawer-vscode-link"),).not.toBeInTheDocument();});- it("should show the planner tab when the active backend is cloud", () => {+ it("should show the vscode link when the active backend is cloud", () => {// ArrangeseedActiveBackend({id: "cloud-test",@@ -537,9 +547,7 @@ describe("ConversationTabs localStorage behavior", () => {});// Assert- expect(- screen.getByTestId("conversation-tab-planner"),- ).toBeInTheDocument();+ expect(screen.getByTestId("drawer-vscode-link")).toBeInTheDocument();});});diff --git a/__tests__/components/features/conversation/right-panel-toggle.test.tsx b/__tests__/components/features/conversation/right-panel-toggle.test.tsxindex 8d05cfba35..604b8063b4 100644--- a/__tests__/components/features/conversation/right-panel-toggle.test.tsx+++ b/__tests__/components/features/conversation/right-panel-toggle.test.tsx@@ -28,6 +28,10 @@ vi.mock("#/hooks/use-conversation-id", () => ({useConversationId: () => ({ conversationId: CONVERSATION_ID }),}));+vi.mock("#/hooks/use-is-archived-conversation", () => ({+ useIsArchivedConversation: () => false,+}));+describe("RightPanelToggle", () => {beforeEach(() => {localStorage.clear();diff --git a/__tests__/components/terminal/terminal-empty-state.test.tsx b/__tests__/components/terminal/terminal-empty-state.test.tsxnew file mode 100644index 0000000000..256e994c8a--- /dev/null+++ b/__tests__/components/terminal/terminal-empty-state.test.tsx@@ -0,0 +1,73 @@+import { screen } from "@testing-library/react";+import { describe, expect, it, vi, beforeEach } from "vitest";+import { useCommandStore } from "#/stores/command-store";+import { useAgentState } from "#/hooks/use-agent-state";+import { AgentState } from "#/types/agent-state";++vi.mock("#/hooks/use-agent-state");++const mockTerminalInstance = {+ open: vi.fn(),+ write: vi.fn(),+ writeln: vi.fn(),+ dispose: vi.fn(),+ loadAddon: vi.fn(),+};++vi.mock("@xterm/xterm", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@xterm/xterm")>()),+ Terminal: vi.fn(function MockTerminal() {+ return mockTerminalInstance;+ }),+}));++vi.mock("@xterm/addon-fit", () => ({+ FitAddon: vi.fn(function MockFitAddon() {+ return { fit: vi.fn() };+ }),+}));++import { renderWithProviders } from "test-utils";+import Terminal from "#/components/features/terminal/terminal";++describe("Terminal empty state", () => {+ beforeEach(() => {+ useCommandStore.setState({ commands: [] });+ vi.mocked(useAgentState).mockReturnValue({+ curAgentState: AgentState.RUNNING,+ });+ global.ResizeObserver = vi.fn(function MockResizeObserver() {+ return {+ observe: vi.fn(),+ disconnect: vi.fn(),+ };+ }) as unknown as typeof ResizeObserver;+ });++ it("shows the empty state when runtime is active and there is no output", () => {+ renderWithProviders(<Terminal />);++ expect(screen.getByText("TERMINAL$NO_OUTPUT")).toBeInTheDocument();+ });++ it("hides the empty state when terminal commands exist", () => {+ useCommandStore.setState({+ commands: [{ type: "output", content: "hello" }],+ });++ renderWithProviders(<Terminal />);++ expect(screen.queryByText("TERMINAL$NO_OUTPUT")).not.toBeInTheDocument();+ });++ it("shows the runtime waiting state instead of the empty state when inactive", () => {+ vi.mocked(useAgentState).mockReturnValue({+ curAgentState: AgentState.LOADING,+ });++ renderWithProviders(<Terminal />);++ expect(screen.queryByText("TERMINAL$NO_OUTPUT")).not.toBeInTheDocument();+ expect(screen.getByTestId("runtime-waiting")).toBeInTheDocument();+ });+});diff --git a/__tests__/hooks/use-select-conversation-tab.test.ts b/__tests__/hooks/use-select-conversation-tab.test.tsindex 6b0d80af04..2fa1bbcead 100644--- a/__tests__/hooks/use-select-conversation-tab.test.ts+++ b/__tests__/hooks/use-select-conversation-tab.test.ts@@ -213,7 +213,7 @@ describe("useSelectConversationTab", () => {it("should return current selectedTab from store", () => {// ArrangeuseConversationStore.setState({- selectedTab: "vscode",+ selectedTab: "browser",isRightPanelShown: true,hasRightPanelToggled: true,});@@ -221,7 +221,7 @@ describe("useSelectConversationTab", () => {const { result } = renderHook(() => useSelectConversationTab());// Assert: Should return current selectedTab- expect(result.current.selectedTab).toBe("vscode");+ expect(result.current.selectedTab).toBe("browser");});it("should return current isRightPanelShown from store", () => {diff --git a/__tests__/routes/changes-tab.test.tsx b/__tests__/routes/changes-tab.test.tsxindex 8a428c23c4..1891ab761e 100644--- a/__tests__/routes/changes-tab.test.tsx+++ b/__tests__/routes/changes-tab.test.tsx@@ -86,7 +86,7 @@ describe("Changes Tab", () => {render(<GitChanges />, { wrapper });- expect(screen.getByText("TIPS$PROTIP:")).toBeInTheDocument();+ expect(screen.getByText("TIPS$PROTIP")).toBeInTheDocument();});it("should hide the Protip when the git changes request errors", () => {@@ -105,7 +105,7 @@ describe("Changes Tab", () => {render(<GitChanges />, { wrapper });- expect(screen.queryByText("TIPS$PROTIP:")).not.toBeInTheDocument();+ expect(screen.queryByText("TIPS$PROTIP")).not.toBeInTheDocument();expect(screen.getByText("DIFF_VIEWER$NOT_A_GIT_REPO"),).toBeInTheDocument();diff --git a/__tests__/routes/vscode-tab.test.tsx b/__tests__/routes/vscode-tab.test.tsxdeleted file mode 100644index 8c84678603..0000000000--- a/__tests__/routes/vscode-tab.test.tsx+++ /dev/null@@ -1,65 +0,0 @@-import { screen } from "@testing-library/react";-import { beforeEach, describe, expect, it, vi } from "vitest";-import { renderWithProviders } from "test-utils";-import VSCodeTab from "#/routes/vscode-tab";-import { useUnifiedVSCodeUrl } from "#/hooks/query/use-unified-vscode-url";-import { useAgentState } from "#/hooks/use-agent-state";-import { AgentState } from "#/types/agent-state";--vi.mock("#/hooks/query/use-unified-vscode-url");-vi.mock("#/hooks/use-agent-state");-vi.mock("#/utils/feature-flags", () => ({- VSCODE_IN_NEW_TAB: () => false,-}));--function mockVSCodeUrlHook(- value: Partial<ReturnType<typeof useUnifiedVSCodeUrl>>,-) {- vi.mocked(useUnifiedVSCodeUrl).mockReturnValue({- data: { url: "http://localhost:3000/vscode", error: null },- error: null,- isLoading: false,- isError: false,- isSuccess: true,- status: "success",- refetch: vi.fn(),- ...value,- } as ReturnType<typeof useUnifiedVSCodeUrl>);-}--describe("VSCodeTab", () => {- beforeEach(() => {- vi.clearAllMocks();- });-- it("keeps VSCode accessible when the agent is in an error state", () => {- vi.mocked(useAgentState).mockReturnValue({- curAgentState: AgentState.ERROR,- });- mockVSCodeUrlHook({});-- renderWithProviders(<VSCodeTab />);-- expect(- screen.queryByText("DIFF_VIEWER$WAITING_FOR_RUNTIME"),- ).not.toBeInTheDocument();- expect(screen.getByTitle("VSCODE$TITLE")).toHaveAttribute(- "src",- "http://localhost:3000/vscode",- );- });-- it("still waits while the runtime is starting", () => {- vi.mocked(useAgentState).mockReturnValue({- curAgentState: AgentState.LOADING,- });- mockVSCodeUrlHook({});-- renderWithProviders(<VSCodeTab />);-- expect(- screen.getByText("DIFF_VIEWER$WAITING_FOR_RUNTIME"),- ).toBeInTheDocument();- expect(screen.queryByTitle("VSCODE$TITLE")).not.toBeInTheDocument();- });-});diff --git a/__tests__/services/canvas-ui.test.ts b/__tests__/services/canvas-ui.test.tsindex a0d8283922..2469b43267 100644--- a/__tests__/services/canvas-ui.test.ts+++ b/__tests__/services/canvas-ui.test.ts@@ -68,6 +68,14 @@ describe("handleCanvasUIAction", () => {}});+ it("open_tab routes the removed vscode tab to files", () => {+ handleCanvasUIAction(action({ command: "open_tab", tab: "vscode" }));++ expect(useConversationStore.getState().selectedTab).toBe("files");+ expect(useConversationStore.getState().isRightPanelShown).toBe(true);+ expect(useFilesTabStore.getState().selectedPath).toBeNull();+ });+it("navigate_to_file leaves selectedPath alone when no path is supplied", () => {useFilesTabStore.setState({ selectedPath: "previous.txt" });diff --git a/scripts/dev-with-automation.mjs b/scripts/dev-with-automation.mjsindex 9779e8ec87..7d476dccee 100644--- a/scripts/dev-with-automation.mjs+++ b/scripts/dev-with-automation.mjs@@ -569,7 +569,11 @@ function spawnService(name, command, args, options = {}) {.filter(Boolean).forEach((line) => {const parsed = parseLogLine ? parseLogLine(line.trim()) : null;- logService(name, parsed ? parsed.text : line.trim(), parsed ? parsed.color : color);+ logService(+ name,+ parsed ? parsed.text : line.trim(),+ parsed ? parsed.color : color,+ );});});@@ -580,7 +584,11 @@ function spawnService(name, command, args, options = {}) {.filter(Boolean).forEach((line) => {const parsed = parseLogLine ? parseLogLine(line.trim()) : null;- logService(name, parsed ? parsed.text : line.trim(), parsed ? parsed.color : c.yellow);+ logService(+ name,+ parsed ? parsed.text : line.trim(),+ parsed ? parsed.color : c.yellow,+ );});});@@ -1150,7 +1158,9 @@ function printBanner(config) {? [` Main UI: http://localhost:${config.ingressPort}/`]: []),...(config.launchAutomation- ? [` API Docs: http://localhost:${config.ingressPort}/api/automation/docs`]+ ? [+ ` API Docs: http://localhost:${config.ingressPort}/api/automation/docs`,+ ]: []),` State directory: ${config.stateDir}`,];diff --git a/src/components/features/automations/empty-state.tsx b/src/components/features/automations/empty-state.tsxindex 64b8b35379..a9850b34e0 100644--- a/src/components/features/automations/empty-state.tsx+++ b/src/components/features/automations/empty-state.tsx@@ -16,7 +16,7 @@ export function EmptyState() {{t(I18nKey.AUTOMATIONS$EMPTY_HINT)}</p>- <div className="mt-8 flex justify-center">+ <div className="mt-8 flex justify-center border-t border-[var(--oh-border)] pt-8"><CreateInstructions /></div></div>diff --git a/src/components/features/backends/device-flow-auth.tsx b/src/components/features/backends/device-flow-auth.tsxindex 46ff4b1009..d1b883abc8 100644--- a/src/components/features/backends/device-flow-auth.tsx+++ b/src/components/features/backends/device-flow-auth.tsx@@ -229,14 +229,6 @@ function LoadingSpinner() {viewBox="0 0 24 24"aria-hidden="true">- <circle- className="opacity-25"- cx="12"- cy="12"- r="10"- stroke="currentColor"- strokeWidth="4"- /><pathclassName="opacity-75"fill="currentColor"diff --git a/src/components/features/browser/browser-chrome-bar.tsx b/src/components/features/browser/browser-chrome-bar.tsxnew file mode 100644index 0000000000..63a2d7ee1b--- /dev/null+++ b/src/components/features/browser/browser-chrome-bar.tsx@@ -0,0 +1,68 @@+import { ExternalLink } from "lucide-react";+import { useTranslation } from "react-i18next";+import { I18nKey } from "#/i18n/declaration";+import { cn } from "#/utils/utils";++type BrowserChromeBarProps = {+ url: string;+ hasPage: boolean;+};++export function BrowserChromeBar({ url, hasPage }: BrowserChromeBarProps) {+ const { t } = useTranslation("openhands");++ const disabledButtonClassName = cn(+ "shrink-0 inline-flex items-center justify-center w-6 h-6 rounded-md",+ "text-[var(--oh-text-tertiary)] opacity-40 cursor-not-allowed",+ );++ const iconClassName = "w-3.5 h-3.5";++ return (+ <div+ className="flex w-full min-h-[34px] shrink-0 items-center gap-1 border-b border-[var(--oh-border)] px-2 py-1.5"+ data-testid="browser-chrome-bar"+ >+ <div+ className={cn(+ "flex min-h-7 min-w-0 flex-1 items-center rounded-md border border-[var(--oh-border)]",+ "bg-[var(--oh-surface-raised)] px-2 text-xs leading-5",+ url ? "text-[var(--oh-text-tertiary)]" : "text-[var(--oh-text-dim)]",+ )}+ data-testid="browser-chrome-url"+ title={url || undefined}+ >+ <span className="truncate">+ {url || t(I18nKey.BROWSER$URL_PLACEHOLDER)}+ </span>+ </div>++ {hasPage && url ? (+ <a+ href={url}+ target="_blank"+ rel="noopener noreferrer"+ aria-label={t(I18nKey.BUTTON$OPEN_IN_NEW_TAB)}+ title={t(I18nKey.BUTTON$OPEN_IN_NEW_TAB)}+ data-testid="browser-chrome-open-external"+ className={cn(+ "shrink-0 inline-flex items-center justify-center w-6 h-6 rounded-md",+ "text-[var(--oh-text-tertiary)] hover:bg-tertiary cursor-pointer",+ )}+ >+ <ExternalLink className={iconClassName} aria-hidden strokeWidth={2} />+ </a>+ ) : (+ <button+ type="button"+ disabled+ aria-label={t(I18nKey.BUTTON$OPEN_IN_NEW_TAB)}+ title={t(I18nKey.BUTTON$OPEN_IN_NEW_TAB)}+ className={disabledButtonClassName}+ >+ <ExternalLink className={iconClassName} aria-hidden strokeWidth={2} />+ </button>+ )}+ </div>+ );+}diff --git a/src/components/features/browser/browser-snapshot.tsx b/src/components/features/browser/browser-snapshot.tsxindex 471ea6d2fb..6678ab15f7 100644--- a/src/components/features/browser/browser-snapshot.tsx+++ b/src/components/features/browser/browser-snapshot.tsx@@ -11,7 +11,7 @@ export function BrowserSnapshot({ src }: BrowserSnaphsotProps) {return (<imgsrc={src}- className="rounded-xl object-contain w-full h-auto"+ className="block w-full h-auto"alt={t(I18nKey.BROWSER$SCREENSHOT_ALT)}/>);diff --git a/src/components/features/browser/browser.tsx b/src/components/features/browser/browser.tsxindex 85a502cbbe..47a21fdc57 100644--- a/src/components/features/browser/browser.tsx+++ b/src/components/features/browser/browser.tsx@@ -1,20 +1,20 @@import { BrowserSnapshot } from "./browser-snapshot";+import { BrowserChromeBar } from "./browser-chrome-bar";import { EmptyBrowserMessage } from "./empty-browser-message";import { useBrowserStore } from "#/stores/browser-store";export function BrowserPanel() {const { url, screenshotSrc } = useBrowserStore();+ const hasPage = Boolean(screenshotSrc);const imgSrc = screenshotSrc?.startsWith("data:image/png;base64,")? screenshotSrc: `data:image/png;base64,${screenshotSrc ?? ""}`;return (- <div className="h-full w-full flex flex-col text-[var(--oh-muted)]">- <div className="w-full p-2 truncate border-b border-[var(--oh-border)]">- {url}- </div>- <div className="overflow-y-auto grow scrollbar-hide rounded-xl">+ <div className="flex h-full min-h-0 w-full flex-col text-[var(--oh-muted)]">+ <BrowserChromeBar url={url} hasPage={hasPage} />+ <div className="flex min-h-0 flex-1 flex-col overflow-y-auto scrollbar-hide bg-[var(--oh-surface)]">{screenshotSrc ? (<BrowserSnapshot src={imgSrc} />) : (diff --git a/src/components/features/chat/btw-messages.tsx b/src/components/features/chat/btw-messages.tsxindex 00252b5d8d..fc6d8c89aa 100644--- a/src/components/features/chat/btw-messages.tsx+++ b/src/components/features/chat/btw-messages.tsx@@ -46,7 +46,7 @@ export function BtwMessages({ conversationId }: BtwMessagesProps) {{isPending && (<spandata-testid="btw-spinner"- className="inline-block w-3.5 h-3.5 ml-2 rounded-full border-2 border-[var(--oh-border-input)] border-t-transparent animate-spin"+ className="inline-block w-3.5 h-3.5 ml-2 rounded-full border-2 border-transparent border-t-[var(--oh-border-input)] animate-spin"/>)}</span>diff --git a/src/components/features/chat/chat-interface.tsx b/src/components/features/chat/chat-interface.tsxindex 0b1ef246e3..a80ed51ce0 100644--- a/src/components/features/chat/chat-interface.tsx+++ b/src/components/features/chat/chat-interface.tsx@@ -17,6 +17,7 @@ import { ScrollProvider } from "#/context/scroll-context";import { useInitialQueryStore } from "#/stores/initial-query-store";import { useSendMessage } from "#/hooks/use-send-message";import { useAgentState } from "#/hooks/use-agent-state";+import { useIsArchivedConversation } from "#/hooks/use-is-archived-conversation";import { useHandleBuildPlanClick } from "#/hooks/use-handle-build-plan-click";import { ScrollToBottomButton } from "#/components/shared/buttons/scroll-to-bottom-button";@@ -105,8 +106,7 @@ export function ChatInterface() {// always null, so this is effectively a no-op for non-cloud use.const { data: activeConversation } = useActiveConversation();const sandboxStatus = activeConversation?.sandbox_status ?? null;- const isArchivedConversation =- sandboxStatus === "MISSING" || sandboxStatus === "ERROR";+ const isArchivedConversation = useIsArchivedConversation();// Block sending in a resumed conversation that has no usable LLM, and show// the same setup banner as the home screen so the dead end is explained.@@ -533,7 +533,7 @@ export function ChatInterface() {<PendingUserMessages /></div>- <div className="flex shrink-0 flex-col gap-[6px]">+ <div className="flex shrink-0 flex-col gap-[6px] pb-4"><BtwMessages conversationId={conversationId} />{errorMessage && (<ErrorMessageBannerdiff --git a/src/components/features/chat/waiting-for-runtime-message.tsx b/src/components/features/chat/waiting-for-runtime-message.tsxindex fdf1fcf844..a00933b3d2 100644--- a/src/components/features/chat/waiting-for-runtime-message.tsx+++ b/src/components/features/chat/waiting-for-runtime-message.tsx@@ -1,6 +1,4 @@-import { useTranslation } from "react-i18next";-import { cn } from "#/utils/utils";-import { I18nKey } from "#/i18n/declaration";+import { RuntimeWaitingState } from "#/components/features/conversation-panel/runtime-waiting-state";interface WaitingForRuntimeMessageProps {className?: string;@@ -11,17 +9,5 @@ export function WaitingForRuntimeMessage({className,testId,}: WaitingForRuntimeMessageProps) {- const { t } = useTranslation("openhands");-- return (- <div- data-testid={testId}- className={cn(- "w-full h-full flex items-center text-center justify-center text-2xl text-foreground",- className,- )}- >- {t(I18nKey.DIFF_VIEWER$WAITING_FOR_RUNTIME)}- </div>- );+ return <RuntimeWaitingState testId={testId} className={className} />;}diff --git a/src/components/features/context-menu/archived-disabled-tooltip.tsx b/src/components/features/context-menu/archived-disabled-tooltip.tsxnew file mode 100644index 0000000000..5198ab6eee--- /dev/null+++ b/src/components/features/context-menu/archived-disabled-tooltip.tsx@@ -0,0 +1,32 @@+import React from "react";+import { useTranslation } from "react-i18next";+import { StyledTooltip } from "#/components/shared/buttons/styled-tooltip";+import { I18nKey } from "#/i18n/declaration";++interface ArchivedDisabledTooltipProps {+ isDisabled: boolean;+ children: React.ReactNode;+ placement?: "top" | "bottom" | "left" | "right";+}++export function ArchivedDisabledTooltip({+ isDisabled,+ children,+ placement = "right",+}: ArchivedDisabledTooltipProps) {+ const { t } = useTranslation("openhands");++ if (!isDisabled) {+ return children;+ }++ return (+ <StyledTooltip+ content={t(I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES)}+ placement={placement}+ tooltipClassName="bg-white text-black text-xs font-medium leading-5"+ >+ <span className="block w-full">{children}</span>+ </StyledTooltip>+ );+}diff --git a/src/components/features/controls/tools-context-menu.tsx b/src/components/features/controls/tools-context-menu.tsxindex c7cc218ec6..ba24d2d42b 100644--- a/src/components/features/controls/tools-context-menu.tsx+++ b/src/components/features/controls/tools-context-menu.tsx@@ -18,6 +18,8 @@ import CarretRightFillIcon from "#/icons/carret-right-fill.svg?react";import { ToolsContextMenuIconText } from "./tools-context-menu-icon-text";import { GitToolsSubmenu } from "./git-tools-submenu";import { MacrosSubmenu } from "./macros-submenu";+import { ArchivedDisabledTooltip } from "../context-menu/archived-disabled-tooltip";+import { useIsArchivedConversation } from "#/hooks/use-is-archived-conversation";interface ToolsContextMenuProps {onClose: () => void;@@ -47,6 +49,7 @@ export function ToolsContextMenu({const { t } = useTranslation("openhands");const { data: conversation } = useActiveConversation();const { providers } = useUserProviders();+ const isArchivedConversation = useIsArchivedConversation();const [activeSubmenu, setActiveSubmenu] = useState<"git" | "macros" | null>(null,@@ -57,6 +60,9 @@ export function ToolsContextMenu({const showGitTools = hasRepository && providersAreSet;const handleSubmenuClick = (submenu: "git" | "macros") => {+ if (isArchivedConversation) {+ return;+ }setActiveSubmenu(activeSubmenu === submenu ? null : submenu);};@@ -78,92 +84,117 @@ export function ToolsContextMenu({{/* Git Tools */}{showGitTools && (<div className="relative group/git">+ <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>+ <ContextMenuListItem+ testId="git-tools-button"+ onClick={() => handleSubmenuClick("git")}+ isDisabled={isArchivedConversation}+ >+ <ToolsContextMenuIconText+ icon={<CodeBranchIcon width={16} height={16} />}+ text={t(I18nKey.COMMON$GIT_TOOLS)}+ rightIcon={<CarretRightFillIcon width={10} height={10} />}+ />+ </ContextMenuListItem>+ </ArchivedDisabledTooltip>+ {!isArchivedConversation && (+ <div+ className={cn(+ "absolute left-full top-[-6px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]",+ "group-hover/git:opacity-100 group-hover/git:visible group-hover/git:pointer-events-auto",+ "hover:opacity-100 hover:visible hover:pointer-events-auto",+ activeSubmenu === "git" &&+ "opacity-100 visible pointer-events-auto",+ )}+ >+ <GitToolsSubmenu onClose={handleClose} />+ </div>+ )}+ </div>+ )}++ {/* Macros */}+ <div className="relative group/macros">+ <ArchivedDisabledTooltip isDisabled={isArchivedConversation}><ContextMenuListItem- testId="git-tools-button"- onClick={() => handleSubmenuClick("git")}+ testId="macros-button"+ onClick={() => handleSubmenuClick("macros")}+ isDisabled={isArchivedConversation}><ToolsContextMenuIconText- icon={<CodeBranchIcon width={16} height={16} />}- text={t(I18nKey.COMMON$GIT_TOOLS)}+ icon={<SettingsIcon width={16} height={16} />}+ text={t(I18nKey.COMMON$MACROS)}rightIcon={<CarretRightFillIcon width={10} height={10} />}/></ContextMenuListItem>+ </ArchivedDisabledTooltip>+ {!isArchivedConversation && (<divclassName={cn(- "absolute left-full top-[-6px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]",- "group-hover/git:opacity-100 group-hover/git:visible group-hover/git:pointer-events-auto",+ "absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]",+ "group-hover/macros:opacity-100 group-hover/macros:visible group-hover/macros:pointer-events-auto","hover:opacity-100 hover:visible hover:pointer-events-auto",- activeSubmenu === "git" &&+ activeSubmenu === "macros" &&"opacity-100 visible pointer-events-auto",)}>- <GitToolsSubmenu onClose={handleClose} />+ <MacrosSubmenu onClose={handleClose} /></div>- </div>- )}+ )}+ </div>- {/* Macros */}- <div className="relative group/macros">+ {shouldShowAgentTools && <Divider inset="menu" />}++ <ArchivedDisabledTooltip isDisabled={isArchivedConversation}><ContextMenuListItem- testId="macros-button"- onClick={() => handleSubmenuClick("macros")}+ testId="show-skills-button"+ onClick={onShowSkills}+ isDisabled={isArchivedConversation}><ToolsContextMenuIconText- icon={<SettingsIcon width={16} height={16} />}- text={t(I18nKey.COMMON$MACROS)}- rightIcon={<CarretRightFillIcon width={10} height={10} />}+ icon={+ <SkillsIcon+ width={16}+ height={16}+ className="stroke-[1.75]"+ aria-hidden+ />+ }+ text={t(I18nKey.CONVERSATION$SHOW_SKILLS)}/></ContextMenuListItem>- <div- className={cn(- "absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]",- "group-hover/macros:opacity-100 group-hover/macros:visible group-hover/macros:pointer-events-auto",- "hover:opacity-100 hover:visible hover:pointer-events-auto",- activeSubmenu === "macros" &&- "opacity-100 visible pointer-events-auto",- )}- >- <MacrosSubmenu onClose={handleClose} />- </div>- </div>-- {shouldShowAgentTools && <Divider inset="menu" />}-- <ContextMenuListItem testId="show-skills-button" onClick={onShowSkills}>- <ToolsContextMenuIconText- icon={- <SkillsIcon- width={16}- height={16}- className="stroke-[1.75]"- aria-hidden- />- }- text={t(I18nKey.CONVERSATION$SHOW_SKILLS)}- />- </ContextMenuListItem>+ </ArchivedDisabledTooltip>{/* Show Hooks - Only show for V1 conversations */}{shouldShowHooks && (- <ContextMenuListItem testId="show-hooks-button" onClick={onShowHooks}>- <ToolsContextMenuIconText- icon={<FishingHookIcon width={16} height={16} aria-hidden />}- text={t(I18nKey.CONVERSATION$SHOW_HOOKS)}- />- </ContextMenuListItem>+ <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>+ <ContextMenuListItem+ testId="show-hooks-button"+ onClick={onShowHooks}+ isDisabled={isArchivedConversation}+ >+ <ToolsContextMenuIconText+ icon={<FishingHookIcon width={16} height={16} aria-hidden />}+ text={t(I18nKey.CONVERSATION$SHOW_HOOKS)}+ />+ </ContextMenuListItem>+ </ArchivedDisabledTooltip>)}{/* Show Agent Tools and Metadata - Only show if system message is available */}{shouldShowAgentTools && (- <ContextMenuListItem- testId="show-agent-tools-button"- onClick={onShowAgentTools}- >- <ToolsContextMenuIconText- icon={<ToolsIcon width={16} height={16} />}- text={t(I18nKey.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)}- />- </ContextMenuListItem>+ <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>+ <ContextMenuListItem+ testId="show-agent-tools-button"+ onClick={onShowAgentTools}+ isDisabled={isArchivedConversation}+ >+ <ToolsContextMenuIconText+ icon={<ToolsIcon width={16} height={16} />}+ text={t(I18nKey.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)}+ />+ </ContextMenuListItem>+ </ArchivedDisabledTooltip>)}{footerAction && (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 c4bf39e85e..eb1cf67399 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@@ -1,5 +1,6 @@import { ExecutionStatus } from "#/types/agent-server/core/base/common";import { SandboxStatus } from "#/api/conversation-service/agent-server-conversation-service.types";+import { isArchivedSandboxStatus } from "#/utils/conversation-archive-status";import { ConversationCardTitle } from "./conversation-card-title";import { ConversationStatusDot } from "../conversation-status-dot";@@ -18,7 +19,7 @@ export function ConversationCardHeader({executionStatus,sandboxStatus,}: ConversationCardHeaderProps) {- const isArchived = sandboxStatus === "MISSING" || sandboxStatus === "ERROR";+ const isArchived = isArchivedSandboxStatus(sandboxStatus);return (<div className="flex items-center gap-2 flex-1 min-w-0 overflow-hidden">{executionStatus !== undefined && (diff --git a/src/components/features/conversation-panel/runtime-waiting-state.tsx b/src/components/features/conversation-panel/runtime-waiting-state.tsxindex 9463d3b8b4..4aca9735c0 100644--- a/src/components/features/conversation-panel/runtime-waiting-state.tsx+++ b/src/components/features/conversation-panel/runtime-waiting-state.tsx@@ -2,24 +2,32 @@ import { useTranslation } from "react-i18next";import { LoadingSpinner } from "#/components/shared/loading-spinner";import { I18nKey } from "#/i18n/declaration";import { Typography } from "#/ui/typography";+import { cn } from "#/utils/utils";interface RuntimeWaitingStateProps {testId?: string;+ messageKey?: I18nKey;+ className?: string;}export function RuntimeWaitingState({testId = "runtime-waiting",+ messageKey = I18nKey.DIFF_VIEWER$WAITING_FOR_RUNTIME,+ className,}: RuntimeWaitingStateProps) {const { t } = useTranslation("openhands");return (<divdata-testid={testId}- className="flex h-full w-full flex-col items-center justify-center gap-3 py-8 text-center"+ className={cn(+ "flex h-full w-full flex-col items-center justify-center gap-3 py-8 text-center",+ className,+ )}><LoadingSpinner size="small" /><Typography.Text className="text-sm text-[var(--oh-muted)]">- {t(I18nKey.DIFF_VIEWER$WAITING_FOR_RUNTIME)}+ {t(messageKey)}</Typography.Text></div>);diff --git a/src/components/features/conversation/conversation-loading.tsx b/src/components/features/conversation/conversation-loading.tsxindex 05fdced60a..8466a58cec 100644--- a/src/components/features/conversation/conversation-loading.tsx+++ b/src/components/features/conversation/conversation-loading.tsx@@ -1,5 +1,6 @@import { LoaderCircle } from "lucide-react";import { useTranslation } from "react-i18next";+import { TextShimmer } from "#/components/shared/text-shimmer";import { I18nKey } from "#/i18n/declaration";import { cn } from "#/utils/utils";@@ -18,12 +19,19 @@ export function ConversationLoading({ className }: ConversationLoadingProps) {)}><LoaderCircle- className="h-8 w-8 shrink-0 animate-spin text-foreground"+ className="h-8 w-8 shrink-0 animate-spin text-tertiary-light"aria-hidden/>- <span className="text-base font-normal leading-5 text-foreground">+ <TextShimmer+ as="p"+ role="status"+ aria-live="polite"+ className="block w-full text-center text-base font-normal leading-5"+ duration={1}+ spread={2}+ >{t(I18nKey.HOME$LOADING)}- </span>+ </TextShimmer></div>);}diff --git a/src/components/features/conversation/conversation-main/conversation-main.tsx b/src/components/features/conversation/conversation-main/conversation-main.tsxindex 7cc0c9f382..889daa13d7 100644--- a/src/components/features/conversation/conversation-main/conversation-main.tsx+++ b/src/components/features/conversation/conversation-main/conversation-main.tsx@@ -120,7 +120,7 @@ export function ConversationMain() {data-testid="tabs-pane-header"className="flex shrink-0 flex-col border-b border-[var(--oh-border)]">- <ConversationTabs />+ <ConversationTabs isPanelResizing={isDragging} /></div><div className="flex-1 min-h-0 flex flex-col"><ConversationTabContent />diff --git a/src/components/features/conversation/conversation-name-context-menu.tsx b/src/components/features/conversation/conversation-name-context-menu.tsxindex 1406b0fd2b..8609ad39ca 100644--- a/src/components/features/conversation/conversation-name-context-menu.tsx+++ b/src/components/features/conversation/conversation-name-context-menu.tsx@@ -22,6 +22,8 @@ import CloseIcon from "#/icons/u-close.svg?react";import DeleteIcon from "#/icons/u-delete.svg?react";import CopyIcon from "#/icons/copy.svg?react";import { ConversationNameContextMenuIconText } from "./conversation-name-context-menu-icon-text";+import { ArchivedDisabledTooltip } from "../context-menu/archived-disabled-tooltip";+import { useIsArchivedConversation } from "#/hooks/use-is-archived-conversation";interface ConversationNameContextMenuProps {onClose: () => void;@@ -106,6 +108,7 @@ export function ConversationNameContextMenu({const { t } = useTranslation("openhands");const { backend } = useActiveBackend();const { data: conversation } = useActiveConversation();+ const isArchivedConversation = useIsArchivedConversation();const ref = useClickOutsideElement<HTMLUListElement>(onClose);const anchorElement = anchorRef?.current ?? null;@@ -177,40 +180,55 @@ export function ConversationNameContextMenu({{hasTools && <Divider testId="separator-tools" inset="menu" />}{onShowSkills && (- <ContextMenuListItem testId="show-skills-button" onClick={onShowSkills}>- <ConversationNameContextMenuIconText- icon={- <SkillsIcon- width={16}- height={16}- className="stroke-[1.75]"- aria-hidden- />- }- text={t(I18nKey.CONVERSATION$SHOW_SKILLS)}- />- </ContextMenuListItem>+ <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>+ <ContextMenuListItem+ testId="show-skills-button"+ onClick={onShowSkills}+ isDisabled={isArchivedConversation}+ >+ <ConversationNameContextMenuIconText+ icon={+ <SkillsIcon+ width={16}+ height={16}+ className="stroke-[1.75]"+ aria-hidden+ />+ }+ text={t(I18nKey.CONVERSATION$SHOW_SKILLS)}+ />+ </ContextMenuListItem>+ </ArchivedDisabledTooltip>)}{onShowHooks && (- <ContextMenuListItem testId="show-hooks-button" onClick={onShowHooks}>- <ConversationNameContextMenuIconText- icon={<FishingHookIcon width={16} height={16} aria-hidden />}- text={t(I18nKey.CONVERSATION$SHOW_HOOKS)}- />- </ContextMenuListItem>+ <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>+ <ContextMenuListItem+ testId="show-hooks-button"+ onClick={onShowHooks}+ isDisabled={isArchivedConversation}+ >+ <ConversationNameContextMenuIconText+ icon={<FishingHookIcon width={16} height={16} aria-hidden />}+ text={t(I18nKey.CONVERSATION$SHOW_HOOKS)}+ />+ </ContextMenuListItem>+ </ArchivedDisabledTooltip>)}{onShowAgentTools && (- <ContextMenuListItem- testId="show-agent-tools-button"- onClick={onShowAgentTools}- >- <ConversationNameContextMenuIconText- icon={<ToolsIcon width={16} height={16} />}- text={t(I18nKey.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)}- />- </ContextMenuListItem>+ <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>+ <ContextMenuListItem+ testId="show-agent-tools-button"+ onClick={onShowAgentTools}+ isDisabled={isArchivedConversation}+ >+ <ConversationNameContextMenuIconText+ icon={<ToolsIcon width={16} height={16} />}+ text={t(I18nKey.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)}+ />+ </ContextMenuListItem>+ </ArchivedDisabledTooltip>)}{onDownloadConversation && (@@ -287,12 +305,18 @@ export function ConversationNameContextMenu({)}{onStop && (- <ContextMenuListItem testId="stop-button" onClick={onStop}>- <ConversationNameContextMenuIconText- icon={<CloseIcon width={16} height={16} />}- text={t(stopLabelKey)}- />- </ContextMenuListItem>+ <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>+ <ContextMenuListItem+ testId="stop-button"+ onClick={onStop}+ isDisabled={isArchivedConversation}+ >+ <ConversationNameContextMenuIconText+ icon={<CloseIcon width={16} height={16} />}+ text={t(stopLabelKey)}+ />+ </ContextMenuListItem>+ </ArchivedDisabledTooltip>)}{onDelete && (diff --git a/src/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content-crossfade.tsx b/src/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content-crossfade.tsxnew file mode 100644index 0000000000..a68d05a0ab--- /dev/null+++ b/src/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content-crossfade.tsx@@ -0,0 +1,120 @@+import {+ ReactNode,+ Suspense,+ useCallback,+ useLayoutEffect,+ useState,+} from "react";+import { AnimatePresence, motion, useReducedMotion } from "framer-motion";+import { ConversationLoading } from "../../conversation-loading";++const CROSSFADE_DURATION_SECONDS = 0.35;++const crossfadeTransition = {+ duration: CROSSFADE_DURATION_SECONDS,+ ease: "easeInOut" as const,+};++function TabReadyNotifier({+ children,+ onReady,+}: {+ children: ReactNode;+ onReady: () => void;+}) {+ useLayoutEffect(() => {+ onReady();+ }, [onReady]);++ return children;+}++function SuspensePendingFallback({ onPending }: { onPending: () => void }) {+ useLayoutEffect(() => {+ onPending();+ }, [onPending]);++ return <ConversationLoading />;+}++type ConversationTabContentCrossfadeProps = {+ showAgentLoading: boolean;+ tabKey: string;+ children: ReactNode;+};++export function ConversationTabContentCrossfade({+ showAgentLoading,+ tabKey,+ children,+}: ConversationTabContentCrossfadeProps) {+ const reduceMotion = useReducedMotion();+ const [lazyPending, setLazyPending] = useState(false);++ useLayoutEffect(() => {+ setLazyPending(false);+ }, [tabKey]);++ const handleLazyPending = useCallback(() => {+ setLazyPending(true);+ }, []);++ const handleLazyReady = useCallback(() => {+ setLazyPending(false);+ }, []);++ const showLoadingOverlay = showAgentLoading || lazyPending;++ if (reduceMotion) {+ return (+ <div className="relative h-full w-full overflow-hidden">+ {showLoadingOverlay ? (+ <ConversationLoading />+ ) : (+ <Suspense+ fallback={<SuspensePendingFallback onPending={handleLazyPending} />}+ >+ <TabReadyNotifier onReady={handleLazyReady}>+ {children}+ </TabReadyNotifier>+ </Suspense>+ )}+ </div>+ );+ }++ return (+ <div className="relative h-full w-full overflow-hidden">+ <motion.div+ className="absolute inset-0 h-full w-full"+ initial={false}+ animate={{ opacity: showLoadingOverlay ? 0 : 1 }}+ transition={crossfadeTransition}+ aria-hidden={showLoadingOverlay}+ >+ <Suspense+ fallback={<SuspensePendingFallback onPending={handleLazyPending} />}+ >+ <TabReadyNotifier onReady={handleLazyReady}>+ {children}+ </TabReadyNotifier>+ </Suspense>+ </motion.div>++ <AnimatePresence>+ {showLoadingOverlay ? (+ <motion.div+ key="conversation-tab-loading-overlay"+ className="absolute inset-0 z-10 h-full w-full"+ initial={{ opacity: 1 }}+ animate={{ opacity: 1 }}+ exit={{ opacity: 0 }}+ transition={crossfadeTransition}+ >+ <ConversationLoading />+ </motion.div>+ ) : null}+ </AnimatePresence>+ </div>+ );+}diff --git a/src/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.tsx b/src/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.tsxindex c88a7c0e57..cb23978ab2 100644--- a/src/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.tsx+++ b/src/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.tsx@@ -1,8 +1,8 @@-import { lazy, useMemo, Suspense } from "react";-import { ConversationLoading } from "../../conversation-loading";+import { lazy, useMemo } from "react";import { TabWrapper } from "./tab-wrapper";import { TabContainer } from "./tab-container";import { TabContentArea } from "./tab-content-area";+import { ConversationTabContentCrossfade } from "./conversation-tab-content-crossfade";import { useConversationStore } from "#/stores/conversation-store";import { useConversationId } from "#/hooks/use-conversation-id";@@ -11,7 +11,6 @@ import { useConversationId } from "#/hooks/use-conversation-id";// route's eager graph just because the terminal tab might be selected later.const FilesTab = lazy(() => import("#/routes/files-tab"));const BrowserTab = lazy(() => import("#/routes/browser-tab"));-const VSCodeTab = lazy(() => import("#/routes/vscode-tab"));const PlannerTab = lazy(() => import("#/routes/planner-tab"));const TaskListTab = lazy(() => import("#/routes/task-list-tab"));const Terminal = lazy(() => import("#/components/features/terminal/terminal"));@@ -20,7 +19,6 @@ const TAB_CONFIG = {tasklist: { component: TaskListTab },files: { component: FilesTab },browser: { component: BrowserTab },- vscode: { component: VSCodeTab },terminal: { component: Terminal },planner: { component: PlannerTab },};@@ -37,26 +35,23 @@ export function ConversationTabContent() {const ActiveComponent = activeTab.component;- if (shouldShownAgentLoading) {- return <ConversationLoading />;- }+ const tabWrapperKey =+ selectedTab === "terminal"+ ? `${selectedTab}-${conversationId}`+ : (selectedTab ?? "files");return (<TabContainer>- <Suspense fallback={<ConversationLoading />}>- <TabContentArea>- <TabWrapper- // Force Terminal remount to reset XTerm buffer/state- key={- selectedTab === "terminal"- ? `${selectedTab}-${conversationId}`- : selectedTab- }- >+ <TabContentArea>+ <ConversationTabContentCrossfade+ showAgentLoading={shouldShownAgentLoading}+ tabKey={tabWrapperKey}+ >+ <TabWrapper key={tabWrapperKey}><ActiveComponent /></TabWrapper>- </TabContentArea>- </Suspense>+ </ConversationTabContentCrossfade>+ </TabContentArea></TabContainer>);}diff --git a/src/components/features/conversation/conversation-tabs/conversation-tab-nav.tsx b/src/components/features/conversation/conversation-tabs/conversation-tab-nav.tsxindex 7e1b350ba5..be8369c240 100644--- a/src/components/features/conversation/conversation-tabs/conversation-tab-nav.tsx+++ b/src/components/features/conversation/conversation-tabs/conversation-tab-nav.tsx@@ -1,6 +1,14 @@import { ComponentType } from "react";+import { motion, useReducedMotion } from "framer-motion";import { cn } from "#/utils/utils";+const TAB_LABEL_MAX_WIDTH_PX = 160;++const tabLabelTransition = {+ duration: 0.22,+ ease: [0.4, 0, 0.2, 1] as const,+};+type ConversationTabNavProps = {tabValue: string;icon: ComponentType<{ className: string }>;@@ -10,6 +18,8 @@ type ConversationTabNavProps = {className?: string;/** Omit test id (e.g. offscreen width measurement clones). */measureOnly?: boolean;+ /** Disable layout-driven shifts while the drawer width is being dragged. */+ suppressLayoutAnimation?: boolean;};export function ConversationTabNav({@@ -20,35 +30,83 @@ export function ConversationTabNav({label,className,measureOnly,+ suppressLayoutAnimation = false,}: ConversationTabNavProps) {+ const reduceMotion = useReducedMotion();+ const disableAnimation =+ measureOnly || reduceMotion || import.meta.env.MODE === "test";+ const enableLayoutAnimation = !disableAnimation && !suppressLayoutAnimation;++ const buttonClassName = cn(+ "flex items-center rounded-md cursor-pointer",+ "pl-1.5 pr-2 py-1 lg:py-1.5",+ "text-[var(--oh-muted)] bg-transparent",+ isActive && "bg-[var(--oh-interactive-active)] text-white",+ isActive+ ? "hover:text-white hover:bg-[var(--oh-interactive-hover)]"+ : "hover:text-white hover:bg-white/5",+ isActive+ ? "focus-within:text-white"+ : "focus-within:text-[var(--oh-muted)]",+ className,+ );++ const iconElement = <Icon className={cn("h-4 w-4 shrink-0 text-inherit")} />;++ const labelElement =+ label && isActive ? (+ <span className="whitespace-nowrap text-sm font-normal">{label}</span>+ ) : null;++ const animatedLabelElement = label ? (+ <motion.span+ initial={false}+ animate={{+ maxWidth: isActive ? TAB_LABEL_MAX_WIDTH_PX : 0,+ opacity: isActive ? 1 : 0,+ marginLeft: isActive ? 8 : 0,+ }}+ transition={tabLabelTransition}+ className="block overflow-hidden whitespace-nowrap text-sm font-normal"+ aria-hidden={!isActive}+ >+ {label}+ </motion.span>+ ) : null;++ if (disableAnimation) {+ return (+ <button+ type="button"+ onClick={onClick}+ {...(measureOnly+ ? {}+ : { "data-testid": `conversation-tab-${tabValue}` as const })}+ data-tab-measure={measureOnly ? "true" : undefined}+ className={cn(buttonClassName, "gap-2")}+ >+ {iconElement}+ {labelElement}+ </button>+ );+ }+return (- <button+ <motion.button+ layout={enableLayoutAnimation ? "position" : false}type="button"- onClick={() => {- onClick();- }}+ onClick={onClick}{...(measureOnly? {}: { "data-testid": `conversation-tab-${tabValue}` as const })}data-tab-measure={measureOnly ? "true" : undefined}- className={cn(- "flex items-center gap-2 rounded-md cursor-pointer",- "pl-1.5 pr-2 py-1 lg:py-1.5",- "text-[var(--oh-muted)] bg-transparent",- isActive && "bg-[var(--oh-interactive-active)] text-white",- isActive- ? "hover:text-white hover:bg-[var(--oh-interactive-hover)]"- : "hover:text-white hover:bg-white/5",- isActive- ? "focus-within:text-white"- : "focus-within:text-[var(--oh-muted)]",- className,- )}+ className={buttonClassName}+ transition={+ enableLayoutAnimation ? { layout: tabLabelTransition } : undefined+ }>- <Icon className={cn("w-5 h-5 text-inherit flex-shrink-0")} />- {isActive && label && (- <span className="text-sm font-normal whitespace-nowrap">{label}</span>- )}- </button>+ {iconElement}+ {animatedLabelElement}+ </motion.button>);}diff --git a/src/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.tsx b/src/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.tsxindex 4b5c61afa5..c614fc2c83 100644--- a/src/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.tsx+++ b/src/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.tsx@@ -1,4 +1,5 @@-import React from "react";+import React, { useLayoutEffect, useState } from "react";+import ReactDOM from "react-dom";import { useTranslation } from "react-i18next";import { ContextMenu } from "#/ui/context-menu";import { useClickOutsideElement } from "#/hooks/use-click-outside-element";@@ -9,17 +10,16 @@ import {type ConversationTab,} from "#/stores/conversation-store";import { I18nKey } from "#/i18n/declaration";-import TerminalIcon from "#/icons/terminal.svg?react";-import GlobeIcon from "#/icons/globe.svg?react";+import { Globe, ListTodo, SquareChevronRight } from "lucide-react";import DocumentIcon from "#/icons/document.svg?react";-import VSCodeIcon from "#/icons/vscode.svg?react";import PillIcon from "#/icons/pill.svg?react";import PillFillIcon from "#/icons/pill-fill.svg?react";-import LessonPlanIcon from "#/icons/lesson-plan.svg?react";import DoubleCheckIcon from "#/icons/double-check.svg?react";import { useTaskList } from "#/hooks/use-task-list";import { useActiveBackend } from "#/contexts/active-backend-context";import { useSelectConversationTab } from "#/hooks/use-select-conversation-tab";+import { useIsArchivedConversation } from "#/hooks/use-is-archived-conversation";+import { ArchivedDisabledTooltip } from "../../context-menu/archived-disabled-tooltip";import { cn } from "#/utils/utils";import {dropdownInstantColorClassName,@@ -30,17 +30,49 @@ interface ConversationTabsContextMenuProps {isOpen: boolean;onClose: () => void;ignoreOutsideClickRef?: React.RefObject<HTMLElement | null>;+ /** Portal anchor so the menu is not clipped by drawer overflow. */+ anchorRef?: React.RefObject<HTMLElement | null>;}export function ConversationTabsContextMenu({isOpen,onClose,ignoreOutsideClickRef,+ anchorRef,}: ConversationTabsContextMenuProps) {const ref = useClickOutsideElement<HTMLUListElement>(onClose,ignoreOutsideClickRef,);+ const [portalStyle, setPortalStyle] = useState<React.CSSProperties>();++ useLayoutEffect(() => {+ if (!isOpen || !anchorRef?.current) {+ setPortalStyle(undefined);+ return undefined;+ }++ const updatePosition = () => {+ const rect = anchorRef.current?.getBoundingClientRect();+ if (!rect) return;++ const gap = 8;+ setPortalStyle({+ position: "fixed",+ zIndex: 9999,+ top: rect.bottom + gap,+ left: rect.left,+ });+ };++ updatePosition();+ window.addEventListener("resize", updatePosition);+ window.addEventListener("scroll", updatePosition, true);+ return () => {+ window.removeEventListener("resize", updatePosition);+ window.removeEventListener("scroll", updatePosition, true);+ };+ }, [isOpen, anchorRef]);const { t } = useTranslation("openhands");const { conversationId } = useConversationId();const {@@ -55,17 +87,21 @@ export function ConversationTabsContextMenu({const { hasTaskList } = useTaskList();const { backend } = useActiveBackend();+ const isArchivedConversation = useIsArchivedConversation();const tabConfig = [{tab: "planner",- icon: LessonPlanIcon,+ icon: ListTodo,i18nKey: I18nKey.COMMON$PLANNER,},{ tab: "files", icon: DocumentIcon, i18nKey: I18nKey.COMMON$FILES },- { tab: "vscode", icon: VSCodeIcon, i18nKey: I18nKey.COMMON$CODE },- { tab: "terminal", icon: TerminalIcon, i18nKey: I18nKey.COMMON$TERMINAL },- { tab: "browser", icon: GlobeIcon, i18nKey: I18nKey.COMMON$BROWSER },+ {+ tab: "terminal",+ icon: SquareChevronRight,+ i18nKey: I18nKey.COMMON$TERMINAL,+ },+ { tab: "browser", icon: Globe, i18nKey: I18nKey.COMMON$BROWSER },];if (hasTaskList) {@@ -77,18 +113,23 @@ export function ConversationTabsContextMenu({}const visibleTabConfig = tabConfig.filter(- ({ tab }) =>- (tab !== "vscode" && tab !== "planner") || backend.kind === "cloud",+ ({ tab }) => tab !== "planner" || backend.kind === "cloud",);- if (!isOpen) return null;-const handleOpenTab = (tab: string) => {+ if (isArchivedConversation) {+ return;+ }navigateToTab(tab as ConversationTab);onClose();};const handlePinToggle = (tab: string, e: React.MouseEvent) => {+ if (isArchivedConversation) {+ e.preventDefault();+ e.stopPropagation();+ return;+ }e.preventDefault();e.stopPropagation();if (state.unpinnedTabs.includes(tab)) {@@ -111,77 +152,104 @@ export function ConversationTabsContextMenu({}};- return (+ if (!isOpen) return null;++ const isPortaled = Boolean(anchorRef?.current && portalStyle);++ const menu = (<ContextMenuref={ref}- alignment="right"- position="bottom"- className="z-[9999] mt-2 w-fit"+ theme={isPortaled ? "popover" : "default"}+ position={isPortaled ? "none" : "bottom"}+ alignment={isPortaled ? "none" : "left"}+ spacing={isPortaled ? "none" : "default"}+ className={cn("z-[9999] w-fit", isPortaled ? "mt-0" : "mt-2")}>{visibleTabConfig.map(({ tab, icon: Icon, i18nKey }) => {const pinned = !state.unpinnedTabs.includes(tab);return (<li key={tab} className="list-none">- <div- className={cn(- "group flex h-[30px] w-full min-w-0 items-stretch rounded",- "hover:bg-[var(--oh-interactive-hover)]",- )}- >- <button- type="button"- data-testid={`conversation-tabs-menu-open-${tab}`}+ <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>+ <divclassName={cn(- "flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-l p-2 text-start text-white",- dropdownInstantColorClassName,+ "group flex h-[30px] w-full min-w-0 items-stretch rounded",+ !isArchivedConversation &&+ "hover:bg-[var(--oh-interactive-hover)]",+ isArchivedConversation && "opacity-50",)}- onClick={() => handleOpenTab(tab)}>- <span- className={dropdownMenuRowIconWrapperClassName}- aria-hidden+ <button+ type="button"+ data-testid={`conversation-tabs-menu-open-${tab}`}+ disabled={isArchivedConversation}+ className={cn(+ "flex min-w-0 flex-1 items-center gap-2 rounded-l p-2 text-start text-white",+ dropdownInstantColorClassName,+ isArchivedConversation+ ? "cursor-not-allowed"+ : "cursor-pointer",+ )}+ onClick={() => handleOpenTab(tab)}>- <Icon className="h-4 w-4" />- </span>- <span className="text-sm">{t(i18nKey)}</span>- </button>- <button- type="button"- data-testid={`conversation-tabs-menu-pin-${tab}`}- className={cn(- "flex shrink-0 cursor-pointer items-center justify-center rounded-r px-2 text-white hover:bg-white/10",- dropdownInstantColorClassName,- )}- aria-pressed={pinned}- aria-label={pinned ? "Unpin tab from bar" : "Pin tab to bar"}- onClick={(e) => handlePinToggle(tab, e)}- >- {pinned ? (<span- className={cn(- "-mr-[5px] ml-auto",- dropdownMenuRowIconWrapperClassName,- )}+ className={dropdownMenuRowIconWrapperClassName}aria-hidden>- <PillFillIcon className="h-7 w-7" />+ <Icon className="h-4 w-4" /></span>- ) : (- <span- className={cn(- "ml-auto",- dropdownMenuRowIconWrapperClassName,- )}- aria-hidden- >- <PillIcon className="h-4.5 w-4.5" />- </span>- )}- </button>- </div>+ <span className="text-sm">{t(i18nKey)}</span>+ </button>+ <button+ type="button"+ data-testid={`conversation-tabs-menu-pin-${tab}`}+ disabled={isArchivedConversation}+ className={cn(+ "flex shrink-0 items-center justify-center rounded-r px-2 text-white",+ dropdownInstantColorClassName,+ isArchivedConversation+ ? "cursor-not-allowed"+ : "cursor-pointer hover:bg-white/10",+ )}+ aria-pressed={pinned}+ aria-label={pinned ? "Unpin tab from bar" : "Pin tab to bar"}+ onClick={(e) => handlePinToggle(tab, e)}+ >+ {pinned ? (+ <span+ className={cn(+ "-mr-[5px] ml-auto",+ dropdownMenuRowIconWrapperClassName,+ )}+ aria-hidden+ >+ <PillFillIcon className="h-7 w-7" />+ </span>+ ) : (+ <span+ className={cn(+ "ml-auto",+ dropdownMenuRowIconWrapperClassName,+ )}+ aria-hidden+ >+ <PillIcon className="h-4.5 w-4.5" />+ </span>+ )}+ </button>+ </div>+ </ArchivedDisabledTooltip></li>);})}</ContextMenu>);++ if (isPortaled && portalStyle && typeof document !== "undefined") {+ return ReactDOM.createPortal(+ <div style={portalStyle}>{menu}</div>,+ document.body,+ );+ }++ return menu;}diff --git a/src/components/features/conversation/conversation-tabs/conversation-tabs.tsx b/src/components/features/conversation/conversation-tabs/conversation-tabs.tsxindex 640cb19fb6..2b030251b2 100644--- a/src/components/features/conversation/conversation-tabs/conversation-tabs.tsx+++ b/src/components/features/conversation/conversation-tabs/conversation-tabs.tsx@@ -1,18 +1,16 @@import { useEffect, useLayoutEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import TerminalIcon from "#/icons/terminal.svg?react";-import GlobeIcon from "#/icons/globe.svg?react";+import { LayoutGroup } from "framer-motion";+import { Globe, ListTodo, SquareChevronRight } from "lucide-react";import DocumentIcon from "#/icons/document.svg?react";-import VSCodeIcon from "#/icons/vscode.svg?react";-import LessonPlanIcon from "#/icons/lesson-plan.svg?react";import DoubleCheckIcon from "#/icons/double-check.svg?react";import { EllipsisButton } from "#/components/features/conversation-panel/ellipsis-button";import { cn } from "#/utils/utils";import { useConversationLocalStorageState } from "#/utils/conversation-local-storage";import { ConversationTabNav } from "./conversation-tab-nav";+import { DrawerVSCodeLink } from "./drawer-vscode-link";import { ChatActionTooltip } from "../../chat/chat-action-tooltip";import { I18nKey } from "#/i18n/declaration";-import { VSCodeTooltipContent } from "./vscode-tooltip-content";import { useConversationStore } from "#/stores/conversation-store";import { ConversationTabsContextMenu } from "./conversation-tabs-context-menu";import { useConversationId } from "#/hooks/use-conversation-id";@@ -27,8 +25,11 @@ import { mobileTopBarIconClassName } from "#/utils/mobile-top-bar-icon-button-clexport function ConversationTabs({variant = "default",+ isPanelResizing = false,}: {variant?: "default" | "compact";+ /** True while the desktop drawer gripper is being dragged. */+ isPanelResizing?: boolean;}) {const { conversationId } = useConversationId();const { setSelectedTab, planContent } = useConversationStore();@@ -93,25 +94,16 @@ export function ConversationTabs({{tabValue: "planner",isActive: isTabActive("planner"),- icon: LessonPlanIcon,+ icon: ListTodo,onClick: () => selectTab("planner"),tooltipContent: t(I18nKey.COMMON$PLANNER),tooltipAriaLabel: t(I18nKey.COMMON$PLANNER),label: t(I18nKey.COMMON$PLANNER),},- {- tabValue: "vscode",- isActive: isTabActive("vscode"),- icon: VSCodeIcon,- onClick: () => selectTab("vscode"),- tooltipContent: <VSCodeTooltipContent />,- tooltipAriaLabel: t(I18nKey.COMMON$CODE),- label: t(I18nKey.COMMON$CODE),- },{tabValue: "terminal",isActive: isTabActive("terminal"),- icon: TerminalIcon,+ icon: SquareChevronRight,onClick: () => selectTab("terminal"),tooltipContent: t(I18nKey.COMMON$TERMINAL),tooltipAriaLabel: t(I18nKey.COMMON$TERMINAL),@@ -121,7 +113,7 @@ export function ConversationTabs({{tabValue: "browser",isActive: isTabActive("browser"),- icon: GlobeIcon,+ icon: Globe,onClick: () => selectTab("browser"),tooltipContent: t(I18nKey.COMMON$BROWSER),tooltipAriaLabel: t(I18nKey.COMMON$BROWSER),@@ -144,10 +136,9 @@ export function ConversationTabs({// Pinned tabs always show in the bar. Unpinned tabs stay hidden unless the// user has that tab selected — then it appears while active so the bar- // matches the open panel. Hide VS Code and Planner on local backends —- // both are cloud-only (the planning agent isn't supported locally).+ // matches the open panel. Hide Planner on local backends — the planning+ // agent isn't supported locally.const visibleTabs = tabs.filter((tab) => {- if (tab.tabValue === "vscode" && backend.kind !== "cloud") return false;if (tab.tabValue === "planner" && backend.kind !== "cloud") return false;if (!persistedState.unpinnedTabs.includes(tab.tabValue)) return true;return selectedTab === tab.tabValue;@@ -163,6 +154,7 @@ export function ConversationTabs({const tabsRowInnerRef = useRef<HTMLDivElement>(null);const measureRowRef = useRef<HTMLDivElement>(null);const menuRef = useRef<HTMLDivElement>(null);+ const vscodeButtonRef = useRef<HTMLDivElement>(null);const anchorRef = useRef<HTMLButtonElement>(null);const [inlineTabCount, setInlineTabCount] = useState(visibleTabs.length);@@ -170,7 +162,8 @@ export function ConversationTabs({const rowInner = tabsRowInnerRef.current;const measureRow = measureRowRef.current;const menuEl = menuRef.current;- if (!rowInner || !measureRow || !menuEl) return undefined;+ const vscodeEl = vscodeButtonRef.current;+ if (!rowInner || !measureRow || !menuEl || !vscodeEl) return undefined;const measure = () => {const measureButtons = measureRow.querySelectorAll<HTMLButtonElement>(@@ -194,13 +187,14 @@ export function ConversationTabs({}const menuWidth = menuEl.getBoundingClientRect().width;+ const vscodeWidth = vscodeEl.getBoundingClientRect().width;const gapCss =getComputedStyle(rowInner).columnGap || getComputedStyle(rowInner).gap;const gapPx = parseFloat(gapCss) || 6;let nextCount = 0;for (let k = tabCount; k >= 0; k -= 1) {- let total = menuWidth;+ let total = menuWidth + vscodeWidth;for (let i = 0; i < k; i += 1) {total += widths[i] ?? 0;}@@ -283,57 +277,76 @@ export function ConversationTabs({ref={tabsRowInnerRef}className="flex w-full min-w-0 flex-nowrap items-center justify-start">- <div className="flex w-fit max-w-full min-w-0 flex-nowrap items-center gap-1.5">- <div className="flex min-w-0 flex-1 flex-nowrap items-center gap-1.5 overflow-x-hidden">- {visibleTabs- .slice(0, safeInlineTabCount)- .map(- (- {- tabValue,- icon,- onClick,- isActive,- tooltipContent,- tooltipAriaLabel,- label,- className: tabClassName,- },- index,- ) => (- <ChatActionTooltip- key={`${tabValue}-${index}`}- tooltip={tooltipContent}- ariaLabel={tooltipAriaLabel}- >- <ConversationTabNav- tabValue={tabValue}- icon={icon}- onClick={onClick}- isActive={isActive}- label={label}- className={cn(tabClassName, "shrink-0")}- />- </ChatActionTooltip>- ),- )}- </div>- <div ref={menuRef} className="relative shrink-0">- <EllipsisButton- ref={anchorRef}- onClick={() => setIsMenuOpen(!isMenuOpen)}- ariaLabel={t(I18nKey.COMMON$MORE_OPTIONS)}- iconClassName={- variant === "compact" ? mobileTopBarIconClassName : undefined- }- />- <ConversationTabsContextMenu- isOpen={isMenuOpen}- onClose={() => setIsMenuOpen(false)}- ignoreOutsideClickRef={anchorRef}- />+ <div className="flex min-w-0 flex-1 items-center justify-start overflow-hidden">+ <div className="flex w-fit max-w-full min-w-0 items-center gap-1.5">+ <LayoutGroup id="conversation-drawer-tabs">+ <div className="flex w-fit max-w-full min-w-0 flex-nowrap items-center gap-1.5 overflow-x-hidden">+ {visibleTabs+ .slice(0, safeInlineTabCount)+ .map(+ (+ {+ tabValue,+ icon,+ onClick,+ isActive,+ tooltipContent,+ tooltipAriaLabel,+ label,+ className: tabClassName,+ },+ index,+ ) => (+ <ChatActionTooltip+ key={`${tabValue}-${index}`}+ tooltip={tooltipContent}+ ariaLabel={tooltipAriaLabel}+ >+ <ConversationTabNav+ tabValue={tabValue}+ icon={icon}+ onClick={onClick}+ isActive={isActive}+ label={label}+ className={cn(tabClassName, "shrink-0")}+ suppressLayoutAnimation={isPanelResizing}+ />+ </ChatActionTooltip>+ ),+ )}+ </div>+ </LayoutGroup>+ <div ref={menuRef} className="relative shrink-0">+ <EllipsisButton+ ref={anchorRef}+ onClick={() => setIsMenuOpen(!isMenuOpen)}+ ariaLabel={t(I18nKey.COMMON$MORE_OPTIONS)}+ iconClassName={+ variant === "compact"+ ? mobileTopBarIconClassName+ : undefined+ }+ />+ <ConversationTabsContextMenu+ isOpen={isMenuOpen}+ onClose={() => setIsMenuOpen(false)}+ ignoreOutsideClickRef={anchorRef}+ anchorRef={anchorRef}+ />+ </div></div></div>+ {/* Keep the ref'd wrapper mounted on local backends too — the+ overflow measurement effect above bails if it's missing. */}+ <div+ ref={vscodeButtonRef}+ className={cn(+ "ml-auto shrink-0",+ backend.kind === "cloud" && "pr-1",+ )}+ >+ {backend.kind === "cloud" && <DrawerVSCodeLink />}+ </div></div></div>{isTabActive("planner") && (diff --git a/src/components/features/conversation/conversation-tabs/drawer-vscode-link.tsx b/src/components/features/conversation/conversation-tabs/drawer-vscode-link.tsxnew file mode 100644index 0000000000..fb2b61e16d--- /dev/null+++ b/src/components/features/conversation/conversation-tabs/drawer-vscode-link.tsx@@ -0,0 +1,52 @@+import { ExternalLink } from "lucide-react";+import { useTranslation } from "react-i18next";+import VSCodeIcon from "#/icons/vscode.svg?react";+import { I18nKey } from "#/i18n/declaration";+import { useAgentState } from "#/hooks/use-agent-state";+import { useUnifiedVSCodeUrl } from "#/hooks/query/use-unified-vscode-url";+import { RUNTIME_STARTING_STATES } from "#/types/agent-state";+import { cn } from "#/utils/utils";++export function DrawerVSCodeLink() {+ const { t } = useTranslation("openhands");+ const { curAgentState } = useAgentState();+ const { data, refetch, isLoading } = useUnifiedVSCodeUrl();+ const isRuntimeStarting = RUNTIME_STARTING_STATES.includes(curAgentState);++ const handleClick = async () => {+ let vscodeUrl = data?.url;++ if (!vscodeUrl) {+ const result = await refetch();+ vscodeUrl = result.data?.url ?? null;+ }++ if (vscodeUrl) {+ window.open(vscodeUrl, "_blank", "noopener,noreferrer");+ }+ };++ return (+ <button+ type="button"+ onClick={handleClick}+ disabled={isLoading || isRuntimeStarting}+ aria-label={t(I18nKey.VSCODE$OPEN)}+ title={t(I18nKey.VSCODE$OPEN)}+ data-testid="drawer-vscode-link"+ className={cn(+ "inline-flex items-center gap-1.5 rounded-[7px] border border-[var(--oh-border)] bg-base-secondary px-2 py-1 text-xs",+ "text-[var(--oh-muted)] transition-colors hover:enabled:bg-surface-raised hover:enabled:text-white",+ "cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",+ )}+ >+ <VSCodeIcon className="h-[15px] w-[15px] shrink-0" aria-hidden />+ <span>{t(I18nKey.FILES$VSCODE)}</span>+ <ExternalLink+ className="h-3.5 w-3.5 shrink-0"+ aria-hidden+ strokeWidth={2}+ />+ </button>+ );+}diff --git a/src/components/features/conversation/conversation-tabs/vscode-tooltip-content.tsx b/src/components/features/conversation/conversation-tabs/vscode-tooltip-content.tsxdeleted file mode 100644index bbb832d56c..0000000000--- a/src/components/features/conversation/conversation-tabs/vscode-tooltip-content.tsx+++ /dev/null@@ -1,41 +0,0 @@-import { FaExternalLinkAlt } from "react-icons/fa";-import { useTranslation } from "react-i18next";-import { I18nKey } from "#/i18n/declaration";-import { useAgentState } from "#/hooks/use-agent-state";-import { useUnifiedVSCodeUrl } from "#/hooks/query/use-unified-vscode-url";-import { RUNTIME_STARTING_STATES } from "#/types/agent-state";--export function VSCodeTooltipContent() {- const { curAgentState } = useAgentState();- const { t } = useTranslation("openhands");- const { data, refetch } = useUnifiedVSCodeUrl();- const isRuntimeStarting = RUNTIME_STARTING_STATES.includes(curAgentState);-- const handleVSCodeClick = async (e: React.MouseEvent) => {- e.preventDefault();- e.stopPropagation();-- let vscodeUrl = data?.url;-- if (!vscodeUrl) {- const result = await refetch();- vscodeUrl = result.data?.url ?? null;- }-- if (vscodeUrl) {- window.open(vscodeUrl, "_blank", "noopener,noreferrer");- }- };-- return (- <div className="flex items-center gap-2">- <span>{t(I18nKey.COMMON$CODE)}</span>- {!isRuntimeStarting ? (- <FaExternalLinkAlt- className="w-3 h-3 text-inherit cursor-pointer"- onClick={handleVSCodeClick}- />- ) : null}- </div>- );-}diff --git a/src/components/features/conversation/right-panel-toggle.tsx b/src/components/features/conversation/right-panel-toggle.tsxindex 5a31a11a87..92564934b1 100644--- a/src/components/features/conversation/right-panel-toggle.tsx+++ b/src/components/features/conversation/right-panel-toggle.tsx@@ -8,6 +8,7 @@ import BlockDrawerLeftIcon from "#/icons/block-drawer-left.svg?react";import { ChatActionTooltip } from "../chat/chat-action-tooltip";import { useBreakpoint } from "#/hooks/use-breakpoint";import { useConversationId } from "#/hooks/use-conversation-id";+import { useIsArchivedConversation } from "#/hooks/use-is-archived-conversation";interface RightPanelToggleProps {className?: string;@@ -24,6 +25,7 @@ interface RightPanelToggleProps {export function RightPanelToggle({ className }: RightPanelToggleProps) {const { t } = useTranslation("openhands");const isMobile = useBreakpoint();+ const isArchivedConversation = useIsArchivedConversation();const navigate = useNavigate();const { conversationId } = useConversationId();const {@@ -34,6 +36,10 @@ export function RightPanelToggle({ className }: RightPanelToggleProps) {} = useConversationStore();const handleToggle = () => {+ if (isArchivedConversation) {+ return;+ }+if (isMobile) {if (!conversationId) return;setHasRightPanelToggled(true);@@ -57,11 +63,13 @@ export function RightPanelToggle({ className }: RightPanelToggleProps) {}};- const tooltipText = isMobile- ? t(I18nKey.COMMON$SHOW_PANEL)- : isRightPanelShown- ? t(I18nKey.COMMON$HIDE_PANEL)- : t(I18nKey.COMMON$SHOW_PANEL);+ const tooltipText = isArchivedConversation+ ? t(I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES)+ : isMobile+ ? t(I18nKey.COMMON$SHOW_PANEL)+ : isRightPanelShown+ ? t(I18nKey.COMMON$HIDE_PANEL)+ : t(I18nKey.COMMON$SHOW_PANEL);const ariaPressed = isMobile ? false : isRightPanelShown;@@ -70,9 +78,16 @@ export function RightPanelToggle({ className }: RightPanelToggleProps) {<buttontype="button"onClick={handleToggle}- className={cn(mobileTopBarIconButtonClassName, className)}+ disabled={isArchivedConversation}+ className={cn(+ mobileTopBarIconButtonClassName,+ isArchivedConversation &&+ "cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]",+ className,+ )}aria-label={tooltipText}aria-pressed={ariaPressed}+ aria-disabled={isArchivedConversation}data-testid="right-panel-toggle"><BlockDrawerLeftIcon className="w-5 h-5 -scale-x-100" />diff --git a/src/components/features/diff-viewer/diff-drawer-icon.tsx b/src/components/features/diff-viewer/diff-drawer-icon.tsxnew file mode 100644index 0000000000..373b880698--- /dev/null+++ b/src/components/features/diff-viewer/diff-drawer-icon.tsx@@ -0,0 +1,5 @@+import { LuFileDiff } from "react-icons/lu";++export function DiffDrawerIcon() {+ return <LuFileDiff aria-hidden className="size-full" />;+}diff --git a/src/components/features/diff-viewer/empty-changes-message.tsx b/src/components/features/diff-viewer/empty-changes-message.tsxindex ff87ebb576..1af6d17c8c 100644--- a/src/components/features/diff-viewer/empty-changes-message.tsx+++ b/src/components/features/diff-viewer/empty-changes-message.tsx@@ -1,13 +1,13 @@import { useTranslation } from "react-i18next";-import { FaCodeCompare } from "react-icons/fa6";import { I18nKey } from "#/i18n/declaration";import { ConversationTabEmptyState } from "#/components/features/conversation/conversation-tab-empty-state";+import { DiffDrawerIcon } from "./diff-drawer-icon";export function EmptyChangesMessage() {const { t } = useTranslation("openhands");return (- <ConversationTabEmptyState icon={<FaCodeCompare />}>+ <ConversationTabEmptyState icon={<DiffDrawerIcon />}>{t(I18nKey.DIFF_VIEWER$NO_CHANGES)}</ConversationTabEmptyState>);diff --git a/src/components/features/diff-viewer/loading-spinner.tsx b/src/components/features/diff-viewer/loading-spinner.tsxindex f91b45bc60..4b251bce41 100644--- a/src/components/features/diff-viewer/loading-spinner.tsx+++ b/src/components/features/diff-viewer/loading-spinner.tsx@@ -9,7 +9,7 @@ export function LoadingSpinner({ className }: LoadingSpinnerProps) {<div className="flex items-center justify-center"><divclassName={cn(- "animate-spin rounded-full border-4 border-[var(--oh-border)] border-t-white",+ "animate-spin rounded-full border-4 border-transparent border-t-white",className,)}role="status"diff --git a/src/components/features/files-tab/file-quick-row.tsx b/src/components/features/files-tab/file-quick-row.tsxindex a30a4a9f06..0f17b57bd5 100644--- a/src/components/features/files-tab/file-quick-row.tsx+++ b/src/components/features/files-tab/file-quick-row.tsx@@ -1,8 +1,6 @@+import { ListTree } from "lucide-react";import { useMemo } from "react";import { useTranslation } from "react-i18next";--import ChevronLeft from "#/icons/chevron-left-small.svg?react";-import ChevronRight from "#/icons/chevron-right-small.svg?react";import { I18nKey } from "#/i18n/declaration";import { sortFilesByPriority } from "#/utils/file-priority";import { cn } from "#/utils/utils";@@ -20,8 +18,8 @@ interface FileQuickRowProps {/*** Horizontal "quick access" row of files at the top of the file viewer.* Important entrypoints (index.html, README.md, package.json, …) appear- * first. A small caret on the leading edge toggles the full file tree on- * the left — there is no overflow dropdown, so anything that doesn't fit+ * first. A file-tree toggle on the leading edge shows or hides the full+ * tree on the left — there is no overflow dropdown, so anything that doesn't fit* here is reachable by opening the tree.*/export function FileQuickRow({@@ -61,11 +59,7 @@ export function FileQuickRow({isTreeVisible && "bg-[var(--oh-surface-raised)]",)}>- {isTreeVisible ? (- <ChevronLeft className="w-3 h-3" />- ) : (- <ChevronRight className="w-3 h-3" />- )}+ <ListTree className="w-3 h-3" aria-hidden strokeWidth={2} /></button>{sortedByPriority.length > 0 && (diff --git a/src/components/features/files-tab/no-file-selected-message.tsx b/src/components/features/files-tab/no-file-selected-message.tsxnew file mode 100644index 0000000000..a4c8d3525a--- /dev/null+++ b/src/components/features/files-tab/no-file-selected-message.tsx@@ -0,0 +1,19 @@+import { MousePointerClick } from "lucide-react";+import { useTranslation } from "react-i18next";+import { ConversationTabEmptyState } from "#/components/features/conversation/conversation-tab-empty-state";+import { I18nKey } from "#/i18n/declaration";++export function NoFileSelectedMessage() {+ const { t } = useTranslation("openhands");++ return (+ <ConversationTabEmptyState+ className="h-full"+ icon={+ <MousePointerClick aria-hidden strokeWidth={2} className="size-full" />+ }+ >+ {t(I18nKey.FILES$NO_FILE_SELECTED)}+ </ConversationTabEmptyState>+ );+}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 8d50204564..8b76d97437 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@@ -187,7 +187,7 @@ export function GitBranchDropdown({<div className="group relative text-[var(--oh-muted)] hover:text-white"><div className="absolute left-2 top-1/2 transform -translate-y-1/2 z-10">{isLoadingState ? (- <div className="animate-spin h-4 w-4 border-2 border-white/20 border-t-white rounded-full" />+ <div className="animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full" />) : (<BranchIcon width={16} height={16} />)}diff --git a/src/components/features/home/git-repo-dropdown/git-repo-dropdown.tsx b/src/components/features/home/git-repo-dropdown/git-repo-dropdown.tsxindex 13dce4918d..3913f0326c 100644--- a/src/components/features/home/git-repo-dropdown/git-repo-dropdown.tsx+++ b/src/components/features/home/git-repo-dropdown/git-repo-dropdown.tsx@@ -290,7 +290,7 @@ export function GitRepoDropdown({<div className="group relative text-[var(--oh-muted)] hover:text-white"><div className="absolute left-2 top-1/2 transform -translate-y-1/2 z-10">{isLoadingState ? (- <div className="animate-spin h-4 w-4 border-2 border-white/20 border-t-white rounded-full" />+ <div className="animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full" />) : (<RepoIcon width={16} height={16} />)}diff --git a/src/components/features/home/shared/loading-spinner.tsx b/src/components/features/home/shared/loading-spinner.tsxindex c0050f818e..d6c32f8113 100644--- a/src/components/features/home/shared/loading-spinner.tsx+++ b/src/components/features/home/shared/loading-spinner.tsx@@ -18,7 +18,7 @@ export function LoadingSpinner({)}><div- className="animate-spin h-4 w-4 border-2 border-white/20 border-t-white rounded-full"+ className="animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full"data-testid={testId}/></div>diff --git a/src/components/features/settings/llm-profiles/profiles-body.tsx b/src/components/features/settings/llm-profiles/profiles-body.tsxindex cc597e9dbe..b6f2816d4a 100644--- a/src/components/features/settings/llm-profiles/profiles-body.tsx+++ b/src/components/features/settings/llm-profiles/profiles-body.tsx@@ -8,6 +8,7 @@ import {settingsListContainerClassName,settingsListDividerClassName,} from "#/utils/settings-list-classes";+import { extensionModuleEmptyStateClassName } from "#/utils/extension-module-card-classes";interface ProfilesBodyProps {isLoading: boolean;@@ -44,17 +45,27 @@ export function ProfilesBody({if (loadError) {return (- <p className="text-sm text-red-400">- {t(I18nKey.SETTINGS$PROFILES_LOAD_ERROR)}- </p>+ <div+ data-testid="profiles-load-error"+ className={extensionModuleEmptyStateClassName}+ >+ <p className="text-sm text-red-400">+ {t(I18nKey.SETTINGS$PROFILES_LOAD_ERROR)}+ </p>+ </div>);}if (profiles.length === 0) {return (- <p className="text-sm text-[var(--oh-muted)] italic">- {t(I18nKey.SETTINGS$PROFILES_EMPTY)}- </p>+ <div+ data-testid="profiles-empty"+ className={extensionModuleEmptyStateClassName}+ >+ <p className="text-sm text-[var(--oh-muted)]">+ {t(I18nKey.SETTINGS$PROFILES_EMPTY)}+ </p>+ </div>);}diff --git a/src/components/features/settings/mcp-settings/mcp-server-list.tsx b/src/components/features/settings/mcp-settings/mcp-server-list.tsxindex ed653cd91d..8617135cf2 100644--- a/src/components/features/settings/mcp-settings/mcp-server-list.tsx+++ b/src/components/features/settings/mcp-settings/mcp-server-list.tsx@@ -1,6 +1,7 @@import { useTranslation } from "react-i18next";import { MCPServerListItem } from "./mcp-server-list-item";import { I18nKey } from "#/i18n/declaration";+import { extensionModuleEmptyStateClassName } from "#/utils/extension-module-card-classes";interface MCPServerConfig {id: string;@@ -29,7 +30,7 @@ export function MCPServerList({if (servers.length === 0) {return (- <div className="border border-[var(--oh-border)] rounded-md p-8 text-center">+ <div className={extensionModuleEmptyStateClassName}><p className="text-content-2 text-sm">{t(I18nKey.SETTINGS$MCP_NO_SERVERS)}</p>diff --git a/src/components/features/settings/sdk-settings/sdk-section-page.tsx b/src/components/features/settings/sdk-settings/sdk-section-page.tsxindex a7746a0b11..d870609f4a 100644--- a/src/components/features/settings/sdk-settings/sdk-section-page.tsx+++ b/src/components/features/settings/sdk-settings/sdk-section-page.tsx@@ -10,8 +10,8 @@ import {} from "#/hooks/query/use-agent-settings-schema";import { useSettings } from "#/hooks/query/use-settings";import { I18nKey } from "#/i18n/declaration";-import { Typography } from "#/ui/typography";import { Settings, SettingsSchema, SettingsScope } from "#/types/settings";+import { extensionModuleEmptyStateClassName } from "#/utils/extension-module-card-classes";import {displayErrorToast,displaySuccessToast,@@ -599,9 +599,14 @@ export function SdkSectionPage({if (!hasAnyVisibleSection) {return (- <Typography.Paragraph className="text-tertiary-alt">- {schemaUnavailableMessage}- </Typography.Paragraph>+ <div+ data-testid="sdk-schema-unavailable"+ className={extensionModuleEmptyStateClassName}+ >+ <p className="text-sm text-[var(--oh-muted)]">+ {schemaUnavailableMessage}+ </p>+ </div>);}diff --git a/src/components/features/terminal/empty-terminal-message.tsx b/src/components/features/terminal/empty-terminal-message.tsxnew file mode 100644index 0000000000..feb9463587--- /dev/null+++ b/src/components/features/terminal/empty-terminal-message.tsx@@ -0,0 +1,19 @@+import { useTranslation } from "react-i18next";+import { ConversationTabEmptyState } from "#/components/features/conversation/conversation-tab-empty-state";+import { I18nKey } from "#/i18n/declaration";+import { SquareChevronRight } from "lucide-react";++export function EmptyTerminalMessage() {+ const { t } = useTranslation("openhands");++ return (+ <ConversationTabEmptyState+ className="h-full"+ icon={+ <SquareChevronRight aria-hidden strokeWidth={2} className="size-full" />+ }+ >+ {t(I18nKey.TERMINAL$NO_OUTPUT)}+ </ConversationTabEmptyState>+ );+}diff --git a/src/components/features/terminal/terminal.tsx b/src/components/features/terminal/terminal.tsxindex 33c884ecd3..7c3c16c708 100644--- a/src/components/features/terminal/terminal.tsx+++ b/src/components/features/terminal/terminal.tsx@@ -4,26 +4,33 @@ import { RUNTIME_INACTIVE_STATES } from "#/types/agent-state";import { cn } from "#/utils/utils";import { WaitingForRuntimeMessage } from "../chat/waiting-for-runtime-message";import { useAgentState } from "#/hooks/use-agent-state";+import { useCommandStore } from "#/stores/command-store";+import { EmptyTerminalMessage } from "./empty-terminal-message";function Terminal() {const { curAgentState } = useAgentState();+ const commands = useCommandStore((state) => state.commands);const isRuntimeInactive = RUNTIME_INACTIVE_STATES.includes(curAgentState);+ const hasOutput = commands.length > 0;+ const hideTerminalSurface = isRuntimeInactive || !hasOutput;const ref = useTerminal();return (- <div className="h-full flex flex-col rounded-xl">+ <div className="relative flex h-full min-h-0 flex-col">{isRuntimeInactive && <WaitingForRuntimeMessage className="pt-16" />}- <div className="flex-1 min-h-0 p-4">- <div- ref={ref}- className={cn(- "w-full h-full",- isRuntimeInactive ? "p-0 w-0 h-0 opacity-0 overflow-hidden" : "",- )}- />+ {!isRuntimeInactive && !hasOutput && <EmptyTerminalMessage />}++ <div+ className={cn(+ "flex-1 min-h-0 p-4",+ hideTerminalSurface &&+ "pointer-events-none absolute inset-0 h-0 w-0 overflow-hidden p-0 opacity-0",+ )}+ >+ <div ref={ref} className="h-full w-full" /></div></div>);diff --git a/src/components/features/tips/random-tip.tsx b/src/components/features/tips/random-tip.tsxindex 34e65fec2f..48732fddf2 100644--- a/src/components/features/tips/random-tip.tsx+++ b/src/components/features/tips/random-tip.tsx@@ -2,35 +2,45 @@ import React from "react";import { useTranslation } from "react-i18next";import { I18nKey } from "#/i18n/declaration";import { getRandomTip } from "#/utils/tips";+import LightbulbIcon from "#/icons/lightbulb.svg?react";export function RandomTip() {const { t } = useTranslation("openhands");const [randomTip, setRandomTip] = React.useState(getRandomTip());- // Update the random tip when the component mountsReact.useEffect(() => {setRandomTip(getRandomTip());}, []);return (- <div>- <h4 className="font-bold">{t(I18nKey.TIPS$PROTIP)}:</h4>- <p>- {t(randomTip.key)}- {randomTip.link && (- <>- {" "}- <a- href={randomTip.link}- target="_blank"- rel="noopener noreferrer"- className="underline"- >- {t(I18nKey.TIPS$LEARN_MORE)}- </a>- </>- )}- </p>+ <div className="w-full bg-tertiary p-4 text-left">+ <div className="flex items-start gap-3">+ <LightbulbIcon+ className="mt-0.5 h-4 w-4 shrink-0 fill-[var(--oh-muted)]"+ aria-hidden+ />+ <div className="min-w-0">+ <h4 className="text-sm font-semibold text-[var(--oh-text-tertiary)]">+ {t(I18nKey.TIPS$PROTIP)}+ </h4>+ <p className="text-sm font-normal leading-5 text-[var(--oh-muted)]">+ {t(randomTip.key)}+ {randomTip.link ? (+ <>+ {" "}+ <a+ href={randomTip.link}+ target="_blank"+ rel="noopener noreferrer"+ className="underline transition-colors hover:text-white"+ >+ {t(I18nKey.TIPS$LEARN_MORE)}+ </a>+ </>+ ) : null}+ </p>+ </div>+ </div></div>);}diff --git a/src/components/shared/loading-spinner.tsx b/src/components/shared/loading-spinner.tsxindex 564ef8a93f..c2c09d411b 100644--- a/src/components/shared/loading-spinner.tsx+++ b/src/components/shared/loading-spinner.tsx@@ -4,14 +4,12 @@ import { cn } from "#/utils/utils";interface LoadingSpinnerProps {size: "small" | "large";className?: string;- innerClassName?: string;outerClassName?: string;}export function LoadingSpinner({size,className,- innerClassName,outerClassName,}: LoadingSpinnerProps) {const sizeStyle =@@ -22,13 +20,6 @@ export function LoadingSpinner({data-testid="loading-spinner"className={cn("relative", sizeStyle, className)}>- <div- className={cn(- "rounded-full border-4 border-[var(--oh-border)] absolute",- sizeStyle,- innerClassName,- )}- /><LoadingSpinnerOuterclassName={cn("absolute animate-spin", sizeStyle, outerClassName)}/>diff --git a/src/hooks/use-is-archived-conversation.ts b/src/hooks/use-is-archived-conversation.tsnew file mode 100644index 0000000000..711bae427b--- /dev/null+++ b/src/hooks/use-is-archived-conversation.ts@@ -0,0 +1,7 @@+import { useActiveConversation } from "#/hooks/query/use-active-conversation";+import { isArchivedSandboxStatus } from "#/utils/conversation-archive-status";++export function useIsArchivedConversation() {+ const { data: conversation } = useActiveConversation();+ return isArchivedSandboxStatus(conversation?.sandbox_status);+}diff --git a/src/i18n/translation.json b/src/i18n/translation.jsonindex 4190c9f821..5f293b0c88 100644--- a/src/i18n/translation.json+++ b/src/i18n/translation.json@@ -1393,6 +1393,23 @@"uk": "Ви впевнені, що хочете видалити цей ключ?","ca": "Esteu segur que voleu eliminar aquesta clau?"},+ "SECRETS$EMPTY": {+ "en": "No secrets saved yet.",+ "ja": "まだシークレットが保存されていません。",+ "zh-CN": "尚未保存任何密钥。",+ "zh-TW": "尚未儲存任何密鑰。",+ "ko-KR": "아직 저장된 시크릿이 없습니다.",+ "no": "Ingen hemmeligheter lagret ennå.",+ "it": "Nessun segreto salvato.",+ "pt": "Nenhum segredo salvo ainda.",+ "es": "Aún no hay secretos guardados.",+ "ar": "لم يتم حفظ أي أسرار بعد.",+ "fr": "Aucun secret enregistré pour le moment.",+ "tr": "Henüz kaydedilmiş gizli anahtar yok.",+ "de": "Noch keine Geheimnisse gespeichert.",+ "uk": "Ще немає збережених секретів.",+ "ca": "Encara no hi ha secrets desats."+ },"SETTINGS$MCP_TITLE": {"en": "Model Context Protocol (MCP)","ja": "モデルコンテキストプロトコル (MCP)",@@ -16251,6 +16268,23 @@"uk": "Відключено. Будь ласка, оновіть сторінку","ca": "Desconnectat. Actualitzeu la pàgina"},+ "BROWSER$URL_PLACEHOLDER": {+ "en": "No URL loaded",+ "ja": "URLが読み込まれていません",+ "zh-CN": "未加载 URL",+ "zh-TW": "未載入 URL",+ "ko-KR": "로드된 URL 없음",+ "no": "Ingen URL lastet",+ "it": "Nessun URL caricato",+ "pt": "Nenhum URL carregado",+ "es": "No hay URL cargada",+ "ar": "لم يتم تحميل عنوان URL",+ "fr": "Aucune URL chargée",+ "tr": "URL yüklenmedi",+ "de": "Keine URL geladen",+ "uk": "URL не завантажено",+ "ca": "No s'ha carregat cap URL"+ },"BROWSER$NO_PAGE_LOADED": {"en": "No page loaded yet. Ask OpenHands to open a URL. Example: \"Open https://example.com\"","ja": "まだページは読み込まれていません。OpenHandsにURLを開くよう指示してください。例: \"Open https://example.com\"",@@ -22167,6 +22201,23 @@"uk": "Відкрити в новому вікні","ca": "Obre en una finestra nova"},+ "FILES$VSCODE": {+ "en": "VSCode",+ "ja": "VSCode",+ "zh-CN": "VSCode",+ "zh-TW": "VSCode",+ "ko-KR": "VSCode",+ "no": "VSCode",+ "it": "VSCode",+ "pt": "VSCode",+ "es": "VSCode",+ "ar": "VSCode",+ "fr": "VSCode",+ "tr": "VSCode",+ "de": "VSCode",+ "uk": "VSCode",+ "ca": "VSCode"+ },"FILES$REFRESH": {"en": "Refresh files","ja": "ファイルを更新",@@ -23340,6 +23391,23 @@"uk": "Консоль","ca": "Consola"},+ "TERMINAL$NO_OUTPUT": {+ "en": "No terminal output yet. Commands run by the agent will appear here.",+ "ja": "ターミナル出力はまだありません。エージェントが実行したコマンドがここに表示されます。",+ "zh-CN": "尚无终端输出。智能体运行的命令将显示在此处。",+ "zh-TW": "尚無終端機輸出。代理執行的指令將顯示於此。",+ "ko-KR": "아직 터미널 출력이 없습니다. 에이전트가 실행한 명령이 여기에 표시됩니다.",+ "no": "Ingen terminalutdata ennå. Kommandoer kjørt av agenten vises her.",+ "it": "Nessun output del terminale. I comandi eseguiti dall'agente appariranno qui.",+ "pt": "Ainda não há saída no terminal. Os comandos executados pelo agente aparecerão aqui.",+ "es": "Aún no hay salida en la terminal. Los comandos ejecutados por el agente aparecerán aquí.",+ "ar": "لا يوجد إخراج في الطرفية بعد. ستظهر الأوامر التي ينفذها الوكيل هنا.",+ "de": "Noch keine Terminalausgabe. Vom Agenten ausgeführte Befehle erscheinen hier.",+ "fr": "Aucune sortie terminal pour le moment. Les commandes exécutées par l'agent s'afficheront ici.",+ "tr": "Henüz terminal çıktısı yok. Ajanın çalıştırdığı komutlar burada görünecek.",+ "uk": "Виводу термінала ще немає. Команди, які виконує агент, з’являться тут.",+ "ca": "Encara no hi ha sortida de terminal. Les ordres executades per l'agent apareixeran aquí."+ },"MICROAGENT$DEFINITION": {"en": "Microagents are specialized prompts that enhance OpenHands with domain-specific knowledge. They provide expert guidance, automate common tasks, and ensure consistent practices across projects.","ja": "マイクロエージェントは、OpenHandsにドメイン固有の知識を追加するための専門的なプロンプトです。専門的なガイダンスを提供し、一般的なタスクを自動化し、プロジェクト全体で一貫した実践を保証します。",@@ -24054,6 +24122,23 @@"uk": "Показати доступні навички","ca": "Mostra les habilitats disponibles"},+ "CONVERSATION$UNAVAILABLE_FOR_ARCHIVES": {+ "en": "Unavailable for Archives",+ "ja": "アーカイブでは利用できません",+ "zh-CN": "归档对话不可用",+ "zh-TW": "封存對話不可用",+ "ko-KR": "보관된 대화에서는 사용할 수 없습니다",+ "no": "Utilgjengelig for arkiver",+ "ar": "غير متاح للمحادثات المؤرشفة",+ "de": "Für Archive nicht verfügbar",+ "fr": "Indisponible pour les archives",+ "it": "Non disponibile per le conversazioni archiviate",+ "pt": "Indisponível para arquivos",+ "es": "No disponible para archivos",+ "tr": "Arşivler için kullanılamaz",+ "uk": "Недоступно для архівів",+ "ca": "No disponible per a arxius"+ },"SKILLS_MODAL$TITLE": {"en": "Available Skills","ja": "利用可能なスキル",@@ -29087,21 +29172,21 @@"ca": "Biblioteca"},"NAV$CUSTOMIZE": {- "en": "Customize:",- "ja": "カスタマイズ:",- "zh-CN": "自定义:",- "zh-TW": "自訂:",- "ko-KR": "사용자 지정:",- "no": "Tilpass:",- "ar": "تخصيص:",- "de": "Anpassen:",- "fr": "Personnaliser :",- "it": "Personalizza:",- "pt": "Personalizar:",- "es": "Personalizar:",- "tr": "Özelleştir:",- "uk": "Налаштувати:",- "ca": "Personalitza:"+ "en": "Customize",+ "ja": "カスタマイズ",+ "zh-CN": "自定义",+ "zh-TW": "自訂",+ "ko-KR": "사용자 지정",+ "no": "Tilpass",+ "ar": "تخصيص",+ "de": "Anpassen",+ "fr": "Personnaliser",+ "it": "Personalizza",+ "pt": "Personalizar",+ "es": "Personalizar",+ "tr": "Özelleştir",+ "uk": "Налаштувати",+ "ca": "Personalitza"},"NAV$EXTENSIONS": {"en": "Extensions",diff --git a/src/icons/vscode.svg b/src/icons/vscode.svgindex 6314ae0c54..cb5ac0ec7d 100644--- a/src/icons/vscode.svg+++ b/src/icons/vscode.svg@@ -1,4 +1,8 @@-<svg viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg">-<path d="M12.5063 0.946289L11.4948 2.05386L16.8906 6.98209L11.4928 11.9481L12.5083 13.052L19.1105 6.97807L12.5063 0.946289Z" fill="currentColor"/>-<path d="M7.49476 13.0539L8.50634 11.9463L3.11047 7.01806L8.50834 2.05202L7.49275 0.948125L0.890625 7.02208L7.49476 13.0539Z" fill="currentColor"/>+<svg viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path+ fill="currentColor"+ fill-rule="evenodd"+ clip-rule="evenodd"+ d="M90.767 127.126a7.968 7.968 0 0 0 6.35-.244l26.353-12.681a8 8 0 0 0 4.53-7.209V21.009a8 8 0 0 0-4.53-7.21L97.117 1.12a7.97 7.97 0 0 0-9.093 1.548l-50.45 46.026L15.6 32.013a5.328 5.328 0 0 0-6.807.302l-7.048 6.411a5.335 5.335 0 0 0-.006 7.888L20.796 64 1.74 81.387a5.336 5.336 0 0 0 .006 7.887l7.048 6.411a5.327 5.327 0 0 0 6.807.303l21.974-16.68 50.45 46.025a7.96 7.96 0 0 0 2.743 1.793Zm5.252-92.183L57.74 64l38.28 29.058V34.943Z"+ /></svg>diff --git a/src/routes/changes-tab.tsx b/src/routes/changes-tab.tsxindex 4cdca61511..9e699f87e8 100644--- a/src/routes/changes-tab.tsx+++ b/src/routes/changes-tab.tsx@@ -2,26 +2,51 @@ import { useTranslation } from "react-i18next";import React from "react";import { FileDiffViewer } from "#/components/features/diff-viewer/file-diff-viewer";import { EmptyChangesMessage } from "#/components/features/diff-viewer/empty-changes-message";+import { DiffDrawerIcon } from "#/components/features/diff-viewer/diff-drawer-icon";import { retrieveAxiosErrorMessage } from "#/utils/retrieve-axios-error-message";import { useUnifiedGetGitChanges } from "#/hooks/query/use-unified-get-git-changes";import { I18nKey } from "#/i18n/declaration";import { RUNTIME_INACTIVE_STATES } from "#/types/agent-state";import { RandomTip } from "#/components/features/tips/random-tip";import { useAgentState } from "#/hooks/use-agent-state";+import { RuntimeWaitingState } from "#/components/features/conversation-panel/runtime-waiting-state";+import { ConversationTabEmptyState } from "#/components/features/conversation/conversation-tab-empty-state";// Error message patternsconst GIT_REPO_ERROR_PATTERN = /not a git repository/i;-function StatusMessage({ children }: React.PropsWithChildren) {+const RUNTIME_STATUS_KEYS = new Set<I18nKey>([+ I18nKey.DIFF_VIEWER$WAITING_FOR_RUNTIME,+ I18nKey.DIFF_VIEWER$LOADING,+]);++function ChangesTabStatus({ messages }: { messages: string[] }) {+ const { t } = useTranslation("openhands");++ if (+ messages.length === 1 &&+ RUNTIME_STATUS_KEYS.has(messages[0] as I18nKey)+ ) {+ return (+ <RuntimeWaitingState+ testId="changes-tab-status"+ messageKey={messages[0] as I18nKey}+ />+ );+ }+return (- <div className="w-full h-full flex flex-col items-center text-center justify-center text-2xl text-foreground">- {children}- </div>+ <ConversationTabEmptyState icon={<DiffDrawerIcon />}>+ {messages.map((msg) => (+ <span key={msg} className="block">+ {t(msg)}+ </span>+ ))}+ </ConversationTabEmptyState>);}function GitChanges() {- const { t } = useTranslation("openhands");const {data: gitChanges,isSuccess,@@ -71,22 +96,12 @@ function GitChanges() {{!isSuccess || !gitChanges.length ? (<div className="flex flex-col h-full w-full"><div className="flex-1 flex items-center justify-center">- {statusMessage && (- <StatusMessage>- {statusMessage.map((msg) => (- <span key={msg}>{t(msg)}</span>- ))}- </StatusMessage>- )}+ {statusMessage && <ChangesTabStatus messages={statusMessage} />}{!statusMessage && isSuccess && gitChanges.length === 0 && (<EmptyChangesMessage />)}</div>- {!isError && isSuccess && gitChanges.length === 0 && (- <div className="w-full text-m bg-tertiary p-4 text-left">- <RandomTip />- </div>- )}+ {!isError && isSuccess && gitChanges.length === 0 && <RandomTip />}</div>) : (<div className="h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always">diff --git a/src/routes/files-tab.tsx b/src/routes/files-tab.tsxindex 8a3faeea50..eb42a38af3 100644--- a/src/routes/files-tab.tsx+++ b/src/routes/files-tab.tsx@@ -2,6 +2,7 @@ import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";import { useQueryClient } from "@tanstack/react-query";+import { NoFileSelectedMessage } from "#/components/features/files-tab/no-file-selected-message";import { I18nKey } from "#/i18n/declaration";import { useFilesTabStore } from "#/stores/files-tab-store";import { useWorkspaceFiles } from "#/hooks/query/use-workspace-files";@@ -191,7 +192,7 @@ function FilesTab() {isTreeVisible={isTreeVisible}onToggleTree={() => setIsTreeVisible((prev) => !prev)}/>- <div className="flex flex-1 min-h-0">+ <div className="flex h-full min-h-0 flex-1">{isTreeVisible && (<asideclassName="w-56 shrink-0 border-r border-[var(--oh-border)] overflow-y-auto custom-scrollbar-always"@@ -205,7 +206,7 @@ function FilesTab() {</aside>)}<section- className="flex-1 min-w-0 min-h-0"+ className="flex h-full min-h-0 min-w-0 flex-1 flex-col"data-testid="files-tab-content">{selectedPath ? (@@ -214,9 +215,7 @@ function FilesTab() {viewMode={contentViewMode}/>) : (- <div className="flex h-full w-full items-center justify-center text-sm text-[var(--oh-muted)]">- {t(I18nKey.FILES$NO_FILE_SELECTED)}- </div>+ <NoFileSelectedMessage />)}</section></div>diff --git a/src/routes/mcp.tsx b/src/routes/mcp.tsxindex b407ac5a18..0831660c85 100644--- a/src/routes/mcp.tsx+++ b/src/routes/mcp.tsx@@ -115,7 +115,7 @@ export default function MCPPage() {><ExtensionsNavigation /><div className="flex h-full flex-1 items-center justify-center px-4 md:px-0">- <div className="h-8 w-8 rounded-full border-2 border-[var(--oh-border)] border-t-white animate-spin" />+ <div className="h-8 w-8 rounded-full border-2 border-transparent border-t-white animate-spin" /></div></div>);diff --git a/src/routes/planner-tab.tsx b/src/routes/planner-tab.tsxindex 4afe6ba091..6af41b22b5 100644--- a/src/routes/planner-tab.tsx+++ b/src/routes/planner-tab.tsx@@ -1,7 +1,7 @@import React from "react";import { useTranslation } from "react-i18next";import { I18nKey } from "#/i18n/declaration";-import LessonPlanIcon from "#/icons/lesson-plan.svg?react";+import { ListTodo } from "lucide-react";import { BrandButton } from "#/components/features/settings/brand-button";import { ConversationTabEmptyState } from "#/components/features/conversation/conversation-tab-empty-state";import { useConversationStore } from "#/stores/conversation-store";@@ -47,7 +47,7 @@ function PlannerTab() {return (<ConversationTabEmptyState- icon={<LessonPlanIcon />}+ icon={<ListTodo aria-hidden strokeWidth={2} className="size-full" />}action={<BrandButtontype="button"diff --git a/src/routes/secrets-settings.tsx b/src/routes/secrets-settings.tsxindex ae5c287a3f..e7b069482f 100644--- a/src/routes/secrets-settings.tsx+++ b/src/routes/secrets-settings.tsx@@ -20,6 +20,7 @@ import {settingsListTableHeadClassName,settingsListTableHeaderCellClassName,} from "#/utils/settings-list-classes";+import { extensionModuleEmptyStateClassName } from "#/utils/extension-module-card-classes";export const handle = { hideTitle: true };@@ -143,7 +144,18 @@ export function SecretsSettingsScreen() {</ul>)}- {view === "list" && !isLoadingSecrets && (+ {view === "list" && !isLoadingSecrets && secrets?.length === 0 && (+ <div+ data-testid="secrets-empty"+ className={extensionModuleEmptyStateClassName}+ >+ <p className="text-sm text-[var(--oh-muted)]">+ {t(I18nKey.SECRETS$EMPTY)}+ </p>+ </div>+ )}++ {view === "list" && !isLoadingSecrets && (secrets?.length ?? 0) > 0 && (<divref={tableContainerRef}className={settingsListScrollContainerClassName}diff --git a/src/routes/skills-settings.tsx b/src/routes/skills-settings.tsxindex 6052b3839a..cfad808b65 100644--- a/src/routes/skills-settings.tsx+++ b/src/routes/skills-settings.tsx@@ -18,6 +18,7 @@ import { settingsLikeMainScrollClassName } from "#/utils/settings-like-page-layoimport {extensionModuleCardGridClassName,extensionModuleCardGridContainerClassName,+ extensionModuleEmptyStateClassName,} from "#/utils/extension-module-card-classes";import type { SkillInfo } from "#/types/settings";import { getSkillCardDescription } from "#/components/features/skills/get-skill-card-description";@@ -142,9 +143,14 @@ function SkillsSettingsScreen() {)}{!isLoading && (!skills || skills.length === 0) && (- <p className="text-sm text-tertiary">- {t(I18nKey.SETTINGS$SKILLS_NO_SKILLS)}- </p>+ <div+ data-testid="skills-empty"+ className={extensionModuleEmptyStateClassName}+ >+ <p className="text-sm text-tertiary-light">+ {t(I18nKey.SETTINGS$SKILLS_NO_SKILLS)}+ </p>+ </div>)}{!isLoading && skills && skills.length > 0 && (@@ -156,12 +162,14 @@ function SkillsSettingsScreen() {onTypeFilterChange={setTypeFilter}/>{filteredSkills.length === 0 ? (- <p+ <divdata-testid="skills-no-match"- className="text-sm text-tertiary"+ className={extensionModuleEmptyStateClassName}>- {t(I18nKey.SETTINGS$SKILLS_NO_MATCH)}- </p>+ <p className="text-sm text-tertiary-light">+ {t(I18nKey.SETTINGS$SKILLS_NO_MATCH)}+ </p>+ </div>) : (<sectionclassName={cn(diff --git a/src/routes/vscode-tab.tsx b/src/routes/vscode-tab.tsxdeleted file mode 100644index fafc42f7c9..0000000000--- a/src/routes/vscode-tab.tsx+++ /dev/null@@ -1,104 +0,0 @@-import React, { useState, useEffect } from "react";-import { useTranslation } from "react-i18next";-import { I18nKey } from "#/i18n/declaration";-import { useUnifiedVSCodeUrl } from "#/hooks/query/use-unified-vscode-url";-import { useAgentState } from "#/hooks/use-agent-state";-import { RUNTIME_STARTING_STATES } from "#/types/agent-state";-import { VSCODE_IN_NEW_TAB } from "#/utils/feature-flags";-import { WaitingForRuntimeMessage } from "#/components/features/chat/waiting-for-runtime-message";-import { ConversationTabEmptyState } from "#/components/features/conversation/conversation-tab-empty-state";-import { BrandButton } from "#/components/features/settings/brand-button";-import VSCodeIcon from "#/icons/vscode.svg?react";--function VSCodeTab() {- const { t } = useTranslation("openhands");- const { data, isLoading, error } = useUnifiedVSCodeUrl();- const { curAgentState } = useAgentState();- const isRuntimeStarting = RUNTIME_STARTING_STATES.includes(curAgentState);- const iframeRef = React.useRef<HTMLIFrameElement>(null);- const [isCrossProtocol, setIsCrossProtocol] = useState(false);- const [iframeError, setIframeError] = useState<string | null>(null);-- useEffect(() => {- if (data?.url) {- try {- const iframeProtocol = new URL(data.url).protocol;- const currentProtocol = window.location.protocol;-- // Check if the iframe URL has a different protocol than the current page- setIsCrossProtocol(- VSCODE_IN_NEW_TAB() || iframeProtocol !== currentProtocol,- );- } catch (e) {- // Silently handle URL parsing errors- setIframeError(t(I18nKey.VSCODE$URL_PARSE_ERROR));- }- }- }, [data?.url]);-- const handleOpenInNewTab = () => {- if (data?.url) {- window.open(data.url, "_blank", "noopener,noreferrer");- }- };-- if (isRuntimeStarting) {- return <WaitingForRuntimeMessage />;- }-- if (isLoading) {- return (- <div className="w-full h-full flex items-center text-center justify-center text-2xl text-tertiary-light">- {t(I18nKey.VSCODE$LOADING)}- </div>- );- }-- if (error || data?.error || !data?.url || iframeError) {- return (- <div className="w-full h-full flex items-center text-center justify-center text-2xl text-tertiary-light">- {iframeError ||- data?.error ||- String(error) ||- t(I18nKey.VSCODE$URL_NOT_AVAILABLE)}- </div>- );- }-- // If cross-origin, show a button to open in new tab- if (isCrossProtocol) {- return (- <ConversationTabEmptyState- icon={<VSCodeIcon />}- action={- <BrandButton- type="button"- variant="secondary"- onClick={handleOpenInNewTab}- className="min-w-40 justify-center px-6"- >- {t(I18nKey.VSCODE$OPEN_IN_NEW_TAB)}- </BrandButton>- }- >- {t(I18nKey.VSCODE$CROSS_ORIGIN_WARNING)}- </ConversationTabEmptyState>- );- }-- // If same origin, use the iframe- return (- <div className="h-full w-full">- <iframe- ref={iframeRef}- title={t(I18nKey.VSCODE$TITLE)}- src={data.url}- className="w-full h-full border-0"- allow="clipboard-read; clipboard-write"- />- </div>- );-}--// Export the VSCodeTab directly since we're using the provider at a higher level-export default VSCodeTab;diff --git a/src/services/canvas-ui.ts b/src/services/canvas-ui.tsindex cf95f54fb2..5f531a54ce 100644--- a/src/services/canvas-ui.ts+++ b/src/services/canvas-ui.ts@@ -8,7 +8,6 @@ import type { CanvasUIAction } from "#/types/agent-server/core";const VALID_TABS: ReadonlySet<ConversationTab> = new Set<ConversationTab>(["files","browser",- "vscode","terminal","planner","tasklist",@@ -40,7 +39,12 @@ export function handleCanvasUIAction(action: CanvasUIAction): void {}return;case "open_tab":- if (action.tab && isValidTab(action.tab)) {+ if (action.tab === "vscode") {+ // The in-app VS Code tab was removed — on cloud backends VS Code+ // now opens in a new browser window via the link in the drawer tab+ // row. Route agent requests to Files so the drawer still opens.+ navigateToTab("files");+ } else if (action.tab && isValidTab(action.tab)) {navigateToTab(action.tab);} else if (action.tab) {// Surface unknown tab names so they're diagnosable from the browserdiff --git a/src/stores/conversation-store.ts b/src/stores/conversation-store.tsindex 458f9553ca..9920723c99 100644--- a/src/stores/conversation-store.ts+++ b/src/stores/conversation-store.ts@@ -8,7 +8,6 @@ import {export type ConversationTab =| "files"| "browser"- | "vscode"| "terminal"| "planner"| "tasklist";diff --git a/src/ui/dropdown/loading-spinner.tsx b/src/ui/dropdown/loading-spinner.tsxindex 300743719f..6916a5aebb 100644--- a/src/ui/dropdown/loading-spinner.tsx+++ b/src/ui/dropdown/loading-spinner.tsx@@ -1,7 +1,7 @@export function LoadingSpinner() {return (<div- className="animate-spin h-4 w-4 border-2 border-white/20 border-t-white rounded-full"+ className="animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full"data-testid="dropdown-loading"/>);diff --git a/src/utils/conversation-archive-status.ts b/src/utils/conversation-archive-status.tsnew file mode 100644index 0000000000..f9903657b9--- /dev/null+++ b/src/utils/conversation-archive-status.ts@@ -0,0 +1,7 @@+import type { SandboxStatus } from "#/api/conversation-service/agent-server-conversation-service.types";++export function isArchivedSandboxStatus(+ sandboxStatus: SandboxStatus | null | undefined,+): boolean {+ return sandboxStatus === "MISSING" || sandboxStatus === "ERROR";+}diff --git a/src/utils/conversation-local-storage.ts b/src/utils/conversation-local-storage.tsindex fd9106d500..5b6046d757 100644--- a/src/utils/conversation-local-storage.ts+++ b/src/utils/conversation-local-storage.ts@@ -58,7 +58,6 @@ const DEFAULT_CONVERSATION_STATE: ConversationState = {const VALID_CONVERSATION_TABS: ReadonlySet<ConversationTab> = new Set(["files","browser",- "vscode","terminal","planner","tasklist",@@ -78,6 +77,7 @@ const REMOVED_CONVERSATION_TABS: ReadonlySet<string> = new Set(["served","changes","app",+ "vscode",]);const VALID_VIEW_MODES: ReadonlySet<ViewMode> = new Set(["rich", "plain"]);diff --git a/src/utils/feature-flags.ts b/src/utils/feature-flags.tsdeleted file mode 100644index f61ff18806..0000000000--- a/src/utils/feature-flags.ts+++ /dev/null@@ -1,15 +0,0 @@-function loadFeatureFlag(- flagName: string,- defaultValue: boolean = false,-): boolean {- try {- const stringValue =- localStorage.getItem(`FEATURE_${flagName}`) || defaultValue.toString();- const value = !!JSON.parse(stringValue);- return value;- } catch (e) {- return defaultValue;- }-}--export const VSCODE_IN_NEW_TAB = () => loadFeatureFlag("VSCODE_IN_NEW_TAB");