Files
t3code/apps/web
Josh Gratton aebb4fa3e5 perf(web): park the local-secondary auto-retry on hosts with no WSL
The renderer's local-secondary reconciler was polling
getLocalEnvironmentBootstraps on a fixed backoff (2s, 4s, 8s, 16s,
30s, 45s, 60s, 60s) regardless of whether the user had any WSL
backend configured. On Windows hosts without WSL enabled that's eight
IPC round-trips plus a setTimeout chain doing zero useful work.

Probe desktopBridge.getWslState() once at module init. When the user
hasn't enabled the WSL backend, latch the auto-retry chain so it
parks. The settings page calls markSecondariesConfigured(state.enabled)
after every WSL toggle so flipping WSL on later wakes the loop back
up.

For users who *do* have WSL enabled, behavior is unchanged: the loop
still rides out the full 4-minute desktop-bootstrap TTL window
covering cold boot.
2026-05-18 11:50:44 -04:00
..
2026-05-15 06:40:13 +00:00