Files
胡飞 4fbdb84cbd fix(windows): 后台子进程统一隐藏控制台,修掉启动闪黑框
Windows 上应用启动会闪一下控制台窗口,根因是启动期识别 WSL 发行版时直接
spawn 了控制台程序 wsl.exe 且未设置 CREATE_NO_WINDOW,系统为它新建了控制台
窗口(stdout 已重定向到管道也一样)。该路径由 #182 引入。

- terminal:WSL 识别改走 process_util::configure_background_child
- html-preview:Windows 分支拉起浏览器前设置 CREATE_NO_WINDOW,cmd /C start
  不再闪窗;纯逻辑 crate 内联 helper,不额外引入 tokio
- workspace_explorer:容器后端 docker exec 收敛到 process-util
- main:设置页安装 skill 的 npx/node 启动器同样处理
- 补 4 条结构 contract 测试钉住这些 spawn 点,防止回归
- AGENTS.md 沉淀该约定:GUI 进程 spawn 控制台程序必须隐藏控制台

验证:cargo test -p html-preview、cargo test -p terminal --lib
wsl_distributions、cargo test -p workspace_explorer --lib backend、
cargo check -p main --tests、cargo test -p main --bin navop mcp_skill、
cargo metadata --locked --offline 全部通过;改动文件无新增 clippy 告警。
Windows 实机「不再闪窗」需另行确认(macOS 上 cfg(windows) 不参与编译)。
2026-09-19 11:31:36 +08:00
..

Workspace Explorer

workspace_explorer provides the local workspace experience embedded in a terminal view:

  • a lazily expanded file tree;
  • Git working-tree change discovery and per-file diff loading;
  • a multi-tab local text editor with save, reload, search, soft-wrap, and dirty-close handling;
  • a read-only diff viewer for Git changes.

The crate owns filesystem and Git work. Host crates only create the explorer/editor entities, mount them in their layout, and react to WorkspaceEditorEvent::VisibilityChanged.