Commit Graph
1439 Commits
Author SHA1 Message Date
Josh Gratton 50869788e4 fix(web): surface secondary backend update failures instead of reporting success
The provider-update fan-out dispatches to the primary and every connected
desktopLocal backend, but completion handling only inspected promise
rejections and the primary's instance ids. A secondary backend (e.g. WSL)
whose updateProvider resolved with a failed or unchanged provider in its
payload was silently dropped, so the launch toast and settings flow could
report success while the WSL copy stayed outdated.

- updateProviderAcrossLocalEnvironments now resolves each dispatch to a
  normalized outcome carrying the matched provider snapshot (with its
  terminal updateState) plus isPrimary / environment metadata.
- The launch toast aggregates outcomes across backends to the worst-case
  status per driver, and gates the primary-only serverState effect behind
  an awaitingSettlement flag so it cannot finalize success before every
  dispatched update settles.
- The settings flow surfaces a secondary backend's failed/unchanged result
  via a toast; the primary's own result is already shown inline.
2026-06-13 11:09:14 -04:00
Josh Gratton 76bd75b9f0 fix(server): run provider update commands through the shell on Windows
Provider update executables are package-manager launcher shims (`npm` ->
`npm.cmd`, `pnpm` -> `pnpm.cmd`, etc.). On Windows a bare-name spawn does
not resolve PATHEXT, so `ChildProcess.spawn("npm", ...)` fails with ENOENT,
surfaced to users as "Failed to run update command npm: NotFound". This
broke one-click updates for every npm/pnpm/bun/vp-managed provider on the
Windows backend.

Spawn the maintenance command with `shell: true` on win32 so the shell
resolves the shim, matching how every other provider command is already
spawned (ClaudeProvider, CodexSessionRuntime, CursorProvider, GrokProvider,
opencodeRuntime, AcpSessionRuntime). The update args are a fixed allowlist
of package names, so there is no shell-injection surface.
2026-06-13 10:50:55 -04:00
Josh Gratton 4cb3a5c1d4 fix(web): update providers in every connected local environment, not just the primary
The provider update popover and settings dispatched updateProvider only to the
primary environment (ensureLocalApi). In dual-backend mode that left the WSL (or
any other local secondary) provider un-updated.

Add a small helper that fans the update out to the primary plus every connected
local secondary backend that has the provider configured, looking up each
environment's own instance id (the same driver has a distinct instance id per
environment). Wire it into both dispatch sites and reuse the existing result
aggregation / toasts unchanged. Remote (SSH / relay) environments are skipped.
2026-06-13 10:41:18 -04:00
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 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 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
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 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 f60def2054 Migrate tests to vite-plus test APIs (#2964) 2026-06-05 04:39:19 +00: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
Josh Gratton ae03db4f47 Merge upstream/main into josh/desktop-wsl-parallel-backends
Resolve conflicts from the upstream bun->pnpm+Vite migration (#2899),
relay tunnels (#2837), and proof-key bootstrap auth:

- apps/web/src/environments/primary/auth.ts: upstream switched the
  contracts import to `import type` and added ServerAuthSessionMethod;
  keep that and re-add PRIMARY_LOCAL_ENVIRONMENT_ID as a value import
  (still used at runtime to find the primary bootstrap entry).
- apps/web/src/environments/runtime/catalog.ts: keep both new optional
  fields on SavedEnvironmentRecord (our desktopLocal marker and
  upstream's relayManaged).
- apps/server/src/auth/PairingGrantStore.test.ts: keep upstream's new
  proof-key thumbprint test and our reusable-bootstrap-grant test
  (the desktop bootstrap credential is reusable: remainingUses
  unbounded, 24h TTL).
- apps/web/src/components/settings/ConnectionsSettings.tsx: render both
  the WSL row and upstream's CloudLinkRow in the connected section.
2026-06-04 23:35:04 -04:00
Julius Marminge b5a62504d4 move 2026-06-04 20:05:30 -07:00
Julius Marminge ec18938bf9 Restructure documentation into topical folders (#2963) 2026-06-04 20:03:12 -07:00
Julius Marmingeandcodex 5ae77c0d63 feat(relay): Add managed relay tunnels and APN service (#2837)
Co-authored-by: codex <[email protected]>
2026-06-04 19:53:56 -07:00
Julius MarmingeandJulius Marminge 300f7fd11d [codex] Avoid shell for system executables (#2950)
Co-authored-by: Julius Marminge <[email protected]>
2026-06-04 15:25:46 -07:00
Guilherme Vieira 53042f47f8 fix(composer): support spaces in file mentions (#2625) 2026-06-04 15:19:06 -07:00
Julius MarmingeandJulius Marminge 6ce6f678b5 [codex] Avoid shell for Windows environment probe (#2951)
Co-authored-by: Julius Marminge <[email protected]>
2026-06-04 15:15:26 -07:00
Julius MarmingeandJulius Marminge a74dfd4f3c [codex] Avoid shell for Node executable spawns (#2952)
Co-authored-by: Julius Marminge <[email protected]>
2026-06-04 15:14:07 -07:00
Guilherme VieiraandJulius Marminge 49c1b64687 fix(source-control): handle self-hosted GitLab, multi-account GitHub auth & azure devops web url (#2480)
Co-authored-by: Julius Marminge <[email protected]>
2026-06-04 15:13:04 -07:00
Julius Marminge b0fa60a121 Prevent settings layout shifts with scrollbar gutters (#2960) 2026-06-04 14:31:24 -07:00