feat(lanes): add pipeline-template picker to the Workspace lane header
Lets a lane's pipeline template be switched live from the dashboard (the same PATCH /api/lanes/:id the CLI's `ccam lanes pipeline` uses), so lanes created before the picker shipped don't need the terminal. Both ship-feature skills now force their own template before their first `ccam stage` call, so the human never has to pick correctly at lane creation.
This commit is contained in:
@@ -41,6 +41,10 @@ vi.mock("../../lib/api", async (importOriginal) => {
|
||||
send: r({ messageId: "m-1" }),
|
||||
kill: r({ ok: true }),
|
||||
},
|
||||
lanes: {
|
||||
list: r({ lanes: [], counts: { total: 0, running: 0, needs_you: 0, dead: 0 } }),
|
||||
pipelines: r({ pipelines: [] }),
|
||||
},
|
||||
ccConfig: {
|
||||
commands: r({ items: [] }),
|
||||
plugins: r({ plugins: [] }),
|
||||
|
||||
@@ -105,6 +105,15 @@ vi.mock("../../lib/api", async (importOriginal) => {
|
||||
recordCall("POST", `/api/lanes/stage`);
|
||||
return { ok: true };
|
||||
}),
|
||||
pipelines: vi.fn().mockImplementation(async () => {
|
||||
recordCall("GET", "/api/lanes/pipelines");
|
||||
return { pipelines: [{ id: "default", name: "default", nodes: [] }] };
|
||||
}),
|
||||
update: vi.fn().mockImplementation(async (id: number, patch: Record<string, unknown>) => {
|
||||
recordCall("PATCH", `/api/lanes/${id}`);
|
||||
const lane = lanesToReturn.find((l) => l.id === id);
|
||||
return { lane: { ...lane, ...patch } };
|
||||
}),
|
||||
features: {
|
||||
list: vi.fn().mockImplementation(async (id: number) => {
|
||||
recordCall("GET", `/api/lanes/${id}/features`);
|
||||
|
||||
@@ -387,6 +387,7 @@ vi.mock("../../lib/api", async (importOriginal) => {
|
||||
create: r({ lane: {} }),
|
||||
update: r({ lane: {} }),
|
||||
stage: r({ lane: {} }),
|
||||
pipelines: r({ pipelines: [] }),
|
||||
// A realistic shape: `{}` would crash blockingReason on `blocked` if any
|
||||
// screen ever opened the destructive modal.
|
||||
preflight: r({
|
||||
|
||||
Reference in New Issue
Block a user