Skip to content

fix(build): 将顶部构建选项明确命名为忽略路径(#2152) - #2343

Merged
1lck merged 5 commits into
mainfrom
lithe-support/issue-2152-build-option-scope-labels
Nov 25, 2026
Merged

1lck merged 5 commits into
mainfrom
lithe-support/issue-2152-build-option-scope-labels

Conversation

@lithe-support

@lithe-support lithe-support Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

关联 Issue / Linked issue

PR 类型 / Type

  • fix:缺陷修复

改动说明 / What changes

背景 / Why

Build 工具窗口顶部工具栏的齿轮按钮只打开项目检测“忽略路径”对话框(openBuildOptions(p, nil)),而构建系统实例行上的齿轮才打开该构建系统的配置选项({name} Options)。旧顶部入口名容易让用户误以为可以在顶部入口修改 Maven 等构建系统自身的工作区选项(如 settings.xml 与本地仓库)。

改动 / Changes

不在本 PR 范围内 / Out of scope

  • Maven 插件自身的选项展示/生效值回显属于独立插件仓库(Lithe-IDEA/lithe-plugin-maven),宿主仓库不添加 Maven 专属配置或页面。
  • 若后续需要从插件设置页直接跳转到当前项目的 Build Options,需要单独设计通用的宿主导航扩展点,不在本 PR 夹带。

类型专属:fix

复现与根因

  • 复现步骤、实际结果、期望结果:打开 Build 工具窗口,将鼠标悬停在工具栏顶部齿轮上并点击打开,此前显示 Build Detection Scope / 构建系统检测范围;现明确显示 Ignored Paths / 忽略路径,与构建系统实例行各自的 {name} Options / {name} 选项 清晰区分。
  • 根因:build_tree_view.go 与 build_options.go 对无实例顶部入口使用了独立的 desktop.build.optionsTitle,未直接表明它只编辑“忽略路径”。
  • 影响平台:macOS / Windows / Linux(共用 Viva 界面)。

检查项

  • 已先写回归测试并确认修复后通过:TestBuildOptionsIgnoredPathsAreSavedOnThisMachineAndRestored 与 TestBuildOptionsNameTheLineOfARefusedIgnoredPath 在更改前按旧名点击失败、更新断言并通过,TestVisualBuildIgnoredPaths 验证顶部齿轮提示与弹框标题。
  • [N/A] 无法自动化时,已写明手动复现与验证步骤:已覆盖自动化测试与无头截图,macOS/Windows 原生实机验收待执行。
  • 已搜索被修改函数、类型、契约字段的全部调用方(全仓搜索 desktop.build.optionsTitle 仅剩下被移除的 i18n 声明)。
  • 已检查另一平台是否有同类缺陷(Viva 跨平台共用 build_tree_view.go 与 build_options.go)。
  • 只改了修复所需的代码,并按规范清除了本次替换产生的无用 i18n 词条。
  • [N/A] 修复改变了行为约束或容易复发,已在 .agents/notes/implemented/bug-fix/ 记录:纯入口文案命名明确化,未改变架构或存储行为。

范围检查 / Scope checks

功能矩阵 / Feature matrix

  • 已更新 shared/platform-feature-matrix/features/build-system-plugins.json:保持 partial / pending,补充无头验证记录与测试证据路径。
  • 已运行 ./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh 与 ./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD。
  • 没有提交 .artifacts/ 下生成的矩阵视图。
  • [N/A] 没有更新矩阵的,理由:已更新矩阵。

插件归属 / Plugin ownership

  • 已在仓库根目录运行 develop-lithe 第三节自查命令,结果为空。
  • 新增视觉测试仅使用内联合成插件 dev.lithe.test.ignored-paths,对具体插件零依赖。
  • 没有为具体插件新建或更新宿主功能矩阵条目。
  • 插件文案没有写进 shared/i18n/。
  • [N/A] 未修改通用扩展点或插件协议。

UI 验证 / UI evidence

  • 已运行受影响场景的 Viva 无头测试 TestVisualBuildIgnoredPaths(提交 8a452ceec,1280×800,dark/light × en-US/zh-Hans,命令:LITHE_VISUAL_OUTPUT_DIR=... ./scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' ./internal/workbench -run '^TestVisualBuildIgnoredPaths$' -count=1 -timeout=120s),并检查生成的 8 张 PNG(工具栏齿轮悬停提示 + 对话框标题)。
  • 已在本 PR 嵌入截图或附上可访问的已上传截图 artifact 链接:保持 Draft,待协调者统一附无头截图后转 Ready。
  • 明暗主题与中英文均已通过无头截图核对;macOS/Windows 原生窗口验收待执行。

统一日志系统 / Structured logging

N/A:未新增或改动日志事件、警告或错误处理边界。

界面文案 / i18n

  • 宿主文案使用共享词条 desktop.build.ignoredPaths;移除了不再被任何代码引用的 desktop.build.optionsTitle,并运行 node scripts/i18n/generate-i18n.mjs 提交生成结果。
  • 插件提供的文字由插件自己翻译,未写进 shared/i18n/。
  • 已运行 node scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --check 与 node --test --test-timeout=60000 scripts/i18n/test-i18n.mjs(62 项通过)。

逻辑归属 / Logic placement

N/A:纯呈现层标签切换与测试,未新增或修改业务逻辑。

性能与内存 / Performance and memory

N/A:未新增后台任务、缓存、定时器或改动性能热路径。

设置 / Settings

  • 忽略路径字段保持 ⓘ 说明(desktop.build.ignoredPathsHelp)及配置来源提示(本机/团队/默认),不引入 Maven 专属宿主表单。
  • [N/A] 未新增或移动 macOS 设置页。

插件契约 / Plugin contract

N/A:未改动插件契约、能力版本或宿主方法。

发行包与资源 / Bundle and resources

  • 运行 ./scripts/desktop/verify/verify-runtime-bundle-immutability.sh 通过;未新增或修改运行时资源路径。
  • [N/A] 未新增或修改构建缓存或下载资源。

无用代码与重构 / Dead code and refactoring

  • 本次改动导致变成无用的词条 desktop.build.optionsTitle 已在本 PR 同步删除并重新生成字典。
  • [N/A] 本次改动范围内未发现其他需要建单的既有债务。

验证 / Verification

命令或操作 平台 结果
gofmt -l desktop macOS 通过(无输出)
./scripts/desktop/desktop-go.sh vet ./... macOS 通过
./scripts/desktop/desktop-go.sh vet -tags dev ./... macOS 通过
./scripts/desktop/desktop-go.sh test ./internal/i18n -count=1 macOS 通过(1.208s)
./scripts/desktop/desktop-go.sh test -tags 'dev vivahead' ./internal/settingswindow -count=1 macOS 通过(5.549s)
./scripts/desktop/desktop-go.sh test -tags 'dev vivahead' ./internal/workbench -run '^TestBuild' -count=1 macOS 通过(43.785s)
./scripts/desktop/desktop-go.sh test -tags 'dev vivahead' -race ./internal/workbench -run 'TestBuildOptions|TestBuildToolbar|TestBuildTree|TestBuildAndRunOption' -count=1 macOS 通过(8.475s)
LITHE_VISUAL_OUTPUT_DIR=... ./scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' ./internal/workbench -run '^TestVisualBuildIgnoredPaths$' -count=1 -timeout=120s macOS 通过(2.338s,8 张 PNG 已检查)
./.agents/skills/write-stable-tests/scripts/verify-test-stability.sh --base origin/main macOS 通过(DesktopGo 由下方 timing 与 race 覆盖)
./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh --package ./internal/workbench -- --filter 'TestBuildOptionsIgnoredPathsAreSavedOnThisMachineAndRestored|TestBuildOptionsNameTheLineOfARefusedIgnoredPath' macOS 通过(2 项用例:410ms / 60ms,报告 .artifacts/test-stability/index.html)
./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD & ./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh macOS 通过(222 项能力校验通过)
./scripts/agent-notes/verify-agent-notes.sh macOS 通过(204 篇 Active Note)
node scripts/i18n/verify-app-language-localization.mjs & generate-i18n.mjs --check & node --test --test-timeout=60000 scripts/i18n/test-i18n.mjs macOS 通过(12627/12627,62 项测试)
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh & node scripts/desktop/validate-pins.mjs macOS 通过
插件零依赖 rg 自查 macOS 通过(无命中)

未能执行的检查和原因:

  • Windows 测试与真机桌面端交互验收:当前在 macOS 主机上执行,未运行 Windows VM 或实机窗口验收,待 Windows runner 与协调者附图验收。

提交前确认 / Final checks

  • 已合入最新 origin/main,目标分支为 main
  • 保持 Draft,待协调者统一附截图后转 Ready
  • 无无关改动,未提交 .artifacts/、PNG 或 extension-host/
  • 测试结束后无残留 Lithe 进程

@ghfind-review ghfind-review Bot added the review: no-score ghfind author score missing (not zero) label Nov 23, 2026
1lck added 3 commits November 23, 2026 09:04
…152-build-option-scope-labels

# Conflicts:
#	desktop/internal/workbench/build_tree_view.go
#	shared/platform-feature-matrix/features/build-system-plugins.json
# Conflicts:
#	shared/platform-feature-matrix/features/build-system-plugins.json
@1lck
1lck marked this pull request as ready for review November 25, 2026 07:32

@1lck 1lck left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已核对顶部忽略路径和实例选项的文案范围,本地工作台回归及翻译生成检查通过。

@1lck
1lck merged commit eba11f5 into main Nov 25, 2026
15 of 19 checks passed
@xiaoyumuxi xiaoyumuxi mentioned this pull request Nov 25, 2026
9 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: no-score ghfind author score missing (not zero)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant