fix(web): production-build type errors (tsc -b caught what --noEmit missed)
Test-file TeamSnapshot literals needed the new `domain` field, api.test used L1: null (now a string), and LiveBoardFeed's NodeActivityKind map was missing the `fallback` key. tsc --noEmit + vitest passed these (vitest doesn't type-check; the no-emit config skipped the test files that tsc -b checks); the vite build did not. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
6d94833bb9
commit
e2ce67f069
@@ -8,6 +8,7 @@ const KIND_DOT: Record<NodeActivityKind, string> = {
|
|||||||
flash: 'bg-primary',
|
flash: 'bg-primary',
|
||||||
error: 'bg-destructive',
|
error: 'bg-destructive',
|
||||||
response: 'bg-teal',
|
response: 'bg-teal',
|
||||||
|
fallback: 'bg-amber',
|
||||||
}
|
}
|
||||||
|
|
||||||
const TALLY: { key: keyof NodeFeed['counts']; label: string }[] = [
|
const TALLY: { key: keyof NodeFeed['counts']; label: string }[] = [
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ const base: TeamSnapshot = {
|
|||||||
id: 't1',
|
id: 't1',
|
||||||
name: 'team_resonance',
|
name: 'team_resonance',
|
||||||
kit: 'KIT-03',
|
kit: 'KIT-03',
|
||||||
|
domain: 'structural stress',
|
||||||
members: ['a'],
|
members: ['a'],
|
||||||
phases: { reg: true, setup: true, m1: false, m2: false, add: false },
|
phases: { reg: true, setup: true, m1: false, m2: false, add: false },
|
||||||
stats: { calls: 12, nominal: 8, anomalous: 3, critical: 1 },
|
stats: { calls: 12, nominal: 8, anomalous: 3, critical: 1 },
|
||||||
|
|||||||
+2
-1
@@ -13,6 +13,7 @@ const snapshot: TeamSnapshot = {
|
|||||||
id: 'team-1',
|
id: 'team-1',
|
||||||
name: 'team_x',
|
name: 'team_x',
|
||||||
kit: 'KIT-01',
|
kit: 'KIT-01',
|
||||||
|
domain: '',
|
||||||
members: ['a'],
|
members: ['a'],
|
||||||
phases: { reg: true, setup: false, m1: false, m2: false, add: false },
|
phases: { reg: true, setup: false, m1: false, m2: false, add: false },
|
||||||
stats: { calls: 0, nominal: 0, anomalous: 0, critical: 0 },
|
stats: { calls: 0, nominal: 0, anomalous: 0, critical: 0 },
|
||||||
@@ -49,7 +50,7 @@ describe('api client', () => {
|
|||||||
teamId: 'team-1',
|
teamId: 'team-1',
|
||||||
teamName: 'team_x',
|
teamName: 'team_x',
|
||||||
code: 'KIT-01-AAA',
|
code: 'KIT-01-AAA',
|
||||||
add: { L1: null, L2: '', L3: '', L4: '', L5: '' },
|
add: { L1: '', L2: '', L3: '', L4: '', L5: '' },
|
||||||
submittedAt: '2026-07-27T18:00:00.000Z',
|
submittedAt: '2026-07-27T18:00:00.000Z',
|
||||||
})
|
})
|
||||||
expect(res.teamId).toBe('team-1')
|
expect(res.teamId).toBe('team-1')
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ const team = (id: string): TeamSnapshot => ({
|
|||||||
id,
|
id,
|
||||||
name: `team ${id}`,
|
name: `team ${id}`,
|
||||||
kit: 'KIT-01',
|
kit: 'KIT-01',
|
||||||
|
domain: '',
|
||||||
members: [],
|
members: [],
|
||||||
phases: { reg: true, setup: false, m1: false, m2: false, add: false },
|
phases: { reg: true, setup: false, m1: false, m2: false, add: false },
|
||||||
stats: { calls: 0, nominal: 0, anomalous: 0, critical: 0 },
|
stats: { calls: 0, nominal: 0, anomalous: 0, critical: 0 },
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ const team = (i: number): TeamSnapshot => ({
|
|||||||
id: `t${i}`,
|
id: `t${i}`,
|
||||||
name: `team ${i}`,
|
name: `team ${i}`,
|
||||||
kit: `KIT-${String(i).padStart(2, '0')}`,
|
kit: `KIT-${String(i).padStart(2, '0')}`,
|
||||||
|
domain: '',
|
||||||
members: [],
|
members: [],
|
||||||
phases: { reg: true, setup: false, m1: false, m2: false, add: false },
|
phases: { reg: true, setup: false, m1: false, m2: false, add: false },
|
||||||
stats: { calls: 0, nominal: 0, anomalous: 0, critical: 0 },
|
stats: { calls: 0, nominal: 0, anomalous: 0, critical: 0 },
|
||||||
|
|||||||
Reference in New Issue
Block a user