Repository navigation
fix(desktop): gofmt toolchains_state.go,恢复 main 的格式检查 - #2206
Merged
Merged
Conversation
main fails the gofmt check since #2195 aligned only part of the struct. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1lck
marked this pull request as ready for review
November 19, 2026 11:13
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
make fmt-check失败,所有 PR 的 Linux 检查都被它挡住,例如 fix(run)+feat(workspace): 打开项目时识别启动类,并在打开前确认工作区信任(对齐 IDEA) #2197 的 Desktop CI)PR 类型 / Type
改动说明 / What changes
背景 / Why
#2195 在
toolchainsPage结构体里加了preparingRuntime字段,但没有重新对齐同组字段,gofmt -l报告desktop/internal/settingswindow/toolchains_state.go。main 的 Desktop CI(f4c6943b3、76f8a663f)因此在 “Check gofmt” 和 “Vet and test on Linux” 两步失败。改动 / Changes
desktop/internal/settingswindow/toolchains_state.go:运行gofmt -w,只调整runtimeEffect至invalidate这一组字段的对齐空格,没有其他改动。不在本 PR 范围内 / Out of scope
无。
类型专属:fix
复现与根因
无用户可观察缺陷。复现:在 main 上运行
cd desktop && gofmt -l ./,输出internal/settingswindow/toolchains_state.go。根因:新增的字段名比同组其他字段长,gofmt 要求整组重新对齐。检查项
make fmt-check覆盖,修复前失败、修复后为空gofmt -l ./无输出.agents/notes/implemented/bug-fix/记录:CI 已有门禁范围检查 / Scope checks
功能矩阵 / Feature matrix
N/A:只改格式,没有行为变化。
插件归属 / Plugin ownership
N/A:不涉及插件。
UI 验证 / UI evidence
N/A:没有界面变化。
统一日志系统 / Structured logging
N/A:没有日志改动。
界面文案 / i18n
N/A:没有文案改动。
逻辑归属 / Logic placement
N/A:没有逻辑改动。
性能与内存 / Performance and memory
N/A:没有逻辑改动。
设置 / Settings
N/A:没有设置改动。
插件契约 / Plugin contract
N/A:不涉及契约。
发行包与资源 / Bundle and resources
N/A:不涉及资源。
无用代码与重构 / Dead code and refactoring
N/A:只改格式。
验证 / Verification
cd desktop && gofmt -l ./:修复前输出internal/settingswindow/toolchains_state.go,修复后无输出(macOS,提交cbefe5fb9)。提交前确认 / Final checks
main创建;目标分支:main🤖 Generated with Claude Code