Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified frontend/src/landing/public/ao-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/src/renderer/assets/ao-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/renderer/assets/dashboard-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 11 additions & 11 deletions frontend/src/renderer/components/ShellTopbar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { useNavigate, useParams } from "@tanstack/react-router";
import { GitBranch, LayoutDashboard, PanelRightClose, PanelRightOpen, Square } from "lucide-react";
import { GitBranch, PanelRightClose, PanelRightOpen, Square } from "lucide-react";
import { useState } from "react";
import {
findProjectOrchestrator,
isOrchestratorSession,
sessionIsActive,
workerDisplayStatus,
type WorkerDisplayStatus,
Expand All @@ -14,7 +13,8 @@ import { useWorkspaceQuery, workspaceQueryKey } from "../hooks/useWorkspaceQuery
import { apiClient, apiErrorMessage } from "../lib/api-client";
import { spawnOrchestrator } from "../lib/spawn-orchestrator";
import { useUiStore } from "../stores/ui-store";
import { OrchestratorIcon } from "./icons";
import dashboardLogo from "../assets/dashboard-logo.png";
import orchestratorLogo from "../assets/orchestrator-logo.png";
import { cn } from "../lib/utils";

const isMac = typeof navigator !== "undefined" && /Mac|iPod|iPhone|iPad/.test(navigator.userAgent);
Expand Down Expand Up @@ -57,7 +57,7 @@ export function ShellTopbar() {
? all.flatMap((workspace) => workspace.sessions).find((s) => s.id === params.sessionId)
: undefined;
const isSessionRoute = Boolean(params.sessionId);
const isOrchestrator = session ? isOrchestratorSession(session) : false;
const isOrchestrator = session?.kind === "orchestrator";
// Project in scope: the session's workspace wins over the route param so the
// cross-project /sessions/$sessionId route still resolves a crumb. A
// projectId that no longer resolves (stale route after the project was
Expand Down Expand Up @@ -106,7 +106,7 @@ export function ShellTopbar() {
·
</span>
<span className="session-detail-mode-badge session-detail-mode-badge--neutral">
<OrchestratorIcon className="size-3 shrink-0" aria-hidden="true" />
<img src={orchestratorLogo} alt="" aria-hidden="true" className="size-3 shrink-0 rounded-[3px]" />
Orchestrator
</span>
</div>
Expand Down Expand Up @@ -139,20 +139,20 @@ export function ShellTopbar() {
style={noDragStyle}
type="button"
>
<LayoutDashboard className="h-3.5 w-3.5" aria-hidden="true" />
<img src={dashboardLogo} alt="" aria-hidden="true" className="h-3.5 w-3.5 rounded-[3px]" />
Open Kanban
</button>
) : (
<button
aria-label="Open orchestrator"
aria-label="Open Orchestrator"
className="dashboard-app-header__primary-btn"
disabled={isSpawning}
onClick={() => void openOrchestrator()}
style={noDragStyle}
type="button"
>
<OrchestratorIcon className="h-3.5 w-3.5" aria-hidden="true" />
{isSpawning ? "Spawning…" : "Open orchestrator"}
<img src={orchestratorLogo} alt="" aria-hidden="true" className="h-3.5 w-3.5 rounded-[3px]" />
{isSpawning ? "Spawning…" : "Open Orchestrator"}
</button>
)}
{/* Kill control sits beside the orchestrator link for active workers —
Expand Down Expand Up @@ -191,7 +191,7 @@ export function ShellTopbar() {
style={noDragStyle}
type="button"
>
<OrchestratorIcon className="h-3.5 w-3.5" aria-hidden="true" />
<img src={orchestratorLogo} alt="" aria-hidden="true" className="h-3.5 w-3.5 rounded-[3px]" />
Orchestrator
</button>
) : (
Expand All @@ -203,7 +203,7 @@ export function ShellTopbar() {
style={noDragStyle}
type="button"
>
<OrchestratorIcon className="h-3.5 w-3.5" aria-hidden="true" />
<img src={orchestratorLogo} alt="" aria-hidden="true" className="h-3.5 w-3.5 rounded-[3px]" />
{isSpawning ? "Spawning…" : "Spawn Orchestrator"}
</button>
)
Expand Down
20 changes: 5 additions & 15 deletions frontend/src/renderer/components/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import { useQueryClient } from "@tanstack/react-query";
import { useNavigate, useParams, useRouterState } from "@tanstack/react-router";
import {
ChevronRight,
GitPullRequest,
LayoutDashboard,
Moon,
MoreVertical,
Plus,
Search,
Settings,
Sun,
Trash2,
} from "lucide-react";
import { ChevronRight, GitPullRequest, Moon, MoreVertical, Plus, Search, Settings, Sun, Trash2 } from "lucide-react";
import { useState } from "react";
import {
attentionZone,
Expand Down Expand Up @@ -52,8 +41,9 @@ import {
useSidebar,
} from "./ui/sidebar";
import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip";
import { OrchestratorIcon } from "./icons";
import aoLogo from "../assets/ao-logo.png";
import dashboardLogo from "../assets/dashboard-logo.png";
import orchestratorLogo from "../assets/orchestrator-logo.png";
import { cn } from "../lib/utils";
import { useUiStore } from "../stores/ui-store";

Expand Down Expand Up @@ -492,7 +482,7 @@ function ProjectItem({
onClick={() => selection.goProject(workspace.id)}
type="button"
>
<LayoutDashboard aria-hidden="true" />
<img src={dashboardLogo} alt="" aria-hidden="true" className="h-[15px] w-[15px] rounded-[3px]" />
</button>
</TooltipTrigger>
<TooltipContent>Dashboard</TooltipContent>
Expand All @@ -506,7 +496,7 @@ function ProjectItem({
onClick={() => void openOrchestrator()}
type="button"
>
<OrchestratorIcon aria-hidden="true" />
<img src={orchestratorLogo} alt="" aria-hidden="true" className="h-[15px] w-[15px] rounded-[3px]" />
</button>
</TooltipTrigger>
<TooltipContent>
Expand Down
33 changes: 0 additions & 33 deletions frontend/src/renderer/components/icons.tsx

This file was deleted.

13 changes: 13 additions & 0 deletions frontend/src/renderer/types/workspace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest";
import {
attentionZone,
findProjectOrchestrator,
isOrchestratorSession,
sessionIsActive,
sessionNeedsAttention,
toAgentProvider,
Expand Down Expand Up @@ -46,6 +47,18 @@ describe("toSessionStatus", () => {
});
});

describe("isOrchestratorSession", () => {
it("lets explicit worker kind override an orchestrator-looking id", () => {
const worker = sessionWith({ id: "project-orchestrator", kind: "worker" });
expect(isOrchestratorSession(worker)).toBe(false);
});

it("keeps the id suffix fallback for legacy sessions without kind", () => {
const orchestrator = sessionWith({ id: "project-orchestrator", kind: undefined });
expect(isOrchestratorSession(orchestrator)).toBe(true);
});
});

describe("workerDisplayStatus", () => {
it("prefers an explicit displayStatus override", () => {
expect(workerDisplayStatus(sessionWith({ status: "ci_failed", displayStatus: "done" }))).toBe("done");
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/renderer/types/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ export function workerDisplayStatus(session: WorkspaceSession): WorkerDisplaySta
}

export function isOrchestratorSession(session: WorkspaceSession): boolean {
return session.kind === "orchestrator" || session.id.endsWith("-orchestrator");
if (session.kind) return session.kind === "orchestrator";
return session.id.endsWith("-orchestrator");
}

/**
Expand Down