Repository navigation
feat(desktop): Build 窗口可运行的行常驻绿色运行按钮,依赖标题加 ⓘ - #1896
Merged
Merged
Conversation
- 参照 IDEA 的 Make 窗口:每个任务行和有运行入口的目标行,行首常驻绿色 ▷, 不必先选中,点一下就选中该行并运行,然后打开 Run 窗口的构建控制台; 构建进行中按钮变暗、不可点。没有运行入口的目标和项目仍显示类型图标, ▷ 与图标同宽,名称对齐。调试按钮仍只在选中的行上。 - 名称与路径放不下时,路径先缩(按权重收缩),名称以省略号结尾;悬停提示 显示完整的名称和路径,同时作为无障碍提示。#1895 给只显示路径的目标设的 tooltip(完整名称)优先,两者由 buildItemTip 统一给出。 - “依赖”标题旁加 ⓘ:依赖树在第一次展开时才由构建工具读取,以及何时重新读取。 新增 i18n 词条 desktop.build.dependenciesHelp(中英)。 - 测试 TestBuildTreeRunMarksRunTheirRowsAtOnce:▷ 只出现在可运行的行, 未选中时点 ▷ 就以该行发出请求,构建进行中没有可点的 ▷,悬停提示与 ⓘ 文案。 - 截图:新增 build-go-targets 场景(以导入路径命名目标的 Go 模块), 重新生成其余截图。 - 功能矩阵 build-system-plugins 的说明补上该行为。 - 通知测试直接调用 notify 后没有请求重绘,依赖偶然的唤醒才画出 toast, 整套测试负载下 TestNoticesKeepTheirKindAndShowAtMostThreeToasts 会失败; 三个通知测试在 settle 前显式 Invalidate。
xiaoyumuxi
marked this pull request as ready for review
November 14, 2026 04:56
This was referenced Nov 14, 2026
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
IDEA 的 Make 窗口里,每个可运行的目标行首都有绿色 ▷,看一眼就知道哪些能跑,点一下就运行。Lithe 的 Build 窗口只有选中的那一行才有运行按钮:要先点选中,再去点工具栏或行尾的按钮,而且看不出哪些目标能运行。另外 Go 模块的目标名是完整导入路径,窄窗口里名称和路径会挤在一起,被窗口边缘直接截断,没有省略号。依赖分组折叠着,展开后才会运行构建工具读取依赖,用户也不知道为什么要等、什么时候会重新读取。
改动 / Changes
常驻运行按钮(
build_tree_view.go的buildRunMark):buildPrimaryAction有运行的),行首放绿色 ▷(colors.Success),替换该行的类型图标。RoleButton,悬停是手形,提示为“运行 {名称}”),同时作为无障碍标签。名称优先、路径先省略:标签
Shrink(1),路径Shrink(1000),两者都MinWidth(0)并以省略号结尾。行太窄时路径先缩,路径没了才轮到名称。悬停提示(
buildItemTip):项目、目标、任务行悬停显示完整名称,下一行是完整路径。feat(desktop): Build 窗口的目标行只显示路径,悬停显示完整名称 #1895 给“只显示路径的目标”设的tooltip(完整名称)优先,两种提示由同一个函数给出,不会叠加。依赖标题的 ⓘ:依赖分组标题旁加 ⓘ,说明依赖树在第一次展开时才由构建工具读取,以及什么时候重新读取(重新检测构建系统,或在构建系统、依赖上选“重新加载”)。新增 i18n 词条
desktop.build.dependenciesHelp(中英),并重新生成shared.generated.go。测试(
build_tree_test.go):新增TestBuildTreeRunMarksRunTheirRowsAtOnce,覆盖以下几点:回退成“只在选中行有运行按钮”时,这个测试会失败(本地反向验证过)。
截图(
build_panels_visual_test.go、docs/assets/build-panels/):新增build-go-targets场景,内容是一个以导入路径命名目标的 Go 模块,两个命令可运行,其余是测试包,有任务和依赖。其余四张截图按当前代码重新生成,README 补一行。功能矩阵:
build-system-plugins的说明补上上述行为和测试名,状态保持 partial/pending。顺手修的不稳定测试(
notifications_test.go):notify后只settle()一次,没有请求重绘。Driver.Pump只在有待处理的唤醒时才重画,所以 toast 能否画出来,取决于前面有没有偶然留下的唤醒。整套测试负载下,TestNoticesKeepTheirKindAndShowAtMostThreeToasts会失败(“the newest toasts are not up”)。Len()==3没能发现:Toaster.Show按标题去重,错误和成功两个“Sync”是同一个 toast,所以没画过也是 3。settle前显式invalidator.Invalidate(),和仓库里其他测试的做法一致。截图(深色中文 / 浅色英文):
不在本 PR 范围内 / Out of scope
以下改动已规划,分别提交:
build.detect跳过被 Git 忽略的目录:Lithe-IDEA/Lithe-core-rust#33(Draft)。合入后另开桌面端 PR 升级PINNED_CORE_REVISION,不叠在本 PR 上。displayName,以及 lithe-plugin-go 映射它:feat(desktop): Build 窗口的目标行只显示路径,悬停显示完整名称 #1895 已让目标行只显示路径并在悬停时给出完整名称,这两项可能已经不需要,待确认。类型专属:feat
多平台对齐
platform-specific),理由:范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/build-system-plugins.json的说明;状态和验证保持 partial/pending./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(222 项通过)和./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/preview HEAD(通过).artifacts/下生成的矩阵视图统一日志系统 / Structured logging
N/A:没有新增生命周期里程碑、操作终态或失败路径。点 ▷ 复用已有的运行路径,打点用已有的
performed("build.item.run")。界面文案 / i18n
desktop.build.dependenciesHelp在shared/i18n/补齐中英,运行了node scripts/i18n/generate-i18n.mjs并提交生成结果;▷ 的提示复用已有的RunTargetnode scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,都通过;没有放宽脚本逻辑归属 / Logic placement
buildPrimaryAction和任务声明,没有新增业务规则性能与内存 / Performance and memory
设置 / Settings
N/A:没有改设置项或设置页。依赖标题的 ⓘ 按“难懂的功能用 ⓘ”加。
插件契约 / Plugin contract
N/A:不改契约和宿主方法。
发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh,通过无用代码与重构 / Dead code and refactoring
buildItemIcons只留给不可运行的行验证 / Verification
./scripts/desktop/desktop-go.sh test ./... -count=1(在desktop/,rebase 到最新 preview 后)./scripts/desktop/desktop-go.sh test ./internal/workbench/ -run 'TestBuild|TestNotice|TestNotification|TestRepeatedNotices|TestRunConfiguration' -count=5./scripts/desktop/desktop-go.sh test ./internal/workbench/ -run TestNoticesKeepTheirKindAndShowAtMostThreeToasts -count=20./scripts/desktop/desktop-go.sh vet ./internal/workbench/、gofmt -lLITHE_VISUAL_OUTPUT_DIR=… ./scripts/desktop/desktop-go.sh test -tags vivahead,lithevisual ./internal/workbench -run '^TestVisualBuildPanels'node --test --test-timeout=60000 scripts/i18n/test-i18n.mjsnode scripts/i18n/generate-i18n.mjs --check、node scripts/i18n/verify-app-language-localization.mjs.agents/skills/write-stable-tests/scripts/verify-test-stability.sh --base origin/preview./scripts/desktop/verify/verify-runtime-bundle-immutability.sh未能执行的检查和原因: Windows 实机没有运行;截图来自无头渲染,不代表原生窗口验收。没有在打包后的应用里手动点过 ▷。
提交前确认 / Final checks
preview(已 rebase 到 feat(desktop): Build 窗口的目标行只显示路径,悬停显示完整名称 #1895 之后),目标分支preview