ci(actions): fix typecheck/build order + share webview artifact #161

Merged
KofTwentyTwo merged 1 commits from ci/fix-typecheck-and-spm-deps into develop 2026-05-13 11:55:50 +00:00
KofTwentyTwo commented 2026-05-13 11:55:39 +00:00 (Migrated from github.com)

Summary

Three surgical fixes to `.github/workflows/ci.yml` from the first develop-push validation cycle after PR #154 landed.

1. Webview typecheck order

`pnpm -r typecheck` was running before `pnpm -r build`, so `packages/hud` TS imports of `@jarvis/bus` failed with `TS2307: Cannot find module '@jarvis/bus'`. The build emits `packages/bus/dist/index.d.ts` which typecheck needs.

Fix: Reordered to install → build → typecheck → test. Build step now invokes `bash scripts/build-webview.sh` so the production-stamped bundle lands at `App/Resources/webview/`.

2. SPM tests need the webview HUD bundle

6 packages (`AgentCore`, `Bus`, `Harness`, `MCP`, `Voice`, `VoiceLog`) failed with `Error: bus not mounted` because Bus + downstream test fixtures mount a real `WKWebView` that loads `App/Resources/webview/index.html`. CI didn't produce that file.

Fix: Added `needs: [webview]` to `swift-packages` + an `actions/download-artifact@v4` step that pulls the new `webview-resources` artifact to `App/Resources/webview/`.

3. app-build no longer rebuilds the webview

Was running `bash scripts/build-webview.sh` inline (which needs pnpm + node setup — extra 30-60s of runner time).

Fix: Same artifact download as swift-packages. One webview build serves all consumers.

Artifact rename

Renamed from `webview-dist` (raw `packages/hud/dist/` contents) to `webview-resources` (the production-stamped `App/Resources/webview/` tree). No external consumers — the old name was added in #154 the day prior, so it's a clean rename.

Test plan

  • After merge: develop push triggers CI workflow.
  • Webview job: `pnpm -r typecheck` succeeds (was failing).
  • SPM Bus job: `swift test` green (was 4 failures with bus-not-mounted).
  • SPM AgentCore / Harness / MCP / Voice / VoiceLog: green (were failing).
  • App target job: still builds with the downloaded artifact.

🤖 Generated with Claude Code

## Summary Three surgical fixes to \`.github/workflows/ci.yml\` from the first develop-push validation cycle after PR #154 landed. ### 1. Webview typecheck order \`pnpm -r typecheck\` was running before \`pnpm -r build\`, so \`packages/hud\` TS imports of \`@jarvis/bus\` failed with \`TS2307: Cannot find module '@jarvis/bus'\`. The build emits \`packages/bus/dist/index.d.ts\` which typecheck needs. **Fix:** Reordered to install → build → typecheck → test. Build step now invokes \`bash scripts/build-webview.sh\` so the production-stamped bundle lands at \`App/Resources/webview/\`. ### 2. SPM tests need the webview HUD bundle 6 packages (\`AgentCore\`, \`Bus\`, \`Harness\`, \`MCP\`, \`Voice\`, \`VoiceLog\`) failed with \`Error: bus not mounted\` because Bus + downstream test fixtures mount a real \`WKWebView\` that loads \`App/Resources/webview/index.html\`. CI didn't produce that file. **Fix:** Added \`needs: [webview]\` to \`swift-packages\` + an \`actions/download-artifact@v4\` step that pulls the new \`webview-resources\` artifact to \`App/Resources/webview/\`. ### 3. app-build no longer rebuilds the webview Was running \`bash scripts/build-webview.sh\` inline (which needs pnpm + node setup — extra 30-60s of runner time). **Fix:** Same artifact download as swift-packages. One webview build serves all consumers. ### Artifact rename Renamed from \`webview-dist\` (raw \`packages/hud/dist/\` contents) to \`webview-resources\` (the production-stamped \`App/Resources/webview/\` tree). No external consumers — the old name was added in #154 the day prior, so it's a clean rename. ## Test plan - [ ] After merge: develop push triggers CI workflow. - [ ] Webview job: \`pnpm -r typecheck\` succeeds (was failing). - [ ] SPM Bus job: \`swift test\` green (was 4 failures with bus-not-mounted). - [ ] SPM AgentCore / Harness / MCP / Voice / VoiceLog: green (were failing). - [ ] App target job: still builds with the downloaded artifact. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.