The WSL parallel-backend runs a Linux node against the same node_modules
the Windows desktop uses (via /mnt/c). Platform-gated optional native
deps -- e.g. @yuuang/ffi-rs-linux-x64-gnu (pulled in transitively) -- are
only fetched for the install host's platform, so a Windows pnpm install
omitted the Linux binaries and the WSL backend crash-looped on
"Cannot find module '@yuuang/ffi-rs-linux-x64-gnu'".
Add supportedArchitectures (current + linux, x64, glibc) so one install
fetches both platforms' native binaries: electron.exe stays for the
Windows desktop while the Linux variants become available to the WSL
backend. This makes every install pull both platforms' optional natives,
which is required for the WSL backend to start.
Catch up to upstream main (b2d17b71). One conflict, in Sidebar.tsx:
upstream relocated the T3Wordmark component, so the merge left a stale
copy of it next to our LocalSecondaryStatus (the WSL "Connecting" banner).
Kept our LocalSecondaryStatus and dropped the duplicate T3Wordmark in
favor of upstream's relocated definition.
Verified: web + desktop typecheck clean.
Per the app's service-definition convention (flagged by macroscope),
inline the standalone *Shape interfaces into their Context.Service type
arguments and drop the separate types:
- DesktopWslBackendShape -> DesktopWslBackend
- DesktopWslEnvironmentShape -> DesktopWslEnvironment
- DesktopBackendOutputLogFactoryShape -> DesktopBackendOutputLogFactory
- DesktopBackendPoolShape -> DesktopBackendPool
Internal and test references updated to X["Service"] (and
["Service"]["register"] / ["unregister"]). Pure type-level move; tags,
members, and runtime behavior are unchanged. Desktop typecheck clean;
affected tests pass.
The desktop backend manager and the SSH tunnel each had their own HTTP
readiness probe. Extract the richer SSH implementation into
@t3tools/shared/httpReadiness as a generic waitForHttpReady parameterized
by a makeError callback, so each caller keeps its own tagged error:
- ssh/tunnel: thin wrapper that still fails with SshReadinessError (tag,
messages, and cause shapes unchanged).
- DesktopBackendManager: delegates to the shared probe, still failing with
BackendTimeoutError; its external signature is unchanged. It picks up the
per-probe timeout + bounded-retry behavior the SSH probe already had.
Verified: shared + ssh + desktop typecheck clean; full ssh suite (25) and
desktop backend tests (14) pass; SshReadinessError is unchanged.
Lint:
- providerMaintenanceRunner: drop the shell:win32 spawn option to match
upstream main (which removed it), clearing the no-global-process-runtime
error. No WSL/desktop behavior change (server-side provider maintenance).
- DesktopBackendConfiguration.test: the runSync-safety test deliberately
uses ManagedRuntime + Effect.runSync to replicate the sync IPC handler's
exact path; add a justified oxlint-disable (converting to it.effect would
mask a regression to async-only resolution).
Normalize internal error classes from Data.TaggedError to
Schema.TaggedErrorClass, matching the app's normalized error style:
BackendTimeoutError, BackendProcessBootstrapEncodeError,
BackendProcessSpawnError, DesktopBackendPoolInstanceAlreadyRegisteredError,
DesktopBackendPoolCannotUnregisterPrimaryError, and
DesktopLogFileWriterConfigurationError. Tags, fields, and messages are
unchanged; this is type-level normalization only.
Verified: desktop + server typecheck clean, full lint green, and the
converted-error tests pass.
Two DesktopBackendManager error classes interpolated cause.message into
their caller-visible message, which violates the convention of deriving
messages from stable structural attributes (never from cause.message) and
leaked raw PlatformError text (command/path) into the message.
Restore the structural context these classes had dropped, and derive the
message from it while keeping the underlying error as cause:
- BackendProcessBootstrapEncodeError carries entryPath; message names it.
- BackendProcessSpawnError carries executablePath; message names it.
Addresses the two Macroscope conventions findings on DesktopBackendManager.
Follow-up to the pending-bootstrap change: a secondary backend whose
preflight failed fatally (no node, wrong version, missing build tools)
has stopped retrying, so reporting it as a pending bootstrap showed an
indefinite "Connecting..." that conflicted with the WSL-state UI already
surfacing the fatal error. Now only mid-registration or transiently
retrying (non-fatal) secondaries are emitted as pending; fatal ones are
dropped as before.
Addresses the Cursor "Stale Connecting after fatal preflight" finding.
getLocalEnvironmentBootstraps dropped secondary (WSL) instances whose
config carried a preflightFailure (or had no config yet), so the sidebar
"Connecting..." indicator -- which is driven by the bootstrap list --
never appeared while a dual-mode WSL backend was retrying transient
preflight.
Emit such secondaries as pending bootstraps with null endpoints (and no
token) instead of dropping them. The renderer surfaces them as
"Connecting..." (the Sidebar bootstrap-list banner) and, because the
endpoints are null, never dials the dead port -- so the
/api/auth/bootstrap/bearer error cycles the drop avoided stay avoided.
The primary instance is still skipped while not ready: it is same-origin
with no connecting affordance to surface.
Addresses the Cursor "WSL sidebar misses preflight boot" finding.
Resolve conflicts from upstream's Effect-service normalization batch while
preserving the WSL parallel-backend feature set.
Key resolutions:
- ipc/methods/window.ts: adopt the DesktopIpc.makeIpcMethod /
DesktopIpc.makeSyncIpcMethod namespace convention; keep our plural
getLocalEnvironmentBootstraps and the getLocalEnvironmentBearerToken
method.
- app/DesktopState.ts: adopt upstream's Context.Service class with
backendReady + quitting. The window keeps its own backendReadyRef, so
state.backendReady is unused but harmless.
- app/DesktopObservability.ts: keep our per-instance
DesktopBackendOutputLogFactory (per-instance backend logs are required
for parallel backends). Drop upstream's newly-extracted single-instance
DesktopBackendOutputLog.ts: zero consumers in this tree, fully
superseded by the factory (primary maps to forInstance(primary), same
server-child.log path).
- backend/DesktopBackendManager.test.ts: keep our factory-based harness.
Upstream's side provisioned the removed DesktopBackendManager.layer
service model (DesktopState / DesktopWindow / DesktopBackendConfiguration
deps), which no longer exists in this tree.
- Adapt DesktopObservability.ts + ipc/methods/wsl.test.ts to upstream's
removal of the standalone DesktopEnvironmentShape export: use
DesktopEnvironment.DesktopEnvironment["Service"] (the normalized form).
Verified: web + desktop typecheck clean; affected desktop tests pass
(DesktopObservability, DesktopBackendPool, DesktopBackendManager, wsl).