Skip to content
Merged
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
4 changes: 2 additions & 2 deletions packages/app/src/features/jobs/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { JobTabs } from "./tabs";
import type { Job } from "./editor-state";

type JobHeaderProps = {
job: Pick<Job, "id" | "name" | "enabled" | "executionType" | "agentKind" | "model" | "runningCount" | "concurrencyLimit">;
job: Pick<Job, "id" | "name" | "enabled">;
};

export function JobHeader({ job }: JobHeaderProps) {
Expand All @@ -27,7 +27,7 @@ export function JobHeader({ job }: JobHeaderProps) {
});

return <>
<ResourceHeader type="Job" title={job.name} description={<>{job.executionType === "code" ? "Code script" : `${job.agentKind} · ${job.model || "Default model"}`} · {job.runningCount}/{job.concurrencyLimit} running</>}><div className="flex max-w-full shrink-0 flex-wrap items-center gap-2"><InvokeJob jobId={job.id} enabled={job.enabled} />
<ResourceHeader type="Job" title={job.name}><div className="flex max-w-full shrink-0 flex-wrap items-center gap-2"><InvokeJob jobId={job.id} enabled={job.enabled} />
<Button className="min-h-9 px-2.5 py-1.5 text-xs" disabled={enabled.isPending} onClick={() => enabled.mutate(!job.enabled)}>{job.enabled ? "Disable job" : "Enable job"}</Button>
</div></ResourceHeader>
<JobTabs jobId={job.id} />
Expand Down
4 changes: 2 additions & 2 deletions packages/app/test/jobs.browser.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ for (const width of [1280, 390]) test(`job header actions and status remain usab
await page.goto(origin + "/jobs/" + jobId);
const heading = page.getByRole("heading", { name: longTitle, exact: true });
await heading.waitFor();
assert.equal(await page.getByText("codex · Default model · 1/3 running", { exact: true }).count(), 1);
assert.equal(await page.getByText("codex · Default model · 1/3 running", { exact: true }).count(), 0);
assert.equal(await page.getByText("Enabled", { exact: true }).count(), 0);
assert.equal(await page.getByRole("button", { name: "Run job", exact: true }).isEnabled(), true);
assert.equal(await page.getByRole("button", { name: "Disable job", exact: true }).count(), 1);
Expand Down Expand Up @@ -619,7 +619,7 @@ test("job Runs tab paginates distinct records, supports refresh/back and keeps c
await page.goto(origin + `/jobs/${jobId}/settings`);
await page.getByRole("heading", { name: "Review builds", exact: true }).waitFor();
assert.equal(await page.getByRole("navigation", { name: "Breadcrumb" }).getByRole("link", { name: "Review builds", exact: true }).count(), 0);
assert.equal(await page.getByText("codex · Default model · 0/2 running", { exact: true }).count(), 1);
assert.equal(await page.getByText("codex · Default model · 0/2 running", { exact: true }).count(), 0);
assert.equal(await page.getByRole("button", { name: "Run job", exact: true }).count(), 1);
assert.equal(await page.getByRole("button", { name: "Disable job", exact: true }).count(), 1);
await context.close();
Expand Down
Loading