MCPcopy
hub / github.com/coder/mux / workflowChild

Function workflowChild

src/browser/components/ProjectSidebar/sidebarTaskGroups.test.ts:43–64  ·  view source on GitHub ↗
(
  id: string,
  runId: string,
  opts?: {
    taskStatus?: FrontendWorkspaceMetadata["taskStatus"];
    createdAt?: string;
    workflowName?: string;
    title?: string;
  }
)

Source from the content-addressed store, hash-verified

41const parent = createWorkspace("parent");
42
43function workflowChild(
44 id: string,
45 runId: string,
46 opts?: {
47 taskStatus?: FrontendWorkspaceMetadata["taskStatus"];
48 createdAt?: string;
49 workflowName?: string;
50 title?: string;
51 }
52): FrontendWorkspaceMetadata {
53 return createWorkspace(id, {
54 parentWorkspaceId: "parent",
55 taskStatus: opts?.taskStatus ?? "running",
56 createdAt: opts?.createdAt,
57 title: opts?.title,
58 workflowTask: {
59 runId,
60 stepId: `${id}-step`,
61 workflowName: opts?.workflowName,
62 },
63 });
64}
65
66describe("computeSidebarTaskGroups", () => {
67 test("groups workflow tasks per runId from the first member, separating concurrent runs", () => {

Callers 1

Calls 1

createWorkspaceFunction · 0.70

Tested by

no test coverage detected