fix(api): align frontend with project-scoped backend

Use project-scoped endpoints and run IDs for current project, SCADA metadata, historical time series, migrated DMA results, and sensor placement runs.

The regressions recurred because tests mocked pre-interceptor and new-only payload shapes, while history queries relied on implicit global scheme state and unbounded request fan-out. Cover post-interceptor pages, migrated result_rows, explicit run_id routing, multi-element requests, request limits, and cancellation.
This commit is contained in:
2026-09-01 14:37:51 +08:00
parent 0dad61ff1f
commit 29b8babd68
28 changed files with 1512 additions and 3494 deletions
@@ -31,9 +31,12 @@ const run = {
describe("sensor placement runs API adapter", () => {
beforeEach(() => jest.clearAllMocks());
it("lists paged runs and maps run fields to the existing screen model", async () => {
it.each([
["contract page", { items: [run], total: 1, limit: 1000, offset: 0 }],
["interceptor-unwrapped page", [run]],
])("maps runs from the %s response", async (_label, data) => {
jest.mocked(api.get).mockResolvedValue({
data: { items: [run], total: 1, limit: 1000, offset: 0 },
data,
});
await expect(listSensorPlacementSchemes()).resolves.toEqual([