style: format prettier warnings

This commit is contained in:
maaz 2026-07-05 10:57:17 +05:30
parent 382125555d
commit c5e9a66e89
9 changed files with 41 additions and 10 deletions

View File

@ -11,7 +11,7 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
important: important:
description: 'Mark this nightly as an important update (escalates the in-app restart prompt). Retro-flag an already-published nightly by re-running only the publish-feed job with this input set.' description: "Mark this nightly as an important update (escalates the in-app restart prompt). Retro-flag an already-published nightly by re-running only the publish-feed job with this input set."
type: boolean type: boolean
default: false default: false

View File

@ -41,13 +41,18 @@ export function OrchestratorReplacementDialog({
<AlertTriangle className="size-4" aria-hidden="true" /> <AlertTriangle className="size-4" aria-hidden="true" />
</div> </div>
<div className="min-w-0 flex-1"> <div className="min-w-0 flex-1">
<Dialog.Title className="text-sm font-medium text-foreground">Orchestrator replacement failed</Dialog.Title> <Dialog.Title className="text-sm font-medium text-foreground">
Orchestrator replacement failed
</Dialog.Title>
<Dialog.Description className="mt-2 text-[13px] leading-5 text-muted-foreground"> <Dialog.Description className="mt-2 text-[13px] leading-5 text-muted-foreground">
{error ?? "The project orchestrator could not be replaced."} {error ?? "The project orchestrator could not be replaced."}
</Dialog.Description> </Dialog.Description>
</div> </div>
<Dialog.Close asChild> <Dialog.Close asChild>
<button className="rounded-md p-1 text-passive hover:bg-interactive-hover hover:text-foreground" type="button"> <button
className="rounded-md p-1 text-passive hover:bg-interactive-hover hover:text-foreground"
type="button"
>
<X className="size-4" aria-hidden="true" /> <X className="size-4" aria-hidden="true" />
<span className="sr-only">Close</span> <span className="sr-only">Close</span>
</button> </button>

View File

@ -95,7 +95,11 @@ beforeEach(() => {
putMock.mockReset(); putMock.mockReset();
postMock.mockReset(); postMock.mockReset();
putMock.mockResolvedValue({ data: { project: {} }, error: undefined }); putMock.mockResolvedValue({ data: { project: {} }, error: undefined });
postMock.mockResolvedValue({ data: { orchestrator: { id: "proj-1-orch-2" } }, error: undefined, response: { status: 200 } }); postMock.mockResolvedValue({
data: { orchestrator: { id: "proj-1-orch-2" } },
error: undefined,
response: { status: 200 },
});
}); });
describe("ProjectSettingsForm", () => { describe("ProjectSettingsForm", () => {

View File

@ -169,7 +169,13 @@ export function SessionsBoard({ projectId }: SessionsBoardProps) {
type="button" type="button"
> >
<OrchestratorIcon className="h-3.5 w-3.5" aria-hidden="true" /> <OrchestratorIcon className="h-3.5 w-3.5" aria-hidden="true" />
{isProjectRestarting ? "Restarting..." : isSpawning ? "Spawning..." : orchestrator ? "Orchestrator" : "Spawn Orchestrator"} {isProjectRestarting
? "Restarting..."
: isSpawning
? "Spawning..."
: orchestrator
? "Orchestrator"
: "Spawn Orchestrator"}
</button> </button>
</> </>
) : undefined; ) : undefined;

View File

@ -602,7 +602,13 @@ function ProjectItem({
</button> </button>
</TooltipTrigger> </TooltipTrigger>
<TooltipContent> <TooltipContent>
{isProjectRestarting ? "Restarting…" : isSpawning ? "Spawning…" : orchestrator ? "Orchestrator" : "Spawn orchestrator"} {isProjectRestarting
? "Restarting…"
: isSpawning
? "Spawning…"
: orchestrator
? "Orchestrator"
: "Spawn orchestrator"}
</TooltipContent> </TooltipContent>
</Tooltip> </Tooltip>
<DropdownMenu> <DropdownMenu>

View File

@ -101,7 +101,12 @@ describe("useWorkspaceQuery", () => {
await waitFor(() => expect(result.current.isSuccess).toBe(true)); await waitFor(() => expect(result.current.isSuccess).toBe(true));
const [workspace] = result.current.data ?? []; const [workspace] = result.current.data ?? [];
expect(workspace).toMatchObject({ id: "proj-1", name: "my-app", path: "/home/me/my-app", orchestratorAgent: "codex" }); expect(workspace).toMatchObject({
id: "proj-1",
name: "my-app",
path: "/home/me/my-app",
orchestratorAgent: "codex",
});
expect(workspace.sessions).toHaveLength(2); expect(workspace.sessions).toHaveLength(2);
expect(workspace.sessions[0]).toMatchObject({ expect(workspace.sessions[0]).toMatchObject({
id: "sess-1", id: "sess-1",

View File

@ -44,7 +44,10 @@ export async function restartProjectOrchestrator({
}); });
} catch (error) { } catch (error) {
await refreshWorkspaceState(queryClient); await refreshWorkspaceState(queryClient);
setOrchestratorReplacementError(projectId, error instanceof Error ? error.message : "Could not replace orchestrator"); setOrchestratorReplacementError(
projectId,
error instanceof Error ? error.message : "Could not replace orchestrator",
);
onError?.(error); onError?.(error);
} finally { } finally {
setProjectRestarting(projectId, false); setProjectRestarting(projectId, false);

View File

@ -239,7 +239,8 @@ describe("orchestratorHealth", () => {
}), }),
).toEqual({ ).toEqual({
state: "duplicates", state: "duplicates",
message: "Multiple orchestrators are active. The newest one is used; stale ones will be cleaned up on daemon reconcile.", message:
"Multiple orchestrators are active. The newest one is used; stale ones will be cleaned up on daemon reconcile.",
}); });
expect( expect(

View File

@ -386,7 +386,8 @@ export function orchestratorHealth(workspace: WorkspaceSummary, restarting = fal
if (active.length > 1) { if (active.length > 1) {
return { return {
state: "duplicates", state: "duplicates",
message: "Multiple orchestrators are active. The newest one is used; stale ones will be cleaned up on daemon reconcile.", message:
"Multiple orchestrators are active. The newest one is used; stale ones will be cleaned up on daemon reconcile.",
}; };
} }
const orchestrator = newestActiveOrchestrator(workspace.sessions); const orchestrator = newestActiveOrchestrator(workspace.sessions);