Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(ide): no surface switch while the workspace wizard is the screen

rubenluetke10-beep78a6667f438a
diff --git a/jarvis/ui/web/frontend/src/views/AgenticIdeView.test.tsx b/jarvis/ui/web/frontend/src/views/AgenticIdeView.test.tsx
index 86b0681170..a51789d49c 100644
--- a/jarvis/ui/web/frontend/src/views/AgenticIdeView.test.tsx
+++ b/jarvis/ui/web/frontend/src/views/AgenticIdeView.test.tsx
@@ -831,6 +831,15 @@ describe("Agentic IDE running workspace", () => {
expect(screen.queryByTestId("workspace-launcher")).toBeNull();
});
+ it("offers no surface switch while the wizard is the screen", async () => {
+ // Nothing is open, so neither surface has anything to show — and a
+ // control that changes nothing visible reads as broken.
+ render(<AgenticIdeView />);
+ await waitFor(() => expect(api.fetchIdeAgents).toHaveBeenCalled());
+
+ expect(screen.queryByTestId("agentic-view-switch")).toBeNull();
+ });
+
it("switches between the chat and the grid from one control in the bar", async () => {
vi.mocked(api.fetchIdeState).mockResolvedValue(
stateWith(sessionWith(["Mika"])),
diff --git a/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsx b/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsx
index ee705c0ac1..e2c8d4d006 100644
--- a/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsx
+++ b/jarvis/ui/web/frontend/src/views/AgenticIdeView.tsx
@@ -887,7 +887,14 @@ export function AgenticIdeView({ onScreen = true }: AgenticIdeViewProps) {
<WorkspaceBar
embedded={embedded}
actions={embedded ? undefined : <TopBarActions />}
- viewSwitch={<ViewSwitch view={ideView} onView={setIdeView} />}
+ /* Only with a workspace open: with none there is nothing to show on
+ either surface, and the wizard is the screen. A switch that changes
+ nothing visible is a dead control. */
+ viewSwitch={
+ session && !addingNew ? (
+ <ViewSwitch view={ideView} onView={setIdeView} />
+ ) : undefined
+ }
workspaces={barWorkspaces}
activeId={session?.id ?? null}
addingNew={addingNew}