Skip to content

feat(desktop): manage WSL Host projects - #4306

Merged
M4n5ter merged 1 commit into
mainfrom
feat/wsl-host-project-management
Aug 31, 2026
Merged

feat(desktop): manage WSL Host projects#4306
M4n5ter merged 1 commit into
mainfrom
feat/wsl-host-project-management

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 31, 2026

Copy link
Copy Markdown
Member

Why

WSL Runtime Hosts could be added and used, but Desktop did not retain the exact managed deployment identity needed to edit their allowed project roots. The project picker also had no route to the canonical project manager, so stale projects could accumulate without an obvious management surface.

What changed

  • Extend managed deployment bindings to WSL environment profiles while keeping SSH operator routing explicit.
  • Persist the exact WSL deployment identity during onboarding; derive the WSL control route from the environment profile instead of storing a second route representation.
  • Reuse an existing WSL profile when onboarding the same target again, reject duplicate managed ownership of its State Root, and keep the catalog profile as the recoverable bracket around binding lifetime.
  • Route WSL status and project-directory configuration through wsl.exe --exec <absolute-operator> with bounded framed output, exact deployment fencing, CAS updates, and reconnect handling.
  • Keep WSL bindings active-only; SSH uninstall and cleanup states remain SSH-only.
  • Make managed onboarding the only WSL profile creation authority; the generic add-profile contract is remote-only and requires a credential.
  • Expose directory-only management for WSL Hosts without advertising unsupported SSH/service operations.
  • Add “Manage projects” to each project-picker Host group and atomically navigate to Settings → Projects for the selected Host.
  • Reuse the existing project catalog and deployment configuration authorities; no parallel WSL-specific project state is introduced.

Scope

Pre-release WSL binding shapes are intentionally not migrated.

Onboarding the same physical State Root through both managed SSH and WSL is not supported. The binding store fails closed before a second owner can be persisted; fully rejecting that case before setup commits would require a separate two-phase operator identity/claim protocol and is outside this PR.

Verification

  • 57 focused main-process tests passed.
  • Desktop main, preload, and renderer TypeScript checks passed.
  • AppShell hook-scope and diff checks passed.
  • Nine independent fresh-context correctness/simplification review rounds converged with no confirmed in-scope findings.
中文

背景

WSL Runtime Host 已经可以添加和使用,但 Desktop 没有保存编辑项目目录白名单所需的精确 managed deployment identity。项目快速选择器也没有通往唯一项目管理页面的入口,长期使用后无效项目会不断累积。

变更

  • 将 managed deployment binding 扩展到 WSL environment profile,同时保留 SSH 显式 operator route。
  • WSL onboarding 时持久化精确 deployment identity;WSL 控制路径直接来自 environment profile,不再额外保存一份空 route 表示。
  • 重复 onboarding 同一 WSL target 时复用已有 profile;拒绝同一 State Root 出现重复 managed owner;catalog profile 作为 binding 生命周期的可恢复外层锚点。
  • 通过 wsl.exe --exec <absolute-operator> 执行 WSL status 和项目目录配置,使用有界 framed output、精确 deployment fencing、CAS 更新和重连处理。
  • WSL binding 只允许 active;SSH uninstall/cleanup 状态机仍只属于 SSH。
  • managed onboarding 是唯一 WSL profile 创建入口;通用 profile 添加接口只接受 remote profile,并强制 credential。
  • WSL Host 只暴露目录管理能力,不展示尚不支持的 SSH/service 操作。
  • 在项目快速选择器的每个 Host 分组加入“管理项目”,用一个原子导航 intent 打开 Settings → Projects 并选中对应 Host。
  • 继续复用现有 project catalog 与 deployment config authority,不新增 WSL 专属平行状态。

范围

产品尚未发布,因此不迁移开发期的 WSL binding 中间格式。

不支持把同一个物理 State Root 同时通过 managed SSH 与 WSL onboarding。binding store 会 fail closed,确保第二个 owner 不会落盘;若要在 setup commit 前就识别并拒绝,需要独立的两阶段 operator identity/claim 协议,不属于本 PR。

验证

  • 57 项主进程关键测试通过。
  • Desktop main、preload、renderer TypeScript 检查通过。
  • AppShell hook scope 与 diff 检查通过。
  • 9 轮全新上下文 correctness/simplification 并行审查已收敛,范围内无确认 findings。

@M4n5ter M4n5ter self-assigned this Aug 31, 2026
@github-actions github-actions Bot added the effort/XL Over 1000 readable lines label Aug 31, 2026
@M4n5ter
M4n5ter force-pushed the feat/wsl-host-project-management branch 3 times, most recently from dcc33ba to 856c2ea Compare August 31, 2026 05:54
@M4n5ter
M4n5ter marked this pull request as ready for review August 31, 2026 06:10

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved at the explicit direction of M4n5ter. No technical review was performed as part of this action; M4n5ter requested the approval and accepts responsibility for subsequent handling.


Review notice: This approval was submitted by an automated review agent operated by jackwener and is published at the direction of M4n5ter, who is the human accountable for it.

@M4n5ter
M4n5ter force-pushed the feat/wsl-host-project-management branch from 856c2ea to 9fa9561 Compare August 31, 2026 06:37
@M4n5ter
M4n5ter merged commit 1e75800 into main Aug 31, 2026
2 checks passed
@M4n5ter
M4n5ter deleted the feat/wsl-host-project-management branch August 31, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Over 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants