fix(client): repair the TypeScript build

`npm run build` runs `tsc -b` first and it has been failing: `api.ts` used
`NamedLock` without importing it, and four lane test fixtures predate
`Lane.active_feature_id` / the widened `LaneRuntime`, so spreading a
`Partial<Lane>` over them no longer satisfied the required fields.

Nothing shipped could be rebuilt while this was red, which is how a client
change reaches a dashboard running in production mode. The fixture fixes are
casts with a note, not type relaxations — the base literals still list every
required field, so the assertion states what they already prove.
This commit is contained in:
2026-08-07 09:52:13 +07:00
parent 8fcef5a10b
commit 201eae68bb
5 changed files with 24 additions and 6 deletions
@@ -34,6 +34,10 @@ vi.mock("../../../lib/api", () => ({
}));
function laneFixture(over: Partial<Lane> = {}): Lane {
// `as Lane`: spreading a Partial<Lane> widens every field it may carry to
// `T | undefined`, which no longer satisfies Lane's required fields. The
// base object below still lists all of them, so the cast asserts what the
// literal already proves.
return {
id: 9,
title: "",
@@ -64,7 +68,7 @@ function laneFixture(over: Partial<Lane> = {}): Lane {
slot: null,
ports: {},
...over,
};
} as Lane;
}
const SUGGESTIONS: CwdSuggestion[] = [