refactor(ui): replace modal implementation with Dialog component in R… - #448
Draft
Loosand wants to merge 4 commits into
Draft
refactor(ui): replace modal implementation with Dialog component in R…#448Loosand wants to merge 4 commits into
Loosand wants to merge 4 commits into
Conversation
…emotePathPickerModal and GitBranchSelector
StackCairn
marked this pull request as draft
August 13, 2026 03:47
Contributor
|
PR governance checks failed — this PR has been converted to draft.
Fix the items above, then click Ready for review to re-run the checks. |
…Modal for clarity and consistency
…oss various components for consistency and improved user experience
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
无
概要
将
RemotePathPickerModal和GitBranchSelector中手写的模态框实现替换为基于 Base UI 的共享 shadcn 风格Dialog组件。原实现通过
createPortal、fixed和手动设置z-index管理弹层。当用户在“新建 Worktree”模态框中继续打开远程目录选择器时,会形成两层相互独立的手写模态框,容易出现遮罩层、焦点锁定、Escape 键响应和层级顺序冲突。本次改动:
@base-ui/react/dialog的共享Dialog组件;变更范围
agent-ui、agent-gateway/webcrates/agent-ui/src/components/ui/dialog.tsxcrates/agent-ui/src/components/git/GitBranchSelector.tsxcrates/agent-gateway/web/src/components/RemotePathPickerModal.tsxcrates/agent-ui/src/styles/base.css截图 / 运行预览
修改前
修改后
嵌套目录选择器
运行时检查步骤:
验证
已执行:
cd crates/agent-gui && node_modules/.bin/tsc --noEmitcd crates/agent-gateway/web && node_modules/.bin/tsc --noEmitcd crates/agent-gui && node_modules/.bin/vite buildcd crates/agent-gateway/web && node_modules/.bin/vite buildnode scripts/check-ui-boundaries.mjsgit diff --checkGUI 和 WebUI 的 TypeScript 检查、生产构建及 UI 边界检查均通过。
本次改动仅替换模态框基础组件,Worktree 创建与路径选择的业务逻辑保持不变,因此未新增专项业务测试;嵌套 Dialog 的交互通过上述运行流程验证。
提交前检查