fix(desktop): 打磨桌面 shell 顶栏与左下角运行控制 UI - #784
Open
LucasIcarus wants to merge 3 commits into
Open
Conversation
- 顶栏 action 按钮补齐 12px 字号与字重,与侧边栏/胶囊风格对齐(此前继承 16px 文档默认字号偏大) - 顶部状态胶囊(在线 Daemon/需要处理/已配置 Bot)改为左对齐并弱化为只读摘要样式,action 入口与语言切换统一右对齐 - 左下角运行控制按状态显隐:运行中/启动中/需要处理只显示停止+重启,其余状态只显示启动,按钮组改 flex 自适应铺满 - 开机启动改为 macOS 风格滑动 switch(隐藏原生 checkbox 保留 a11y/label 语义),开启态文案与颜色区隔并新增对应 i18n 文案 - 桌面 shell chrome 整体 user-select:none,日志输出/版本号/运行时详情等诊断文本保留可选中
- 开机自启 switch 上移至运行状态行右侧:状态左对齐、switch 右对齐,字号字重与状态文案对齐;多行运行详情时 switch 钉在首行不下坠 - 版本信息行水平居中,保持底部位置 - sidebar-foot 改为 flex column 均匀排布三行(状态行 / 操作按钮组 / 版本行)
运行状态文案与开机自启 label 的 line-height 从 1.2 改为精确 16px(等于 switch 高度),状态文字、switch、label 三者垂直中心完全重合(实测 delta 0),修复同行布局放大看存在的 0.3-0.5px 光学错位
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.
改了什么
Botmux Desktop 原生 shell(
src/desktop/renderer/)的 4 处 UI 细节打磨,均为纯样式/展示逻辑,不涉及功能行为变化:font-size: 12px; font-weight: 650,并统一左右 padding。role="switch"、focus-visible 描边等 a11y 语义不变)。开启/关闭态做出区隔:开启态轨道用主题渐变色、文案变为「已设为开机启动」且亮色显示;关闭态保持灰色「开机启动 App」。新增 i18n keylogin.launchAtLoginOn(中英文)。sidebar-foot改为 flex column 均匀排布三行(状态行 / 操作按钮组 / 版本行)。另按桌面应用惯例,shell chrome(导航、胶囊、按钮、运行状态文案)整体
user-select: none;日志输出、版本号、运行时错误详情等诊断文本保留可选中,方便复制反馈。影响面
src/desktop/renderer/{index.html,style.css,app.ts}+ 对应源码断言测试test/desktop/desktop-dashboard-webview.test.ts。desktopShellInjectedCss未动)。paintControls仅新增hidden赋值,原有 disabled 判定逐行保留,unmanagedRuntime/ 桥接不可用等分支行为不变;takeover 按钮维持常驻隐藏,其兼容样式改为flex: 1 1 100%等价保留。runtime-line(HTML 结构移动 + grid 加第三列 auto),footer-meta-row仅剩版本行;aria-live="polite"容器范围未变。getLoginItem/setLoginItem、失败回滚、legacy autostart title 提示)未改,仅新增状态渲染paintLoginState(),在初始化、切换语言、变更成功/失败后统一重绘。验证
pnpm build✅pnpm test全量单测 ✅(首个 commit 全量 825 文件 / 13267 用例通过;第二个 commit 后复跑,desktop 相关全绿,全量运行中 codex-app-threads / cost-calculator-cache 出现的计时敏感用例失败经单独复跑 60/60 通过,确认为并发负载 flake,与本 PR 改动无交集)test/desktop/19 个测试文件 / 144 用例全绿;本 PR 同步更新了按钮组布局与版本行对齐的源码断言,并新增两个用例:运行按钮按状态显隐、开机启动 switch 的结构/同行布局与开启态文案断言演示截图
截图为浏览器加载构建产物 + mock 桥接数据渲染(版本号、计数均为演示值),不含真实环境信息。
整体:顶栏状态胶囊左对齐 / action 右对齐 + 字号对齐
(第一行为运行中,第二行为已停止;整体图统一 2560×1600、特写统一 1000×608 同一裁剪区,便于逐格对比)
左下角特写:运行控制显隐 + 开机自启 switch