Skip to content

fix(desktop): unbreak Companion Desktop Builds and Desktop E2E on main - #51

Merged
acamarata merged 1 commit into
mainfrom
fix/ci-desktop-workflows
Aug 27, 2026
Merged

acamarata merged 1 commit into
mainfrom
fix/ci-desktop-workflows

Conversation

@acamarata

Copy link
Copy Markdown
Contributor

Summary

  • Companion Desktop Builds has never passed since it was added: working-directory: desktop/tauri (and matching artifact paths) never matched the real project location, desktop/src-tauri.
  • Desktop E2E crashed on every one of its 11 tests: App.tsx read process.env.REACT_APP_SENTRY_DSN, a Node global Vite does not polyfill in the browser, throwing before React ever mounted. Switched to import.meta.env.VITE_*, matching main.tsx's existing convention.
  • While tracing why the fixed App.tsx still didn't take effect, found 44 stale compiled .js files committed alongside their .ts/.tsx sources back in May (from a build script that ran bare tsc, which emits without --noEmit/outDir). Vite's resolver prefers .js over .tsx on an extensionless import, so these shadowed the real sources at runtime. Removed them, fixed the build script to tsc --noEmit && vite build, and gitignored src/**/*.js so it can't recur.
  • Raised the E2E job timeout from 8 to 15 minutes — the windows-latest leg was killed by the timeout mid-install on the only run this workflow has had.

Known remaining gap (not fixed here)

Two chat.spec.ts E2E cases still fail: ChatContainer (the real chat UI) is never imported by any route the shipped App.tsx renders, so the placeholder Shell() screen has no chat input for the test to find. That's a pre-existing product/routing gap, not a CI defect — flagging for a follow-up decision on auth/routing state for E2E, not fixing here.

Test plan

  • pnpm typecheck — clean
  • pnpm build — succeeds, no stray .js regenerated
  • pnpm test — 14/14 pass
  • pnpm e2e locally (chromium) — 9/11 pass (was 0/11 before this fix); 2 known failures documented above
  • cargo check in desktop/src-tauri (the corrected path) — compiles clean

Companion Desktop Builds has failed every run since it was added
(2026-03-18): working-directory and artifact paths pointed at
desktop/tauri, but the Tauri project has always lived at
desktop/src-tauri. Point the workflow at the real path.

Desktop E2E (added 2026-08-26, failing on its first and only run)
crashed on every test: App.tsx read process.env.REACT_APP_SENTRY_DSN,
a Node global Vite does not polyfill in the browser, throwing before
React ever mounted. Switch to import.meta.env.VITE_*, matching the
convention main.tsx already uses.

While tracing why Vite served a stale, crash-prone version of App
even after fixing App.tsx, found the actual App.tsx source was dead
code at runtime: 44 compiled .js files were accidentally committed
alongside their .ts/.tsx sources in 5c09667 (2026-05-13), and Vite's
module resolution prefers .js over .tsx on an extensionless import,
so every one of those components ran from a three-month-old snapshot
instead of the maintained source. They exist because desktop's build
script ran bare `tsc` (which emits per tsconfig, no outDir/noEmit)
instead of `tsc --noEmit`. Remove the stray files, fix the script,
and gitignore src/**/*.js so this can't recur.

Also raise the E2E job timeout from 8 to 15 minutes: the windows-latest
leg was killed by the timeout mid-install on the one run this workflow
has had, before it ever reached the test step.

Two chat.spec.ts E2E cases still fail after this fix: ChatContainer,
the real chat UI, is never imported by any route App.tsx renders, so
the placeholder Shell() screen the app actually ships has no chat
input for the test to find. That is a pre-existing product gap (which
auth/routing state an E2E run should exercise), not a CI defect, and
is out of scope here.
@acamarata
acamarata merged commit 1e23ca4 into main Aug 27, 2026
11 of 14 checks passed
@acamarata
acamarata deleted the fix/ci-desktop-workflows branch August 27, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant