Skip to content

fix(workbench): 将文件树独立 Pane 与路径拖拽补合到 main - #685

Merged
yovinchen merged 1 commit into
mainfrom
fix/restore-file-tree-workbench-mainline
Aug 30, 2026
Merged

fix(workbench): 将文件树独立 Pane 与路径拖拽补合到 main#685
yovinchen merged 1 commit into
mainfrom
fix/restore-file-tree-workbench-mainline

Conversation

@yovinchen

Copy link
Copy Markdown
Contributor

Linked issue

Closes #661

Summary

PR #665 已合并到其堆叠目标分支 feat/session-workbench-web,但父 PR #662 先以 squash 方式进入 main,导致文件树独立 Pane 与工作区路径拖拽没有进入主线。

本 PR 将 #665 的已验证改动原样补合到最新 main,恢复:

  • File Tree Tab 从 Right Dock 拖出为项目级单例 Workbench Pane;
  • 文件/目录拖入 Composer 时插入结构化引用;
  • 路径拖入本地/Gateway 终端时插入经过 Shell 转义的文本,不自动执行;
  • Desktop 原生拖拽桥接、跨项目/SSH 拒绝、拖拽性能与捕获阶段处理。

不包含工作区中未提交的 Provider Registry 文档改动。

Change scope

  • Modules: agent-ui / agent-gui / agent-gateway WebUI
  • Key paths:
    • crates/agent-ui/src/components/project-tools/file-tree/**
    • crates/agent-ui/src/lib/chat/workspacePathDrag.ts
    • crates/agent-ui/src/lib/workbench/**
    • crates/agent-gui/src/pages/ChatPage.tsx
    • crates/agent-gateway/web/src/app/workbench/useGatewayWorkbench.ts

Screenshots / preview

文件树独立 Pane 与路径拖拽

Verification

  • Desktop 定向测试:73 passed / 0 failed
  • Gateway WebUI Workbench 测试:27 passed / 0 failed
  • pnpm --dir crates/agent-ui typecheck
  • pnpm --dir crates/agent-gui exec tsc --noEmit
  • pnpm --dir crates/agent-gateway/web exec tsc --noEmit
  • pnpm --dir crates/agent-ui lint
  • pnpm --dir crates/agent-gui lint
  • pnpm --dir crates/agent-gateway/web lint(通过,保留目标分支已有的 1 条 noImportantStyles warning)
  • pnpm --dir crates/agent-gui build
  • pnpm --dir crates/agent-gateway/web build
  • git diff --check origin/main..HEAD

Pre-submit checklist

  • A requirement issue is linked.
  • Synced with the target branch; no merge conflicts.
  • The change is focused, with no unrelated modifications.
  • No secrets, tokens, or personal data included.
  • Docs are updated for the restored user behavior.

* feat(workbench): add file tree pane and path drag (#661)

* fix(workbench): move file tree fully out of dock

* fix(workbench): route file tree drops in desktop

* perf(workbench): coalesce pane drag updates

* fix(desktop): mirror workspace path drag feedback

* docs(workbench): add file tree pane preview

* fix(workbench): address file tree pane review findings

- Carry external multi-root grants into the Workbench file tree pane via a
  shared useFileTreeExternalRoots hook, so leasing the tree out of the Right
  Dock no longer hides external roots on Desktop and WebUI.
- Stop a lingering workspace-path payload from claiming an OS "Files" drag
  during the dragend-to-native-drop handoff window.
- Publish a pointer-free WorkbenchDragRenderState so the overlay model no
  longer exposes a stale pointer field.
- Refuse workspace-path drags for external roots explicitly instead of
  relying on the payload validator's control-character rejection.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
@yovinchen
yovinchen merged commit ab85311 into main Aug 30, 2026
9 checks passed
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.

[Feature] 文件树支持 Workbench 独立 Pane 与文件路径拖拽引用

1 participant