Repository navigation
fix(desktop): 新建项目的高级设置箭头跟随展开状态,高级字段出现问题时自动展开 - #1960
Merged
Merged
Conversation
“高级设置”按钮迁移到 Viva 时固定画朝右的箭头,展开后不变。现在收起朝右、 展开朝下。高级字段出现新的问题(如空的必填项)时分组自动展开一次,否则 创建按钮不可用却看不到原因;用户再收起后不会被重新打开。 新增合成插件的回归测试和无头截图场景,更新项目生成器的功能矩阵条目。
xiaoyumuxi
marked this pull request as ready for review
November 15, 2026 07:05
This was referenced Nov 15, 2026
xiaoyumuxi
added a commit
to Lithe-IDEA/lithe-plugin-go
that referenced
this pull request
Nov 15, 2026
* feat: 新建 Go 项目可以选 GOROOT,Go 版本默认取所选 Go 的版本 插件声明 go 工具定义:在 Homebrew、/usr/local/go、~/sdk/go* 等位置找 Go, 用 go version 读版本(需要 Core 6477e9a,宿主 1lck/Lithe-IDEA#1960)。 - 新建项目加入 GOROOT 字段(tool 类型,默认最新的 Go,创建后记为项目固定); Go 版本默认 ${field.goroot.version},没有找到 Go 时需要手动填写。 - 构建系统的 go 在 Go executable 设置之后交给工具定义解析,最后才用 PATH。 - 集成测试改为用插件的工具定义在本机找 Go,覆盖版本跟随、项目固定和用固定的 Go 构建;宿主固定到 fce5d46d3。 * chore: 宿主固定到 1lck/Lithe-IDEA#1964 的分支提交 #1960 合入时没有带上 Core 6477e9a 的固定提交,改由 #1964 单独提交。 宿主固定到 b03dbf0c0(preview 1fc1e8b05 加上 Core 6477e9a),说明里的 宿主 PR 随之改为 #1964。
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
Closes。PINNED_CORE_REVISION升到这个提交,见“Core 固定版本”)PR 类型 / Type
改动说明 / What changes
背景 / Why
新建项目窗口里,生成器声明了
advanced: true的字段收在“高级设置”分组里。点开分组后高级字段出现了,但按钮前的箭头仍然朝右,看起来像没展开。另外,分组默认收起,高级字段如果有问题(比如空着的必填项),“创建”按钮不可用,但收起的分组里看不到原因。
改动 / Changes
desktop/internal/workbench/new_project_view.goicons.ChevronRight,展开时icons.ChevronDown。写法与分支、Git 日志详情、嵌套仓库等已有折叠分组一致。desktop/internal/workbench/new_project_form.gogeneratorForm新增advancedProblem,记录上一次绘制时高级字段是否有问题。按表单保存,切换生成器互不影响。desktop/internal/workbench/new_project_advanced_test.go(新文件)dev.lithe.test.advanced,两个生成器:level有默认值;module是空的必填项。advancedChevronPointsDown:从无头快照中取“高级设置”按钮范围内的三角形图元,宽大于高即朝下。TestNewProjectAdvancedSettingsChevronFollowsTheGroup:初始收起且朝右 → 点击后显示高级字段且朝下 → 再点隐藏且朝右。TestNewProjectAdvancedSettingsOpenOnAProblem:选 Strict 后分组自动展开、显示必填提示、箭头朝下、“创建”不可用;用户收起后重绘仍保持收起。desktop/internal/workbench/visual_capture_test.goTestVisualNewProjectAdvancedSettings:明暗主题 × 中英文,各截收起和展开两张。只需要LITHE_VISUAL_OUTPUT_DIR。scripts/desktop/build-desktop-core.sh(fce5d46d3)PINNED_CORE_REVISION从 52c54e0(w3多终端 #49)升到 6477e9a(feat(toolchain): 工具定义的版本探针可以用子命令开头 Lithe-IDEA/Lithe-core-rust#52)。go version)。Go 插件要靠它声明go工具定义,新建项目时才能提供 GOROOT 下拉,并把“Go 版本”默认设为所选 Go 的版本。插件改动在插件仓库进行。shared/platform-feature-matrix/features/plugin-project-generators.jsonnew_project_advanced_test.go。两端实现状态和验证状态不变。不在本 PR 范围内 / Out of scope
go工具定义、GOROOT 下拉和“Go 版本”默认值:在插件仓库进行,依赖本 PR 的 Core 固定版本。类型专属:fix
复现与根因
advanced字段的生成器插件(例如 Go 插件 0.1.0),在欢迎页点“新建项目”,选中该生成器,再点“高级设置”。ui.Button(c, title).Ghost().Icon(icons.ChevronRight),没有按advancedOpen切换。检查项
desktop/internal/workbench/new_project_advanced_test.go。把箭头临时改回固定朝右时的失败输出:generatorFields只在new_project_view.go调用。icons.ChevronRight/icons.ChevronDown:其他折叠分组(branch_view.go、gitlog_details_view.go、nested_repos_view.go、runconfig_view.go、saved_files.go)都已按状态切换箭头。固定箭头的只有导航行和下拉指示,本来就不随状态变化。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/plugin-project-generators.json(capability、verification、notes、两端 evidence)。两端的实现状态和验证状态没有改动。./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(191 项通过)和./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/preview HEAD(通过:capability records changed)。.artifacts/下生成的矩阵视图。插件归属 / Plugin ownership
rg -n -i 'io\.github\.lithe-idea\.|lithe-idea/lithe-plugin-|PLUGIN_(ARCHIVE|MANIFEST|PACKAGE)\b|"plugin-provided"' desktop scripts shared .github docs/ci-builds.md -g '!desktop/internal/core/testdata/marketplace/**'),结果为空。advancedGeneratorPlugin(dev.lithe.test.advanced),没有真实插件 ID,没有读取插件包,也没有“缺少插件时跳过”的写法。advanced是契约已有字段,宿主只改了呈现方式。UI 验证 / UI evidence
LITHE_VISUAL_OUTPUT_DIR=<目录> scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' -run '^TestVisualNewProjectAdvancedSettings$' -count=1 ./internal/workbench/.artifacts/visual-evidence/new-project-advanced/{before,after}/,用上面的命令可以重新生成。合入前需要人工上传。统一日志系统 / Structured logging
N/A:没有新增或改动生命周期、操作终态或失败路径的日志。
界面文案 / i18n
desktop.newProject.advanced;字段标题来自生成器声明,原样显示。shared/i18n/。node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,都通过,没有放宽脚本或豁免名单。逻辑归属 / Logic placement
project.generatorForm)计算,宿主只决定分组展开与否和箭头方向,属于呈现。性能与内存 / Performance and memory
设置 / Settings
N/A:没有新增或修改设置项。新建项目表单的字段由生成器声明,本 PR 只修分组的折叠呈现。
插件契约 / Plugin contract
发行包与资源 / Bundle and resources
N/A:没有新增或修改运行时资源、缓存、下载物或构建资源步骤。
无用代码与重构 / Dead code and refactoring
验证 / Verification
scripts/desktop/desktop-go.sh test ./internal/workbench/ -run 'TestNewProject' -count=1-run 'TestNewProjectAdvancedSettings',箭头临时改回固定朝右scripts/desktop/desktop-go.sh test ./internal/workbench/ -count=1scripts/desktop/desktop-go.sh test ./...scripts/desktop/desktop-go.sh vet ./internal/workbench/,gofmt -l desktop/internal/workbench/TestVisualNewProjectAdvancedSettings(vivahead lithevisual),改动前后各一次node scripts/i18n/verify-app-language-localization.mjs,node scripts/i18n/generate-i18n.mjs --check./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/preview HEADrg未能执行的检查和原因:
提交前确认 / Final checks
preview(116a0b2bc)创建,目标分支preview.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图