Repository navigation
fix(desktop): 设置侧栏没有展开箭头的页面图标与分组图标对齐 - #1924
Merged
Merged
Conversation
设置窗口使用紧凑密度,Tree 行内间距是 6 而不是 8。非分组行用 chevronSlot-8 的占位加行间距对齐图标, 比分组行左移 2pt;分组内子项按 +8 缩进,标题比分组标题右移 2pt。图标和标题改放进自己的行里, 用固定的 tileGap 排列,不再依赖主题间距。
xiaoyumuxi
marked this pull request as ready for review
November 14, 2026 12:59
Lithe Review结论: ❓ 审查未完成 已由服务器取消。可以重新评论 |
24 of 28 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.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
设置窗口侧栏里,带展开箭头的分组(外观与行为、工具、AI)和没有箭头的页面(插件、版本控制、构建执行部署、语言与框架、关于)图标不在同一列,后者向左错了 2pt;分组里的子页面(通用、更新……)标题也比分组标题向右错了 2pt。旧版客户端这一列是对齐的。
改动 / Changes
desktop/internal/settingswindow/window_view.gonavContent:顶层行的图标和标题放进自己的一行,用固定的tileGap排列;没有箭头的页面用PadLeft(chevronSlot)留出箭头的位置,不再用chevronSlot - 8的占位块加上 Tree 行的主题间距去凑。desktop/internal/settingswindow/window.go:新增常量tileGap = 8,childIndent改为chevronSlot + tileSize + tileGap,子页面标题与分组标题从同一处开始;注释写明chevronSlot就是 Viva Tree 给自带箭头留的列宽。desktop/internal/settingswindow/window_view_test.go(新增):TestSidebarTilesAndTitlesLineUp用无界面驱动绘制设置窗口,断言 8 个顶层图标在同一列,子页面和顶层页面标题与分组标题起点相同。不在本 PR 范围内 / Out of scope
无。
类型专属:fix
复现与根因
chevronSlot - 8的占位块,图标位置 = 16 + Tree 行间距,默认要求间距是 8;但设置窗口主题用gfx.DensityCompact,Viva Tree 行间距Metrics.GapItem是 6,图标落在 22 而分组行在 24。childIndent同样按 +8 计算,分组标题实际在 24 + 20 + 6 = 50,子页面标题在 52。检查项
desktop/internal/settingswindow/window_view_test.goTestSidebarTilesAndTitlesLineUp,修复前:the tiles start at [36 34 34 34 34 36 36 34], want one columnnavContent、chevronSlot、childIndent只在settingswindow包内使用.agents/notes/implemented/bug-fix/记录:只是布局常量,回归由测试守住范围检查 / Scope checks
功能矩阵 / Feature matrix
N/A:没有新增宿主能力,也没有改变跨平台行为,只修正侧栏像素位置。
插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空shared/i18n/;插件的构建步骤、资源路径和补丁没有写进scripts/resources/、docs/ci-builds.md、Agent Note 或 Skill:未涉及统一日志系统 / Structured logging
N/A:没有新增或改动生命周期、操作终态或失败路径。
界面文案 / i18n
node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,没有放宽脚本或扩大豁免名单逻辑归属 / Logic placement
N/A:只改界面布局,没有业务逻辑。
性能与内存 / Performance and memory
N/A:每个顶层行多声明一个布局行(共 8 行),不涉及启动、输入、滚动或大文件路径。
设置 / Settings
N/A:没有新增或修改设置项和设置页归属,只改侧栏行内排列。
插件契约 / Plugin contract
N/A:未涉及插件契约和宿主方法。
发行包与资源 / Bundle and resources
N/A:没有新增运行时资源或构建资源。
无用代码与重构 / Dead code and refactoring
chevronSlot - 8占位块已删除)refactor标签的 Issue,没有在本 PR 顺手处理:未发现验证 / Verification
scripts/desktop/desktop-go.sh test ./internal/settingswindow -run TestSidebarTilesAndTitlesLineUp -count=1(修复前)the tiles start at [36 34 34 34 34 36 36 34], want one columnscripts/desktop/desktop-go.sh test ./internal/settingswindow -count=1scripts/desktop/desktop-go.sh vet ./internal/settingswindow、gofmt -l.agents/skills/write-stable-tests/scripts/test-stability-macos.sh --package ./internal/settingswindow --filter TestSidebarTilesAndTitlesLineUpLITHE_VISUAL_OUTPUT_DIR=… desktop-go.sh test -tags 'vivahead lithevisual' ./internal/settingswindow -run 'TestVisualSettings/(20-settings-general-light|35-settings-search-light)',前后截图对比node scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --checkrg …未能执行的检查和原因: Windows 未在真机上验证(布局代码两端共用,无平台分支);没有启动整机应用,验证用的是生产 Page 的无界面渲染截图,截图未附在 PR 中;暗色主题和英文界面没有单独截图,布局常量与主题和语言无关。
提交前确认 / Final checks
preview创建;目标分支:feat、fix、docs 为preview,release 以发布流程要求为准.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图