Files
openclaw/packages/workboard-contract/src/index.test.ts
Peter Steinberger c4eb9078d9 feat(workboard): link boards to owning automations (#125076)
* feat(workboard): reference the automation job that owns a board's prompt

Boards can now record automationJobId, linking a board to the cron
automation whose prompt/model/schedule categorize its cards. The cron
job remains the single owner of that configuration; workboard stores
only the reference. The board toolbar shows an Automation chip linking
to the cron page when set. Deleting a board never deletes the job.

Proof: pnpm test extensions/workboard packages/workboard-contract
ui/src/pages/workboard ui/src/lib/workboard (9,492 passed), autoreview
clean (codex/gpt-5.6-sol). check:changed blocked by remote capacity
(Blacksmith down, Daytona lease cap); local fallback lanes green except
a parent-branch lint finding fixed on that branch.

* fix(ui): describe workboard automation destination
2026-08-16 22:52:26 -07:00

25 lines
806 B
TypeScript

import { describe, expect, expectTypeOf, it } from "vitest";
import type { WorkboardBoardMetadata, WorkboardBoardSummary } from "./index.js";
describe("workboard board automation contract", () => {
it("carries the owning automation job reference in metadata and summaries", () => {
const metadata: WorkboardBoardMetadata = {
id: "planning",
automationJobId: "job-categorize-planning",
createdAt: 1,
updatedAt: 1,
};
const summary: WorkboardBoardSummary = {
id: metadata.id,
automationJobId: metadata.automationJobId,
total: 0,
active: 0,
archived: 0,
byStatus: {},
};
expect(summary.automationJobId).toBe("job-categorize-planning");
expectTypeOf(summary.automationJobId).toEqualTypeOf<string | undefined>();
});
});