Skip to content

fix(config): add workspace and git_branch to known status bar items#4679

Closed
ttmouse wants to merge 1 commit into
esengine:main-v2from
ttmouse:pr/fix-settings-workspace-git
Closed

fix(config): add workspace and git_branch to known status bar items#4679
ttmouse wants to merge 1 commit into
esengine:main-v2from
ttmouse:pr/fix-settings-workspace-git

Conversation

@ttmouse

@ttmouse ttmouse commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

问题

设置面板中新增了「工作区」(workspace) 和「Git 分支」(git_branch) 两个状态栏维度,但在设置面板中无法开启。

根因

前端代码(枚举定义、SettingsPanel 标签、StatusBar 渲染器、i18n 翻译)已完整支持 workspace 和 git_branch,但 Go 后端knownDesktopStatusBarItems 映射和 defaultDesktopStatusBarItems 列表中缺少这两项,导致后端在 SetDesktopStatusBarItems()normalizeDesktopStatusBarItems() 时将其过滤掉。

修复

internal/config/config.go 中:

  1. defaultDesktopStatusBarItems 添加 "workspace""git_branch",位于 "model" 之后
  2. knownDesktopStatusBarItems 添加对应的 true 条目

验证

  • go build ./internal/config/...
  • go test ./internal/config/... -run TestDesktopStatusBar

The workspace and git_branch status bar items were added to the frontend
enum and UI (SettingsPanel labels, StatusBar renderers, i18n translations)
but the Go backend config didn't include them in knownDesktopStatusBarItems
or defaultDesktopStatusBarItems. This caused the backend to silently filter
them out, making them impossible to enable in the settings panel.

Fix by adding both entries to the known map (so SetDesktopStatusBarItems
accepts them) and the default list (so they appear enabled by default).
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development config Configuration & setup (internal/config) labels Jun 17, 2026
@ttmouse

ttmouse commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author
image 解决这两个不能够开启的问题。

@ttmouse ttmouse closed this Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration & setup (internal/config) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant