Fix orchestrator self-link on session detail

This commit is contained in:
Gautam Tayal 2026-04-12 18:25:15 +05:30
parent af2af115bd
commit b4c6a2b59e
2 changed files with 26 additions and 1 deletions

View File

@ -517,7 +517,7 @@ export function SessionDetail({
) : null}
<div className="dashboard-app-header__spacer" />
<div className="dashboard-app-header__actions">
{orchestratorHref ? (
{!isOrchestrator && orchestratorHref ? (
<a
href={orchestratorHref}
className="dashboard-app-btn dashboard-app-btn--amber"

View File

@ -186,4 +186,29 @@ describe("SessionDetail desktop layout", () => {
expect(screen.getByText(/Terminal session has ended/i)).toBeInTheDocument();
expect(screen.queryByTestId("direct-terminal")).not.toBeInTheDocument();
});
it("hides the desktop orchestrator button on orchestrator session pages", () => {
render(
<SessionDetail
session={makeSession({
id: "my-app-orchestrator",
summary: "Project orchestrator",
})}
isOrchestrator
orchestratorZones={{
merge: 1,
respond: 0,
review: 0,
pending: 0,
working: 2,
done: 3,
}}
projectOrchestratorId="my-app-orchestrator"
projects={[{ id: "my-app", name: "My App", path: "/tmp/my-app" }]}
/>,
);
expect(screen.queryByRole("link", { name: "Orchestrator" })).not.toBeInTheDocument();
expect(screen.getByText("orchestrator")).toBeInTheDocument();
});
});