Repository navigation
Commit 00b200c
committed
fix(desktop): recover from unavailable WSL and don't false-fail slow swaps
Two bugbot reports on the WSL backend flow:
High - "WSL off hides recovery control": when persisted wslMode is "wsl"
but WSL is unavailable (wsl.exe removed, no distro), backend resolution
still took the WSL spawn path and looped on preflight failures, while the
Connections "Backend runtime" row is hidden whenever WSL is unavailable -
leaving no in-app way back to Windows. resolveBackendStartConfig now
checks wslEnvironment.isAvailable and falls back to the Windows backend
(logging a warning) when WSL was requested but isn't usable. Added a
regression test asserting the Windows path is taken in that case.
Medium - "Six minute cap false failure": the swap wrapped setWslBackend +
reauth + welcome wait in one 6-minute Promise.race, so a slow-but-
successful swap could trip the ceiling during reauth/sync and surface
"Backend swap took too long" even though the backend already switched
(and getWslState would show the new mode). Track a swapCommitted flag set
once setWslBackend returns; when the global ceiling fires after commit,
report the switch as done with the still-syncing caveat instead of a hard
failure. Genuine pre-commit failures (aborted false, or setWslBackend
throwing) still take the error path.1 parent 0b5f35d commit 00b200c
3 files changed
Lines changed: 83 additions & 3 deletions
File tree
- apps
- desktop/src/backend
- web/src/components/settings
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
265 | 301 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
214 | 228 | | |
215 | 229 | | |
216 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2442 | 2442 | | |
2443 | 2443 | | |
2444 | 2444 | | |
2445 | | - | |
2446 | | - | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
2447 | 2451 | | |
| 2452 | + | |
2448 | 2453 | | |
2449 | 2454 | | |
2450 | 2455 | | |
2451 | 2456 | | |
| 2457 | + | |
2452 | 2458 | | |
2453 | 2459 | | |
2454 | 2460 | | |
| |||
2501 | 2507 | | |
2502 | 2508 | | |
2503 | 2509 | | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
2504 | 2534 | | |
2505 | 2535 | | |
2506 | 2536 | | |
| |||
0 commit comments