Affected area
Desktop UI (agent-gui / React)
Problem statement (what should this solve)
点击对话中的文件链接(liveagent-file: 协议,如 ChangedFilesCard、Markdown MarkdownFileLink)或工作区文件树中的文件后,文件预览(WorkspaceFilePreviewOverlay)或代码编辑器(WorkspaceCodeEditorOverlay)会以全屏覆盖层的形式铺满主内容区(absolute inset-0 + z-50),把正在进行的对话完全盖住。
用户无法同时查看文件内容和对话上下文——例如对照文件逐行核对 AI 的修改、边看代码边看解释、边查报错边回滚等常见场景都需要反复"打开覆盖层 → 关闭覆盖层"来回切换。现状只有侧边栏在覆盖层打开时保持可用(#312 已确认该行为是有意设计),但对话正文区域在覆盖层打开期间完全不可见。
源码定位:
crates/agent-ui/src/components/workspace-editor/WorkspaceFilePreviewOverlay.tsx — absolute inset-0 + workspaceOverlayStackClassName(z-50)
crates/agent-ui/src/components/workspace-editor/WorkspaceCodeEditorOverlay.tsx — 同样覆盖层定位
crates/agent-ui/src/components/workspace-editor/WorkspaceOverlayHost.tsx — overlay 栈宿主,注释明确 "absolute positioning leaves the sidebar usable in both hosts"(即只有侧边栏可用)
crates/agent-gui/src/agent-ui-adapters/workspacePreview.tsx(desktop z-50)/ crates/agent-gateway/web/src/agent-ui-adapters/workspacePreview.tsx(webui z-40)
crates/agent-ui/src/lib/chat/useChatFileLinkNavigation.ts — 点击链接后路由到 preview/editor overlay
Proposed behavior
希望文件预览/编辑器能与对话内容同屏并排显示,而非全屏覆盖。可选实现方向(按优先级):
可停靠分屏(dockable side panel):文件预览/编辑器作为可停靠在主内容区一侧(左/右)的可调宽度面板,与对话区并存;支持拖拽调整宽度;窄屏或用户选择时可退回全屏覆盖层模式
规则由内容类型区分:图片预览(小体积、适合内联)继续渲染内联;Markdown/代码/大文件默认分屏,可配置
最少改动:仅为覆盖层增加"半宽停靠"切换按钮,保留现有全屏模式为默认
Estimated change scope
No response
Alternatives considered
No response
Pre-submit checklist
Affected area
Desktop UI (agent-gui / React)
Problem statement (what should this solve)
点击对话中的文件链接(liveagent-file: 协议,如 ChangedFilesCard、Markdown MarkdownFileLink)或工作区文件树中的文件后,文件预览(WorkspaceFilePreviewOverlay)或代码编辑器(WorkspaceCodeEditorOverlay)会以全屏覆盖层的形式铺满主内容区(absolute inset-0 + z-50),把正在进行的对话完全盖住。
用户无法同时查看文件内容和对话上下文——例如对照文件逐行核对 AI 的修改、边看代码边看解释、边查报错边回滚等常见场景都需要反复"打开覆盖层 → 关闭覆盖层"来回切换。现状只有侧边栏在覆盖层打开时保持可用(#312 已确认该行为是有意设计),但对话正文区域在覆盖层打开期间完全不可见。
源码定位:
crates/agent-ui/src/components/workspace-editor/WorkspaceFilePreviewOverlay.tsx — absolute inset-0 + workspaceOverlayStackClassName(z-50)
crates/agent-ui/src/components/workspace-editor/WorkspaceCodeEditorOverlay.tsx — 同样覆盖层定位
crates/agent-ui/src/components/workspace-editor/WorkspaceOverlayHost.tsx — overlay 栈宿主,注释明确 "absolute positioning leaves the sidebar usable in both hosts"(即只有侧边栏可用)
crates/agent-gui/src/agent-ui-adapters/workspacePreview.tsx(desktop z-50)/ crates/agent-gateway/web/src/agent-ui-adapters/workspacePreview.tsx(webui z-40)
crates/agent-ui/src/lib/chat/useChatFileLinkNavigation.ts — 点击链接后路由到 preview/editor overlay
Proposed behavior
希望文件预览/编辑器能与对话内容同屏并排显示,而非全屏覆盖。可选实现方向(按优先级):
可停靠分屏(dockable side panel):文件预览/编辑器作为可停靠在主内容区一侧(左/右)的可调宽度面板,与对话区并存;支持拖拽调整宽度;窄屏或用户选择时可退回全屏覆盖层模式
规则由内容类型区分:图片预览(小体积、适合内联)继续渲染内联;Markdown/代码/大文件默认分屏,可配置
最少改动:仅为覆盖层增加"半宽停靠"切换按钮,保留现有全屏模式为默认
Estimated change scope
No response
Alternatives considered
No response
Pre-submit checklist