feat(FN-2726): add bulk node override support in dashboard workflows

- Extend batch task update APIs and route handlers to accept nodeId overrides alongside model settings
- Update ListView bulk edit UX to load nodes and apply node overrides through batch updates
- Add node routing visibility improvements in task detail/settings UI and align related labels/styles
- Expand dashboard/API test coverage for node override batch updates and bulk edit behavior
This commit is contained in:
Fusion
2026-04-28 13:37:37 -07:00
committed by gsxdsm
parent 5414b8a0c7
commit 35694005ef
12 changed files with 445 additions and 163 deletions

View File

@@ -823,6 +823,56 @@ describe("batchUpdateTaskModels", () => {
);
});
it("includes nodeId when provided", async () => {
const mockResponse = { updated: [{ id: "FN-001", nodeId: "node-abc" }], count: 1 };
(globalThis.fetch as ReturnType<typeof vi.fn>).mockResolvedValue(
mockFetchResponse(true, mockResponse)
);
const { batchUpdateTaskModels } = await import("../api");
await batchUpdateTaskModels(
["FN-001"],
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
"node-abc",
"proj-123"
);
expect(globalThis.fetch).toHaveBeenCalledWith(
"/api/tasks/batch-update-models?projectId=proj-123",
expect.objectContaining({
body: JSON.stringify({
taskIds: ["FN-001"],
nodeId: "node-abc",
}),
})
);
});
it("includes null nodeId when clearing override", async () => {
const mockResponse = { updated: [{ id: "FN-001" }], count: 1 };
(globalThis.fetch as ReturnType<typeof vi.fn>).mockResolvedValue(
mockFetchResponse(true, mockResponse)
);
const { batchUpdateTaskModels } = await import("../api");
await batchUpdateTaskModels(["FN-001"], undefined, undefined, undefined, undefined, undefined, undefined, null);
expect(globalThis.fetch).toHaveBeenCalledWith(
"/api/tasks/batch-update-models",
expect.objectContaining({
body: JSON.stringify({
taskIds: ["FN-001"],
nodeId: null,
}),
})
);
});
it("throws on 400 validation error", async () => {
(globalThis.fetch as ReturnType<typeof vi.fn>).mockResolvedValue(
mockFetchResponse(false, { error: "taskIds must be an array" }, 400)