Files
t3code/apps/server
Josh Gratton 08a3f9f94a Merge upstream/main into josh/desktop-wsl-parallel-backends
Re-integrates the WSL parallel-backends renderer onto upstream's rewritten
connection/RPC architecture (#2978), which deleted the saved-env / environmentApi
/ serverState / wsConnectionState subsystem this branch was built on.

Core (packages/client-runtime/connection):
- Add dynamic platform-managed bearer environments: a PlatformConnectionRegistration
  union (Primary|Bearer) and registry.reconcilePlatform(set), which adds/removes
  platform-managed environments as the host topology changes and stashes the bearer
  credential. This models the dual-mode WSL secondary (separate loopback origin,
  bearer auth, dynamic port so it is rederived rather than persisted). The primary
  and the WSL-only primary keep the same-origin cookie path.

Web platform source (apps/web/src/connection/platform.ts):
- Emit the platform set from the plural getLocalEnvironmentBootstraps() IPC: the
  primary (cookie) plus each WSL backend (bearer via bootstrap-token exchange),
  polling and reconciling on toggle. Replaces the deleted 541-line reconciler.

Renderer re-home:
- Drop the old subsystem (environmentApi, rpc/serverState, rpc/wsConnectionState,
  environments/runtime/*, environments/local/*) and their tests.
- Re-home the Sidebar cold-boot indicator, the ConnectionsSettings WSL picker, and
  the multi-environment provider-update feature onto the new hooks (useEnvironments,
  serverEnvironment.updateProvider, the primaryServer* atoms). Desktop-local
  environments are identified by a BearerConnectionTarget with a "local:"
  connection id.
- Drop the inert swap-suppression surface superseded by parallel backends.

Verified: typecheck (web, desktop, client-runtime), connection / provider /
localApi / authBootstrap tests, and lint all pass.
2026-06-19 16:25:39 -04:00
..