Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

Merge pull request #1120 from yuxino/fix/browser-local-file-feedback

Lan370516014e5e
diff --cc docs/spec/04-ux/08-component-spec.md
index ec14dab95,2346d16fe..985e13b09
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@@ -1061,14 -1061,12 +1061,18 @@@ entirely inside the plugin's isolated p
reveals the page without waiting for images or subframes; those continue to
drive the loading/stop control. A failed switch or one exceeding the 15-second
main-frame wait shows a retryable error, with the old guest hidden. Superseded
- and cancelled requests cannot publish over the new navigation.
+ and cancelled requests cannot publish over the new navigation. A local file
+ address or absolute path that does not resolve to an existing file inside
+ the session workspace is rejected before loading and shows a specific
+ workspace-boundary message in the browser chrome, including on a blank tab.
+ Existing files inside the workspace remain previewable by absolute path.
+- Browser address input accepts HTTP(S) URLs and scheme-less web hosts. A
+ `localhost` or dotted hostname followed by a numeric port (for example,
+ `localhost:3000/index.html` or `example.com:8080`) is treated as an HTTP
+ address rather than a custom URL scheme. Unsupported schemes remain blocked;
+ workspace file previews continue to use the in-root file path gate.
+
- Opening an HTTP(S) link in the work panel creates an additional Browser
resource tab instead of replacing the previous URL. Each tab owns a host-retained WebContents, address, title and navigation
history. Switching hides/shows pages without reloading, preserving live form,
diff --cc docs/zh-CN/spec/04-ux/08-component-spec.md
index 3de282315,8dfbcb31e..31764d0e9
--- a/docs/zh-CN/spec/04-ux/08-component-spec.md
+++ b/docs/zh-CN/spec/04-ux/08-component-spec.md
@@@ -771,12 -771,10 +771,15 @@@ vendor 进来的 `pi.file-manager` 视�
当前主框架导航提交后即可显示页面,不再等待图片或子框架完成加载。
导航失败或主框架等待超过 15 秒时显示可重试的错误,并隐藏旧页面;
被替代或取消的请求不得覆盖新导航。
+ `file:` 地址或绝对路径若不能解析为当前会话工作区内已存在的文件,
+ 必须在加载前拒绝,并在浏览器栏显示明确的工作区范围提示;空白标签页也一样。
+ 工作区内已存在文件的绝对路径仍可预览。
+- 浏览器地址栏接受 HTTP(S) URL 和省略协议的网页主机。`localhost` 或点分主机名
+ 后接数字端口时(如 `localhost:3000/index.html`、`example.com:8080`),
+ 按 HTTP 地址处理,而不是误认为自定义 scheme。不支持的 scheme 仍会被拒绝;
+ 工作区文件预览继续使用根目录范围校验。
+
- 在工作面板中打开 HTTP(S) 链接会新增浏览器资源标签,不覆盖原网址。
每个标签保留自己的 WebContents、地址、标题及浏览历史。切换只隐藏/显示页面,
保留当前表单、滚动位置和 JavaScript 状态;后台页面启用节流。关闭标签释放页面和 CDP 资源,