fix(ci): give Companion Desktop Builds pnpm before it runs beforeBuildCommand - #52
Merged
Merged
Conversation
…dCommand Fixing the desktop/tauri -> desktop/src-tauri path (previous commit) let cargo tauri build actually find the project, and it immediately hit the next problem: tauri.conf.json's beforeBuildCommand runs `pnpm build`, but this workflow only ever installed Rust. Every platform in the matrix failed identically with `pnpm: not found`. It also never checked out the nself-org/packages sibling that desktop/package.json's workspace:* dependencies resolve against (pnpm-workspace.yaml globs ../packages/@nself/*), so a bare `pnpm install` here would fail the same way desktop-e2e.yml's did before it added the sibling checkout. Apply the same fix desktop-e2e.yml already uses: check nclaw out to a subdir, check nself-org/packages out beside it, set up Node + pnpm, and install before cargo tauri build runs.
Merged
4 tasks
acamarata
added a commit
that referenced
this pull request
Aug 27, 2026
…col, restore Tailwind (#53) * fix(ci): give Companion Desktop Builds pnpm before it runs beforeBuildCommand Fixing the desktop/tauri -> desktop/src-tauri path (previous commit) let cargo tauri build actually find the project, and it immediately hit the next problem: tauri.conf.json's beforeBuildCommand runs `pnpm build`, but this workflow only ever installed Rust. Every platform in the matrix failed identically with `pnpm: not found`. It also never checked out the nself-org/packages sibling that desktop/package.json's workspace:* dependencies resolve against (pnpm-workspace.yaml globs ../packages/@nself/*), so a bare `pnpm install` here would fail the same way desktop-e2e.yml's did before it added the sibling checkout. Apply the same fix desktop-e2e.yml already uses: check nclaw out to a subdir, check nself-org/packages out beside it, set up Node + pnpm, and install before cargo tauri build runs. * fix(desktop): wire ChatContainer into auth-gated Shell, fix broken chat send Desktop E2E's two chat.spec.ts failures traced back to four separate, compounding regressions, none caused by the other: 1. App.tsx's Shell() never had an 'authenticated' branch. The ea5e077 "native epic complete" rewrite replaced the direct ChatContainer render with an auth-gated title screen but only handled 'loading' and 'unauthenticated' -- a real user who signs in still sees the title screen forever. Added the missing branch. 2. chat-client.ts's chatTransport still spoke the ad hoc `data: {"content": ...}` SSE shape from an older AI SDK version. AI SDK v6's DefaultChatTransport (package.json already pins ai@^6, @ai-sdk/react@^3) requires the UI Message Stream protocol (text-start/text-delta/text-end chunks + the x-vercel-ai-ui-message-stream header) and its strict chunk schema silently drops anything else, so no reply ever reached useChat. It also declared `chatTransport(req: Request)`, but DefaultChatTransport calls its fetch override as fetch(url, init) -- the (Request) form would throw on every call. Fixed both. 3. main.tsx never imported styles/globals.css (the file that pulls in Tailwind), so every Tailwind utility class in the tree was inert -- flex/h-full utilities did nothing, so ChatList's scroll container collapsed to zero height and rendered messages were invisible even after wiring auth and the SDK protocol correctly. 4. globals.css and postcss.config.js were still on Tailwind v3 syntax (`@tailwind` directives, bare `tailwindcss` PostCSS plugin) while tailwindcss@4 was the version actually resolving in the workspace (hoisted from apps/web, which is already on v4's @tailwindcss/postcss convention) -- desktop/package.json never declared tailwindcss, @tailwindcss/postcss, autoprefixer, or @fontsource/inter at all, so the whole CSS pipeline only worked by accident of hoisting. v4's PostCSS plugin rejects the v3 config outright (500 on every request). Migrated to `@import "tailwindcss"` + `@config` (keeping the existing tailwind.config.js as the source of truth for custom colors), fixed postcss.config.js, and declared the CSS toolchain as explicit devDependencies/dependencies instead of relying on hoisting. chat.spec.ts itself also asserted on markup the app never renders: the real composer placeholder is @nself/i18n's "Message ɳClaw…" (desktop.nclaw.messagePlaceholder), not the test's hardcoded "Type a message…", and MessageBubble renders markdown through react-markdown (<p>/<strong>/<code> etc.), never an article/[role=article]/.markdown/.prose wrapper -- that selector could never have matched. Rewrote both assertions against real, current output (real placeholder string; <strong> produced by **bold** through remark-gfm) so they still fail if send-and-render or markdown rendering breaks again. Neither test can exercise a signed-in session without a backend, so a new tests/e2e/fixtures/auth.ts seeds a TokenPair into the same localStorage keys NativeAuthStrategy reads (making the app reach 'authenticated') and stubs window.__TAURI_INTERNALS__ (Playwright drives a plain Chromium window with no Tauri IPC bridge). This restores a harness that existed at 8e21382 and was dropped when chat.spec.ts was later rewritten without it. The stubbed stream_chat reply intentionally returns the same '(stub response)' text the real (still NotImplemented, pending S15.T17) Tauri command would return -- it does not fake more backend behavior than exists. Companion Desktop Builds' pnpm-not-found failure (run 33074963689) is already fixed on origin/main via #52 (cherry-picked here as 2567651); included so this branch is green standalone.
5 tasks
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
Follow-up to #51. That PR fixed the wrong
desktop/tauripath socargo tauri buildcould find the project, but the very next run on main (actions/runs/33074963689) failed identically on all three platforms withpnpm: not found--tauri.conf.json'sbeforeBuildCommand: pnpm buildruns before cargo builds anything, and this workflow never installed Node/pnpm, and never checked out thenself-org/packagessibling thatdesktop/package.json'sworkspace:*deps resolve against.Applied the same checkout-as-siblings + setup-node + pnpm/action-setup pattern
desktop-e2e.ymlalready uses successfully.Test plan
pushtomainorworkflow_dispatch(nopull_requesttrigger), so it will not run as a PR check here.