Skip to content

fix(webui): use the Windows folder dialog for local projects - #48

Draft
July-X wants to merge 3 commits into
mainfrom
fix/native-workspace-folder-picker
Draft

July-X wants to merge 3 commits into
mainfrom
fix/native-workspace-folder-picker

Conversation

@July-X

@July-X July-X commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Change

For authenticated Windows loopback sessions opened by the packaged launcher, choosing a new project shows an Add folder action that opens the Windows system folder picker. Selection uses the existing project workflow; cancellation never changes it. Ordinary browser sessions, LAN/headless deployments, and full-access mode keep the existing server-side picker. No project-model or remote filesystem semantics change.

The native action requires both the normal WebUI credential and a separate ephemeral grant issued only to the launcher-opened tab, with local same-origin admission. The fixed helper accepts no command or path from the browser and opens at most one dialog. Returned directories are checked on the server before selection. Reloading without the launch grant returns to server browsing.

Validation

  • Cloud Linux/Node 24, frozen pnpm 9.12.0: client/server/test typechecks, WebUI build, dependency/presentation/feedback gates, and diff check passed. 23 native route/transport tests, 1 WebuiService HTTP wiring test, and 6 launcher/release checks passed.
  • Added 3 browser scenarios for selecting a drive path, cancellation/stale response, and ordinary server fallback. They are not reported as passing: cloud Chromium could not start. Real Windows COM initialization worked in an interactive STA without showing a dialog; real Show, foreground, selection, and cancel are not yet verified.
  • The source-inventory check still reports six missing AOCI entries on both the unmodified base afc2e977 and this candidate. Only the five reviewed new source paths were added to the inventory; unrelated entries are preserved. Full CI/performance results are pending; use default basic performance.

Publication and contribution checks

  • Existing applicable licenses and attribution are preserved. No credentials, personal runtime data, or private sources included.
  • New source paths were reviewed and the suite and source inventories updated.
  • Composer behavior and its limitations are documented; mocks are not live Windows acceptance.

Maintainer handoff

Fork-local WebUI only. Before marking ready, verify the system dialog on Windows and confirm a remote browser cannot trigger it, then check native Windows cancellation and multi-drive selection. Do not read this change as an attempt to fix unrelated main inventory drift.


中文说明

变更

本机 Windows 通过打包启动器打开已认证的 WebUI 时,「选择新项目 → 添加文件夹」调用 Windows 系统目录选择器。选中后沿用已有项目选择逻辑;取消不改变当前项目。普通浏览器会话、局域网、无桌面运行和全访问模式保留服务端目录选择,不改变项目数据模型,也不会把浏览器电脑上的路径当成远程工作目录。

原生选择需要 WebUI 凭据和本地启动器只发给自动打开标签页的一次运行授权,并校验本地同源。浏览器不能传入命令或待执行路径,同时最多开一个系统对话框。选中目录经服务端验证后才交给项目选择。刷新后,若没有启动授权则回到服务端浏览。

验证

  • 云端 Linux、Node 24、锁定 pnpm 9.12.0:客户端、服务端及测试类型检查,WebUI 构建,依赖、界面组件、反馈规则和 diff 检查通过;23 项原生接口/传输测试、1 项真实 WebuiService HTTP 接线测试、6 项启动器/发布测试通过。
  • 新增 3 项浏览器回归,覆盖跨盘选择、取消/迟到响应、普通服务端回退。本地云端 Chromium 启动受限,没把这三项算作通过。Windows 仅验证了交互会话中 STA 能初始化 COM 对话框;真实弹窗、前台焦点、选择及取消还没验收。
  • 源码清单检查在本 PR 和未打补丁的 afc2e977 都报同样 6 个 AOCI 条目缺失。此处只加入本改动的 5 个源码路径,不处理无关基线漂移。完整 CI 尚待运行,性能采用默认基础检查。

发布检查与交接

保留原许可证和署名,没有提交凭据、个人运行数据或私有源文件。已更新受影响文档、源码清单及测试套件登记。仅改当前 WebUI 仓库,不向上游同步。转正式审核前请验证真实 Windows 多盘选择、取消和前台表现,以及远程客户端不能触发原生弹窗。

@July-X July-X added the enhancement New feature or request label Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants