fix(ui): 深色模式下侧边栏与主面板分界线过亮 - #828
Merged
Loosand merged 1 commit intoSep 19, 2026
Merged
Conversation
develop 引入的 Sidebar 原语默认给左侧栏加 border-r,深色主题下侧栏底色是纯黑而 --border 亮度 26%,分界处形成一条扎眼的亮线;浅色主题下两者亮度只差 4 个点所以 看不出来。只在 chat-history-sidebar 上给深色模式把边框透明度降到 30%,不改原语、 不影响浅色模式和布局。 Fixes Stack-Cairn#827
2 tasks
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.
Linked issue
Fixes #827
Summary
develop 分支(
refactor/ui合入后)深色模式下,左侧导航栏与中间对话面板的分界处有一条非常明显的亮灰色竖线,浅色模式下几乎看不到。原因:
crates/agent-ui/src/components/ui/sidebar.tsx的 Sidebar 原语默认给左侧栏容器加group-data-[side=left]:border-r,边框色取全局--border。深色主题下侧栏底色是纯黑(--settings-rail: 0 0% 0%)而--border是220 14% 26%,亮度差 26 个点;浅色主题两者只差约 4 个点,所以问题只在深色模式暴露。修复:只在
ChatHistorySidebar传给Sidebar的 className 上追加dark:border-border/30,让深色模式下这条边框的视觉强度与浅色模式对齐。不改 Sidebar 原语本身(其他使用方不受影响),不改浅色模式,不涉及任何布局或交互逻辑。Change scope
crates/agent-ui/src/components/chat/ChatHistorySidebar.tsx(一行 className 改动).github/pr-assets/sidebar-dark-border-*.png(截图证据)Screenshots / preview
深色模式,Windows 11 本地
tauri dev调试客户端,同一窗口、同一位置:完整窗口截图:修复前 / 修复后
像素实测(同一坐标 y=600,x=418 为分界线):
(0,0,0) | (58,63,75) | (18,21,28)(0,0,0) | (17,19,23) | (18,21,28)Verification
pnpm exec biome check crates/agent-ui/src/components/chat/ChatHistorySidebar.tsx:仅报全文件 CRLF 行尾格式差异(Windows autocrlf 检出导致,与本改动无关;git diff确认只有一行变更)pnpm --dir crates/agent-gui tauri dev从本分支 HEAD 启动调试客户端,深色模式下人工确认分界线消失,浅色模式无变化pnpm test/ Rust 检查,改动仅为一个 Tailwind class,不涉及逻辑与测试覆盖的行为Pre-submit checklist