fix(hud): clean up TS18048 strict-undefined errors #165

Merged
KofTwentyTwo merged 1 commits from fix/hud-typecheck-strict-undefined into develop 2026-05-13 12:35:51 +00:00
KofTwentyTwo commented 2026-05-13 12:19:41 +00:00 (Migrated from github.com)

Summary

  • Fixes the only real TS18048 ('m' is possibly 'undefined') at webview/packages/hud/src/hud/SegmentedRing.tsx:92. Used a non-null assertion because the loop bound (i < tickCount) and initialMatrices (also derived from tickCount) make initialMatrices[i] provably defined — TS just can't track that relationship.
  • The other ~30 errors reported in CI run 25797533005 were all downstream of TS2307: Cannot find module '@jarvis/bus'. They disappear automatically once pnpm install + bash scripts/build-webview.sh produces the bus package's dist/index.d.ts. CI already runs build-webview.sh before typecheck (see ci.yml comments), so no further changes needed.

Verification

  • pnpm -r typecheck exits 0 (was: 30+ errors).
  • pnpm -r test — 138 tests passing across 13 test files.
  • bash scripts/check-app-builds.sh — App target compiles cleanly.
  • All 18 boundary gates green.

Follow-up

Once this lands, a one-line follow-up should flip continue-on-error: true → false on the Typecheck step in .github/workflows/ci.yml (line ~around the typecheck step) to make typecheck blocking. Held back from this PR to avoid conflict with the parallel CI Green Doctor agent.

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

## Summary - Fixes the only real TS18048 (`'m' is possibly 'undefined'`) at `webview/packages/hud/src/hud/SegmentedRing.tsx:92`. Used a non-null assertion because the loop bound (`i < tickCount`) and `initialMatrices` (also derived from `tickCount`) make `initialMatrices[i]` provably defined — TS just can't track that relationship. - The other ~30 errors reported in CI run 25797533005 were all downstream of `TS2307: Cannot find module '@jarvis/bus'`. They disappear automatically once `pnpm install` + `bash scripts/build-webview.sh` produces the bus package's `dist/index.d.ts`. CI already runs `build-webview.sh` before typecheck (see ci.yml comments), so no further changes needed. ## Verification - `pnpm -r typecheck` exits 0 (was: 30+ errors). - `pnpm -r test` — 138 tests passing across 13 test files. - `bash scripts/check-app-builds.sh` — App target compiles cleanly. - All 18 boundary gates green. ## Follow-up Once this lands, a one-line follow-up should flip `continue-on-error: true` → `false` on the Typecheck step in `.github/workflows/ci.yml` (line ~around the typecheck step) to make typecheck blocking. Held back from this PR to avoid conflict with the parallel CI Green Doctor agent. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign in to join this conversation.