Skip to content

feat: WSLC SDK backend — persist, restart/inspect/exec, volumes, prefs - #4

Merged
timeroute merged 21 commits into
mainfrom
cursor/wslc-sdk-backend-dd67
Oct 10, 2026
Merged

timeroute merged 21 commits into
mainfrom
cursor/wslc-sdk-backend-dd67

Conversation

@timeroute

@timeroute timeroute commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Windows-only WSLc Desktop on the official WSL Containers SDK (wslc path-vendored from timeroute/wslc-rs with OpenContainer / Logs / named_volume). Live-only dedicated wslc-desktop session; no Demo mode.

Done in this PR

  1. Logs — scrape via container exec (switch to native Logs API when upstream crate publishes)
  2. Persist / reopen — catalog under %LOCALAPPDATA%\WSLcDesktop\; OpenContainer on boot; session not terminated on app exit; remove requires confirm
  3. Restart / Inspect / Exec — Restart action; Inspect modal (JSON); non-TTY Exec with output modal
  4. Volumes — create size picker (1/2/5/10 GiB) in modal; named volume mounts on container create (vol:/path); per-row Remove
  5. Session prefs — CPU / memory in Settings; applied on next new session; Overview shows configured limits
  6. UI unify — Settings scrollable; Images/Volumes/Containers share toolbar + per-row actions layout; shared list/row helpers
  7. Codex review fixes — offline NuGet → stale index / active DLL; failed Sdk::load not cached; unique auto container names

Also

  • Overview as default home; Product.ico
  • Vendored vendor/wslc-rs (path dep) until crates.io catches up

Test plan

  • cargo test (9 tests) on Linux CI/agent
  • Windows MSI CI (prior commits)
  • Codex P1/P2 review items addressed
  • Windows: Settings scrolls; Images/Volumes row actions; create volume modal
  • Windows: offline Retry uses cached SDK; failed load then Retry recovers without app restart
Open in Web Open in Cursor 

cursoragent and others added 17 commits October 10, 2026 07:16
Use the windows subsystem so MSI launches do not spawn an empty
console. Overlay the titlebar settings control outside the drag
hitbox and occlude it so Windows HTCAPTION no longer swallows clicks.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
GPUI Stateful styling has no inset_y_0 helper; use top_0/bottom_0.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Hide child CLI consoles with CREATE_NO_WINDOW, apply the dark theme
once before the first window, and relocalize UI without re-running
wslc commands when switching language.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Drive Live mode through the official wslc crate / wslcsdk.dll on a
dedicated worker thread; drop all CLI spawning. When the SDK is missing,
keep Demo data only (no CLI fallback).

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Fetch Microsoft.WSL.Containers during packaging and install the
win-x64 native DLL beside the exe so LoadLibrary succeeds without
PATH. CI runs scripts/fetch-wslc-sdk.ps1 before cargo wix.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Drop bundled Microsoft.WSL.Containers from the installer. At startup,
prefer wslcsdk.dll from WSL install dirs / PATH so the DLL matches the
host runtime. Surface SdkNotFound / missing components / outdated SDK
in the status bar instead of a generic Demo hint.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Probe wslc/wsl version on startup, resolve Microsoft.WSL.Containers from
NuGet, and cache the native DLL under LocalAppData. Re-check when the
host version changes or a newer matching package appears. MSI stays
DLL-free; container ops still use the SDK only.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Session::start requires an empty storage root. SDK downloads were
written under %LOCALAPPDATA%\WSLcDesktop\sdk, which made the shared
WSLcDesktop folder non-empty and blocked LIVE boot. Use ...\session.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Install/update wslcsdk.dll behind a modal with logs and progress; the app
stays locked until Live connects. Retry reinstalls the SDK; no demo fallback.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Attach to the wslc CLI default session via Session::open_default so images
match `wslc image ls`. Remove the Run tab; pull and create containers use
blocking modals with ports/volumes/command/auto-remove. Container rows show
status/ports/mounts and open an inspect+runtime logs dialog.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
SDK cannot reliably share the reserved CLI default session. Own session
under LocalAppData again; remove the vendored open_default patch.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Split the monolithic app.rs into src/app/* by concern (shell, containers,
images, volumes, settings, SDK setup, refresh/state, parsing, poll/widgets).
Keep AppView as the single GPUI root in mod.rs with Render wiring.

Move port/bind-mount parsing to parsing.rs (no GPUI). Deduplicate modal
overlay chrome and mpsc drain loops. Extract wslc public types to types.rs.
Update README project structure.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Reset create/pull fields on open and dismiss. Run start/stop/create/logs
off the UI thread with a busy overlay so Stop no longer freezes the window.
Do not replace the image ENTRYPOINT with a sleep loop; status prefers inspect.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
- Default Overview with SDK/app/session/resource summary
- Container logs collect runtime files, drop inspect JSON
- Volumes buttons use .small() like other pages
- Refresh Product.ico / Product.png

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
@cursor cursor Bot changed the title feat: replace CLI backend with WSL Containers SDK feat: Live-only WSLc Desktop with Overview, SDK session, packaging Oct 10, 2026
cursoragent and others added 2 commits October 10, 2026 09:19
- Catalog JSON under WSLcDesktop; reopen on boot; no session terminate
- Temp git dep on wslc-rs fork with OpenContainer
- Confirm dialog before removing containers/images/volumes

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Add container Restart/Inspect/Exec, volume GiB picker + named
mounts on create, and session CPU/memory prefs with Overview
stats. Vendor wslc-rs (OpenContainer/Logs/named_volume) as path dep.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
@cursor cursor Bot changed the title feat: Live-only WSLc Desktop with Overview, SDK session, packaging feat: WSLC SDK backend — persist, restart/inspect/exec, volumes, prefs Oct 10, 2026
@timeroute
timeroute marked this pull request as ready for review October 10, 2026 09:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T09:48:35.433808Z ec471d5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Settings scrolls; Images/Volumes match Containers (toolbar create,
per-row actions). Extract shared list/row/modal helpers.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec471d5176

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/wslc/sdk_fetch.rs Outdated
Comment thread vendor/wslc-rs/crates/wslc-sys/src/runtime.rs Outdated
Comment thread src/wslc/live.rs
Fall back to stale NuGet index / active DLL when offline; do not
cache failed Sdk::load; use unique auto container names.

Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
@timeroute
timeroute merged commit 9be1fee into main Oct 10, 2026
1 check passed
@timeroute
timeroute deleted the cursor/wslc-sdk-backend-dd67 branch October 11, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants