Commit Graph
1641 Commits
Author SHA1 Message Date
Josh Gratton 70db2edcde fix(desktop): repair the WSL backend's PATH so provider CLIs resolve
The WSL server spawns provider update commands (e.g. `npm install -g
@openai/codex@latest`) by name, but `wsl.exe -- node` leaves the resolved Node's
bin dir off the process PATH, so npm/npx (and the installed CLIs like codex)
weren't found and the update failed with "npm: NotFound". Provider maintenance
already runs per-backend server, so this broke updates for every provider in the
WSL backend, and in WSL-only mode there's no Windows fallback to mask it.

Launch the WSL server through a shell that front-loads the resolved Node's bin
dir (plus the standard system dirs) onto PATH, then `exec` the same absolute
Node. exec preserves fd 0, so the bootstrap-over-stdin delivery is unchanged.
npm/npx and globally-installed provider CLIs now resolve to the distro's Node
toolchain.

Verified on a packaged build in WSL-only mode: the backend still starts cleanly
through the shell wrapper, and the server's PATH resolves and runs npm.
2026-06-13 09:41:52 -04:00
Josh Gratton ad2a0959c3 fix(desktop): preflight a WSL server dependency so a missing-deps regression fails safe
The WSL preflight only validated node-pty, so when the server's externalized
node_modules wasn't readable by WSL's Node (the ERR_MODULE_NOT_FOUND bug),
preflight passed and wsl-only mode failed to launch with no Windows fallback.

Add a server-dependency canary to the probe: resolve "effect" (the framework
every server module imports) from the server directory, which validates the
whole node_modules tree is present on the WSL filesystem. On failure (exit 3,
kept distinct from a node-pty problem) report a fatal preflight failure, so
wsl-only mode falls back to Windows and dual mode surfaces the reason inline,
instead of the server crash-looping on ERR_MODULE_NOT_FOUND once it launches.
2026-06-12 14:51:02 -04:00
Josh Gratton bbb7ba7b07 fix(desktop): unpack the full node_modules tree for the WSL backend
The WSL backend launches the server with the distro's own Linux Node, which
can't read inside app.asar. asarUnpack only covered the server bundle and
node-pty, but bin.mjs externalizes its runtime dependencies (effect, @effect/*,
...) to node_modules rather than inlining them. So the Linux Node crashed with
ERR_MODULE_NOT_FOUND ("Cannot find package 'effect'") before it even reached
node-pty, which left WSL-only mode unable to launch (the node-pty preflight had
already passed, so there was no Windows fallback).

Unpack the whole node_modules tree so every server import resolves on the real
filesystem. The Windows primary keeps reading the same files through the asar
via ELECTRON_RUN_AS_NODE, so there's no duplication.
2026-06-12 14:22:24 -04:00
Josh Gratton 185032bd17 fix(desktop): tighten WSL environment affordances per review
- Connections settings: disable Connect/Disconnect and Remove on the WSL
  backend's row. It's a desktop-managed local backend, not a remote environment
  you connect to or remove here, and reconcile would just re-create a removed
  one. Added a tooltip pointing at the WSL on/off setting that actually manages
  its lifecycle.
- Command palette: drop the dedicated "Open WSL folder" command. The generic
  "Add project" flow already offers the WSL-vs-Windows environment picker, so a
  WSL-only shortcut with no Windows counterpart was redundant and asymmetric.
2026-06-12 08:48:05 -04:00
Josh Gratton 6ad3acccd1 ci(release): don't block macOS/Linux builds on the WSL node-pty prebuild
The build matrix gated every entry on build_wsl_node_pty succeeding, but only
the Windows artifact consumes the Linux node-pty prebuild, so a failed prebuild
would skip the macOS and Linux builds too. Gate the build job on preflight and
relay only (via !cancelled() instead of !failure()); build_wsl_node_pty stays in
needs for ordering and the Windows-only download step fails just that platform
when the prebuild is missing.
2026-06-10 20:50:53 -04:00
Josh Gratton da782dadd8 fix(desktop): ship a prebuilt Linux node-pty for the packaged WSL backend
In packaged builds the server bundle and node-pty were sealed inside app.asar,
which the WSL backend's Linux Node cannot read, so the WSL backend never started
in release builds. It dead-ended on a misleading "node-pty not prepared / run
prepare:wsl" error. node-pty also publishes no Linux prebuilt, and the Windows
artifact is built on a Windows CI runner that cannot compile one.

- asarUnpack the server bundle and node-pty, and point the WSL backend at the
  app.asar.unpacked sibling. The Windows primary still reads app.asar via
  ELECTRON_RUN_AS_NODE, so it is unaffected and there is no payload duplication.
- Build the Linux pty.node in a dedicated Linux CI job and hand it to the
  Windows packaging job as an artifact. build-desktop-artifact stages it into
  node-pty/prebuilds/linux-<arch>/ with a marker, so the packaged app ships a
  ready binary and needs no compiler, node-gyp, or network on first launch.
- node-pty is N-API, so one Linux binary works across all WSL Node versions;
  drop the modules ABI comparison from the preflight probe accordingly.
- Runtime compile is now dev-only (allowBuild: !isPackaged). In packaged builds
  a prebuilt that cannot load surfaces a clear arch/distro diagnostic instead of
  nagging for build tools or silently compiling.
2026-06-10 20:44:48 -04:00
Josh Gratton 0bb1553690 Merge remote-tracking branch 'upstream/main' into josh/desktop-wsl-parallel-backends 2026-06-09 14:09:54 -04:00
t3-code[bot] 983a8c7fa6 chore(release): prepare v0.0.26 2026-06-09 17:53:22 +00:00
Julius Marmingeandcodex de58ec8e24 Add Claude Fable 5 model (#3009)
Co-authored-by: codex <[email protected]>
2026-06-09 17:39:18 +00:00
Julius Marmingeandcodex 8e6f4229da [codex] Fix main CI Effect test runtimes (#3008)
Co-authored-by: codex <[email protected]>
2026-06-09 09:43:03 -07:00
Milosz JankiewiczandJulius Marminge 38ea6d483e feat(grok): add Grok CLI provider via ACP (#2809)
Co-authored-by: Julius Marminge <[email protected]>
2026-06-09 09:28:40 -07:00
Julius Marmingeandcodex 0e4a43519f [codex] Extract infrastructure, telemetry, and test tooling (#2994)
Co-authored-by: codex <[email protected]>
2026-06-07 20:21:47 -07:00
Josh Gratton 3d041336ad fix(desktop): clear WSL-only state when disabling WSL 2026-06-07 18:03:37 -04:00
Josh Gratton e560f70f25 fix(desktop): keep WSL fallback state in memory 2026-06-07 17:53:04 -04:00
Josh Gratton 382d699cdd fix(desktop): relaunch when enabling WSL-only backend 2026-06-07 17:31:55 -04:00
Josh Gratton 495c2dd046 fix(desktop): clear stale WSL readiness state 2026-06-07 17:22:46 -04:00
Josh Gratton b7bbad9faf fix(desktop): pass WSL node engine range to resolver 2026-06-07 17:13:59 -04:00
Josh Gratton d72c85a888 fix(desktop): retry idle WSL backend after preflight cap 2026-06-07 13:28:19 -04:00
Josh Gratton ac4d02ee63 fix(web): retry local secondary registration after connect failure 2026-06-07 13:11:47 -04:00
Josh Gratton aba2f1b9c8 fix(desktop): reuse SSH node resolver for WSL 2026-06-07 12:58:01 -04:00
Josh Gratton fe77570b5b fix(desktop): surface WSL preflight failures cleanly 2026-06-07 12:56:48 -04:00
Josh Gratton 383d41c1d1 fix(desktop): cap WSL preflight failures, surface them, fall back to Windows
A fatal WSL preflight failure (no node, wrong version, missing build tools)
used to reschedule the backend forever with no cap and no UI, so in wsl-only
mode the app sat invisible (no onReady, no window) retrying a setup that can't
fix itself.

Classify preflight failures as fatal vs transient. Transient ones (WSL cold-
starting, wslpath while the VM boots) keep retrying so the backend self-heals.
Fatal ones stop after MAX_PREFLIGHT_FAILURE_ATTEMPTS and fire onPreflightFailed.
On the primary the pool wires that to show an error dialog and persist Windows
mode, so the manager's next restart re-resolves the primary as Windows and a
window opens instead of hanging.
2026-06-07 11:58:52 -04:00
Josh Gratton 19c2146453 fix(desktop): resolve nvm/fnm/asdf-managed node for the WSL backend
The WSL preflight ran probes via 'bash -l -s' and the backend launched bare
'node' via 'wsl.exe -- node'. Both miss version-manager-installed node: nvm/
fnm/asdf/volta hook in below the interactive guard at the bottom of .bashrc,
which a non-interactive login shell returns before reaching, and a bare
'wsl.exe -- node' uses the non-login PATH. So wsl-only mode failed preflight
(or launched the wrong node) for the common nvm setup.

Source the managers explicitly via a preamble prepended to every WSL probe,
resolve the absolute node path the preflight validated, and launch with that
exact path so preflight and launch agree on one node.
2026-06-07 11:41:25 -04:00
Josh Gratton 6ebdc74cb2 Merge remote-tracking branch 'upstream/main' into josh/desktop-wsl-parallel-backends
# Conflicts:
#	apps/web/src/components/CommandPalette.tsx
2026-06-06 13:03:53 -04:00
Julius Marmingeandcodex 3ea6adf17d [codex] Enrich relay authorization diagnostics (#2977)
Co-authored-by: codex <[email protected]>
2026-06-05 18:01:34 -07:00
Julius Marminge a56496c7f2 Annotate relay error spans with schema fields (#2976) 2026-06-05 16:35:14 -07:00
b76f161d55 fix(desktop): stop looping macOS TCC permission prompts (#2745)
Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
2026-06-05 12:07:18 -07:00
Peter Hozák 75257d64e9 "claude system message" instead of "runtime warning" when using 4.8 from claude code (#2972) 2026-06-05 11:27:37 -07:00
Abdul AzeezandJulius Marminge e1ce9f8500 fix: handle Claude Agent SDK 0.3.x system messages to stop runtime-warning flood (#2872)
Co-authored-by: Julius Marminge <[email protected]>
2026-06-05 18:26:32 +00:00
Julius Marminge 602148f8fe fix(cloud): use Electron fetch for proxying Clerk IPC requests (#2973) 2026-06-05 11:08:34 -07:00
Josh Gratton bd82399cca refactor(desktop): use Effect.orElseSucceed for WSL probe fallbacks
Align the four list/path/IP/home probe fallbacks with the convention
upstream adopted in #2968: replace Effect.catch(() => Effect.succeed(x))
with the more direct Effect.orElseSucceed(() => x). Behavior is
identical (recover from the error channel with a default); silences the
new catchToOrElseSucceed lint.
2026-06-05 14:00:27 -04:00
Josh Gratton 3ca0696b95 test: point WSL test imports at vite-plus/test after upstream sync
Upstream #2964 migrated the workspace test imports from "vitest" to
"vite-plus/test" and dropped vitest as a resolvable module. Our WSL
test files predate that migration and still imported from "vitest",
which broke typecheck (TS2307) after merging main. Repoint them.
2026-06-05 13:51:07 -04:00
Josh Gratton adaa1839ed Merge remote-tracking branch 'upstream/main' into josh/desktop-wsl-parallel-backends 2026-06-05 13:43:46 -04:00
Josh Gratton 7d15110e65 fix(desktop): preserve existing WSLENV verbatim when forwarding secrets
mergeWslEnv split the user's WSLENV on every colon and re-serialized it,
collapsing empty :: segments, trimming, and de-duplicating entries. That
diverged the forwarded value from what the user configured on Windows.
Keep the existing WSLENV byte-for-byte and only append the secret names
we forward that aren't already declared. Empty segments are WSL no-ops,
so nothing stopped forwarding, but verbatim preservation matches intent
(and the test name) and removes the surprise.
2026-06-05 09:08:15 -04:00
Josh Gratton 56c0512666 fix(desktop): tolerate numeric networkInterfaces family in mirrored-mode detection
isLocalHostIpv4 matched interface family against the string IPv4 only.
Some Node builds report family as the numeric 4 (Electron 41 / Node 22
reports the string, but the representation has varied across versions),
which would make mirrored-mode detection silently miss and leave the
renderer pointed at the distro IP instead of loopback. Normalize via
String() and accept either form.
2026-06-05 08:49:51 -04:00
Julius Marminge 92be60e7c1 include @latest 2026-06-04 23:01:09 -07:00
Julius Marminge 0d6e9e9add we support cursor, duhhh 2026-06-04 23:00:40 -07:00
Julius Marminge 8ab58a0b26 tip 2026-06-04 22:59:28 -07:00
Julius Marminge 6f42bd9c88 cleanup 2026-06-04 22:58:53 -07:00
Julius Marminge 5b26bd408b link 2026-06-04 22:57:04 -07:00
Julius Marminge c04d15d3be document vp instead of mise 2026-06-04 22:56:18 -07:00
Julius Marminge 9da430c828 Refactor recoverable Effect fallbacks to orElseSucceed (#2968) 2026-06-05 05:47:56 +00:00
Julius Marminge a084fbbc0a Remove duplicate 'publish' argument in CLI script 2026-06-04 22:39:59 -07:00
Julius Marminge b870a6e349 Rename function for publishing arguments to vp pm (#2967) 2026-06-05 05:22:37 +00:00
Julius Marminge e1cb19b55b Use pnpm for server publish workflow (#2966) 2026-06-04 22:16:52 -07:00
Julius Marminge 94fc117561 publish deploy status on relay deploy workflow 2026-06-04 21:47:12 -07:00
Julius Marminge 113b9d84c7 remove vp staged 2026-06-04 21:41:54 -07:00
Julius Marminge f60def2054 Migrate tests to vite-plus test APIs (#2964) 2026-06-05 04:39:19 +00:00
Julius Marminge eda163ca17 bump alchemy to fix drizzle schema out attempt 2 2026-06-04 21:03:05 -07:00
Josh Gratton 993261f53f fix(desktop): call handleBackendReady with URL in off-origin nav test
The merge combined our handleBackendReady(httpBaseUrl) signature change
with an upstream-added test that still yielded it as a bare Effect.
Pass the resolved URL like the other call site so the merged test
typechecks against the function form.
2026-06-04 23:49:36 -04:00