8.6 KiB
PR Simplification TODO
-
[High][S] Remove fake WSL
.invalidserver entries frompackages/desktop-electron/src/renderer/index.tsx; only include ready WSL servers inservers(). -
[High][S] Delete
isPlaceholderServerUrlusage/guards after removing fake WSL servers:server-health.ts,context/server.tsx,dialog-select-server.tsx,status-popover-body.tsx,app.tsx. -
[High][S] Remove destructive missing-distro auto-delete in
packages/desktop-electron/src/main/wsl-servers.ts; mark runtime failed and let the user remove it manually. -
[High][S] Revisit(Skipped for now)versionOlderThan()indialog-select-server.tsx; keep newer-vs-older semantics or move comparison to backend state. -
[High][S] Remove
dismissOutsideshared UI prop and usage; it is one-off and incomplete because Escape still closes globally. -
[High][S] Remove
cachedServerStatusfromdialog-select-server.tsx;useCheckServerHealth()already caches and this cache can go stale across credential edits. -
[High][S] Remove
pendingSelectKeyWSL selection sync fromdialog-select-server.tsx; select immediately if present or close/let list refresh. -
[High][S] Delete
withWslApi()silent fallback indialog-wsl-server.tsx; only mount the dialog whenplatform.wslServersexists. -
[High][M] Remove the 8-9
useMutationpass-through wrappers indialog-wsl-server.tsx; use the existingrun()helper and direct API calls. -
[High][M] Remove(Skipped for now: wizard currently relies on automatic initial probes)autoProbe/lastAutoProbestate machine fromdialog-wsl-server.tsxunless a repro proves automatic probing is required. -
[High][M] Remove Electron renderer
storedServers/hasFallbackServersraw storage parsing fallback inpackages/desktop-electron/src/renderer/index.tsx. -
[High][M] Decide whether to delete the Electron
httpFetchbridge entirely and use normal fetch; current bridge duplicates fetch semantics and adds IPC surface. -
[High][M] Remove terminal restore preflight (
pty.get()before websocket) incomponents/terminal.tsx; it duplicates the existing clone-on-connect-error path. -
[High][M] Remove server-key from in-memory terminal cache in
context/terminal.tsx;TerminalProvideris already under keyedServerKeyremount. -
[High][M] Remove deferred terminal provider
disposeAll()macrotask workaround unless a minimal repro proves it is still needed. -
[High][M] Remove
unsupportedWorkspacenull-object fallback for WSL/mnt/incontext/terminal.tsx; block earlier or let PTY failure surface. -
[High][M] Fold or delete
packages/desktop-electron/src/main/wsl-pty.ts; it has one importer and can live inwsl.tsif kept. -
[High][L] Remove duplicated WSL state subscription in Electron renderer or
WslServersProvider; keep one WSL state owner. -
[High][L] Revisit
DefaultServercontext; fold into server ownership or make it a real provider instead of ad hoc query hooks. -
[High][L] Collapse duplicated server health loops/logging across
ConnectionGate,ServerProvider, dialog, and status popover. -
[Medium][S] Remove
initialView?: "add-wsl"fromDialogSelectServerif no callsites need it. -
[Medium][S] Remove
handleRemoveWsl,handleRetryWsl,handleUpdateWslguard helpers; callers already know when item is WSL. -
[Medium][S] Remove
hasMenuActionsBeforeDelete()fromdialog-select-server.tsx; inline or always render the separator in the delete block. -
[Medium][S] Remove UI-only
parseProgressPercent()and percent display in WSL wizard unless progress is structured by backend. -
[Medium][S] Remove hard-coded Ubuntu installable distro special-case from UI; backend/platform should return installable distros.(Skipped: changes distro list behavior) -
[Medium][S] Remove(Skipped: changes visible distro behavior)isHiddenDistro()UI filter fordocker-desktop; backend/platform should decide hidden distros if needed. -
[Medium][S] Remove
installProgress()transcript shaping in WSL wizard; render raw transcript or structured progress. -
[Medium][S] Remove
stepIndex/stepTitle/stepStatehelpers in WSL wizard; inline the 3-step UI state. -
[Medium][S] Remove
runWslBash()fromwsl.ts; it is unused. -
[Medium][S] Remove progress-line de-duping from either
wsl-pty.tsorwsl-servers.ts; keep only one place if kept. -
[Medium][S] Remove(Skipped: networking behavior change)ensureLoopbackNoProxy()and Chromium proxy-bypass mutation unless a measured proxy repro exists. -
[Medium][S] Remove broad renderer global error/rejection logging in Electron renderer unless this PR intentionally adds diagnostics.(Skipped: keep diagnostics) -
[Medium][S] Remove(Skipped: keep diagnostics)wireWindowDiagnostics()or move it to a separate diagnostics PR; it is unrelated WSL feature plumbing. -
[Medium][S] Remove terminal debug logging helpers/calls once current investigation is done.(Skipped: keep diagnostics) -
[Medium][S] Remove server-health retry logging helpers ((Skipped: keep diagnostics)serializeError,stringifyLog, per-attempt logs`) or dev-gate one final warning. -
[Medium][S] Remove(Skipped: PATH behavior change)resolveSystem32Command()if no PATH failure is proven; callwsl.exedirectly. -
[Medium][S] Remove WSL path picker catch fallbacks in Electron renderer; for active WSL, failed conversion should fail, not pass Windows paths through.(Skipped: behavior change) -
[Medium][M] Remove(Skipped: output compatibility change)createOutputDecoder()/detectOutputEncoding()heuristic unless logs prove UTF-16 WSL output occurs. -
[Medium][M] Remove registry parsing/default-user discovery in(Skipped: opencode discovery behavior change)wsl.tsif not proven necessary; use the actual WSL command context consistently. -
[Medium][M] Simplify(Skipped: opencode discovery behavior change)resolveWslOpencode()fallback path search; prefercommand -v opencodeunless installer/PATH proves otherwise. -
[Medium][M] Simplify WSL sidecar shell script env/path/watchman workarounds in(Skipped: runtime environment behavior change)server.ts; add back only with repro/logs. -
[Medium][M] Remove(Skipped: race-safety behavior change)startAttemptsstale-start guard in WSL controller unless start/remove/stop race is reproduced. -
[Medium][M] Remove
acknowledgementsmodel/API/IPC if UI does not consume it. -
[Medium][M] Remove(Skipped: error/empty-list behavior change)Promise.allSettleddistro-list fallback; let listing errors surface instead of showing empty distros. -
[Medium][M] Collapse WSL persisted config + state mutations into one owner/path, or derive runtime state instead of mutating both.
-
[Medium][M] Remove bespoke WSL subscribe/unsubscribe IPC lifecycle if broadcast event pattern is acceptable.
-
[Medium][M] Collapse repeated WSL IPC method lists in
ipc.ts,index.ts, and preload into one simpler mapping or smaller API surface. -
[Medium][M] Remove duplicated health polling/sorting between status popover and server dialog; keep one or let dialog own detailed health.
-
[Medium][M] Remove duplicated server-switch navigation/batching from status popover, dialog, and connection error; keep one simple path.
-
[Low][S] Revert dialog timer/lock refactor if it was style churn unrelated to behavior.
-
[Low][S] Revert global dialog CSS overflow changes unless required by a specific dialog.
-
[Low][S] Inline
nextActiveKey()incontext/server.tsxunless more callers appear. -
[Low][S] Add
ServerConnection.isWsl(conn)only if it deletes more local type guards than it adds; otherwise keep local checks. -
[Low][S] Replace manual
wsl:${distro}key construction with returned config id or existingServerConnection.keyonly where already touching code. -
[Low][S] Remove duplicate line-forwarding helper in
server.tsor reuse existing WSL output handling. -
[Low][S] Remove
pickerFilters()duplication only if there is an existing shared helper safe for Electron main. -
[Low][M] Remove duplicate top-level fields from
ServerReadyDataif Electron/Tauri compatibility allows it. -
[Low][M] Consider moving WSL wizard out of embedded server-select mode; current
showWizard/fit/body/dismiss state duplicates dialog flow. -
[Low][L] Consider deleting/folding
context/wsl-servers.tsxif WSL state stays owned by Electron renderer or server context. -
[Low][L] Consider deleting/folding
context/default-server.tsxif default server becomes part ofuseServer().