fix(desktop): unbreak Companion Desktop Builds and Desktop E2E on main - #51
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
working-directory: desktop/tauri(and matching artifact paths) never matched the real project location,desktop/src-tauri.App.tsxreadprocess.env.REACT_APP_SENTRY_DSN, a Node global Vite does not polyfill in the browser, throwing before React ever mounted. Switched toimport.meta.env.VITE_*, matchingmain.tsx's existing convention.App.tsxstill didn't take effect, found 44 stale compiled.jsfiles committed alongside their.ts/.tsxsources back in May (from abuildscript that ran baretsc, which emits without--noEmit/outDir). Vite's resolver prefers.jsover.tsxon an extensionless import, so these shadowed the real sources at runtime. Removed them, fixed the build script totsc --noEmit && vite build, and gitignoredsrc/**/*.jsso it can't recur.windows-latestleg was killed by the timeout mid-install on the only run this workflow has had.Known remaining gap (not fixed here)
Two
chat.spec.tsE2E cases still fail:ChatContainer(the real chat UI) is never imported by any route the shippedApp.tsxrenders, so the placeholderShell()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— cleanpnpm build— succeeds, no stray.jsregeneratedpnpm test— 14/14 passpnpm e2elocally (chromium) — 9/11 pass (was 0/11 before this fix); 2 known failures documented abovecargo checkindesktop/src-tauri(the corrected path) — compiles clean