From 7813de8f5a6e705b5a6665dae8656c9cf46a143c Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:28:17 +0000 Subject: [PATCH 01/13] fix(viva): avoid named keys on text and spacer leaf widgets --- desktop/internal/settingswindow/window_view.go | 9 +++++---- desktop/internal/workbench/chrome_view.go | 4 ++-- .../features/settings-about-page.json | 8 +++++--- .../features/workbench-tool-stripe-icons.json | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/desktop/internal/settingswindow/window_view.go b/desktop/internal/settingswindow/window_view.go index c9f23d5df3..2cc50930e6 100644 --- a/desktop/internal/settingswindow/window_view.go +++ b/desktop/internal/settingswindow/window_view.go @@ -429,27 +429,28 @@ func (w *window) breadcrumb(c ui.C) { w.crumbs = w.appendCrumbs(w.crumbs[:0]) var chosen *crumb ui.Row(c).FillWidth().Height(crumbHeight).Shrink(0).PadX(18).Gap(8).Items(ui.Center).Background(b.surface).Children(func() { + // Keys belong on interactive containers, not leaf Text elements. for i := range w.crumbs { crumb := &w.crumbs[i] k := c.KeyInt(i) if i > 0 { - ui.Text(k.Part("sep"), "›").FontSize(buildFont).Color(b.faint).Shrink(0) + ui.Text(c, "›").FontSize(buildFont).Color(b.faint).Shrink(0) } last := i == len(w.crumbs)-1 switch { case last: - ui.Text(k, crumb.title).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Shrink(1).MinWidth(0).Ellipsis() + ui.Text(c, crumb.title).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Shrink(1).MinWidth(0).Ellipsis() case crumb.link: button := ui.ButtonBase(k, crumb.title).Shrink(1).MinWidth(0).Items(ui.Center) if button.Clicked() { chosen = crumb } button.Children(func() { - ui.Text(k, crumb.title).FontSize(buildFont).Color(b.sub).Shrink(1).MinWidth(0).Ellipsis(). + ui.Text(c, crumb.title).FontSize(buildFont).Color(b.sub).Shrink(1).MinWidth(0).Ellipsis(). StateFrom(button).Hover(ui.Look{}.Color(b.accent)) }) default: - ui.Text(k, crumb.title).FontSize(buildFont).Color(b.sub).Shrink(1).MinWidth(0).Ellipsis() + ui.Text(c, crumb.title).FontSize(buildFont).Color(b.sub).Shrink(1).MinWidth(0).Ellipsis() } } }) diff --git a/desktop/internal/workbench/chrome_view.go b/desktop/internal/workbench/chrome_view.go index 46de23070b..6455f0d045 100644 --- a/desktop/internal/workbench/chrome_view.go +++ b/desktop/internal/workbench/chrome_view.go @@ -142,7 +142,7 @@ func (a *App) titleBar(c ui.C) { a.chromeProject(c) a.chromeBranch(c) } - ui.Spacer(c) + ui.Row(c).Grow(1) zone := ui.Row(c).Items(ui.Center).Gap(chromeGap).Children(func() { for _, i := range a.chrome.items[zoneTitle] { if a.chromeTitleButton(c, i) { @@ -302,7 +302,7 @@ func (a *App) stripe(c ui.C, left bool) { if i := a.stripeZone(c, top, left, dragging); i >= 0 { clicked = i } - ui.Spacer(c) + ui.Column(c).Grow(1) if i := a.stripeZone(c, split, left, dragging); i >= 0 { clicked = i } diff --git a/shared/platform-feature-matrix/features/settings-about-page.json b/shared/platform-feature-matrix/features/settings-about-page.json index 0e6d50d8ae..cf50b1b95e 100644 --- a/shared/platform-feature-matrix/features/settings-about-page.json +++ b/shared/platform-feature-matrix/features/settings-about-page.json @@ -22,7 +22,8 @@ "desktop/internal/buildinfo/preview.go", "desktop/internal/workbench/welcome_view.go", "scripts/desktop/package-desktop.sh", - "scripts/ci/desktop-release/package-release.sh" + "scripts/ci/desktop-release/package-release.sh", + "desktop/internal/settingswindow/window_view.go" ] }, "windows": { @@ -44,11 +45,12 @@ "desktop/internal/buildinfo/preview.go", "desktop/internal/workbench/welcome_view.go", "scripts/desktop/package-desktop.sh", - "scripts/ci/desktop-release/package-release.sh" + "scripts/ci/desktop-release/package-release.sh", + "desktop/internal/settingswindow/window_view.go" ] }, "owner": "Settings", "releaseSource": "只有 Desktop Release 为 desktop-v<版本> 标签的提交打包时传 package-desktop.sh --stable(lithe_stable 构建标签),应用内显示不带“预览版”的版本号,package-release.sh 校验每个打包程序都带这个标签;desktop-AutoBuild、本地打包和 go run 都显示“<版本> 预览版”。", - "verification": "发布验收:在 macOS 和 Windows 的正式包中核对欢迎页、关于页和复制的版本信息均与对应桌面发布标签的版本号一致,且均无预览版标识;版本信息和复制内容里的 Go 运行时与 desktop/go.mod 的 toolchain 行一致;同版本的本地构建仍显示预览版。无头窗口测试覆盖:关于页排在 AI 之后、面包屑只有“关于”;预览版显示“0.7.0 预览版”;QQ 群、Issue、Rust Core 和 Viva 上游链接打开对应地址;复制成功与失败(失败时显示原因并上报);版本信息与更新卡片“已是最新”在正式版和预览版下的文字;复制内容与平台、构建、运行时的读取(打包写入的提交与时间优先,含未记录提交和时间不可读)。macOS 生成了中英文、浅色和深色的无头截图(36-settings-about,以及滚到项目卡片的 36-settings-about-projects)。运行 scripts/desktop/desktop-go.sh test -race ./internal/settingswindow ./internal/workbench -run 'TestAbout|TestUpdateLineSays|TestWelcomeTitleAndVersion'。真实窗口、Windows 实机和正式版安装包上的标识尚未验收。", + "verification": "发布验收:在 macOS 和 Windows 的正式包中核对欢迎页、关于页和复制的版本信息均与对应桌面发布标签的版本号一致,且均无预览版标识;版本信息和复制内容里的 Go 运行时与 desktop/go.mod 的 toolchain 行一致;同版本的本地构建仍显示预览版。无头窗口测试覆盖:关于页排在 AI 之后、面包屑只有“关于”;预览版显示“0.7.0 预览版”;QQ 群、Issue、Rust Core 和 Viva 上游链接打开对应地址;复制成功与失败(失败时显示原因并上报);版本信息与更新卡片“已是最新”在正式版和预览版下的文字;复制内容与平台、构建、运行时的读取(打包写入的提交与时间优先,含未记录提交和时间不可读)。macOS 生成了中英文、浅色和深色的无头截图(36-settings-about,以及滚到项目卡片的 36-settings-about-projects)。运行 scripts/desktop/desktop-go.sh test -race ./internal/settingswindow ./internal/workbench -run 'TestAbout|TestUpdateLineSays|TestWelcomeTitleAndVersion'。真实窗口、Windows 实机和正式版安装包上的标识尚未验收。 2026-11-23 CI Viva 断言修复:回归 TestAboutPageShowsThePreviewAndCopiesTheFacts、TestWorkbenchDefaultLayout,验证文字叶节点不使用 KeyInt、工具栏弹性占位由容器承担身份,功能与位置保持不变;macOS/Windows 原生验证仍 pending。", "notes": "Viva 设置侧栏在 AI 之后增加一级页面“关于”:顶部是图标、名称、简介和复制按钮(复制版本、平台、构建与运行时,用于提交 Issue);“版本信息”显示版本、平台、构建(提交与日期)和 Go 运行时;“更新”是完整的更新设置:自动检查更新、更新渠道、发布源(保存与恢复默认)和立即检查,不再重复当前版本与构建;“加入交流”有 QQ 群 163027877 与微信群(飞书页面);“项目”有源码仓库、Issue、Rust Core(Lithe-IDEA/Lithe-core-rust)和 Viva 上游(vivaui/viva,图标是 Viva 标志,由 generate-desktop-icons.sh 从固定版本的 Viva 源码编译)。不显示 Core C ABI 版本。版本号来自 desktop/viva.toml;Go 运行时是 runtime.Version(),即构建所用的工具链,CI 的 setup-go 按 desktop/go.mod 的 toolchain 行安装;欢迎页、关于页和复制内容都按同一规则显示正式版或预览版。2026-11-18:外观与行为下的独立“更新”页删除,更新设置整体迁入关于页。" } diff --git a/shared/platform-feature-matrix/features/workbench-tool-stripe-icons.json b/shared/platform-feature-matrix/features/workbench-tool-stripe-icons.json index 020e734f45..1d72374c61 100644 --- a/shared/platform-feature-matrix/features/workbench-tool-stripe-icons.json +++ b/shared/platform-feature-matrix/features/workbench-tool-stripe-icons.json @@ -5,7 +5,7 @@ "capability": "工具窗口栏使用 IntelliJ New UI 的工具窗口图标和尺寸", "owner": "Workbench", "notes": "Viva 共享实现。项目、提交、结构、查找、Git、终端、问题、运行、调试、构建、通知、服务使用 IntelliJ Community(Apache-2.0,修订 c7f91397daa3a961b4e78bc634fe467a0a7d9ade)的 20×20 New UI 工具窗口图标,许可见 desktop/internal/toolicons/NOTICE;IDEA 没有对应图标的入口(引用、测试、安全、背景)和隐藏入口列表的“…”使用 Lucide 图标,描边减到 1.8 以接近 IDEA 的线宽;插件声明的通用工具图标名映射到同一套图标。icons.go 由 scripts/desktop/generate-desktop-file-icons.sh --tools-only 从 SVG 生成,运行时不读写文件。尺寸:40pt 工具栏、30pt 按钮、20pt 图标、10pt 间距。", - "verification": "打开工作区,对照 IntelliJ IDEA New UI 检查左右工具窗口栏:图标形状和大小一致,选中按钮为主题主色圆角底配反色图标;拖动按钮时拖动预览里的图标居中,插入线落在两个按钮正中。浅色和深色主题各看一次。自动化:stripe_test.go 的 TestToolStripeButtonsHaveTheToolWindowBarSizes。", + "verification": "打开工作区,对照 IntelliJ IDEA New UI 检查左右工具窗口栏:图标形状和大小一致,选中按钮为主题主色圆角底配反色图标;拖动按钮时拖动预览里的图标居中,插入线落在两个按钮正中。浅色和深色主题各看一次。自动化:stripe_test.go 的 TestToolStripeButtonsHaveTheToolWindowBarSizes。 2026-11-23 CI Viva 断言修复:回归 TestAboutPageShowsThePreviewAndCopiesTheFacts、TestWorkbenchDefaultLayout,验证文字叶节点不使用 KeyInt、工具栏弹性占位由容器承担身份,功能与位置保持不变;macOS/Windows 原生验证仍 pending。", "macos": { "implementationStatus": "implemented", "verificationStatus": "pending", From ca7928c0a88702abc136c5394c78c8e962611d9c Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:39:03 +0000 Subject: [PATCH 02/13] fix(viva): remove identity keys from static text, paragraphs, and wraps --- desktop/internal/settingswindow/ai_generation_view.go | 2 +- desktop/internal/settingswindow/command_install.go | 2 +- desktop/internal/settingswindow/plugin_settings_view.go | 2 +- .../internal/settingswindow/source_settings_entries_view.go | 2 +- desktop/internal/settingswindow/window_view.go | 3 +-- desktop/internal/workbench/branch_view.go | 2 +- desktop/internal/workbench/commit_view.go | 2 +- desktop/internal/workbench/git_gutter.go | 2 +- desktop/internal/workbench/gitreview_diff_view.go | 2 +- desktop/internal/workbench/inlineedit_view.go | 2 +- desktop/internal/workbench/local_history_view.go | 4 ++-- desktop/internal/workbench/new_project_view.go | 2 +- desktop/internal/workbench/remote_host_containers.go | 2 +- desktop/internal/workbench/remote_import.go | 2 +- desktop/internal/workbench/search_replace_view.go | 4 ++-- desktop/internal/workbench/vcs_view.go | 2 +- desktop/internal/workbench/viewer_view.go | 2 +- 17 files changed, 19 insertions(+), 20 deletions(-) diff --git a/desktop/internal/settingswindow/ai_generation_view.go b/desktop/internal/settingswindow/ai_generation_view.go index 0d97dc6b57..b870328211 100644 --- a/desktop/internal/settingswindow/ai_generation_view.go +++ b/desktop/internal/settingswindow/ai_generation_view.go @@ -30,7 +30,7 @@ func (w *window) generationCard(c ui.C) { ui.Text(c, i18n.Shared(w.marketLanguage(), "desktop.settings.aiGeneration.loading")).FontSize(12).Color(w.pal.muted) } for _, source := range []string{"codex", "claude"} { - ui.Wrap(c.Key("gen/"+source), w.generationSourceLine(w.marketLanguage(), source, st.providers, st.loaded)).FontSize(12).Color(w.pal.muted) + ui.Wrap(c, w.generationSourceLine(w.marketLanguage(), source, st.providers, st.loaded)).FontSize(12).Color(w.pal.muted) } provider := generationIndex(generationProviderChoices[:], current.Provider) providers := []int{0, 1, 2} diff --git a/desktop/internal/settingswindow/command_install.go b/desktop/internal/settingswindow/command_install.go index d1a184151d..6073346215 100644 --- a/desktop/internal/settingswindow/command_install.go +++ b/desktop/internal/settingswindow/command_install.go @@ -524,7 +524,7 @@ func (w *window) commandInstallOffer(c ui.C, language i18n.Language, dialog *com ui.Text(c, i18n.Shared(language, "desktop.plugins.commandInstallCommand")).FontSize(13).Bold().PadTop(4) ui.Column(c).FillWidth().Gap(2).Pad(8).Radius(6).Background(w.pal.card).Stroke(1, w.pal.line).Children(func() { for index, variable := range chosen.Environment { - ui.Wrap(c.KeyInt(index), variable).Mono().FontSize(11).Color(w.pal.muted) + ui.Wrap(c, variable).Mono().FontSize(11).Color(w.pal.muted) } ui.Wrap(c, chosen.CommandLine).Mono().FontSize(11).Color(w.pal.text) }) diff --git a/desktop/internal/settingswindow/plugin_settings_view.go b/desktop/internal/settingswindow/plugin_settings_view.go index 29282f2066..2ba7986390 100644 --- a/desktop/internal/settingswindow/plugin_settings_view.go +++ b/desktop/internal/settingswindow/plugin_settings_view.go @@ -215,7 +215,7 @@ func (w *window) readOnlyList(c ui.C, label, value string) { HitWith(ui.ID(c), label, gfx.HitOptions{Role: gfx.RoleTextField, Value: value, ReadOnly: true, Disabled: true}). Children(func() { for index, line := range strings.Split(value, "\n") { - ui.Text(c.Key(strconv.Itoa(index)), line).FontSize(13).Color(w.pal.muted).FillWidth().Ellipsis() + ui.Text(c, line).FontSize(13).Color(w.pal.muted).FillWidth().Ellipsis() } }) } diff --git a/desktop/internal/settingswindow/source_settings_entries_view.go b/desktop/internal/settingswindow/source_settings_entries_view.go index ab480fbae9..2c525e1534 100644 --- a/desktop/internal/settingswindow/source_settings_entries_view.go +++ b/desktop/internal/settingswindow/source_settings_entries_view.go @@ -82,7 +82,7 @@ func (w *window) sourceEntryToolbar(c ui.C, p *sourceSettingsForm, source core.S ui.Spacer(c) if len(entries) > 0 { for _, attribute := range field.Attributes { - ui.Text(c.Key(attribute.ID), attribute.Title).FontSize(11).Color(w.pal.muted).Width(entryAttributeWidth(attribute)).Shrink(0).Ellipsis() + ui.Text(c, attribute.Title).FontSize(11).Color(w.pal.muted).Width(entryAttributeWidth(attribute)).Shrink(0).Ellipsis() } } }) diff --git a/desktop/internal/settingswindow/window_view.go b/desktop/internal/settingswindow/window_view.go index 2cc50930e6..8943f266b5 100644 --- a/desktop/internal/settingswindow/window_view.go +++ b/desktop/internal/settingswindow/window_view.go @@ -432,7 +432,6 @@ func (w *window) breadcrumb(c ui.C) { // Keys belong on interactive containers, not leaf Text elements. for i := range w.crumbs { crumb := &w.crumbs[i] - k := c.KeyInt(i) if i > 0 { ui.Text(c, "›").FontSize(buildFont).Color(b.faint).Shrink(0) } @@ -441,7 +440,7 @@ func (w *window) breadcrumb(c ui.C) { case last: ui.Text(c, crumb.title).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Shrink(1).MinWidth(0).Ellipsis() case crumb.link: - button := ui.ButtonBase(k, crumb.title).Shrink(1).MinWidth(0).Items(ui.Center) + button := ui.ButtonBase(c.KeyInt(i), crumb.title).Shrink(1).MinWidth(0).Items(ui.Center) if button.Clicked() { chosen = crumb } diff --git a/desktop/internal/workbench/branch_view.go b/desktop/internal/workbench/branch_view.go index cc7093bf2c..dde8204fb5 100644 --- a/desktop/internal/workbench/branch_view.go +++ b/desktop/internal/workbench/branch_view.go @@ -668,7 +668,7 @@ func (a *App) drawBranchConflictDialog(c ui.C, p *project) { ui.Scroll(c).Scrollbars().FillWidth().MaxHeight(branchBlockingHeight).Children(func() { ui.Column(c).FillWidth().Gap(2).Children(func() { for _, path := range b.blocking { - ui.Text(c.Key(path), path).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis() + ui.Text(c, path).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis() } }) }) diff --git a/desktop/internal/workbench/commit_view.go b/desktop/internal/workbench/commit_view.go index cfc5b889e2..f10d183f2e 100644 --- a/desktop/internal/workbench/commit_view.go +++ b/desktop/internal/workbench/commit_view.go @@ -489,7 +489,7 @@ func (a *App) drawCommitResults(c ui.C, p *project, target commitTarget) { ui.Text(c, t.Result(target.repositoryName(id), a.commitStatusLabel(result.Status))).Color(tint).Ellipsis().Grow(1) }) if result.Detail != "" { - ui.Paragraph(c.Key(id+"/detail"), result.Detail, 3).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) + ui.Paragraph(c, result.Detail, 3).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) } } ui.Row(c).FillWidth().Items(ui.Center).Gap(6).Children(func() { diff --git a/desktop/internal/workbench/git_gutter.go b/desktop/internal/workbench/git_gutter.go index fc2b756c46..c90c6d0e7e 100644 --- a/desktop/internal/workbench/git_gutter.go +++ b/desktop/internal/workbench/git_gutter.go @@ -294,7 +294,7 @@ func (a *App) gitGutterPeek(c ui.C, p *project, d *document, anchor ui.Box) { if i == maxLines { break } - ui.Text(c.KeyInt(i), line).Mono().FontSize(12).Color(a.colors.Text).Ellipsis() + ui.Text(c, line).Mono().FontSize(12).Color(a.colors.Text).Ellipsis() } ui.Row(c).Gap(6).Children(func() { if ui.Button(c.Key("previous"), i18n.Shared(a.language(), "desktop.git.gutter.previous")).Ghost().Clicked() { diff --git a/desktop/internal/workbench/gitreview_diff_view.go b/desktop/internal/workbench/gitreview_diff_view.go index 1cb72dcc51..c4570ebe85 100644 --- a/desktop/internal/workbench/gitreview_diff_view.go +++ b/desktop/internal/workbench/gitreview_diff_view.go @@ -178,7 +178,7 @@ func (a *App) drawRollbackDialog(c ui.C, p *project) { ui.Column(c).FillWidth().Gap(8).Children(func() { ui.Paragraph(c, i18n.Shared(a.language(), "git.rollback.warning"), 4).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) for _, change := range r.changes { - ui.Text(c.Key(change.Path), change.Path).Ellipsis() + ui.Text(c, change.Path).Ellipsis() } ui.Checkbox(c, &r.deleteAdded, i18n.Shared(a.language(), "git.rollback.deleteAdded")).Disabled(r.busy) }) diff --git a/desktop/internal/workbench/inlineedit_view.go b/desktop/internal/workbench/inlineedit_view.go index ea89893d05..963d393ecf 100644 --- a/desktop/internal/workbench/inlineedit_view.go +++ b/desktop/internal/workbench/inlineedit_view.go @@ -51,7 +51,7 @@ func (a *App) inlineEditView(c ui.C, p *project) { case diffAdded: color, mark = a.colors.Success, "+ " } - ui.Text(c.KeyInt(i), mark+line.text).Mono().FontSize(a.theme.Metrics.FontSizeS).Color(color) + ui.Text(c, mark+line.text).Mono().FontSize(a.theme.Metrics.FontSizeS).Color(color) } }) } diff --git a/desktop/internal/workbench/local_history_view.go b/desktop/internal/workbench/local_history_view.go index b09927625c..46b90fd011 100644 --- a/desktop/internal/workbench/local_history_view.go +++ b/desktop/internal/workbench/local_history_view.go @@ -52,10 +52,10 @@ func (a *App) drawLocalHistory(c ui.C, p *project) { } for i, line := range strings.SplitN(h.preview, "\n", localHistoryPreviewLines+1) { if i == localHistoryPreviewLines { - ui.Text(c.KeyInt(i), "…").Muted() + ui.Text(c, "…").Muted() break } - ui.Text(c.KeyInt(i), line).Mono().FontSize(12).Color(a.colors.Text) + ui.Text(c, line).Mono().FontSize(12).Color(a.colors.Text) } }) }) diff --git a/desktop/internal/workbench/new_project_view.go b/desktop/internal/workbench/new_project_view.go index c4a2ea79cd..141be61a24 100644 --- a/desktop/internal/workbench/new_project_view.go +++ b/desktop/internal/workbench/new_project_view.go @@ -532,7 +532,7 @@ func (a *App) projectOutput(c ui.C, language i18n.Language, lines []string) { ui.Text(c, i18n.Shared(language, "desktop.newProject.output")).FontSize(12).Muted() ui.Column(c).FillWidth().Gap(2).Children(func() { for index, line := range lines { - ui.Text(c.KeyInt(index), line).Mono().FontSize(11).Color(a.colors.Subtle) + ui.Text(c, line).Mono().FontSize(11).Color(a.colors.Subtle) } }) } diff --git a/desktop/internal/workbench/remote_host_containers.go b/desktop/internal/workbench/remote_host_containers.go index e97b21c9ae..0ec23170f6 100644 --- a/desktop/internal/workbench/remote_host_containers.go +++ b/desktop/internal/workbench/remote_host_containers.go @@ -181,7 +181,7 @@ func (a *App) remoteHostContainersView(c ui.C, language i18n.Language, list *rem ui.Column(c.Part("empty")).FillWidth().Pad(12).Gap(8).Children(func() { ui.Paragraph(c, text, 3).FontSize(small).Color(a.colors.Subtle) for i, words := range list.diagnostics { - ui.Paragraph(c.KeyInt(i), words, 6).Mono().FontSize(small).Color(a.colors.Subtle) + ui.Paragraph(c, words, 6).Mono().FontSize(small).Color(a.colors.Subtle) } }) return diff --git a/desktop/internal/workbench/remote_import.go b/desktop/internal/workbench/remote_import.go index d2f6ed9361..e9d6a5980a 100644 --- a/desktop/internal/workbench/remote_import.go +++ b/desktop/internal/workbench/remote_import.go @@ -332,7 +332,7 @@ func (a *App) remoteImportHeader(c ui.C, lead, trail float32, columns []string, ui.Row(c).FillWidth().Height(30).Shrink(0).Items(ui.Center).Gap(10).PadX(10).Children(func() { ui.Row(c.Part("lead")).Width(lead).Shrink(0) for index, column := range columns { - cell := ui.Text(c.KeyInt(index), column).FontSize(a.theme.Metrics.FontSizeS).Weight(gfx.WeightMedium).Color(a.colors.Subtle).Ellipsis().MinWidth(0) + cell := ui.Text(c, column).FontSize(a.theme.Metrics.FontSizeS).Weight(gfx.WeightMedium).Color(a.colors.Subtle).Ellipsis().MinWidth(0) if widths[index] == 0 { cell.Grow(1).Basis(0) } else { diff --git a/desktop/internal/workbench/search_replace_view.go b/desktop/internal/workbench/search_replace_view.go index 7f37fe7164..5e1ce16625 100644 --- a/desktop/internal/workbench/search_replace_view.go +++ b/desktop/internal/workbench/search_replace_view.go @@ -134,8 +134,8 @@ func (a *App) replacePreviewFile(c ui.C, p *project, index int) { } ui.Column(c.KeyInt(i)).FillWidth().PadX(22).Children(func() { line := strconv.Itoa(match.Line) + " " - ui.Text(c.Key("before"), line+"- "+match.Before).Mono().FontSize(11.5).Color(a.theme.Danger).Ellipsis() - ui.Text(c.Key("after"), line+"+ "+match.After).Mono().FontSize(11.5).Color(a.theme.Success).Ellipsis() + ui.Text(c, line+"- "+match.Before).Mono().FontSize(11.5).Color(a.theme.Danger).Ellipsis() + ui.Text(c, line+"+ "+match.After).Mono().FontSize(11.5).Color(a.theme.Success).Ellipsis() }) } }) diff --git a/desktop/internal/workbench/vcs_view.go b/desktop/internal/workbench/vcs_view.go index e00222661e..131583fb54 100644 --- a/desktop/internal/workbench/vcs_view.go +++ b/desktop/internal/workbench/vcs_view.go @@ -602,7 +602,7 @@ func (a *App) drawVcsRollbackDialog(c ui.C, p *project, t vcsTarget) { ui.Text(c, i18n.SharedFormat(lang, "native.arg1FilesSelected", map[string]string{"arg1": strconv.Itoa(len(paths))})).Muted() break } - ui.Text(c.Key(path), path).Color(a.colors.Text).Ellipsis() + ui.Text(c, path).Color(a.colors.Text).Ellipsis() } }) }, func() { diff --git a/desktop/internal/workbench/viewer_view.go b/desktop/internal/workbench/viewer_view.go index aa9d4b9d71..5b3a53f504 100644 --- a/desktop/internal/workbench/viewer_view.go +++ b/desktop/internal/workbench/viewer_view.go @@ -117,7 +117,7 @@ func (a *App) viewerHex(c ui.C, t *viewerTab) { ui.Scroll(c.Part("hex")).Scrollbars().Fill().PadX(12).PadY(8).Children(func() { ui.Text(c, i18n.Shared(language, "desktop.viewer.binaryHint")).FontSize(12).Color(a.colors.Subtle) for i, line := range t.hex { - ui.Text(c.KeyInt(i), line).Mono().FontSize(12).Color(a.colors.Text) + ui.Text(c, line).Mono().FontSize(12).Color(a.colors.Text) } if t.truncated { ui.Text(c, i18n.Shared(language, "desktop.viewer.truncated")).FontSize(12).Color(a.colors.Subtle) From bd45c11bd7e738673c08734ef34e7994f08feb46 Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:40:08 +0000 Subject: [PATCH 03/13] fix(viva): use keyed growable containers instead of unnamed Spacer leaves --- desktop/internal/settingswindow/build_directory_view.go | 2 +- desktop/internal/settingswindow/installed_view.go | 2 +- desktop/internal/settingswindow/stepping_view.go | 2 +- desktop/internal/workbench/build_options_runtime.go | 2 +- desktop/internal/workbench/debug_watch.go | 2 +- desktop/internal/workbench/remote_import.go | 2 +- desktop/internal/workbench/run_view.go | 2 +- desktop/internal/workbench/window_sessions.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/desktop/internal/settingswindow/build_directory_view.go b/desktop/internal/settingswindow/build_directory_view.go index 2d9fe06fea..76bd4a5de1 100644 --- a/desktop/internal/settingswindow/build_directory_view.go +++ b/desktop/internal/settingswindow/build_directory_view.go @@ -92,7 +92,7 @@ func (w *window) buildIssues(c ui.C, language i18n.Language) { ui.Text(k, name).FontSize(buildSmall).Weight(gfx.WeightSemibold).Color(colors.text).Shrink(0) ui.Text(k, w.toolchainReasonText(language, scope, entry, toolchainReason(entry.tool))). FontSize(buildSmall).Color(colors.text).Shrink(1).MinWidth(0).Ellipsis() - ui.Spacer(k) + ui.Row(k.Part("spacer")).Grow(1) ui.Text(k, "›").FontSize(buildSmall).Color(colors.text).Shrink(0) }) } diff --git a/desktop/internal/settingswindow/installed_view.go b/desktop/internal/settingswindow/installed_view.go index f9ce475d5c..29c311d68d 100644 --- a/desktop/internal/settingswindow/installed_view.go +++ b/desktop/internal/settingswindow/installed_view.go @@ -940,7 +940,7 @@ func (w *window) installedFeatures(c ui.C, language i18n.Language, fact PluginFa } else { ui.Text(k, i18n.Shared(language, "native.pluginDisabled")).FontSize(11).Color(w.pal.muted) } - ui.Spacer(k) + ui.Row(k.Part("spacer")).Grow(1) if key := capabilityPage(capability); enabled && key != "" && w.dynamic.selected(key) != nil { if ui.Button(k, i18n.Shared(language, "native.configure")+" →").Link().XSmall().Clicked() { pluginID := fact.ID diff --git a/desktop/internal/settingswindow/stepping_view.go b/desktop/internal/settingswindow/stepping_view.go index 3e903afc4a..57cd305d64 100644 --- a/desktop/internal/settingswindow/stepping_view.go +++ b/desktop/internal/settingswindow/stepping_view.go @@ -409,7 +409,7 @@ func (w *window) debuggerList(c ui.C, language i18n.Language) { ui.Column(k).Grow(1).Shrink(1).MinWidth(0).Children(func() { ui.Row(k).FillWidth().Gap(6).Items(ui.Center).Children(func() { ui.Text(k, adapter.Name).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Shrink(1).Ellipsis() - ui.Spacer(k) + ui.Row(k.Part("spacer")).Grow(1) if stored || changed { w.tag(k, tagBlue, i18n.Shared(language, "desktop.settings.stepping.customized")) } diff --git a/desktop/internal/workbench/build_options_runtime.go b/desktop/internal/workbench/build_options_runtime.go index aa02228bea..68a1204cd9 100644 --- a/desktop/internal/workbench/build_options_runtime.go +++ b/desktop/internal/workbench/build_options_runtime.go @@ -263,7 +263,7 @@ func (a *App) buildRuntimeRows(c ui.C, language i18n.Language, e *buildOptionsEd return } ui.Text(k, runtime.executable).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis().Shrink(1).MinWidth(0) - ui.Spacer(k) + ui.Row(k.Part("spacer")).Grow(1) ui.Text(k, buildExecutionSourceLabel(language, runtime.source)).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(0).MaxWidth(160) }) } diff --git a/desktop/internal/workbench/debug_watch.go b/desktop/internal/workbench/debug_watch.go index cd2f2c3091..9189588962 100644 --- a/desktop/internal/workbench/debug_watch.go +++ b/desktop/internal/workbench/debug_watch.go @@ -342,7 +342,7 @@ func (a *App) debugWatchView(c ui.C, p *project) { row.Children(func() { ui.Icon(k, icons.Eye).Size(treelist.Icon, treelist.Icon).Shrink(0).MarginTop(debugIconInset).Color(a.colors.Subtle) a.debugWatchText(k, entry, false) - ui.Spacer(k) + ui.Row(k.Part("spacer")).Grow(1) i := index if _, clicked := a.toolIconButton(k.Key("remove"), t.RemoveWatch, icons.X, false, false); clicked { c.After(func() { a.removeDebugWatch(p, i) }) diff --git a/desktop/internal/workbench/remote_import.go b/desktop/internal/workbench/remote_import.go index e9d6a5980a..f060fa49f4 100644 --- a/desktop/internal/workbench/remote_import.go +++ b/desktop/internal/workbench/remote_import.go @@ -526,7 +526,7 @@ func (a *App) remoteMottyFields(c ui.C, language i18n.Language, fields []core.Re ui.Text(k, remoteMottySkipText(language, field.Skip)).FontSize(small).Color(a.colors.Subtle).Grow(1.6).Basis(0).MinWidth(0).Ellipsis() } ui.Row(k.Part("tag")).Width(110).Shrink(0).Children(func() { - ui.Spacer(k) + ui.Row(k.Part("spacer")).Grow(1) if field.Lithe != "" { a.remoteTag(k.Part("imported"), i18n.Shared(language, "desktop.remote.import.field.imported"), a.colors.Success) } else { diff --git a/desktop/internal/workbench/run_view.go b/desktop/internal/workbench/run_view.go index 85f9014689..5f4ed4a619 100644 --- a/desktop/internal/workbench/run_view.go +++ b/desktop/internal/workbench/run_view.go @@ -217,7 +217,7 @@ func (a *App) runTree(c ui.C, p *project, run *runEntry) { ui.Text(k, a.text.Run.StartedAt(run.started.Format(runStartedLayout))).Color(a.colors.Subtle). Ellipsis().Shrink(buildDetailShrink) }) - ui.Spacer(k) + ui.Row(k.Part("spacer")).Grow(1) if duration != "" { ui.Text(k, duration).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Shrink(0) } diff --git a/desktop/internal/workbench/window_sessions.go b/desktop/internal/workbench/window_sessions.go index 5fc88944bd..35e63bfcea 100644 --- a/desktop/internal/workbench/window_sessions.go +++ b/desktop/internal/workbench/window_sessions.go @@ -373,7 +373,7 @@ func (a *App) projectTab(c ui.C, tab *App, i, size int) { if d := p.selectedDocument(p.terms.bench.FocusedGroup); d != nil && d.path != "" { ui.Text(k.Part("file"), "· "+filepath.Base(d.path)).Color(a.colors.Subtle).Ellipsis() } - ui.Spacer(k) + ui.Row(k.Part("spacer")).Grow(1) cc := k.Part("close") closeButton = ui.Row(cc).Size(terminalCloseSize, terminalCloseSize).Shrink(0).Center(). Radius(a.theme.Metrics.RadiusItem()). From b065c3f249fef350251d68dbb7b2222fc51a2d89 Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:42:13 +0000 Subject: [PATCH 04/13] fix(viva): leave breadcrumb, toolbar, and keyed-row text and icons anonymous --- .../settingswindow/build_directory_view.go | 12 +++---- .../internal/settingswindow/installed_view.go | 32 +++++++++---------- .../internal/settingswindow/stepping_view.go | 8 ++--- .../workbench/build_options_runtime.go | 12 +++---- desktop/internal/workbench/chrome_view.go | 26 +++++++-------- desktop/internal/workbench/debug_watch.go | 2 +- desktop/internal/workbench/remote_import.go | 26 +++++++-------- desktop/internal/workbench/run_view.go | 12 +++---- desktop/internal/workbench/window_sessions.go | 6 ++-- 9 files changed, 68 insertions(+), 68 deletions(-) diff --git a/desktop/internal/settingswindow/build_directory_view.go b/desktop/internal/settingswindow/build_directory_view.go index 76bd4a5de1..1ff9cab1d4 100644 --- a/desktop/internal/settingswindow/build_directory_view.go +++ b/desktop/internal/settingswindow/build_directory_view.go @@ -89,11 +89,11 @@ func (w *window) buildIssues(c ui.C, language i18n.Language) { } row.Children(func() { dot(k, 8, b.statusColor(issue.Status)) - ui.Text(k, name).FontSize(buildSmall).Weight(gfx.WeightSemibold).Color(colors.text).Shrink(0) - ui.Text(k, w.toolchainReasonText(language, scope, entry, toolchainReason(entry.tool))). + ui.Text(c, name).FontSize(buildSmall).Weight(gfx.WeightSemibold).Color(colors.text).Shrink(0) + ui.Text(c, w.toolchainReasonText(language, scope, entry, toolchainReason(entry.tool))). FontSize(buildSmall).Color(colors.text).Shrink(1).MinWidth(0).Ellipsis() ui.Row(k.Part("spacer")).Grow(1) - ui.Text(k, "›").FontSize(buildSmall).Color(colors.text).Shrink(0) + ui.Text(c, "›").FontSize(buildSmall).Color(colors.text).Shrink(0) }) } if view.Counts.Problems > len(view.Issues) { @@ -165,14 +165,14 @@ func (w *window) directory(c ui.C, entries []directoryEntry) { row.Children(func() { w.glyphTile(k, entry.tile, entry.icon, 28) ui.Column(k).Grow(1).Shrink(1).MinWidth(0).Children(func() { - ui.Text(k, entry.title).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Ellipsis() + ui.Text(c, entry.title).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Ellipsis() ui.Row(k).Height(2).Shrink(0) - ui.Text(k, entry.desc).FontSize(buildSmall).Color(b.sub).Ellipsis() + ui.Text(c, entry.desc).FontSize(buildSmall).Color(b.sub).Ellipsis() }) if entry.problems > 0 { w.badge(k, entry.problems, false) } - ui.Text(k, "›").FontSize(buildFont).Color(b.faint).Shrink(0) + ui.Text(c, "›").FontSize(buildFont).Color(b.faint).Shrink(0) }) } }) diff --git a/desktop/internal/settingswindow/installed_view.go b/desktop/internal/settingswindow/installed_view.go index 29c311d68d..fdf3e5a0bb 100644 --- a/desktop/internal/settingswindow/installed_view.go +++ b/desktop/internal/settingswindow/installed_view.go @@ -371,7 +371,7 @@ func (w *window) installedChip(c ui.C, language i18n.Language, filter int) { chip = chip.Stroke(1, w.pal.border).Hover(ui.Look{}.Background(w.pal.hover)) } chip.Children(func() { - ui.Text(k, title).FontSize(11).Weight(weight).Color(w.pal.text) + ui.Text(c, title).FontSize(11).Weight(weight).Color(w.pal.text) }) if chip.Clicked() { s.filter = filter @@ -398,8 +398,8 @@ func (w *window) installedSlashMenu(c ui.C, language i18n.Language) { HitWith(ui.ID(k), title, gfx.HitOptions{Role: gfx.RoleMenuItem, Cursor: gfx.PointerCursorHand}). Hover(ui.Look{}.Background(w.pal.hover)) option.Children(func() { - ui.Text(k, "/"+token).Mono().FontSize(12).Color(w.pal.text).Width(92).Shrink(0) - ui.Text(k, title).FontSize(11).Color(w.pal.muted).Ellipsis() + ui.Text(c, "/"+token).Mono().FontSize(12).Color(w.pal.text).Width(92).Shrink(0) + ui.Text(c, title).FontSize(11).Color(w.pal.muted).Ellipsis() }) if option.Clicked() { s.filter, s.query = filter, "" @@ -450,7 +450,7 @@ func (w *window) installedList(c ui.C, language i18n.Language, facts []PluginFac available := i18n.Shared(language, "native.updateAvailable.variant2") ui.Row(k).Size(16, 16).Shrink(0).Radius(8).Background(w.pal.accent).Center(). HitWith(ui.ID(k), available, gfx.HitOptions{Role: gfx.RoleStatus}).Tooltip(available).Children(func() { - ui.Icon(k, icons.ArrowUp).Size(10, 10).Color(w.pal.white) + ui.Icon(c, icons.ArrowUp).Size(10, 10).Color(w.pal.white) }) } w.enabledMark(row.C, w.pluginState(fact.ID).Enabled) @@ -685,13 +685,13 @@ func (w *window) installedTabs(c ui.C, language i18n.Language, fact PluginFacts) HitWith(ui.ID(k), title, gfx.HitOptions{Role: gfx.RoleTab, Cursor: gfx.PointerCursorHand, Selected: chosen}) button.Children(func() { ui.Row(k).Gap(5).Items(ui.Center).Children(func() { - text := ui.Text(k, title).FontSize(13).Color(w.pal.muted) + text := ui.Text(c, title).FontSize(13).Color(w.pal.muted) if chosen { text.Weight(gfx.WeightSemibold).Color(w.pal.text) } if counts[tab] > 0 { ui.Row(k).PadX(5).PadY(1).Radius(100).Background(w.pal.selectionIdle).Children(func() { - ui.Text(k, strconv.Itoa(counts[tab])).FontSize(10).Weight(gfx.WeightMedium).Color(w.pal.muted) + ui.Text(c, strconv.Itoa(counts[tab])).FontSize(10).Weight(gfx.WeightMedium).Color(w.pal.muted) }) } }) @@ -842,9 +842,9 @@ func (w *window) configureInSettings(c ui.C, language i18n.Language, fact Plugin if entry.page.Kind == "buildSystem" { icon = icons.Play } - ui.Icon(k, icon).Size(14, 14).Color(w.pal.muted).Shrink(0) + ui.Icon(c, icon).Size(14, 14).Color(w.pal.muted).Shrink(0) if entry.subjects != "" { - ui.Text(k, entry.subjects).FontSize(12).Color(w.pal.muted).Shrink(1).MinWidth(0).Ellipsis() + ui.Text(c, entry.subjects).FontSize(12).Color(w.pal.muted).Shrink(1).MinWidth(0).Ellipsis() } if ui.Button(k, entry.page.Title).Link().Clicked() { key, pluginID := entry.page.Key, fact.ID @@ -923,22 +923,22 @@ func (w *window) installedFeatures(c ui.C, language i18n.Language, fact PluginFa for index, capability := range fact.Capabilities { k := c.KeyInt(index) ui.Column(k).FillWidth().Gap(5).Pad(12).Radius(8).Background(w.pal.card).Stroke(1, w.pal.line).Children(func() { - ui.Text(k, capabilityKindTitle(language, capability.Kind)).FontSize(11).Weight(gfx.WeightMedium).Color(w.pal.muted) + ui.Text(c, capabilityKindTitle(language, capability.Kind)).FontSize(11).Weight(gfx.WeightMedium).Color(w.pal.muted) title := capability.Title if title == "" { title = capability.ID } - ui.Text(k, title).FontSize(13).Color(w.pal.text).Ellipsis() + ui.Text(c, title).FontSize(13).Color(w.pal.text).Ellipsis() if detail := capabilityDetail(language, capability); detail != "" { - ui.Wrap(k, detail).FontSize(11).Color(w.pal.muted) + ui.Wrap(c, detail).FontSize(11).Color(w.pal.muted) } ui.Row(k).FillWidth().Gap(8).Items(ui.Center).Children(func() { if entry, ok := missingFor(missing, capability); enabled && ok { w.commandMissingStatus(k, language, fact, entry) } else if enabled { - ui.Text(k, i18n.Shared(language, "native.available")).FontSize(11).Color(w.pal.success) + ui.Text(c, i18n.Shared(language, "native.available")).FontSize(11).Color(w.pal.success) } else { - ui.Text(k, i18n.Shared(language, "native.pluginDisabled")).FontSize(11).Color(w.pal.muted) + ui.Text(c, i18n.Shared(language, "native.pluginDisabled")).FontSize(11).Color(w.pal.muted) } ui.Row(k.Part("spacer")).Grow(1) if key := capabilityPage(capability); enabled && key != "" && w.dynamic.selected(key) != nil { @@ -1083,13 +1083,13 @@ func (w *window) installedPermissions(c ui.C, language i18n.Language, fact Plugi k := c.KeyInt(index) ui.Row(k).FillWidth().PadY(3).Gap(8).Items(ui.Start).Children(func() { ui.Row(k).Height(installedPermissionLine).Shrink(0).Items(ui.Center).Children(func() { - ui.Icon(k, icons.ShieldCheck).Size(14, 14).Color(w.pal.accent) + ui.Icon(c, icons.ShieldCheck).Size(14, 14).Color(w.pal.accent) }) ui.Row(k).Grow(1).Shrink(1).MinWidth(0).Gap(8).Items(ui.Baseline).Children(func() { if description := permissionDescription(language, permission); description != "" { - ui.Wrap(k, description).FontSize(12).LineHeight(installedPermissionLine).Color(w.pal.text).Shrink(1).MinWidth(0) + ui.Wrap(c, description).FontSize(12).LineHeight(installedPermissionLine).Color(w.pal.text).Shrink(1).MinWidth(0) } - ui.Text(k, permission).Mono().FontSize(11).Color(w.pal.subtle).Shrink(0) + ui.Text(c, permission).Mono().FontSize(11).Color(w.pal.subtle).Shrink(0) }) }) } diff --git a/desktop/internal/settingswindow/stepping_view.go b/desktop/internal/settingswindow/stepping_view.go index 57cd305d64..e639f9f5f2 100644 --- a/desktop/internal/settingswindow/stepping_view.go +++ b/desktop/internal/settingswindow/stepping_view.go @@ -408,14 +408,14 @@ func (w *window) debuggerList(c ui.C, language i18n.Language) { w.pluginTile(k, steppingPluginName(adapter), 20) ui.Column(k).Grow(1).Shrink(1).MinWidth(0).Children(func() { ui.Row(k).FillWidth().Gap(6).Items(ui.Center).Children(func() { - ui.Text(k, adapter.Name).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Shrink(1).Ellipsis() + ui.Text(c, adapter.Name).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Shrink(1).Ellipsis() ui.Row(k.Part("spacer")).Grow(1) if stored || changed { w.tag(k, tagBlue, i18n.Shared(language, "desktop.settings.stepping.customized")) } }) ui.Row(k).FillWidth().Height(2).Shrink(0) - ui.Text(k, steppingPluginName(adapter)).FontSize(11).Color(b.faint).Ellipsis() + ui.Text(c, steppingPluginName(adapter)).FontSize(11).Color(b.faint).Ellipsis() }) }) }).Scrollbars().FillWidth().Grow(1).Shrink(1).MinHeight(0).Label(i18n.Shared(language, "desktop.buildSettings.debuggers")) @@ -489,7 +489,7 @@ func (w *window) debuggerDetail(c ui.C, language i18n.Language, adapter Stepping k := c.Part(feature.key) ui.Row(k).FillWidth().MinHeight(34).PadX(8).PadY(3).Gap(10).Radius(7).Items(ui.Center).Children(func() { ui.Row(k).Grow(1).Shrink(1).MinWidth(0).Gap(5).Items(ui.Center).Children(func() { - ui.Text(k, feature.label).FontSize(buildFont).Color(b.text).Shrink(1).Ellipsis() + ui.Text(c, feature.label).FontSize(buildFont).Color(b.text).Shrink(1).Ellipsis() w.infoButton(k.Part("help"), feature.help) }) ui.Switch(k.Part("switch"), feature.value, "").Label(feature.label).Disabled(s.saving) @@ -515,7 +515,7 @@ func (w *window) patternList(c ui.C, language i18n.Language, draft *steppingDraf for index, pattern := range draft.patterns { k := c.KeyInt(index) ui.Row(k).FillWidth().MinWidth(0).PadX(8).PadY(5).Gap(8).Items(ui.Center).Children(func() { - ui.Text(k, pattern).FontSize(buildMono).Mono().Color(b.text).Grow(1).Shrink(1).MinWidth(0).Ellipsis() + ui.Text(c, pattern).FontSize(buildMono).Mono().Color(b.text).Grow(1).Shrink(1).MinWidth(0).Ellipsis() if w.iconButton(k.Part("remove"), icons.X, i18n.Shared(language, "desktop.buildSettings.removePattern"), s.saving) { remove = index } diff --git a/desktop/internal/workbench/build_options_runtime.go b/desktop/internal/workbench/build_options_runtime.go index 68a1204cd9..c9584d81a2 100644 --- a/desktop/internal/workbench/build_options_runtime.go +++ b/desktop/internal/workbench/build_options_runtime.go @@ -257,14 +257,14 @@ func (a *App) buildRuntimeRows(c ui.C, language i18n.Language, e *buildOptionsEd for index, runtime := range e.runtimes { k := c.KeyInt(index) ui.Row(k).FillWidth().Items(ui.Center).Gap(8).Children(func() { - ui.Text(k, runtime.name).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis().Shrink(0).MaxWidth(120) + ui.Text(c, runtime.name).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis().Shrink(0).MaxWidth(120) if runtime.failure != "" { - ui.Text(k, runtime.failure).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger).Ellipsis().Shrink(1).MinWidth(0) + ui.Text(c, runtime.failure).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger).Ellipsis().Shrink(1).MinWidth(0) return } - ui.Text(k, runtime.executable).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis().Shrink(1).MinWidth(0) + ui.Text(c, runtime.executable).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis().Shrink(1).MinWidth(0) ui.Row(k.Part("spacer")).Grow(1) - ui.Text(k, buildExecutionSourceLabel(language, runtime.source)).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(0).MaxWidth(160) + ui.Text(c, buildExecutionSourceLabel(language, runtime.source)).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(0).MaxWidth(160) }) } ui.Wrap(c, i18n.Shared(language, "desktop.build.runtimeHelp")).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) @@ -323,9 +323,9 @@ func (a *App) buildDroppedOptionRows(c ui.C, language i18n.Language, p *project, value = option.team } ui.Column(k).FillWidth().Gap(2).Children(func() { - ui.Text(k, option.id+" = "+value).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis() + ui.Text(c, option.id+" = "+value).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis() if option.hasTeam { - ui.Text(k, i18n.SharedFormat(language, "desktop.build.droppedInTeam", map[string]string{"file": buildTeamOptionsFile})). + ui.Text(c, i18n.SharedFormat(language, "desktop.build.droppedInTeam", map[string]string{"file": buildTeamOptionsFile})). FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis() } }) diff --git a/desktop/internal/workbench/chrome_view.go b/desktop/internal/workbench/chrome_view.go index 6455f0d045..13be9b8b84 100644 --- a/desktop/internal/workbench/chrome_view.go +++ b/desktop/internal/workbench/chrome_view.go @@ -117,7 +117,7 @@ func (a *App) chromeGlyph(c ui.C, i int, layout glyphLayout, rest, hover gfx.Col box := a.chromeBox(ui.Row(k).Size(layout.side, layout.side).Shrink(0).Center(), ui.ID(k), i, open, "", true). TooltipOn(layout.tooltip) box.Children(func() { - ui.Icon(k, *a.chrome.catalog[i].icon).Size(layout.icon, layout.icon).Color(rest). + ui.Icon(c, *a.chrome.catalog[i].icon).Size(layout.icon, layout.icon).Color(rest). StateFrom(box).Hover(ui.Look{}.Color(hover)) }) return box, box.Clicked() @@ -192,8 +192,8 @@ func (a *App) chromeProject(c ui.C) { } button.Children(func() { projectAvatar(k, row.identity, chromeAvatarTitle) - ui.Text(k, a.project.name).Bold().Color(a.colors.Text).LineHeight(chromeLineHeight).Ellipsis().MaxWidth(chromeProjectMax) - ui.Icon(k, icons.ChevronDown).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Subtle) + ui.Text(c, a.project.name).Bold().Color(a.colors.Text).LineHeight(chromeLineHeight).Ellipsis().MaxWidth(chromeProjectMax) + ui.Icon(c, icons.ChevronDown).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Subtle) }) clicked := button.Clicked() if a.title.projectOpen { @@ -214,9 +214,9 @@ func (a *App) chromeTitleButton(c ui.C, i int) bool { wasOpen := a.title.runConfigOpen box := a.chromeBox(ui.Row(k).Height(chromeIconButton).Shrink(0).Items(ui.Center).Gap(chromeGap).PadX(chromeEdge), ui.ID(k), i, wasOpen, "", false) box.Children(func() { - ui.Icon(k, *a.chrome.catalog[i].icon).Size(chromeIconSize, chromeIconSize).Color(a.colors.Subtle) - ui.Text(k, a.titleRunLabel()).Color(a.colors.Text).LineHeight(chromeLineHeight).Ellipsis().MaxWidth(chromeProjectMax) - ui.Icon(k, icons.ChevronDown).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Subtle) + ui.Icon(c, *a.chrome.catalog[i].icon).Size(chromeIconSize, chromeIconSize).Color(a.colors.Subtle) + ui.Text(c, a.titleRunLabel()).Color(a.colors.Text).LineHeight(chromeLineHeight).Ellipsis().MaxWidth(chromeProjectMax) + ui.Icon(c, icons.ChevronDown).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Subtle) }) clicked := box.Clicked() if wasOpen { @@ -412,7 +412,7 @@ func (a *App) hiddenToolWindowsButton(c ui.C, i int, z zone, layout glyphLayout) button = button.Background(a.colors.Active).Hover(ui.Look{}.Background(a.colors.Active)) } button.Children(func() { - ui.Icon(k, *a.chrome.catalog[i].icon).Size(layout.icon, layout.icon).Color(rest). + ui.Icon(c, *a.chrome.catalog[i].icon).Size(layout.icon, layout.icon).Color(rest). StateFrom(button).Hover(ui.Look{}.Color(hover)) }) clicked := button.Clicked() @@ -547,9 +547,9 @@ func (a *App) chromeStatusItem(c ui.C, i int) bool { if doc := a.selectedEditorDocument(); doc != nil && doc.view.ReadOnly() { icon = icons.Lock } - ui.Icon(k, icon).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Subtle) + ui.Icon(c, icon).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Subtle) case itemHealth: - ui.Icon(k, *a.chrome.catalog[i].icon).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Success) + ui.Icon(c, *a.chrome.catalog[i].icon).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Success) case itemMemory: a.memoryStatusItem(k) case itemLSP: @@ -603,9 +603,9 @@ func (a *App) chromeBranch(c ui.C) { button = button.Hover(ui.Look{}.Background(a.colors.Hover)) } button.Children(func() { - ui.Icon(k, icons.GitBranch).Size(chromeIconSize, chromeIconSize).Color(a.colors.Subtle) - ui.Text(k, name).Color(a.colors.Subtle).LineHeight(chromeLineHeight).Ellipsis().MaxWidth(chromeBranchMax) - ui.Icon(k, icons.ChevronDown).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Subtle) + ui.Icon(c, icons.GitBranch).Size(chromeIconSize, chromeIconSize).Color(a.colors.Subtle) + ui.Text(c, name).Color(a.colors.Subtle).LineHeight(chromeLineHeight).Ellipsis().MaxWidth(chromeBranchMax) + ui.Icon(c, icons.ChevronDown).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Subtle) }) clicked := button.Clicked() if open { @@ -776,7 +776,7 @@ func (a *App) menuProjectDismiss(c ui.C, label string) bool { Radius(a.theme.Metrics.RadiusItem()). HitWith(ui.ID(k), label, gfx.HitOptions{Role: gfx.RoleButton, Cursor: gfx.PointerCursorHand})).Tooltip(label) button.Children(func() { - ui.Icon(k, icons.X).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Subtle). + ui.Icon(c, icons.X).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Subtle). StateFrom(button).Hover(ui.Look{}.Color(a.colors.Text)) }) return button.Clicked() diff --git a/desktop/internal/workbench/debug_watch.go b/desktop/internal/workbench/debug_watch.go index 9189588962..633318dc7f 100644 --- a/desktop/internal/workbench/debug_watch.go +++ b/desktop/internal/workbench/debug_watch.go @@ -340,7 +340,7 @@ func (a *App) debugWatchView(c ui.C, p *project) { Hover(ui.Look{}.Background(a.colors.Hover)). HitWith(ui.ID(k), entry.expression, gfx.HitOptions{SkipFocus: true}) row.Children(func() { - ui.Icon(k, icons.Eye).Size(treelist.Icon, treelist.Icon).Shrink(0).MarginTop(debugIconInset).Color(a.colors.Subtle) + ui.Icon(c, icons.Eye).Size(treelist.Icon, treelist.Icon).Shrink(0).MarginTop(debugIconInset).Color(a.colors.Subtle) a.debugWatchText(k, entry, false) ui.Row(k.Part("spacer")).Grow(1) i := index diff --git a/desktop/internal/workbench/remote_import.go b/desktop/internal/workbench/remote_import.go index f060fa49f4..b666b14c28 100644 --- a/desktop/internal/workbench/remote_import.go +++ b/desktop/internal/workbench/remote_import.go @@ -391,18 +391,18 @@ func (a *App) remoteSSHImportTable(c ui.C, language i18n.Language, m *remoteImpo ui.Row(k.Part("pick")).Width(22).Shrink(0).Children(func() { ui.Checkbox(k.Part("box"), &m.sshChosen[index], "").Label(host.Alias).Disabled(!choosable || m.applying) }) - ui.Text(k, host.Alias).Mono().FontSize(small).Color(color).Width(widths[0]).Shrink(0).Ellipsis() + ui.Text(c, host.Alias).Mono().FontSize(small).Color(color).Width(widths[0]).Shrink(0).Ellipsis() ui.Column(k).Grow(1).Basis(0).MinWidth(0).Gap(2).Children(func() { switch { case host.Status == core.RemoteImportPattern: - ui.Text(k, i18n.Shared(language, "desktop.remote.import.patternNote")).FontSize(small).Color(a.colors.Subtle).Ellipsis().MinWidth(0) + ui.Text(c, i18n.Shared(language, "desktop.remote.import.patternNote")).FontSize(small).Color(a.colors.Subtle).Ellipsis().MinWidth(0) case host.Resolved != nil: resolved := host.Resolved - ui.Text(k, remoteAddress(core.SSHConnection{Host: resolved.HostName, User: resolved.User, Port: resolved.Port})). + ui.Text(c, remoteAddress(core.SSHConnection{Host: resolved.HostName, User: resolved.User, Port: resolved.Port})). Mono().FontSize(small).Color(color).Ellipsis().MinWidth(0) } if len(host.UsedAsJumpBy) > 0 { - ui.Text(k, i18n.SharedFormat(language, "desktop.remote.import.jumpFor", map[string]string{"hosts": strings.Join(host.UsedAsJumpBy, ", ")})). + ui.Text(c, i18n.SharedFormat(language, "desktop.remote.import.jumpFor", map[string]string{"hosts": strings.Join(host.UsedAsJumpBy, ", ")})). Mono().FontSize(small).Color(a.colors.Subtle).Ellipsis().MinWidth(0) } }) @@ -457,20 +457,20 @@ func (a *App) remoteMottyImportTable(c ui.C, language i18n.Language, m *remoteIm } a.remoteTile(k.Part("tile"), mark, candidate.Name, candidate.Color, 26, 10) ui.Column(k).Grow(1).Basis(0).MinWidth(0).Gap(2).Children(func() { - ui.Text(k, candidate.Name).Weight(gfx.WeightMedium).Color(color).Ellipsis().MinWidth(0) + ui.Text(c, candidate.Name).Weight(gfx.WeightMedium).Color(color).Ellipsis().MinWidth(0) if candidate.Address != "" { - ui.Text(k, candidate.Address).Mono().FontSize(small).Color(a.colors.Subtle).Ellipsis().MinWidth(0) + ui.Text(c, candidate.Address).Mono().FontSize(small).Color(a.colors.Subtle).Ellipsis().MinWidth(0) } }) group := candidate.Group if group == "" { group = "—" } - ui.Text(k, group).FontSize(small).Color(color).Width(widths[1]).Shrink(0).Ellipsis() + ui.Text(c, group).FontSize(small).Color(color).Width(widths[1]).Shrink(0).Ellipsis() ui.Row(k.Part("result")).Width(widths[2]).Shrink(0).Items(ui.Center).Gap(6).Children(func() { a.remoteImportTag(k.Part("status"), remoteImportStatusName(language, candidate.Status), candidate.Status) if candidate.Status == core.RemoteImportExists && m.mottyChosen[index] { - ui.Text(k, i18n.Shared(language, "desktop.remote.import.fill")).FontSize(small).Color(a.colors.Subtle).Ellipsis().Shrink(1).MinWidth(0) + ui.Text(c, i18n.Shared(language, "desktop.remote.import.fill")).FontSize(small).Color(a.colors.Subtle).Ellipsis().Shrink(1).MinWidth(0) } }) icon := icons.ChevronRight @@ -513,17 +513,17 @@ func (a *App) remoteMottyFields(c ui.C, language i18n.Language, fields []core.Re ui.Row(k.Part("line")).FillWidth().Height(1).Shrink(0).Background(a.colors.Line) } ui.Row(k).FillWidth().MinHeight(26).Items(ui.Center).Gap(10).PadY(3).Children(func() { - ui.Text(k, field.Motty).Mono().FontSize(small).Color(a.colors.Subtle).Grow(1).Basis(0).MinWidth(0).Ellipsis() + ui.Text(c, field.Motty).Mono().FontSize(small).Color(a.colors.Subtle).Grow(1).Basis(0).MinWidth(0).Ellipsis() value := field.Value if value == "" { value = "—" } - ui.Text(k, value).Mono().FontSize(small).Grow(1).Basis(0).MinWidth(0).Ellipsis() - ui.Text(k, "→").FontSize(small).Color(a.colors.Subtle).Shrink(0) + ui.Text(c, value).Mono().FontSize(small).Grow(1).Basis(0).MinWidth(0).Ellipsis() + ui.Text(c, "→").FontSize(small).Color(a.colors.Subtle).Shrink(0) if field.Lithe != "" { - ui.Text(k, remoteMottyFieldName(language, field.Lithe)).FontSize(small).Grow(1.6).Basis(0).MinWidth(0).Ellipsis() + ui.Text(c, remoteMottyFieldName(language, field.Lithe)).FontSize(small).Grow(1.6).Basis(0).MinWidth(0).Ellipsis() } else { - ui.Text(k, remoteMottySkipText(language, field.Skip)).FontSize(small).Color(a.colors.Subtle).Grow(1.6).Basis(0).MinWidth(0).Ellipsis() + ui.Text(c, remoteMottySkipText(language, field.Skip)).FontSize(small).Color(a.colors.Subtle).Grow(1.6).Basis(0).MinWidth(0).Ellipsis() } ui.Row(k.Part("tag")).Width(110).Shrink(0).Children(func() { ui.Row(k.Part("spacer")).Grow(1) diff --git a/desktop/internal/workbench/run_view.go b/desktop/internal/workbench/run_view.go index 5f4ed4a619..bac711c538 100644 --- a/desktop/internal/workbench/run_view.go +++ b/desktop/internal/workbench/run_view.go @@ -78,7 +78,7 @@ func (a *App) runSessionTabs(c ui.C, p *project) { var closeButton ui.Box chip.Children(func() { a.runStatusMark(k, run, terminalChipIcon) - text := ui.Text(k, run.label).Ellipsis().Shrink(1) + text := ui.Text(c, run.label).Ellipsis().Shrink(1) if on { text.Color(a.colors.Text) } else { @@ -213,13 +213,13 @@ func (a *App) runTree(c ui.C, p *project, run *runEntry) { a.runStatusMark(k, run, runTreeIcon) // The start follows the name with no gap, since its words begin with the separator. ui.Row(k).Shrink(1).MinWidth(0).Items(ui.Center).Children(func() { - ui.Text(k, run.label).Color(a.colors.Text).Weight(gfx.WeightBold).Ellipsis().Shrink(1) - ui.Text(k, a.text.Run.StartedAt(run.started.Format(runStartedLayout))).Color(a.colors.Subtle). + ui.Text(c, run.label).Color(a.colors.Text).Weight(gfx.WeightBold).Ellipsis().Shrink(1) + ui.Text(c, a.text.Run.StartedAt(run.started.Format(runStartedLayout))).Color(a.colors.Subtle). Ellipsis().Shrink(buildDetailShrink) }) ui.Row(k.Part("spacer")).Grow(1) if duration != "" { - ui.Text(k, duration).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Shrink(0) + ui.Text(c, duration).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Shrink(0) } }) if run.running && len(run.ports) > 0 { @@ -324,7 +324,7 @@ func (a *App) runPortsRow(c ui.C, run *runEntry) { func (a *App) runStatusMark(c ui.C, run *runEntry, size float32) { k := c.Part("status") if run.running && run.processRunning { - ui.Icon(k, icons.Play).Size(size, size).Shrink(0).Color(a.colors.Success) + ui.Icon(c, icons.Play).Size(size, size).Shrink(0).Color(a.colors.Success) return } if run.running { @@ -338,7 +338,7 @@ func (a *App) runStatusMark(c ui.C, run *runEntry, size float32) { case runStopped: icon, tint = icons.CircleSlash, a.colors.Subtle } - ui.Icon(k, icon).Size(size, size).Shrink(0).Color(tint) + ui.Icon(c, icon).Size(size, size).Shrink(0).Color(tint) } // runStatusText names where an execution stands, the words its status icon stands for. diff --git a/desktop/internal/workbench/window_sessions.go b/desktop/internal/workbench/window_sessions.go index 35e63bfcea..cb3539d4dc 100644 --- a/desktop/internal/workbench/window_sessions.go +++ b/desktop/internal/workbench/window_sessions.go @@ -363,15 +363,15 @@ func (a *App) projectTab(c ui.C, tab *App, i, size int) { } var closeButton ui.Box chip.Children(func() { - ui.Icon(k, icons.Folder).Size(projectTabIcon, projectTabIcon).Shrink(0).Color(a.colors.Subtle) - name := ui.Text(k, p.name).Ellipsis().Shrink(0) + ui.Icon(c, icons.Folder).Size(projectTabIcon, projectTabIcon).Shrink(0).Color(a.colors.Subtle) + name := ui.Text(c, p.name).Ellipsis().Shrink(0) if shown { name.Color(a.colors.Text) } else { name.Color(a.colors.Subtle).StateFrom(chip).Hover(ui.Look{}.Color(a.colors.Text)) } if d := p.selectedDocument(p.terms.bench.FocusedGroup); d != nil && d.path != "" { - ui.Text(k.Part("file"), "· "+filepath.Base(d.path)).Color(a.colors.Subtle).Ellipsis() + ui.Text(c, "· "+filepath.Base(d.path)).Color(a.colors.Subtle).Ellipsis() } ui.Row(k.Part("spacer")).Grow(1) cc := k.Part("close") From b71d3bcdeb20468d035cd7a77e8849e1570693b4 Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:42:43 +0000 Subject: [PATCH 05/13] fix(viva): eliminate keyed leaf widgets in run, remote, and tab views --- desktop/internal/pluginview/canvas.go | 2 +- .../settingswindow/build_kind_view.go | 4 ++-- .../internal/workbench/github_checks_view.go | 6 ++--- desktop/internal/workbench/memory_monitor.go | 6 ++--- .../internal/workbench/remote_detail_view.go | 22 +++++++++---------- desktop/internal/workbench/remote_list.go | 6 ++--- desktop/internal/workbench/remote_steps.go | 4 ++-- desktop/internal/workbench/runconfig_view.go | 8 +++---- desktop/internal/workbench/shell_view.go | 2 +- desktop/internal/workbench/tabstrip.go | 6 ++--- 10 files changed, 33 insertions(+), 33 deletions(-) diff --git a/desktop/internal/pluginview/canvas.go b/desktop/internal/pluginview/canvas.go index d21dfbf94b..51f7080505 100644 --- a/desktop/internal/pluginview/canvas.go +++ b/desktop/internal/pluginview/canvas.go @@ -299,7 +299,7 @@ func (r *renderer) zoomButtons(c ui.C, state *canvasState) { Hover(ui.Look{}.Background(p.Hover)).Pressed(ui.Look{}.Background(p.Selection)). Tooltip(i18n.Shared(language, "desktop.pluginView.resetZoom")) button.Children(func() { - ui.Text(k, percent).FontSize(11).Weight(gfx.WeightMedium).Mono().Color(p.Text) + ui.Text(c, percent).FontSize(11).Weight(gfx.WeightMedium).Mono().Color(p.Text) }) if button.Clicked() { zoomTo(1) diff --git a/desktop/internal/settingswindow/build_kind_view.go b/desktop/internal/settingswindow/build_kind_view.go index b9156a1a2f..d22360f845 100644 --- a/desktop/internal/settingswindow/build_kind_view.go +++ b/desktop/internal/settingswindow/build_kind_view.go @@ -144,9 +144,9 @@ func (w *window) kindList(c ui.C, language i18n.Language, kind string, state *ki r.Element.Children(func() { w.pluginTile(k, plugins, 20) ui.Column(k).Grow(1).Shrink(1).MinWidth(0).Children(func() { - ui.Text(k, page.Title).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Ellipsis() + ui.Text(c, page.Title).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Ellipsis() ui.Row(k).FillWidth().Height(2).Shrink(0) - ui.Text(k, plugins).FontSize(11).Color(b.faint).Ellipsis() + ui.Text(c, plugins).FontSize(11).Color(b.faint).Ellipsis() }) }) }).Scrollbars().FillWidth().Grow(1).Shrink(1).MinHeight(0).Label(kindTitle(language, kind)) diff --git a/desktop/internal/workbench/github_checks_view.go b/desktop/internal/workbench/github_checks_view.go index 2c4c0d26f1..82ccb081ea 100644 --- a/desktop/internal/workbench/github_checks_view.go +++ b/desktop/internal/workbench/github_checks_view.go @@ -41,9 +41,9 @@ func (a *App) drawPullRequestChecks(c ui.C) { row := ui.Row(k).FillWidth().Items(ui.Center).Gap(6).PadX(8). HitWith(ui.ID(k), check.Name, gfx.HitOptions{Role: gfx.RoleButton, Cursor: gfx.PointerCursorHand}). Hover(ui.Look{}.Background(a.colors.Hover)).Children(func() { - ui.Icon(k, icon).Size(14, 14).Color(color).Shrink(0) - ui.Text(k, check.Name).FontSize(size).Ellipsis().Grow(1) - ui.Text(k, label).FontSize(size).Color(color).Shrink(0) + ui.Icon(c, icon).Size(14, 14).Color(color).Shrink(0) + ui.Text(c, check.Name).FontSize(size).Ellipsis().Grow(1) + ui.Text(c, label).FontSize(size).Color(color).Shrink(0) }) if row.Clicked() && check.DetailsURL != nil && *check.DetailsURL != "" { url := *check.DetailsURL diff --git a/desktop/internal/workbench/memory_monitor.go b/desktop/internal/workbench/memory_monitor.go index d9c05c7022..62351b957d 100644 --- a/desktop/internal/workbench/memory_monitor.go +++ b/desktop/internal/workbench/memory_monitor.go @@ -597,14 +597,14 @@ type memoryLine struct { func (a *App) memoryRow(k ui.C, language i18n.Language, line memoryLine, columns memoryColumns) { small := a.theme.Metrics.FontSizeS figure := func(text string, width float32) { - ui.Text(k, text).FontSize(small).Width(width).Shrink(0).TextEnd() + ui.Text(c, text).FontSize(small).Width(width).Shrink(0).TextEnd() } ui.Row(k).FillWidth().Height(memoryRowHeight).Shrink(0).Items(ui.Center).Gap(memoryColumnGap).Children(func() { ui.Row(k).Grow(1).MinWidth(0).Items(ui.Center).Gap(8).Children(func() { ui.Row(k).Size(memoryDotSize, memoryDotSize).Shrink(0).Radius(memoryDotSize / 2).Background(a.memoryColor(line.kind)) - ui.Text(k, line.name).FontSize(small).Shrink(1).MinWidth(0).Ellipsis() + ui.Text(c, line.name).FontSize(small).Shrink(1).MinWidth(0).Ellipsis() if line.processes > 1 { - ui.Text(k, i18n.SharedFormat(language, "desktop.memory.processCount", map[string]string{"count": strconv.Itoa(line.processes)})). + ui.Text(c, i18n.SharedFormat(language, "desktop.memory.processCount", map[string]string{"count": strconv.Itoa(line.processes)})). FontSize(small).Color(a.colors.Subtle).Shrink(0) } }) diff --git a/desktop/internal/workbench/remote_detail_view.go b/desktop/internal/workbench/remote_detail_view.go index 47a2382236..c1e81a3822 100644 --- a/desktop/internal/workbench/remote_detail_view.go +++ b/desktop/internal/workbench/remote_detail_view.go @@ -267,9 +267,9 @@ func (a *App) remoteRecentSection(c ui.C, language i18n.Language, entry core.Sav HitWith(ui.ID(k), folder, gfx.HitOptions{Role: gfx.RoleButton, Cursor: gfx.PointerCursorHand, Disabled: disabled}). Hover(ui.Look{}.Background(a.colors.Hover)).Pressed(ui.Look{}.Background(a.colors.Active)) row.Children(func() { - ui.Icon(k, icons.Folder).Size(14, 14).Shrink(0).Color(a.colors.Subtle) - ui.Text(k, folder).Mono().FontSize(small).Ellipsis().Grow(1).MinWidth(0) - ui.Icon(k, icons.ChevronRight).Size(12, 12).Shrink(0).Color(a.colors.Subtle) + ui.Icon(c, icons.Folder).Size(14, 14).Shrink(0).Color(a.colors.Subtle) + ui.Text(c, folder).Mono().FontSize(small).Ellipsis().Grow(1).MinWidth(0) + ui.Icon(c, icons.ChevronRight).Size(12, 12).Shrink(0).Color(a.colors.Subtle) }) if !disabled && row.Clicked() { folder := folder @@ -355,10 +355,10 @@ func (a *App) remoteHostGrid(c ui.C, language i18n.Language, host core.RemotePro value = "—" } ui.Column(k).Grow(1).Basis(0).MinWidth(0).Gap(3).PadSides(10, 12, 10, 12).Children(func() { - ui.Text(k, item.label).FontSize(small).Color(a.colors.Subtle).Ellipsis().MinWidth(0) - ui.Text(k, value).Weight(gfx.WeightMedium).Ellipsis().MinWidth(0) + ui.Text(c, item.label).FontSize(small).Color(a.colors.Subtle).Ellipsis().MinWidth(0) + ui.Text(c, value).Weight(gfx.WeightMedium).Ellipsis().MinWidth(0) if item.detail != "" { - ui.Text(k, item.detail).FontSize(small).Color(a.colors.Subtle).Ellipsis().MinWidth(0) + ui.Text(c, item.detail).FontSize(small).Color(a.colors.Subtle).Ellipsis().MinWidth(0) } }) } @@ -383,7 +383,7 @@ func (a *App) remoteOutcomeBox(c ui.C, language i18n.Language, outcome *remotePr k := c.Part("box") ui.Column(k).FillWidth().Gap(6).PadSides(10, 14, 10, 12).Radius(6).Background(tint.WithAlpha(0.08)).Stroke(1, tint.WithAlpha(0.35)).Children(func() { ui.Row(k).FillWidth().Gap(8).Items(ui.Start).Children(func() { - ui.Icon(k, icon).Size(14, 14).Shrink(0).Color(tint).MarginTop(2) + ui.Icon(c, icon).Size(14, 14).Shrink(0).Color(tint).MarginTop(2) if connected { var system, machine string if host := outcome.result.Host; host != nil { @@ -396,7 +396,7 @@ func (a *App) remoteOutcomeBox(c ui.C, language i18n.Language, outcome *remotePr ui.Text(line, i18n.Shared(language, "desktop.remote.probe.usable")).Color(tint).Ellipsis().MinWidth(0) }) } else { - ui.Paragraph(k, remoteFailureText(language, outcome), 4).Weight(gfx.WeightMedium).Color(tint).Grow(1).MinWidth(0) + ui.Paragraph(c, remoteFailureText(language, outcome), 4).Weight(gfx.WeightMedium).Color(tint).Grow(1).MinWidth(0) } if diagnostics != "" { label := i18n.Shared(language, "desktop.remote.diagnostics") @@ -411,7 +411,7 @@ func (a *App) remoteOutcomeBox(c ui.C, language i18n.Language, outcome *remotePr if connected && outcome.result.Host != nil { a.remoteHostTags(k.Part("tags"), language, *outcome.result.Host) } else if hint := remoteFailureHint(language, outcome); hint != "" { - ui.Paragraph(k.Part("hint"), hint, 4).FontSize(small).Color(tint).MarginLeft(22) + ui.Paragraph(c, hint, 4).FontSize(small).Color(tint).MarginLeft(22) } }) if diagnostics != "" && r.log.Open { @@ -539,8 +539,8 @@ func (a *App) remoteEffectiveTable(c ui.C, language i18n.Language, settings core ui.Row(k.Part("line")).FillWidth().Height(1).Shrink(0).Background(a.colors.Line) } ui.Row(k).FillWidth().Height(30).Items(ui.Center).Gap(10).PadX(12).Children(func() { - ui.Text(k, item.key).FontSize(small).Color(a.colors.Subtle).Width(140).Shrink(0).Ellipsis() - value := ui.Text(k, item.value).FontSize(small).Ellipsis().Grow(1).MinWidth(0) + ui.Text(c, item.key).FontSize(small).Color(a.colors.Subtle).Width(140).Shrink(0).Ellipsis() + value := ui.Text(c, item.value).FontSize(small).Ellipsis().Grow(1).MinWidth(0) if !item.words { value.Mono() } diff --git a/desktop/internal/workbench/remote_list.go b/desktop/internal/workbench/remote_list.go index 8112de1610..5813c35472 100644 --- a/desktop/internal/workbench/remote_list.go +++ b/desktop/internal/workbench/remote_list.go @@ -402,7 +402,7 @@ func (a *App) remoteHops(c ui.C, language i18n.Language, disabled bool) { k := c.KeyInt(index) ui.Row(k).Height(a.theme.Metrics.ControlHeight).Shrink(0).Items(ui.Center).Gap(2).PadSides(0, 3, 0, 9). Radius(a.theme.Metrics.RadiusItem()).Background(a.colors.Hover).Stroke(1, a.colors.TabIdleBorder).Children(func() { - ui.Text(k, hop).Mono().FontSize(small) + ui.Text(c, hop).Mono().FontSize(small) remove := ui.Button(k.Part("remove"), i18n.SharedFormat(language, "desktop.remote.hopRemove", map[string]string{"host": hop})). Icon(icons.X).IconOnly().Ghost().Size(18, 18).Disabled(disabled) if remove.Clicked() { @@ -424,8 +424,8 @@ func (a *App) remoteHops(c ui.C, language i18n.Language, disabled bool) { } ui.Row(c.Part("route")).FillWidth().Gap(6).Items(ui.Center).Children(func() { step := func(k ui.C, text string, color gfx.Color) { - ui.Icon(k, icons.ChevronRight).Size(12, 12).Shrink(0).Color(a.colors.Subtle) - ui.Text(k, text).Mono().FontSize(small).Color(color).Ellipsis().Shrink(1).MinWidth(0) + ui.Icon(c, icons.ChevronRight).Size(12, 12).Shrink(0).Color(a.colors.Subtle) + ui.Text(c, text).Mono().FontSize(small).Color(color).Ellipsis().Shrink(1).MinWidth(0) } ui.Text(c, i18n.Shared(language, "desktop.remote.thisComputer")).FontSize(small).Color(a.colors.Subtle).Shrink(0) for index, hop := range hops { diff --git a/desktop/internal/workbench/remote_steps.go b/desktop/internal/workbench/remote_steps.go index 2818a43dd4..efd8109e78 100644 --- a/desktop/internal/workbench/remote_steps.go +++ b/desktop/internal/workbench/remote_steps.go @@ -285,8 +285,8 @@ func (a *App) remoteQuestionCard(c ui.C, language i18n.Language, s *remoteSteps, } k := c.KeyInt(index) ui.Row(k).FillWidth().Items(ui.Center).Gap(10).Children(func() { - ui.Text(k, item[0]).FontSize(small).Color(a.colors.Subtle).Width(80).Shrink(0) - ui.Text(k, item[1]).Mono().FontSize(small).Ellipsis().Grow(1).MinWidth(0) + ui.Text(c, item[0]).FontSize(small).Color(a.colors.Subtle).Width(80).Shrink(0) + ui.Text(c, item[1]).Mono().FontSize(small).Ellipsis().Grow(1).MinWidth(0) }) } ui.Paragraph(c, i18n.Shared(language, "desktop.remote.hostKey.hint"), 3).FontSize(small).Color(a.colors.Subtle) diff --git a/desktop/internal/workbench/runconfig_view.go b/desktop/internal/workbench/runconfig_view.go index 41fa4b9ce4..d46352c3a6 100644 --- a/desktop/internal/workbench/runconfig_view.go +++ b/desktop/internal/workbench/runconfig_view.go @@ -34,12 +34,12 @@ func (a *App) runConfigList(c ui.C, p *project) { ui.Row(k.Part("empty")).Height(panelHeaderHeight).FillWidth().Items(ui.Center).PadX(8).Children(func() { switch { case s.failure != "": - ui.Text(k, i18n.SharedFormat(language, "desktop.runConfig.loadFailed", map[string]string{"reason": s.failure})). + ui.Text(c, i18n.SharedFormat(language, "desktop.runConfig.loadFailed", map[string]string{"reason": s.failure})). FontSize(small).Color(a.colors.Warning).Ellipsis().Grow(1).MinWidth(0) case s.loading: - ui.Text(k, i18n.Shared(language, "native.loading")).FontSize(small).Color(a.colors.Subtle).Ellipsis().Grow(1).MinWidth(0) + ui.Text(c, i18n.Shared(language, "native.loading")).FontSize(small).Color(a.colors.Subtle).Ellipsis().Grow(1).MinWidth(0) default: - ui.Text(k, i18n.Shared(language, "desktop.runConfig.emptyHint")).FontSize(small).Color(a.colors.Subtle).Ellipsis().Grow(1).MinWidth(0) + ui.Text(c, i18n.Shared(language, "desktop.runConfig.emptyHint")).FontSize(small).Color(a.colors.Subtle).Ellipsis().Grow(1).MinWidth(0) } }) }) @@ -244,7 +244,7 @@ func (a *App) drawRunConfigGroupArrow(c ui.C, s *runConfigState, group runConfig slot := ui.Row(k).Size(treelist.Disclosure, treelist.Icon).Shrink(0).Center(). HitWith(ui.ID(k), name+" "+group.title, gfx.HitOptions{Role: gfx.RoleButton, Cursor: gfx.PointerCursorHand, Expandable: true, Expanded: open, SkipFocus: true}) slot.Children(func() { - ui.Icon(k, chevron).Size(12, 12).Color(a.colors.Subtle) + ui.Icon(c, chevron).Size(12, 12).Color(a.colors.Subtle) }) if slot.Clicked() { key := group.key diff --git a/desktop/internal/workbench/shell_view.go b/desktop/internal/workbench/shell_view.go index 558103015a..5480644304 100644 --- a/desktop/internal/workbench/shell_view.go +++ b/desktop/internal/workbench/shell_view.go @@ -326,7 +326,7 @@ func (a *App) toolTabsWith(c ui.C, selected int, labels []string, choose func(in chip = chip.Hover(ui.Look{}.Background(a.colors.Hover)) } chip.Children(func() { - text := ui.Text(k, label).Ellipsis().Shrink(1) + text := ui.Text(c, label).Ellipsis().Shrink(1) if on { text.Color(a.colors.Text) } else { diff --git a/desktop/internal/workbench/tabstrip.go b/desktop/internal/workbench/tabstrip.go index ab0f5ffba7..a3dc808aa4 100644 --- a/desktop/internal/workbench/tabstrip.go +++ b/desktop/internal/workbench/tabstrip.go @@ -444,11 +444,11 @@ func (a *App) stripTab(c ui.C, place *groupPlace, t shownTab, current string, i } var closeButton ui.Box chip.Children(func() { - ui.Icon(k, icon).Size(terminalChipIcon, terminalChipIcon).Shrink(0).Color(a.colors.Subtle) + ui.Icon(c, icon).Size(terminalChipIcon, terminalChipIcon).Shrink(0).Color(a.colors.Subtle) if a.project.terms.bench.Group(place.id).IsPinned(member) { - ui.Icon(k.Part("pin"), icons.Pin).Size(terminalCloseIcon, terminalCloseIcon).Shrink(0).Color(a.colors.Subtle) + ui.Icon(c, icons.Pin).Size(terminalCloseIcon, terminalCloseIcon).Shrink(0).Color(a.colors.Subtle) } - text := ui.Text(k, label).Ellipsis().Grow(1) + text := ui.Text(c, label).Ellipsis().Grow(1) if selected { text.Color(a.colors.Text) } else { From b77b41eef1d1dcca95557fb15dbebac97bd6bb79 Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:43:09 +0000 Subject: [PATCH 06/13] fix(viva): avoid keyed text and icons in run config, notifications and legacy views --- .../internal/settingswindow/build_style.go | 4 ++-- .../settingswindow/command_install.go | 10 +++++----- desktop/internal/workbench/build_options.go | 4 ++-- desktop/internal/workbench/legacy_import.go | 2 +- desktop/internal/workbench/notifications.go | 10 +++++----- desktop/internal/workbench/references_view.go | 2 +- .../internal/workbench/remote_shell_view.go | 2 +- .../workbench/runconfig_dialog_view.go | 20 +++++++++---------- desktop/internal/workbench/runconfig_steps.go | 6 +++--- desktop/internal/workbench/viewer_image.go | 2 +- 10 files changed, 31 insertions(+), 31 deletions(-) diff --git a/desktop/internal/settingswindow/build_style.go b/desktop/internal/settingswindow/build_style.go index 019dae2f2e..70b834dfa3 100644 --- a/desktop/internal/settingswindow/build_style.go +++ b/desktop/internal/settingswindow/build_style.go @@ -345,7 +345,7 @@ func (w *window) segmented(c ui.C, value *string, segments []segment) bool { *value, changed = s.value, true } box.Children(func() { - ui.Text(k, s.label).FontSize(buildFont).Color(words) + ui.Text(c, s.label).FontSize(buildFont).Color(words) if s.changed { ui.Row(k).Size(5, 1).Shrink(0) dot(k, 6, b.accent) @@ -384,7 +384,7 @@ func (w *window) tabsBar(c ui.C, tabs []segment, open *string) bool { words, weight = b.text, gfx.WeightSemibold } ui.Row(k).PadX(12).PadY(6).Children(func() { - ui.Text(k, t.label).FontSize(buildFont).Weight(weight).Color(words) + ui.Text(c, t.label).FontSize(buildFont).Weight(weight).Color(words) }) underline := gfx.Color{} if on { diff --git a/desktop/internal/settingswindow/command_install.go b/desktop/internal/settingswindow/command_install.go index 6073346215..72f743a54d 100644 --- a/desktop/internal/settingswindow/command_install.go +++ b/desktop/internal/settingswindow/command_install.go @@ -341,7 +341,7 @@ func (w *window) commandMissingBanner(c ui.C, language i18n.Language, fact Plugi for index, entry := range missing { k := c.KeyInt(index) ui.Row(k).FillWidth().Gap(8).Pad(10).Radius(8).Items(ui.Center).Stroke(1, w.pal.line).Background(w.pal.card).Children(func() { - ui.Wrap(k, i18n.SharedFormat(language, "desktop.plugins.commandMissingBanner", map[string]string{"commands": commandList(entry.Commands)})). + ui.Wrap(c, i18n.SharedFormat(language, "desktop.plugins.commandMissingBanner", map[string]string{"commands": commandList(entry.Commands)})). FontSize(12).Color(w.pal.warning).Grow(1).Shrink(1).MinWidth(0) if entry.Installer == "" { w.infoButton(k, i18n.Shared(language, "desktop.plugins.commandMissingManual")) @@ -477,8 +477,8 @@ func (w *window) commandInstallOffer(c ui.C, language i18n.Language, dialog *com // and the digest are monospaced. labelled := func(k ui.C, label, value string) { ui.Row(k).FillWidth().Gap(6).Children(func() { - ui.Text(k, label).FontSize(11).Color(w.pal.muted).Shrink(0) - ui.Wrap(k, value).Mono().FontSize(11).Color(w.pal.muted).Grow(1).Shrink(1).MinWidth(0) + ui.Text(c, label).FontSize(11).Color(w.pal.muted).Shrink(0) + ui.Wrap(c, value).Mono().FontSize(11).Color(w.pal.muted).Grow(1).Shrink(1).MinWidth(0) }) } ui.Column(c).FillWidth().Gap(2).Pad(8).Radius(6).Background(w.pal.card).Stroke(1, w.pal.line).Children(func() { @@ -508,9 +508,9 @@ func (w *window) commandInstallOffer(c ui.C, language i18n.Language, dialog *com ui.Column(k).FillWidth().Gap(2).Children(func() { w.radio(k, &dialog.target, target.Target, label, target.Directory == "") ui.Column(k).FillWidth().Gap(2).PadLeft(radioSize + 8).Children(func() { - ui.Wrap(k, help).FontSize(11).Color(w.pal.muted) + ui.Wrap(c, help).FontSize(11).Color(w.pal.muted) if target.Directory != "" { - ui.Wrap(k, target.Directory).Mono().FontSize(11).Color(w.pal.subtle) + ui.Wrap(c, target.Directory).Mono().FontSize(11).Color(w.pal.subtle) } }) }) diff --git a/desktop/internal/workbench/build_options.go b/desktop/internal/workbench/build_options.go index a741d4c4e3..5dfd787b0a 100644 --- a/desktop/internal/workbench/build_options.go +++ b/desktop/internal/workbench/build_options.go @@ -427,11 +427,11 @@ func (a *App) buildOptionsDialog(c ui.C, p *project) { ui.Row(k).FillWidth().Items(ui.Center).Gap(6).MarginTop(6).Children(func() { a.buildOptionsHeading(k, e.name) if e.root != "" { - ui.Text(k, e.root).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(1).MinWidth(0) + ui.Text(c, e.root).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(1).MinWidth(0) } }) if len(e.fields) == 0 && !e.loading { - ui.Wrap(k, i18n.Shared(language, "desktop.build.noOptions")).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) + ui.Wrap(c, i18n.Shared(language, "desktop.build.noOptions")).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) } for index := range e.fields { a.drawRunOptionField(k.KeyInt(index), language, &e.fields[index], ready) diff --git a/desktop/internal/workbench/legacy_import.go b/desktop/internal/workbench/legacy_import.go index 07be58c9a0..0a2f5a5a07 100644 --- a/desktop/internal/workbench/legacy_import.go +++ b/desktop/internal/workbench/legacy_import.go @@ -251,7 +251,7 @@ func (a *App) legacyImportView(c ui.C) { ui.Row(k).FillWidth().Items(ui.Center).Gap(8).Children(func() { ui.Switch(k.Part("chosen"), &entry.chosen, label).Grow(1).Shrink(1).MinWidth(0) if value != "" { - ui.Text(k, value).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(1).MinWidth(0) + ui.Text(c, value).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(1).MinWidth(0) } }) } diff --git a/desktop/internal/workbench/notifications.go b/desktop/internal/workbench/notifications.go index 246e5d5f48..b42944ae8e 100644 --- a/desktop/internal/workbench/notifications.go +++ b/desktop/internal/workbench/notifications.go @@ -288,7 +288,7 @@ func (a *App) notificationBell(c ui.C) { if unread > 0 { color = a.colors.Text } - ui.Icon(k, icons.Bell).Size(chromeMarkSize, chromeMarkSize).Color(color) + ui.Icon(c, icons.Bell).Size(chromeMarkSize, chromeMarkSize).Color(color) if unread > 0 { a.chromeStatusLabel(k, strconv.Itoa(unread)) } @@ -345,17 +345,17 @@ func (a *App) notificationRow(c ui.C, row ui.Box, entry *notification) { func (a *App) notificationEntry(k ui.C, entry *notification) { language := a.language() if entry.detail != "" { - ui.Wrap(k, entry.text).FontSize(a.theme.Metrics.FontSizeS).Weight(gfx.WeightMedium) - ui.Wrap(k.Part("detail"), entry.detail).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) + ui.Wrap(c, entry.text).FontSize(a.theme.Metrics.FontSizeS).Weight(gfx.WeightMedium) + ui.Wrap(c, entry.detail).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) } else { - ui.Wrap(k, entry.text).FontSize(a.theme.Metrics.FontSizeS) + ui.Wrap(c, entry.text).FontSize(a.theme.Metrics.FontSizeS) } meta := entry.at.Format("15:04:05") if entry.count > 1 { meta = i18n.SharedFormat(language, "desktop.notifications.meta", map[string]string{"time": meta, "count": strconv.Itoa(entry.count)}) } ui.Row(k).FillWidth().Items(ui.Center).Gap(8).Children(func() { - ui.Text(k, meta).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Grow(1).Ellipsis() + ui.Text(c, meta).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Grow(1).Ellipsis() if entry.act != nil && ui.Button(k.Part("act"), entry.actLabel).Ghost().Small().Shrink(0).Clicked() { act := entry.act k.After(func() { a.notificationAct(act) }) diff --git a/desktop/internal/workbench/references_view.go b/desktop/internal/workbench/references_view.go index 79e20a083b..841da2ff8c 100644 --- a/desktop/internal/workbench/references_view.go +++ b/desktop/internal/workbench/references_view.go @@ -302,7 +302,7 @@ func (a *App) referencesSearchTab(c ui.C, p *project) { Tooltip(name) var closeButton ui.Box chip.Children(func() { - ui.Text(k, name).Color(a.colors.Text).Ellipsis().Shrink(1) + ui.Text(c, name).Color(a.colors.Text).Ellipsis().Shrink(1) cc := k.Part("close") label := i18n.Shared(lang, "desktop.references.closeSearch") closeButton = ui.Row(cc).Size(terminalCloseSize, terminalCloseSize).Shrink(0).Center(). diff --git a/desktop/internal/workbench/remote_shell_view.go b/desktop/internal/workbench/remote_shell_view.go index 4502fc1c6b..a940f82e36 100644 --- a/desktop/internal/workbench/remote_shell_view.go +++ b/desktop/internal/workbench/remote_shell_view.go @@ -148,7 +148,7 @@ func (a *App) remoteList(c ui.C, language i18n.Language) { if path := r.source.Path(); path != "" { a.remoteHelp(k.Part("storage"), i18n.SharedFormat(language, "desktop.remote.storageHelp", map[string]string{"path": path})) } - ui.Text(k, i18n.SharedFormat(language, "desktop.remote.listFooter", map[string]string{"count": strconv.Itoa(len(r.source.Connections))})). + ui.Text(c, i18n.SharedFormat(language, "desktop.remote.listFooter", map[string]string{"count": strconv.Itoa(len(r.source.Connections))})). FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(1).MinWidth(0) }) }) diff --git a/desktop/internal/workbench/runconfig_dialog_view.go b/desktop/internal/workbench/runconfig_dialog_view.go index 7879b63fd5..820e45df18 100644 --- a/desktop/internal/workbench/runconfig_dialog_view.go +++ b/desktop/internal/workbench/runconfig_dialog_view.go @@ -122,8 +122,8 @@ func (a *App) drawRunConfigDialogTree(c ui.C, p *project) { if s.hidden > 0 { ui.Row(k).FillWidth().Height(1).Shrink(0).Background(a.colors.Line) ui.Row(k.Part("hidden")).FillWidth().Shrink(0).Items(ui.Center).Gap(6).Pad(8).Children(func() { - ui.Icon(k, icons.Info).Size(12, 12).Shrink(0).Color(a.colors.Subtle) - ui.Paragraph(k, hiddenRunConfigurations(language, s.hidden), 2).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Grow(1).MinWidth(0) + ui.Icon(c, icons.Info).Size(12, 12).Shrink(0).Color(a.colors.Subtle) + ui.Paragraph(c, hiddenRunConfigurations(language, s.hidden), 2).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Grow(1).MinWidth(0) }) } }) @@ -384,8 +384,8 @@ func (a *App) drawRunConfigDialogRow(c ui.C, p *project, i int) { if row.node.folder == "" { icon = d.groups[row.group].icon } - ui.Icon(k, icon).Size(treelist.Icon, treelist.Icon).Shrink(0).Color(a.colors.Subtle) - ui.Text(k, a.runConfigDialogRowLabel(p, row)).FontSize(treeFontSize).Color(a.colors.Text).Shrink(1).MinWidth(0).Ellipsis() + ui.Icon(c, icon).Size(treelist.Icon, treelist.Icon).Shrink(0).Color(a.colors.Subtle) + ui.Text(c, a.runConfigDialogRowLabel(p, row)).FontSize(treeFontSize).Color(a.colors.Text).Shrink(1).MinWidth(0).Ellipsis() return } unavailable := a.runConfigDraftUnavailable(p, row.key) @@ -394,8 +394,8 @@ func (a *App) drawRunConfigDialogRow(c ui.C, p *project, i int) { if unavailable != "" { icon, color = icons.CircleAlert, a.colors.Warning } - ui.Icon(k, icon).Size(treelist.Icon, treelist.Icon).Shrink(0).Color(color) - ui.Text(k, a.runConfigDraftLabel(p, row.key)).FontSize(treeFontSize).Color(a.colors.Text).Shrink(1).MinWidth(0).Ellipsis() + ui.Icon(c, icon).Size(treelist.Icon, treelist.Icon).Shrink(0).Color(color) + ui.Text(c, a.runConfigDraftLabel(p, row.key)).FontSize(treeFontSize).Color(a.colors.Text).Shrink(1).MinWidth(0).Ellipsis() }) } @@ -454,7 +454,7 @@ func (a *App) drawRunConfigDialogPane(c ui.C, p *project) { a.drawRunConfigDraft(k, p, draft) } if d.failure != "" { - ui.Paragraph(k, d.failure, 4).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger) + ui.Paragraph(c, d.failure, 4).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger) } }) }) @@ -504,7 +504,7 @@ func (a *App) drawRunConfigFolderPane(c ui.C, p *project) { c.After(func() { a.renameRunConfigFolder(p) }) } if d.folderError != "" { - ui.Text(k, d.folderError).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger) + ui.Text(c, d.folderError).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger) } }) ui.Paragraph(c, i18n.Shared(language, "desktop.runConfig.folderHint"), 3).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) @@ -569,8 +569,8 @@ func (a *App) drawRunConfigDialogStart(c ui.C, p *project) { func (a *App) drawRunConfigDialogBanner(c ui.C, text string) { k := c.Part("banner") ui.Row(k).FillWidth().Items(ui.Start).Gap(8).Pad(8).Radius(a.theme.Metrics.RadiusItem()).Border(1, a.colors.Warning).Children(func() { - ui.Icon(k, icons.CircleAlert).Size(14, 14).Shrink(0).Color(a.colors.Warning) - ui.Paragraph(k, text, 4).FontSize(a.theme.Metrics.FontSizeS).Grow(1).MinWidth(0) + ui.Icon(c, icons.CircleAlert).Size(14, 14).Shrink(0).Color(a.colors.Warning) + ui.Paragraph(c, text, 4).FontSize(a.theme.Metrics.FontSizeS).Grow(1).MinWidth(0) }) } diff --git a/desktop/internal/workbench/runconfig_steps.go b/desktop/internal/workbench/runconfig_steps.go index 9ce0d98913..02d4253b03 100644 --- a/desktop/internal/workbench/runconfig_steps.go +++ b/desktop/internal/workbench/runconfig_steps.go @@ -187,8 +187,8 @@ func (a *App) drawRunConfigStepsTitle(c ui.C, steps *runConfigSteps, title, help fold := ui.Row(k).Shrink(0).Items(ui.Center).Gap(4). HitWith(ui.ID(k), name+" "+title, gfx.HitOptions{Role: gfx.RoleButton, Cursor: gfx.PointerCursorHand, Expandable: true, Expanded: open}) fold.Children(func() { - ui.Icon(k, chevron).Size(12, 12).Shrink(0).Color(a.colors.Subtle) - ui.Text(k, title).Shrink(0) + ui.Icon(c, chevron).Size(12, 12).Shrink(0).Color(a.colors.Subtle) + ui.Text(c, title).Shrink(0) }) if fold.Clicked() { c.After(func() { steps.collapsed = !steps.collapsed }) @@ -540,7 +540,7 @@ func (a *App) drawRunConfigTask(c ui.C, p *project) { ui.Column(k).FillWidth().Gap(10).Children(func() { a.drawRunConfigFormFields(k, p, t.form, !t.checking) if t.failure != "" { - ui.Paragraph(k.Part("failure"), t.failure, 4).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger) + ui.Paragraph(c, t.failure, 4).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger) } }) }, func() { diff --git a/desktop/internal/workbench/viewer_image.go b/desktop/internal/workbench/viewer_image.go index 6bd132de68..8776751804 100644 --- a/desktop/internal/workbench/viewer_image.go +++ b/desktop/internal/workbench/viewer_image.go @@ -151,7 +151,7 @@ func (a *App) viewerZoom(c ui.C, zoom imageZoom, zoomTo func(zoomRequest)) { Hover(ui.Look{}.Background(a.colors.Hover)).Pressed(ui.Look{}.Background(a.colors.Active)). Tooltip(i18n.Shared(language, "desktop.viewer.resetZoom")) button.Children(func() { - ui.Text(k, percent).FontSize(11).Weight(gfx.WeightMedium).Mono().Color(a.colors.Text) + ui.Text(c, percent).FontSize(11).Weight(gfx.WeightMedium).Mono().Color(a.colors.Text) }) if button.Clicked() { zoomTo(zoomRequest{to: 1}) From b240b8dd9df6092e343269809fbe7c9eeaf3d5c0 Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:43:41 +0000 Subject: [PATCH 07/13] fix(viva): complete keyed leaf cleanup in settings and remaining workbench views --- desktop/internal/settingswindow/languages_view.go | 8 ++++---- desktop/internal/settingswindow/marketplace_view.go | 2 +- .../settingswindow/source_settings_entries_view.go | 4 ++-- desktop/internal/settingswindow/toolchains_view.go | 6 +++--- desktop/internal/settingswindow/trusted_locations_view.go | 2 +- desktop/internal/workbench/build_tree_view.go | 6 +++--- desktop/internal/workbench/compact_menu.go | 2 +- desktop/internal/workbench/editor_view.go | 2 +- desktop/internal/workbench/gitpush_workspace_view.go | 2 +- desktop/internal/workbench/markdown_preview.go | 4 ++-- desktop/internal/workbench/remote_ports_view.go | 4 ++-- desktop/internal/workbench/remote_status_view.go | 4 ++-- desktop/internal/workbench/saved_files.go | 2 +- desktop/internal/workbench/status_path_view.go | 2 +- desktop/internal/workbench/update_dialog.go | 2 +- 15 files changed, 26 insertions(+), 26 deletions(-) diff --git a/desktop/internal/settingswindow/languages_view.go b/desktop/internal/settingswindow/languages_view.go index a33f5d0870..0d821d8af8 100644 --- a/desktop/internal/settingswindow/languages_view.go +++ b/desktop/internal/settingswindow/languages_view.go @@ -99,20 +99,20 @@ func (w *window) languageDirectory(c ui.C, language i18n.Language, pages []*core r.Element.Children(func() { w.pluginTile(k, page.Title, 28) ui.Column(k).Grow(1).Shrink(1).MinWidth(0).Children(func() { - ui.Text(k, page.Title).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Ellipsis() + ui.Text(c, page.Title).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Ellipsis() ui.Row(k).Height(2).Shrink(0) - ui.Text(k, i18n.SharedFormat(language, "desktop.buildSettings.providedBy", map[string]string{"plugin": kindPlugins(page, separator)})). + ui.Text(c, i18n.SharedFormat(language, "desktop.buildSettings.providedBy", map[string]string{"plugin": kindPlugins(page, separator)})). FontSize(buildSmall).Color(b.sub).Ellipsis() }) if page.Kind == "language" && len(page.Contributors) > 0 && w.ctrl.opts.LanguageServerState != nil { words, tone := languageStateWords(language, w.languageServerState(page.Contributors[0].PluginID)) ui.Row(k.Part("server")).Shrink(0).Gap(6).Items(ui.Center).Children(func() { dot(k, 8, b.statusColor(tone)) - ui.Text(k, i18n.SharedFormat(language, "desktop.languageSettings.serverState", map[string]string{"state": words})). + ui.Text(c, i18n.SharedFormat(language, "desktop.languageSettings.serverState", map[string]string{"state": words})). FontSize(buildSmall).Color(b.sub) }) } - ui.Text(k, "›").FontSize(buildFont).Color(b.faint).Shrink(0) + ui.Text(c, "›").FontSize(buildFont).Color(b.faint).Shrink(0) }) if r.Element.Clicked() { open = page.Key diff --git a/desktop/internal/settingswindow/marketplace_view.go b/desktop/internal/settingswindow/marketplace_view.go index a4f1bf57d1..dc599e5cb5 100644 --- a/desktop/internal/settingswindow/marketplace_view.go +++ b/desktop/internal/settingswindow/marketplace_view.go @@ -145,7 +145,7 @@ func (w *window) pluginTabButton(c ui.C, tab int, label string) { button = button.Hover(ui.Look{}.Background(w.pal.hover)) } button.Children(func() { - ui.Text(k, label).FontSize(13).Color(color) + ui.Text(c, label).FontSize(13).Color(color) }) if button.Clicked() { w.pluginTab = tab diff --git a/desktop/internal/settingswindow/source_settings_entries_view.go b/desktop/internal/settingswindow/source_settings_entries_view.go index 2c525e1534..12fd057409 100644 --- a/desktop/internal/settingswindow/source_settings_entries_view.go +++ b/desktop/internal/settingswindow/source_settings_entries_view.go @@ -135,7 +135,7 @@ func (w *window) sourceEntryRow(c ui.C, p *sourceSettingsForm, source core.Setti } box.Children(func() { if on { - ui.Icon(k, icons.Check).Size(12, 12).Color(w.pal.white) + ui.Icon(c, icons.Check).Size(12, 12).Color(w.pal.white) } }) if !disabled && box.Clicked() { @@ -156,7 +156,7 @@ func (w *window) sourceEntryRow(c ui.C, p *sourceSettingsForm, source core.Setti } optionTitle := func(option int) string { return attribute.Options[option].Title } if disabled { - ui.Text(k, optionTitle(*choice)).FontSize(12).Color(w.pal.muted).Width(entryChoiceWidth).Shrink(0).Ellipsis() + ui.Text(c, optionTitle(*choice)).FontSize(12).Color(w.pal.muted).Width(entryChoiceWidth).Shrink(0).Ellipsis() continue } if ui.Select(k, choice, indices, optionTitle).Width(entryChoiceWidth).Shrink(0).Label(title).Changed() { diff --git a/desktop/internal/settingswindow/toolchains_view.go b/desktop/internal/settingswindow/toolchains_view.go index cbb3f67333..43fc6cb906 100644 --- a/desktop/internal/settingswindow/toolchains_view.go +++ b/desktop/internal/settingswindow/toolchains_view.go @@ -974,12 +974,12 @@ func (w *window) toolchainTrace(c ui.C, language i18n.Language, tool *toolchain. ui.Row(k).FillWidth().MinWidth(0).PadY(3).Gap(8).Items(ui.Start).Children(func() { ui.Row(k).Width(14).Shrink(0).MinHeight(16).Center().Children(func() { if mark == "" { - ui.Icon(k, icons.Check).Size(11, 11).Color(markColor) + ui.Icon(c, icons.Check).Size(11, 11).Color(markColor) return } - ui.Text(k, mark).FontSize(buildSmall).Weight(gfx.WeightBold).Color(markColor) + ui.Text(c, mark).FontSize(buildSmall).Weight(gfx.WeightBold).Color(markColor) }) - ui.Wrap(k, text).FontSize(buildSmall).Color(words).Grow(1).Shrink(1).MinWidth(0) + ui.Wrap(c, text).FontSize(buildSmall).Color(words).Grow(1).Shrink(1).MinWidth(0) }) } }) diff --git a/desktop/internal/settingswindow/trusted_locations_view.go b/desktop/internal/settingswindow/trusted_locations_view.go index 70be4c3ada..605f4fe168 100644 --- a/desktop/internal/settingswindow/trusted_locations_view.go +++ b/desktop/internal/settingswindow/trusted_locations_view.go @@ -173,7 +173,7 @@ func (w *window) trustedLocationsList(c ui.C, language i18n.Language, l *trusted if row.mark == locationRemoved { words = p.subtle } - ui.Icon(k, icons.Folder).Size(14, 14).Color(p.muted).Shrink(0) + ui.Icon(c, icons.Folder).Size(14, 14).Color(p.muted).Shrink(0) // The tooltip shows a path the row's width cuts; it needs an element with an identity. path := k.Part("path") ui.Row(path).Grow(1).Shrink(1).MinWidth(0).Items(ui.Center). diff --git a/desktop/internal/workbench/build_tree_view.go b/desktop/internal/workbench/build_tree_view.go index a03eb35032..0fc4d2ca9d 100644 --- a/desktop/internal/workbench/build_tree_view.go +++ b/desktop/internal/workbench/build_tree_view.go @@ -237,7 +237,7 @@ func (a *App) buildArrow(c ui.C, title string, branch, open bool) bool { slot := ui.Row(k).Size(treelist.Disclosure, treelist.Icon).Shrink(0).Center(). HitWith(ui.ID(k), name+" "+title, gfx.HitOptions{Role: gfx.RoleButton, Cursor: gfx.PointerCursorHand, Expandable: true, Expanded: open, SkipFocus: true}) slot.Children(func() { - ui.Icon(k, fileicons.TreeChevron(open, a.colors.Dark)).Size(16, 16) + ui.Icon(c, fileicons.TreeChevron(open, a.colors.Dark)).Size(16, 16) }) return slot.Clicked() } @@ -482,13 +482,13 @@ func (a *App) buildRunMark(c ui.C, label string, disabled bool) bool { slot := ui.Row(k).Size(treelist.Icon, treelist.Icon).Shrink(0).Center() if disabled { slot.Children(func() { - ui.Icon(k, icons.Play).Size(14, 14).Color(a.colors.Subtle).Opacity(0.5) + ui.Icon(c, icons.Play).Size(14, 14).Color(a.colors.Subtle).Opacity(0.5) }) return false } slot = slot.HitWith(ui.ID(k), label, gfx.HitOptions{Role: gfx.RoleButton, Cursor: gfx.PointerCursorHand, SkipFocus: true}).Tooltip(label) slot.Children(func() { - ui.Icon(k, icons.Play).Size(14, 14).Color(a.colors.Success) + ui.Icon(c, icons.Play).Size(14, 14).Color(a.colors.Success) }) return slot.Clicked() } diff --git a/desktop/internal/workbench/compact_menu.go b/desktop/internal/workbench/compact_menu.go index 527774173e..fd772d6017 100644 --- a/desktop/internal/workbench/compact_menu.go +++ b/desktop/internal/workbench/compact_menu.go @@ -56,7 +56,7 @@ func (a *App) compactMenuButton(c ui.C) { button = a.chromeHover(button) } button.Children(func() { - ui.Icon(k, icons.Ellipsis).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Text) + ui.Icon(c, icons.Ellipsis).Size(chromeMarkSize, chromeMarkSize).Color(a.colors.Text) }) if button.Clicked() { c.After(func() { a.title.menuOpen = !a.title.menuOpen }) diff --git a/desktop/internal/workbench/editor_view.go b/desktop/internal/workbench/editor_view.go index 4f104ee725..3bc2d33cdd 100644 --- a/desktop/internal/workbench/editor_view.go +++ b/desktop/internal/workbench/editor_view.go @@ -165,7 +165,7 @@ func (a *App) softWrapSwitch(c ui.C) { button = button.Hover(ui.Look{}.Background(a.colors.Hover)) } button.Children(func() { - ui.Icon(k, icons.WrapText).Size(shellIconSize, shellIconSize).Color(icon). + ui.Icon(c, icons.WrapText).Size(shellIconSize, shellIconSize).Color(icon). StateFrom(button).Hover(ui.Look{}.Color(a.colors.Text)) }) if button.Clicked() { diff --git a/desktop/internal/workbench/gitpush_workspace_view.go b/desktop/internal/workbench/gitpush_workspace_view.go index 4afbff2fc1..315add1938 100644 --- a/desktop/internal/workbench/gitpush_workspace_view.go +++ b/desktop/internal/workbench/gitpush_workspace_view.go @@ -163,7 +163,7 @@ func (a *App) drawWorkspacePushFold(c ui.C, s *workspacePushState, id, name stri slot := ui.Row(k).Size(treelist.Disclosure, treelist.Icon).Shrink(0).Center(). HitWith(ui.ID(k), label+" "+name, gfx.HitOptions{Role: gfx.RoleButton, Cursor: gfx.PointerCursorHand, Expandable: true, Expanded: open, SkipFocus: true}) slot.Children(func() { - ui.Icon(k, chevron).Size(12, 12).Color(a.colors.Subtle) + ui.Icon(c, chevron).Size(12, 12).Color(a.colors.Subtle) }) if slot.Clicked() { c.After(func() { s.folded[id] = open }) diff --git a/desktop/internal/workbench/markdown_preview.go b/desktop/internal/workbench/markdown_preview.go index 3960c2a794..bf35a24773 100644 --- a/desktop/internal/workbench/markdown_preview.go +++ b/desktop/internal/workbench/markdown_preview.go @@ -248,7 +248,7 @@ func (a *App) pageModeSwitch(c ui.C, d *document) { button = button.Hover(ui.Look{}.Background(a.colors.Hover)) } button.Tooltip(label).Children(func() { - ui.Icon(k, entry.icon).Size(shellIconSize, shellIconSize).Color(icon). + ui.Icon(c, entry.icon).Size(shellIconSize, shellIconSize).Color(icon). StateFrom(button).Hover(ui.Look{}.Color(a.colors.Text)) }) if button.Clicked() && !on { @@ -345,7 +345,7 @@ func (a *App) markdownContentsButton(c ui.C, p *project, d *document) { button = button.Hover(ui.Look{}.Background(a.colors.Hover)) } button.Tooltip(title).Children(func() { - ui.Icon(k, icons.ListTree).Size(shellIconSize, shellIconSize).Color(icon). + ui.Icon(c, icons.ListTree).Size(shellIconSize, shellIconSize).Color(icon). StateFrom(button).Hover(ui.Look{}.Color(a.colors.Text)) }) if button.Clicked() { diff --git a/desktop/internal/workbench/remote_ports_view.go b/desktop/internal/workbench/remote_ports_view.go index db3989b9ae..6be94c0ecc 100644 --- a/desktop/internal/workbench/remote_ports_view.go +++ b/desktop/internal/workbench/remote_ports_view.go @@ -150,7 +150,7 @@ func (a *App) remotePortsHeader(c ui.C) { cell = cell.Grow(1).Shrink(1).MinWidth(0) } cell.Children(func() { - ui.Text(k.Part(key+"-text"), text).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis() + ui.Text(c, text).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis() }) } column("remote", i18n.Shared(language, "desktop.remote.ports.columnRemote"), remotePortsRemoteWidth) @@ -499,7 +499,7 @@ func (a *App) remotePortsStatusItem(c ui.C) { }). Tooltip(i18n.SharedFormat(language, "desktop.remote.ports.statusTooltip", map[string]string{"count": count})) button.Children(func() { - ui.Icon(k, icons.ArrowLeftRight).Size(chromeMarkSize, chromeMarkSize).Shrink(0).Color(a.colors.Accent) + ui.Icon(c, icons.ArrowLeftRight).Size(chromeMarkSize, chromeMarkSize).Shrink(0).Color(a.colors.Accent) a.chromeStatusLabel(k, count) }) if button.Clicked() { diff --git a/desktop/internal/workbench/remote_status_view.go b/desktop/internal/workbench/remote_status_view.go index 3d6eb0a260..60d5ae8d11 100644 --- a/desktop/internal/workbench/remote_status_view.go +++ b/desktop/internal/workbench/remote_status_view.go @@ -70,9 +70,9 @@ func (a *App) remoteStatus(c ui.C) { button = button.Hover(ui.Look{}.Background(a.colors.Hover)) } button.Children(func() { - ui.Icon(k, icon).Size(chromeMarkSize, chromeMarkSize).Shrink(0).Color(color) + ui.Icon(c, icon).Size(chromeMarkSize, chromeMarkSize).Shrink(0).Color(color) a.chromeStatusLabel(k, text) - ui.Icon(k, icons.ChevronDown).Size(chromeMarkSize, chromeMarkSize).Shrink(0).Color(a.colors.Subtle) + ui.Icon(c, icons.ChevronDown).Size(chromeMarkSize, chromeMarkSize).Shrink(0).Color(a.colors.Subtle) }) if button.Clicked() && !r.menuOpen { r.menuOpen = true diff --git a/desktop/internal/workbench/saved_files.go b/desktop/internal/workbench/saved_files.go index 860cb91e72..fe3d2efc84 100644 --- a/desktop/internal/workbench/saved_files.go +++ b/desktop/internal/workbench/saved_files.go @@ -249,7 +249,7 @@ func (a *App) drawSavedFolderArrow(c ui.C, f *savedFiles, r savedFileRow, dir st slot := ui.Row(k).Size(treelist.Disclosure, treelist.Icon).Shrink(0).Center(). HitWith(ui.ID(k), name+" "+dir, gfx.HitOptions{Role: gfx.RoleButton, Cursor: gfx.PointerCursorHand, Expandable: true, Expanded: open, SkipFocus: true}) slot.Children(func() { - ui.Icon(k, chevron).Size(12, 12).Color(a.colors.Subtle) + ui.Icon(c, chevron).Size(12, 12).Color(a.colors.Subtle) }) if slot.Clicked() { layer, folder := r.layer, r.folder diff --git a/desktop/internal/workbench/status_path_view.go b/desktop/internal/workbench/status_path_view.go index 6410b5bc8c..2081d197dd 100644 --- a/desktop/internal/workbench/status_path_view.go +++ b/desktop/internal/workbench/status_path_view.go @@ -36,7 +36,7 @@ func (a *App) statusPathView(c ui.C) { for rest := crumbs.rel; rest != ""; { name, after, folder := strings.Cut(rest, "/") rest = after - ui.Icon(k, icons.ChevronRight).Size(chromeMarkSize, chromeMarkSize).Shrink(0).Color(a.colors.Subtle) + ui.Icon(c, icons.ChevronRight).Size(chromeMarkSize, chromeMarkSize).Shrink(0).Color(a.colors.Subtle) switch { case folder: case crumbs.dir: diff --git a/desktop/internal/workbench/update_dialog.go b/desktop/internal/workbench/update_dialog.go index 0fc34d6c57..3dccfeb748 100644 --- a/desktop/internal/workbench/update_dialog.go +++ b/desktop/internal/workbench/update_dialog.go @@ -144,7 +144,7 @@ func (a *App) updateArrow(c ui.C) { box = box.DrawOver(u.arrow.draw) } box.Children(func() { - ui.Icon(k, updateIcon).Size(chromeIconSize, chromeIconSize).Color(tint) + ui.Icon(c, updateIcon).Size(chromeIconSize, chromeIconSize).Color(tint) }) if box.Clicked() { c.After(func() { a.showUpdateDialog(surfaceToolbar) }) From 8451d506bcd42eafe6ab4ea901f7755f63c83bc9 Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:48:31 +0000 Subject: [PATCH 08/13] fix(viva): remove unused loop indices after leaf key cleanup --- desktop/internal/settingswindow/command_install.go | 2 +- desktop/internal/settingswindow/plugin_settings_view.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/internal/settingswindow/command_install.go b/desktop/internal/settingswindow/command_install.go index 72f743a54d..9fcda447dc 100644 --- a/desktop/internal/settingswindow/command_install.go +++ b/desktop/internal/settingswindow/command_install.go @@ -523,7 +523,7 @@ func (w *window) commandInstallOffer(c ui.C, language i18n.Language, dialog *com } ui.Text(c, i18n.Shared(language, "desktop.plugins.commandInstallCommand")).FontSize(13).Bold().PadTop(4) ui.Column(c).FillWidth().Gap(2).Pad(8).Radius(6).Background(w.pal.card).Stroke(1, w.pal.line).Children(func() { - for index, variable := range chosen.Environment { + for _, variable := range chosen.Environment { ui.Wrap(c, variable).Mono().FontSize(11).Color(w.pal.muted) } ui.Wrap(c, chosen.CommandLine).Mono().FontSize(11).Color(w.pal.text) diff --git a/desktop/internal/settingswindow/plugin_settings_view.go b/desktop/internal/settingswindow/plugin_settings_view.go index 2ba7986390..a74b20d0c0 100644 --- a/desktop/internal/settingswindow/plugin_settings_view.go +++ b/desktop/internal/settingswindow/plugin_settings_view.go @@ -214,7 +214,7 @@ func (w *window) readOnlyList(c ui.C, label, value string) { ui.Column(c).FillWidth().MinWidth(0).PadX(10).PadY(6).Gap(2).Border(1, w.pal.line).Radius(6). HitWith(ui.ID(c), label, gfx.HitOptions{Role: gfx.RoleTextField, Value: value, ReadOnly: true, Disabled: true}). Children(func() { - for index, line := range strings.Split(value, "\n") { + for _, line := range strings.Split(value, "\n") { ui.Text(c, line).FontSize(13).Color(w.pal.muted).FillWidth().Ellipsis() } }) From d3d45b609f70cad876cdfe09829607ab35953706 Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:49:35 +0000 Subject: [PATCH 09/13] fix(viva): avoid leaf identity keys on remote and configuration display text --- .../settingswindow/remote_workspace_view.go | 8 ++--- .../workbench/gitpush_workspace_view.go | 4 +-- .../internal/workbench/remote_container.go | 2 +- .../internal/workbench/remote_devcontainer.go | 4 +-- .../workbench/remote_host_containers.go | 2 +- .../workbench/remote_port_rules_view.go | 36 +++++++++---------- .../internal/workbench/remote_ports_view.go | 12 +++---- desktop/internal/workbench/remote_trust.go | 2 +- desktop/internal/workbench/remote_view.go | 2 +- desktop/internal/workbench/remote_wsl.go | 2 +- desktop/internal/workbench/runconfig_steps.go | 2 +- desktop/internal/workbench/runconfig_view.go | 2 +- 12 files changed, 39 insertions(+), 39 deletions(-) diff --git a/desktop/internal/settingswindow/remote_workspace_view.go b/desktop/internal/settingswindow/remote_workspace_view.go index 55ff959a55..b8229623c3 100644 --- a/desktop/internal/settingswindow/remote_workspace_view.go +++ b/desktop/internal/settingswindow/remote_workspace_view.go @@ -114,9 +114,9 @@ func (w *window) remoteProgramRow(c ui.C, language i18n.Language, r *remotePrefe } switch ssh.Status { case core.RemoteProgramMissing: - ui.Wrap(c.Part("program-missing"), i18n.SharedFormat(language, "desktop.remoteSettings.programMissing", map[string]string{"path": *ssh.Path})).FontSize(12).Color(w.pal.danger) + ui.Wrap(c, i18n.SharedFormat(language, "desktop.remoteSettings.programMissing", map[string]string{"path": *ssh.Path})).FontSize(12).Color(w.pal.danger) case core.RemoteProgramNotExecutable: - ui.Wrap(c.Part("program-not-executable"), i18n.SharedFormat(language, "desktop.remoteSettings.programNotExecutable", map[string]string{"path": *ssh.Path})).FontSize(12).Color(w.pal.danger) + ui.Wrap(c, i18n.SharedFormat(language, "desktop.remoteSettings.programNotExecutable", map[string]string{"path": *ssh.Path})).FontSize(12).Color(w.pal.danger) } } @@ -268,7 +268,7 @@ func (w *window) remoteIdleTimeoutRow(c ui.C, language i18n.Language, r *remoteP return } w.settingsRow(c, i18n.Shared(language, "desktop.remoteSettings.idleTimeout"), i18n.Shared(language, "desktop.remoteSettings.idleTimeoutHelp"), func() { - ui.Text(c.Part("value"), remoteDuration(language, int(seconds))).FontSize(12).Color(w.pal.text) + ui.Text(c, remoteDuration(language, int(seconds))).FontSize(12).Color(w.pal.text) }) } @@ -287,7 +287,7 @@ func (w *window) remotePathText(c ui.C, path, note string) { HitWith(ui.ID(c), path, gfx.HitOptions{Role: gfx.RoleGroup}).Tooltip(path).Children(func() { ui.Text(c, path).FontSize(12).Mono().Color(w.pal.text).Shrink(1).MinWidth(0).Ellipsis() if note != "" { - ui.Text(c.Part("note"), note).FontSize(12).Color(w.pal.muted).Shrink(0) + ui.Text(c, note).FontSize(12).Color(w.pal.muted).Shrink(0) } }) } diff --git a/desktop/internal/workbench/gitpush_workspace_view.go b/desktop/internal/workbench/gitpush_workspace_view.go index 315add1938..7a2ebd7e89 100644 --- a/desktop/internal/workbench/gitpush_workspace_view.go +++ b/desktop/internal/workbench/gitpush_workspace_view.go @@ -134,7 +134,7 @@ func (a *App) drawWorkspacePushRepository(c ui.C, p *project, repo core.Workspac // Git's own reason is shown as it words it. text, color = i18n.SharedFormat(lang, "desktop.git.pushAll.failed", map[string]string{"reason": outcome.err}), a.theme.Danger } - ui.Paragraph(c.Part("outcome"), text, 3).FontSize(size).Color(color).PadLeft(indent) + ui.Paragraph(c, text, 3).FontSize(size).Color(color).PadLeft(indent) } if s.folded[repo.ID] { return @@ -143,7 +143,7 @@ func (a *App) drawWorkspacePushRepository(c ui.C, p *project, repo core.Workspac a.drawWorkspacePushCommit(c.Key(commit.Hash), p, repo.ID, commit, indent+float32(treelist.Indent)) } if repo.Preview != nil && repo.Preview.HasMore { - ui.Text(c.Part("more"), i18n.Shared(lang, "git.pushDialog.moreCommits")).FontSize(size).Muted().PadLeft(indent + float32(treelist.Indent)) + ui.Text(c, i18n.Shared(lang, "git.pushDialog.moreCommits")).FontSize(size).Muted().PadLeft(indent + float32(treelist.Indent)) } } diff --git a/desktop/internal/workbench/remote_container.go b/desktop/internal/workbench/remote_container.go index 9c9b7aa057..7f82a5f2d0 100644 --- a/desktop/internal/workbench/remote_container.go +++ b/desktop/internal/workbench/remote_container.go @@ -244,7 +244,7 @@ func (a *App) remoteContainerPage(c ui.C, language i18n.Language) { c.After(func() { a.connectRemote("") }) } }) - ui.Paragraph(c.Part("about"), i18n.SharedFormat(language, "desktop.remote.container.about", map[string]string{"engine": engine}), 5).FontSize(small).Color(a.colors.Subtle) + ui.Paragraph(c, i18n.SharedFormat(language, "desktop.remote.container.about", map[string]string{"engine": engine}), 5).FontSize(small).Color(a.colors.Subtle) label := i18n.Shared(language, "desktop.remote.container.user") a.remoteSection(c.Part("account"), label, i18n.Shared(language, "desktop.remote.container.userHelp"), nil, func() { ui.TextField(c.Part("user"), &r.containers.user, label, i18n.Shared(language, "desktop.remote.container.userPlaceholder")). diff --git a/desktop/internal/workbench/remote_devcontainer.go b/desktop/internal/workbench/remote_devcontainer.go index 500a078df5..a82fff9696 100644 --- a/desktop/internal/workbench/remote_devcontainer.go +++ b/desktop/internal/workbench/remote_devcontainer.go @@ -402,7 +402,7 @@ func (a *App) remoteDevcontainerView(c ui.C, language i18n.Language, d *remoteDe config := i18n.Shared(language, "desktop.remote.devcontainer.config") a.remoteSection(c, config, i18n.Shared(language, "desktop.remote.devcontainer.configHelp"), nil, func() { if len(d.configs) == 0 { - ui.Paragraph(c.Part("none"), i18n.Shared(language, "desktop.remote.devcontainer.none"), 3).FontSize(small).Color(a.colors.Warning) + ui.Paragraph(c, i18n.Shared(language, "desktop.remote.devcontainer.none"), 3).FontSize(small).Color(a.colors.Warning) return } paths := make([]string, len(d.configs)) @@ -490,7 +490,7 @@ func (a *App) remoteDevcontainerLog(c ui.C, language i18n.Language, d *remoteDev }).Scrollbars().Label(title).Fill() }) if d.truncated { - ui.Text(c.Part("truncated"), i18n.Shared(language, "desktop.remote.devcontainer.truncated")).FontSize(small).Color(a.colors.Subtle) + ui.Text(c, i18n.Shared(language, "desktop.remote.devcontainer.truncated")).FontSize(small).Color(a.colors.Subtle) } }) } diff --git a/desktop/internal/workbench/remote_host_containers.go b/desktop/internal/workbench/remote_host_containers.go index 0ec23170f6..129ec594b2 100644 --- a/desktop/internal/workbench/remote_host_containers.go +++ b/desktop/internal/workbench/remote_host_containers.go @@ -159,7 +159,7 @@ func (a *App) enterRemoteHostContainer() { // enter as, the list, and the engines' words when listing failed. func (a *App) remoteHostContainersView(c ui.C, language i18n.Language, list *remoteBrowserContainers) { small := a.theme.Metrics.FontSizeS - ui.Paragraph(c.Part("about"), i18n.Shared(language, "desktop.remote.hostContainers.about"), 4).FontSize(small).Color(a.colors.Subtle) + ui.Paragraph(c, i18n.Shared(language, "desktop.remote.hostContainers.about"), 4).FontSize(small).Color(a.colors.Subtle) label := i18n.Shared(language, "desktop.remote.container.user") ui.Row(c.Part("account")).FillWidth().Gap(8).Items(ui.Center).Children(func() { ui.Text(c, label).FontSize(small).Shrink(0) diff --git a/desktop/internal/workbench/remote_port_rules_view.go b/desktop/internal/workbench/remote_port_rules_view.go index 4385fe5be0..adec8dbf3d 100644 --- a/desktop/internal/workbench/remote_port_rules_view.go +++ b/desktop/internal/workbench/remote_port_rules_view.go @@ -102,16 +102,16 @@ func (a *App) remotePortIdleRuleRow(c ui.C, p *project, rule core.RemotePortRule HitWith(ui.ID(c), listen, gfx.HitOptions{Value: status, SkipFocus: true}) line.Children(func() { ui.Row(c.Part("listen")).Width(remotePortRulesListenWidth).Shrink(0).Items(ui.Center).Gap(6).Children(func() { - ui.Icon(c.Part("kind"), icon).Size(14, 14).Shrink(0).Color(a.colors.Subtle) - ui.Text(c.Part("listen-text"), listen).Color(a.colors.Subtle).Ellipsis() + ui.Icon(c, icon).Size(14, 14).Shrink(0).Color(a.colors.Subtle) + ui.Text(c, listen).Color(a.colors.Subtle).Ellipsis() }) a.remotePortsLabelCell(c, rule.Label) ui.Row(c.Part("target")).Grow(1).Shrink(1).MinWidth(0).Items(ui.Center).Children(func() { - ui.Text(c.Part("target-text"), remotePortIdleTarget(language, rule)).Color(a.colors.Subtle).Ellipsis() + ui.Text(c, remotePortIdleTarget(language, rule)).Color(a.colors.Subtle).Ellipsis() }) ui.Row(c.Part("connections")).Width(remotePortRulesConnectionsWidth).Shrink(0) ui.Row(c.Part("status")).Width(remotePortsStatusWidth).Shrink(0).Items(ui.Center).Children(func() { - ui.Text(c.Part("status-text"), status).Color(a.colors.Subtle).Ellipsis() + ui.Text(c, status).Color(a.colors.Subtle).Ellipsis() }) ui.Row(c.Part("actions")).Width(remotePortsActionWidth).Shrink(0).Items(ui.Center).Justify(ui.End).Gap(2).Children(func() { if _, clicked := a.toolIconButton(c.Part("start"), i18n.Shared(language, "desktop.remote.ports.ruleStart"), icons.Play, false, unavailable); clicked { @@ -184,18 +184,18 @@ func (a *App) remotePortRuleRow(c ui.C, p *project, rule core.RemoteForward) { Tooltip(tip) } listenCell.Children(func() { - ui.Icon(c.Part("kind"), icon).Size(14, 14).Shrink(0).Color(color) - ui.Text(c.Part("listen-text"), listen).Color(color).Ellipsis() + ui.Icon(c, icon).Size(14, 14).Shrink(0).Color(color) + ui.Text(c, listen).Color(color).Ellipsis() }) a.remotePortsLabelCell(c, ports.ruleLabel(rule)) ui.Row(c.Part("target")).Grow(1).Shrink(1).MinWidth(0).Items(ui.Center).Children(func() { - ui.Text(c.Part("target-text"), remotePortRuleTarget(language, rule)).Color(a.colors.Text).Ellipsis() + ui.Text(c, remotePortRuleTarget(language, rule)).Color(a.colors.Text).Ellipsis() }) ui.Row(c.Part("connections")).Width(remotePortRulesConnectionsWidth).Shrink(0).Items(ui.Center).Children(func() { - ui.Text(c.Part("connections-text"), connections).Color(connectionsColor).Ellipsis() + ui.Text(c, connections).Color(connectionsColor).Ellipsis() }) ui.Row(c.Part("status")).Width(remotePortsStatusWidth).Shrink(0).Items(ui.Center).Children(func() { - ui.Text(c.Part("status-text"), status).Color(statusColor).Ellipsis() + ui.Text(c, status).Color(statusColor).Ellipsis() }) ui.Row(c.Part("actions")).Width(remotePortsActionWidth).Shrink(0).Items(ui.Center).Justify(ui.End).Gap(2).Children(func() { if _, clicked := a.toolIconButton(c.Part("stop"), i18n.Shared(language, "desktop.remote.ports.stop"), icons.Square, false, busy); clicked { @@ -243,7 +243,7 @@ func (a *App) remotePortRuleDialog(c ui.C, p *project) { unavailable := p.remote.session == "" || draft.starting closed := ui.Modal(c.Part("ports-rule"), &ports.ruleOpen, title, func() { if draft.confirm != remotePortRuleNoConfirm { - ui.Paragraph(c.Part("rule-question"), a.remotePortRuleQuestion(p, draft), 6).Color(a.colors.Warning) + ui.Paragraph(c, a.remotePortRuleQuestion(p, draft), 6).Color(a.colors.Warning) return } a.remotePortRuleFields(c, p, draft, unavailable) @@ -289,13 +289,13 @@ func (a *App) remotePortRuleFields(c ui.C, p *project, draft *remotePortRuleDraf return i18n.Shared(language, "desktop.remote.ports.ruleKindHost") } kindTitle := i18n.Shared(language, "desktop.remote.ports.ruleKind") - ui.Text(c.Part("rule-kind-title"), kindTitle).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) + ui.Text(c, kindTitle).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) if ui.Select(c.Part("rule-kind"), &draft.kind, kinds, kindLabel).FillWidth().Label(kindTitle).Disabled(unavailable).Changed() { draft.message = "" draft.target.SetText("") } if !draft.reverseAllowed { - ui.Paragraph(c.Part("rule-reverse-off"), i18n.Shared(language, "desktop.remote.ports.ruleReverseOff"), 3). + ui.Paragraph(c, i18n.Shared(language, "desktop.remote.ports.ruleReverseOff"), 3). FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) } reverse := draft.kind == remotePortRuleReverse @@ -307,25 +307,25 @@ func (a *App) remotePortRuleFields(c ui.C, p *project, draft *remotePortRuleDraf targetTitle = i18n.Shared(language, "desktop.remote.ports.ruleLocal") targetPlaceholder = i18n.Shared(language, "desktop.remote.ports.ruleLocalPlaceholder") } - ui.Paragraph(c.Part("rule-note"), note, 4).Color(a.colors.Text) + ui.Paragraph(c, note, 4).Color(a.colors.Text) listenTitle := i18n.Shared(language, "desktop.remote.ports.ruleListen") - ui.Text(c.Part("rule-listen-title"), listenTitle).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) + ui.Text(c, listenTitle).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) listened := ui.TextField(c.Part("rule-listen"), &draft.listen, listenTitle, i18n.Shared(language, "desktop.remote.ports.ruleListenPlaceholder")).FillWidth().Submitted() - ui.Text(c.Part("rule-target-title"), targetTitle).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) + ui.Text(c, targetTitle).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) targeted := ui.TextField(c.Part("rule-target"), &draft.target, targetTitle, targetPlaceholder).FillWidth().Submitted() if !reverse { ui.Checkbox(c.Part("rule-all"), &draft.allInterfaces, i18n.Shared(language, "desktop.remote.ports.ruleAllInterfaces")).Disabled(unavailable) if draft.allInterfaces { - ui.Paragraph(c.Part("rule-all-note"), i18n.Shared(language, "desktop.remote.ports.ruleAllInterfacesNote"), 3). + ui.Paragraph(c, i18n.Shared(language, "desktop.remote.ports.ruleAllInterfacesNote"), 3). FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Warning) } } if draft.starting { - ui.Text(c.Part("rule-starting"), i18n.Shared(language, "desktop.remote.ports.statusForwarding")).FontSize(12).Color(a.colors.Subtle) + ui.Text(c, i18n.Shared(language, "desktop.remote.ports.statusForwarding")).FontSize(12).Color(a.colors.Subtle) } if draft.message != "" { - ui.Paragraph(c.Part("rule-message"), draft.message, 3).FontSize(12).Color(a.theme.Danger) + ui.Paragraph(c, draft.message, 3).FontSize(12).Color(a.theme.Danger) } if (listened || targeted) && !unavailable { c.After(func() { a.submitRemotePortRule(p, surfaceShortcut) }) diff --git a/desktop/internal/workbench/remote_ports_view.go b/desktop/internal/workbench/remote_ports_view.go index 6be94c0ecc..f9f040b815 100644 --- a/desktop/internal/workbench/remote_ports_view.go +++ b/desktop/internal/workbench/remote_ports_view.go @@ -276,7 +276,7 @@ func (a *App) remotePortsRow(c ui.C, p *project, row remotePortRow) { Tooltip(remoteTip) } remoteCell.Children(func() { - ui.Text(c.Part("remote-text"), remote).Color(a.colors.Text).Ellipsis() + ui.Text(c, remote).Color(a.colors.Text).Ellipsis() }) a.remotePortsLabelCell(c, ports.labels[row.key]) localCell := ui.Row(c.Part("local")).Width(remotePortsLocalWidth).Shrink(0).Items(ui.Center) @@ -288,16 +288,16 @@ func (a *App) remotePortsRow(c ui.C, p *project, row remotePortRow) { Tooltip(localTip) } localCell.Children(func() { - ui.Text(c.Part("local-text"), local).Color(color).Ellipsis() + ui.Text(c, local).Color(color).Ellipsis() }) ui.Row(c.Part("process")).Grow(1).Shrink(1).MinWidth(0).Items(ui.Center).Children(func() { - ui.Text(c.Part("process-text"), remotePortsProcess(language, row)).Color(a.colors.Subtle).Ellipsis() + ui.Text(c, remotePortsProcess(language, row)).Color(a.colors.Subtle).Ellipsis() }) ui.Row(c.Part("source")).Width(remotePortsSourceWidth).Shrink(0).Items(ui.Center).Children(func() { - ui.Text(c.Part("source-text"), source).Color(a.colors.Subtle).Ellipsis() + ui.Text(c, source).Color(a.colors.Subtle).Ellipsis() }) ui.Row(c.Part("status")).Width(remotePortsStatusWidth).Shrink(0).Items(ui.Center).Children(func() { - ui.Text(c.Part("status-text"), status).Color(statusColor).Ellipsis() + ui.Text(c, status).Color(statusColor).Ellipsis() }) ui.Row(c.Part("actions")).Width(remotePortsActionWidth).Shrink(0).Items(ui.Center).Justify(ui.End).Gap(2).Children(func() { a.remotePortsRowActions(c, p, row, busy) @@ -443,7 +443,7 @@ func (a *App) remotePortsLabelCell(c ui.C, label string) { cell = cell.HitWith(ui.ID(c.Part("label")), label, gfx.HitOptions{Role: gfx.RoleStatus, SkipFocus: true}).Tooltip(label) } cell.Children(func() { - ui.Text(c.Part("label-text"), label).Color(a.colors.Text).Ellipsis() + ui.Text(c, label).Color(a.colors.Text).Ellipsis() }) } diff --git a/desktop/internal/workbench/remote_trust.go b/desktop/internal/workbench/remote_trust.go index e673e838a0..1b61fbdeb2 100644 --- a/desktop/internal/workbench/remote_trust.go +++ b/desktop/internal/workbench/remote_trust.go @@ -222,7 +222,7 @@ func (a *App) remoteTrustView(c ui.C, language i18n.Language, t *remoteTrustProm ui.Text(c, i18n.Shared(language, "desktop.remote.trust.title")).FontSize(16).Weight(gfx.WeightSemibold) ui.Text(c, t.browser.host.address()+" : "+t.dir).Mono().FontSize(small).Ellipsis().Shrink(1).MinWidth(0) }) - ui.Paragraph(c.Part("body"), i18n.Shared(language, "desktop.remote.trust.body"), 6).FontSize(small).Color(a.colors.Subtle) + ui.Paragraph(c, i18n.Shared(language, "desktop.remote.trust.body"), 6).FontSize(small).Color(a.colors.Subtle) ui.Column(c.Part("choices")).FillWidth().Gap(4).Pad(12).Radius(8).Stroke(1, a.colors.Line).Children(func() { a.remoteTrustChoice(c.Part("full"), language, i18n.Shared(language, "desktop.remote.trust.trustOpen"), i18n.Shared(language, "desktop.remote.trust.full")) a.remoteTrustChoice(c.Part("safe"), language, i18n.Shared(language, "desktop.remote.trust.safeOpen"), i18n.Shared(language, "desktop.remote.trust.safe")) diff --git a/desktop/internal/workbench/remote_view.go b/desktop/internal/workbench/remote_view.go index e4455dc36e..7e8e493af0 100644 --- a/desktop/internal/workbench/remote_view.go +++ b/desktop/internal/workbench/remote_view.go @@ -308,7 +308,7 @@ func (a *App) remoteCell(c ui.C, field, label, help string, width float32, contr }) control(c) if field != "" && r.fieldErr.field == field { - ui.Paragraph(c.Part("error"), remoteRefusalText(a.language(), r.fieldErr), 3).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger) + ui.Paragraph(c, remoteRefusalText(a.language(), r.fieldErr), 3).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger) } }) } diff --git a/desktop/internal/workbench/remote_wsl.go b/desktop/internal/workbench/remote_wsl.go index d5338f66c0..78a1dca05c 100644 --- a/desktop/internal/workbench/remote_wsl.go +++ b/desktop/internal/workbench/remote_wsl.go @@ -276,7 +276,7 @@ func (a *App) remoteWSLPage(c ui.C, language i18n.Language) { c.After(func() { a.connectRemote("") }) } }) - ui.Paragraph(c.Part("about"), i18n.Shared(language, "desktop.remote.wsl.about"), 4).FontSize(small).Color(a.colors.Subtle) + ui.Paragraph(c, i18n.Shared(language, "desktop.remote.wsl.about"), 4).FontSize(small).Color(a.colors.Subtle) label := i18n.Shared(language, "desktop.remote.wsl.user") a.remoteSection(c.Part("account"), label, i18n.Shared(language, "desktop.remote.wsl.userHelp"), nil, func() { ui.TextField(c.Part("user"), &r.wsl.user, label, i18n.Shared(language, "desktop.remote.wsl.userPlaceholder")). diff --git a/desktop/internal/workbench/runconfig_steps.go b/desktop/internal/workbench/runconfig_steps.go index 02d4253b03..ceb1a322b7 100644 --- a/desktop/internal/workbench/runconfig_steps.go +++ b/desktop/internal/workbench/runconfig_steps.go @@ -339,7 +339,7 @@ func (a *App) drawRunConfigStepRow(row ui.ListRow, step runConfigStepRow, select ui.Icon(c, step.icon).Size(14, 14).Shrink(0).Color(a.colors.Subtle) ui.Text(c, step.name).Color(color).Ellipsis().Shrink(1).MinWidth(0) if step.summary != "" { - ui.Text(c.Part("summary"), step.summary).Mono().FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(1).MinWidth(0) + ui.Text(c, step.summary).Mono().FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(1).MinWidth(0) } }) } diff --git a/desktop/internal/workbench/runconfig_view.go b/desktop/internal/workbench/runconfig_view.go index d46352c3a6..1afe5edaf1 100644 --- a/desktop/internal/workbench/runconfig_view.go +++ b/desktop/internal/workbench/runconfig_view.go @@ -465,7 +465,7 @@ func (a *App) drawRunConfigDelete(c ui.C, p *project) { open := true title := i18n.Shared(language, "desktop.runConfig.deleteTitle") closed := ui.ModalWith(c, &open, title, ui.ModalSpec{Width: 420}, func() { - ui.Paragraph(c.Part("run-config-delete"), i18n.SharedFormat(language, "desktop.runConfig.deleteBody", map[string]string{"name": d.name}), 4).Color(a.colors.Text) + ui.Paragraph(c, i18n.SharedFormat(language, "desktop.runConfig.deleteBody", map[string]string{"name": d.name}), 4).Color(a.colors.Text) }, func() { ui.Row(c.Part("run-config-delete-footer")).FillWidth().Items(ui.Center).Gap(8).Children(func() { ui.Spacer(c) From ee9d7b8c94965a690e2e723eb0f7b1f60da050f1 Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:57:26 +0000 Subject: [PATCH 10/13] fix(viva): preserve parent context for keyed rows and drop unused loop indices --- desktop/internal/workbench/inlineedit_view.go | 2 +- desktop/internal/workbench/memory_monitor.go | 6 +++--- desktop/internal/workbench/new_project_view.go | 2 +- desktop/internal/workbench/notifications.go | 16 ++++++++-------- .../internal/workbench/remote_host_containers.go | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/desktop/internal/workbench/inlineedit_view.go b/desktop/internal/workbench/inlineedit_view.go index 963d393ecf..858bd9856f 100644 --- a/desktop/internal/workbench/inlineedit_view.go +++ b/desktop/internal/workbench/inlineedit_view.go @@ -43,7 +43,7 @@ func (a *App) inlineEditView(c ui.C, p *project) { ui.Text(c, t.Unchanged).Color(a.colors.Subtle) } ui.Scroll(c).Scrollbars().FillWidth().MaxHeight(360).Children(func() { - for i, line := range s.diff { + for _, line := range s.diff { color, mark := a.colors.Text, " " switch line.kind { case diffRemoved: diff --git a/desktop/internal/workbench/memory_monitor.go b/desktop/internal/workbench/memory_monitor.go index 62351b957d..54b0a2a2b9 100644 --- a/desktop/internal/workbench/memory_monitor.go +++ b/desktop/internal/workbench/memory_monitor.go @@ -554,7 +554,7 @@ func (a *App) memoryLegend(c ui.C, language i18n.Language, parts []core.MemoryCa ui.Column(c).FillWidth().Children(func() { a.memoryHeadings(c.Part("headings"), language, columns) for i, part := range parts { - a.memoryRow(c.KeyInt(i), language, memoryLine{ + a.memoryRow(c, c.KeyInt(i), language, memoryLine{ kind: part.Kind, name: memoryKindLabel(language, part.Kind), processes: part.ProcessCount, bytes: part.Bytes, usage: part.MemoryUsage, }, columns) } @@ -572,7 +572,7 @@ func (a *App) memoryEntries(c ui.C, language i18n.Language, columns memoryColumn } ui.Scroll(c.Part("list")).Scrollbars().FillWidth().MaxHeight(memoryListHeight).Children(func() { for i, entry := range summary.Entries { - a.memoryRow(c.KeyInt(i), language, memoryLine{ + a.memoryRow(c, c.KeyInt(i), language, memoryLine{ kind: entry.Kind, name: entry.Name, processes: entry.ProcessCount, bytes: entry.Bytes, usage: entry.MemoryUsage, }, columns) } @@ -594,7 +594,7 @@ type memoryLine struct { // memoryRow declares a row of the legend or the list: the part's dot, the name, how many // processes it sums when more than one, then the figures of the columns, right-aligned. -func (a *App) memoryRow(k ui.C, language i18n.Language, line memoryLine, columns memoryColumns) { +func (a *App) memoryRow(c, k ui.C, language i18n.Language, line memoryLine, columns memoryColumns) { small := a.theme.Metrics.FontSizeS figure := func(text string, width float32) { ui.Text(c, text).FontSize(small).Width(width).Shrink(0).TextEnd() diff --git a/desktop/internal/workbench/new_project_view.go b/desktop/internal/workbench/new_project_view.go index 141be61a24..8b3246030e 100644 --- a/desktop/internal/workbench/new_project_view.go +++ b/desktop/internal/workbench/new_project_view.go @@ -531,7 +531,7 @@ func (a *App) projectOutput(c ui.C, language i18n.Language, lines []string) { } ui.Text(c, i18n.Shared(language, "desktop.newProject.output")).FontSize(12).Muted() ui.Column(c).FillWidth().Gap(2).Children(func() { - for index, line := range lines { + for _, line := range lines { ui.Text(c, line).Mono().FontSize(11).Color(a.colors.Subtle) } }) diff --git a/desktop/internal/workbench/notifications.go b/desktop/internal/workbench/notifications.go index b42944ae8e..25335c9057 100644 --- a/desktop/internal/workbench/notifications.go +++ b/desktop/internal/workbench/notifications.go @@ -342,7 +342,7 @@ func (a *App) notificationRow(c ui.C, row ui.Box, entry *notification) { // notificationEntry declares a notice of the history: its words, when it came last and how // often, and View Logs when it refers to an action's records. -func (a *App) notificationEntry(k ui.C, entry *notification) { +func (a *App) notificationEntry(c ui.C, entry *notification) { language := a.language() if entry.detail != "" { ui.Wrap(c, entry.text).FontSize(a.theme.Metrics.FontSizeS).Weight(gfx.WeightMedium) @@ -354,19 +354,19 @@ func (a *App) notificationEntry(k ui.C, entry *notification) { if entry.count > 1 { meta = i18n.SharedFormat(language, "desktop.notifications.meta", map[string]string{"time": meta, "count": strconv.Itoa(entry.count)}) } - ui.Row(k).FillWidth().Items(ui.Center).Gap(8).Children(func() { + ui.Row(c).FillWidth().Items(ui.Center).Gap(8).Children(func() { ui.Text(c, meta).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Grow(1).Ellipsis() - if entry.act != nil && ui.Button(k.Part("act"), entry.actLabel).Ghost().Small().Shrink(0).Clicked() { + if entry.act != nil && ui.Button(c.Part("act"), entry.actLabel).Ghost().Small().Shrink(0).Clicked() { act := entry.act - k.After(func() { a.notificationAct(act) }) + c.After(func() { a.notificationAct(act) }) } - if entry.secondaryAct != nil && ui.Button(k.Part("secondary"), entry.secondaryActLabel).Ghost().Small().Shrink(0).Clicked() { + if entry.secondaryAct != nil && ui.Button(c.Part("secondary"), entry.secondaryActLabel).Ghost().Small().Shrink(0).Clicked() { act := entry.secondaryAct - k.After(func() { a.notificationAct(act) }) + c.After(func() { a.notificationAct(act) }) } - if a.viewsLogs(entry) && ui.Button(k.Part("logs"), i18n.Shared(language, "desktop.notifications.viewLogs")).Ghost().Small().Shrink(0).Clicked() { + if a.viewsLogs(entry) && ui.Button(c.Part("logs"), i18n.Shared(language, "desktop.notifications.viewLogs")).Ghost().Small().Shrink(0).Clicked() { op := entry.op - k.After(func() { a.viewNotificationLogs(op) }) + c.After(func() { a.viewNotificationLogs(op) }) } }) } diff --git a/desktop/internal/workbench/remote_host_containers.go b/desktop/internal/workbench/remote_host_containers.go index 129ec594b2..7e73119697 100644 --- a/desktop/internal/workbench/remote_host_containers.go +++ b/desktop/internal/workbench/remote_host_containers.go @@ -180,7 +180,7 @@ func (a *App) remoteHostContainersView(c ui.C, language i18n.Language, list *rem } ui.Column(c.Part("empty")).FillWidth().Pad(12).Gap(8).Children(func() { ui.Paragraph(c, text, 3).FontSize(small).Color(a.colors.Subtle) - for i, words := range list.diagnostics { + for _, words := range list.diagnostics { ui.Paragraph(c, words, 6).Mono().FontSize(small).Color(a.colors.Subtle) } }) From 3582319f225ee645828e80d8d280ba0fa8e40045 Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 11:03:10 +0000 Subject: [PATCH 11/13] fix(viva): remove unused hex row index after anonymous text migration --- desktop/internal/workbench/viewer_view.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/internal/workbench/viewer_view.go b/desktop/internal/workbench/viewer_view.go index 5b3a53f504..441f84b78e 100644 --- a/desktop/internal/workbench/viewer_view.go +++ b/desktop/internal/workbench/viewer_view.go @@ -116,7 +116,7 @@ func (a *App) viewerHex(c ui.C, t *viewerTab) { language := a.language() ui.Scroll(c.Part("hex")).Scrollbars().Fill().PadX(12).PadY(8).Children(func() { ui.Text(c, i18n.Shared(language, "desktop.viewer.binaryHint")).FontSize(12).Color(a.colors.Subtle) - for i, line := range t.hex { + for _, line := range t.hex { ui.Text(c, line).Mono().FontSize(12).Color(a.colors.Text) } if t.truncated { From 6817bb2a486b8f6d31b8534cdd36c386eb6b328e Mon Sep 17 00:00:00 2001 From: "lithe-support[bot]" <356900028+lithe-support[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 11:07:44 +0000 Subject: [PATCH 12/13] fix(viva): use anonymous leaf text in keyed modal and list rows --- desktop/internal/workbench/pluginsemantics_hover.go | 2 +- desktop/internal/workbench/recent_files.go | 4 ++-- desktop/internal/workbench/runconfig_before_launch.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/desktop/internal/workbench/pluginsemantics_hover.go b/desktop/internal/workbench/pluginsemantics_hover.go index 1f456d8dcf..21d59daaeb 100644 --- a/desktop/internal/workbench/pluginsemantics_hover.go +++ b/desktop/internal/workbench/pluginsemantics_hover.go @@ -449,7 +449,7 @@ func (a *App) hoverPopup(c ui.C) { button := ui.Row(key).FillWidth().Height(28).PadX(8).Items(ui.Center). HitWith(ui.ID(key), label, gfx.HitOptions{Role: gfx.RoleButton, SkipFocus: true, Cursor: gfx.PointerCursorHand}). Hover(ui.Look{}.Background(a.colors.Hover)) - button.Children(func() { ui.Text(key, label).FontSize(12) }) + button.Children(func() { ui.Text(c, label).FontSize(12) }) if button.Clicked() { docID, span, anchor := state.documentID, *state.quickFix, state.anchor c.After(func() { diff --git a/desktop/internal/workbench/recent_files.go b/desktop/internal/workbench/recent_files.go index f0aceae58c..8d31985512 100644 --- a/desktop/internal/workbench/recent_files.go +++ b/desktop/internal/workbench/recent_files.go @@ -179,8 +179,8 @@ func (a *App) recentFilesPopup(c ui.C) { } if box.Children(func() { ui.Column(row).FillWidth().Children(func() { - ui.Text(row, entry.Name).FontSize(13).Color(a.colors.Text) - ui.Text(row, entry.Path).FontSize(11).Color(a.colors.Subtle).Ellipsis() + ui.Text(c, entry.Name).FontSize(13).Color(a.colors.Text) + ui.Text(c, entry.Path).FontSize(11).Color(a.colors.Subtle).Ellipsis() }) }).Clicked() { c.After(func() { open(entry) }) diff --git a/desktop/internal/workbench/runconfig_before_launch.go b/desktop/internal/workbench/runconfig_before_launch.go index 8150932f0a..6d40fdd19e 100644 --- a/desktop/internal/workbench/runconfig_before_launch.go +++ b/desktop/internal/workbench/runconfig_before_launch.go @@ -327,13 +327,13 @@ func (a *App) drawBeforeLaunchConfirmation(c ui.C, p *project) { closed := ui.ModalWith(c, &open, title, ui.ModalSpec{Width: 520}, func() { k := c.Part("run-before-launch-confirm") ui.Column(k).FillWidth().Gap(8).Children(func() { - ui.Paragraph(k, i18n.SharedFormat(language, "desktop.runConfig.beforeLaunch.confirmBody", map[string]string{"name": ask.name}), 4).Color(a.colors.Text) + ui.Paragraph(c, i18n.SharedFormat(language, "desktop.runConfig.beforeLaunch.confirmBody", map[string]string{"name": ask.name}), 4).Color(a.colors.Text) for index, step := range ask.steps { row := k.Part(fmt.Sprint(index)) ui.Column(row).FillWidth().Gap(2).Children(func() { - ui.Text(row, fmt.Sprintf("%d. %s", index+1, step.Name)).Weight(gfx.WeightSemibold).Color(a.colors.Text).Ellipsis() + ui.Text(c, fmt.Sprintf("%d. %s", index+1, step.Name)).Weight(gfx.WeightSemibold).Color(a.colors.Text).Ellipsis() if step.Summary != "" { - ui.Text(row, step.Summary).Mono().FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis() + ui.Text(c, step.Summary).Mono().FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis() } }) } From b424232f41e3ca0256c8c01fd377c8f77e4f555c Mon Sep 17 00:00:00 2001 From: lick <2188718831@qq.com> Date: Mon, 23 Nov 2026 06:25:30 -0800 Subject: [PATCH 13/13] fix(viva): upgrade fork pin, fix remaining key leaks, and absorb #2328 ignore tests --- ...toolchain-settings-and-build-resolution.md | 4 + desktop/go.mod | 4 +- desktop/go.sum | 4 +- desktop/internal/fileicons/icons.go | 3 + desktop/internal/fileicons/icons_tree.go | 3 + desktop/internal/pluginview/render.go | 4 +- .../settingswindow/build_directory_view.go | 10 +- .../internal/settingswindow/installed_view.go | 2 +- .../settingswindow/plugin_settings_model.go | 2 +- .../remote_preferences_state.go | 4 +- .../settingswindow/remote_trust_state.go | 4 +- .../settingswindow/remote_workspace_view.go | 14 +-- .../source_settings_entries_view.go | 9 +- .../internal/settingswindow/stepping_view.go | 2 +- .../settingswindow/toolchains_state.go | 6 +- .../settingswindow/toolchains_view.go | 4 +- .../settingswindow/trusted_locations_state.go | 6 +- .../settingswindow/trusted_locations_view.go | 6 +- .../settingswindow/version_control_view.go | 2 +- .../internal/settingswindow/window_view.go | 4 +- desktop/internal/toolchain/storage_test.go | 67 ++++++++++- desktop/internal/toolchain/toolchain_test.go | 2 +- desktop/internal/workbench/aicommit_view.go | 2 +- desktop/internal/workbench/build_options.go | 54 ++++----- .../workbench/build_options_runtime.go | 2 +- desktop/internal/workbench/build_tree_view.go | 6 +- desktop/internal/workbench/chrome_view.go | 12 +- desktop/internal/workbench/debug_view.go | 4 +- desktop/internal/workbench/debug_watch.go | 2 +- desktop/internal/workbench/difftab_view.go | 2 +- desktop/internal/workbench/editor_view.go | 8 +- desktop/internal/workbench/git_gutter.go | 2 +- .../internal/workbench/gitlog_popover_view.go | 2 +- desktop/internal/workbench/memory_monitor.go | 34 +++--- desktop/internal/workbench/problems_view.go | 2 +- .../internal/workbench/remote_browse_view.go | 10 +- .../internal/workbench/remote_detail_view.go | 8 +- .../internal/workbench/remote_devcontainer.go | 6 +- .../workbench/remote_host_containers.go | 106 +++++++++--------- desktop/internal/workbench/remote_import.go | 4 +- .../workbench/remote_port_rules_view.go | 8 +- .../internal/workbench/remote_ports_view.go | 2 +- desktop/internal/workbench/remote_steps.go | 2 +- desktop/internal/workbench/run_view.go | 7 +- .../workbench/runconfig_dialog_view.go | 13 ++- .../internal/workbench/runconfig_form_view.go | 8 +- desktop/internal/workbench/runconfig_steps.go | 4 +- desktop/internal/workbench/runconfig_view.go | 4 +- .../workbench/search_everywhere_view.go | 6 +- desktop/internal/workbench/signature_help.go | 2 +- desktop/internal/workbench/standalone.go | 2 +- desktop/internal/workbench/tabstrip.go | 2 +- desktop/internal/workbench/terminal_menu.go | 4 +- desktop/internal/workbench/window_sessions.go | 2 +- .../features/plugin-injected-toolchains.json | 4 +- .../features/settings-about-page.json | 2 +- .../features/workbench-tool-stripe-icons.json | 2 +- 57 files changed, 295 insertions(+), 211 deletions(-) diff --git a/.agents/notes/implemented/architecture/2026-11-09-viva-toolchain-settings-and-build-resolution.md b/.agents/notes/implemented/architecture/2026-11-09-viva-toolchain-settings-and-build-resolution.md index 672a95f61a..49ddea685f 100644 --- a/.agents/notes/implemented/architecture/2026-11-09-viva-toolchain-settings-and-build-resolution.md +++ b/.agents/notes/implemented/architecture/2026-11-09-viva-toolchain-settings-and-build-resolution.md @@ -42,6 +42,7 @@ Viva 桌面端现在把插件声明的工具链接进了设置和构建执行: - 选择只修改窗口草稿;Save 才把整批变化交给 Core。来源文件的路径、字节预算、缺失时默认值、完整 schema 与重复 JSON 键检查都由 Core 给出;没有已安装工具也必须校验 dormant pin。Go 使用已有 `configfile` 适配器按预算读取 UTF-8,不先解析或补默认文档。原生选项未指定平台时采用当前宿主,不能把空平台字符串交给 Core。 - `toolchains.editPinSources` 同时返回本地文档与忽略文件的编辑计划。没有语义变化时保留原字节和缺失状态;例如对不存在的 pin 执行重置,不能创建 `.lithe`。旧 `editPins` 的选择与合并规则继续复用,不重写内核。 - 忽略规则使用 Core 固定版本 `ignore` 的完整匹配器。只调用 `GitignoreBuilder` 的内存行解析和匹配,不启用目录遍历、全局规则发现或线程池;许可证为 MIT/Unlicense,资源开销仅发生在明确保存时。已经生效的通配规则保持原样;后续否定规则取消忽略时,在末尾追加明确规则,保留评论、已有行与换行风格。不在 Go 用“是否包含一行”代替 Git 规则。输入与输出都检查字节和行数预算,避免发布下次无法读取的来源。 +- 自动生成的 `.lithe/.gitignore` 也属于本机维护文件。Core 在维护 pin 来源时同时保证它自身与 `toolchains/local.json` 被忽略,只补齐尚未生效的根锚定规则 `/.gitignore` 和 `/toolchains/local.json`。不用 `*`,避免隐藏团队配置;自忽略规则也不影响嵌套目录中的 `.gitignore`。用户原有内容、UTF-8 BOM 和换行保留,无语义变化的 Save 不因缺少自忽略规则而写文件。规则跟随固定 Core 修订,宿主不维护另一份文本追加逻辑。 - `configfile` 绑定私有字节快照和原生工作区身份,使用 `os.Root` 约束相对路径、保留原权限及 ACL,并在发布前重查来源。公开的 `Baseline` 只供显示或兼容调用方使用,不能作为设置草稿的授权基线。指向工作区外的符号链接或 Windows junction 无法让保存落到外部目录。 - 写入先发布忽略文件,再发布 pin 文档。前置步骤失败不改 pin;其后 pin 发布失败只可能留下无害的忽略规则。无变化保存也在 Core 返回后再次校验字节和工作区身份,不能因为没有写入而接受过期草稿。此检查是乐观并发保护,不承诺锁住不遵守同一协议的外部写入者。 - pin 已完成原子替换后,句柄清理或回读仍可能失败;这时返回要求重新加载的稳定状态,界面保留草稿但禁用再次保存,不能宣称“失败必然没有改文件”。正常成功则从确认的来源重新加载实际生效值。读取失败、冲突和无效来源走现有日志边界与共享 i18n。 @@ -86,6 +87,7 @@ Windows 的工具发现和构建模型测试要保留两条真实本机边界: - **单独为每次查询启动一份提供方进程。** 同一插件同时提供语言配置和工具链时,进程启动与初始化会重复。共享后端可在同一连接中区分操作,并由同一个插件生命周期释放。 - **每次都重新向提供方请求。** 工具选择会在设置和多个运行入口反复执行。采用短期有界缓存和原生观察,输入变动时重查,空闲时无需轮询。 - **在宿主 CI 下载真实插件和工具做 Windows 回归。** 会引入具体插件依赖、网络与安装布局,不能稳定控制失败形态;宿主只测试合成工具的通用流程,真实工具在插件仓库验收。 +- **忽略整个 `.lithe/`,或在每次读取时补写 `.gitignore`。** 前者会隐藏应由团队共享的配置,后者破坏只读加载和无变化保存的约束。自忽略只在既有的来源维护计划中补齐,并由现有原子写入适配器执行。 ## 后果 @@ -124,3 +126,5 @@ Windows 运行 `./.agents/skills/write-stable-tests/scripts/test-stability-windo - `shared/platform-feature-matrix/features/plugin-injected-toolchains.json` 原生存储回归位于 `toolchain/storage_test.go` 与 `configfile/configfile_test.go`:先复现外部链接写入和空重置创建状态,再验证有界读取、重复键/未知字段的 dormant 来源拒绝、后续否定规则、权限保留、私有基线与原生根身份。`core/toolchain_sources_test.go` 与 Core 同用 `Lithe-core-rust/rust/fixtures/toolchain-pin-storage.json`;设置页另外先复现保存后回读失败仍可重试,再验证草稿保留和强制 Reload。组件证据不等于原生 GUI 或发行包验收。 + +`TestSavePinIgnoresGeneratedFileWithoutHidingSharedFiles` 从真实 Core 与 `SavePin` 写出文件,再让隔离配置的本机 Git 判断忽略结果:`.lithe/.gitignore` 和本机 pin 被忽略,团队配置与嵌套 `.gitignore` 保持可提交。Git 命令只执行空模板初始化和本地 `check-ignore`,有独立期限与管道回收上限;不读取全局 Git 规则或运行 hooks。该集成用例明确依赖 Git,缺少 Git 时不把它记作已通过。 diff --git a/desktop/go.mod b/desktop/go.mod index fecc5bea0d..a29aca8c7e 100644 --- a/desktop/go.mod +++ b/desktop/go.mod @@ -9,7 +9,7 @@ toolchain go1.27.4 require ( github.com/creack/pty v1.1.24 github.com/tailscale/hujson v0.0.0-20260727124030-b80ff77dac4f - github.com/vivaui/viva v0.6.7-0.20261121062827-3abb3dbb4259 + github.com/vivaui/viva v0.6.8-0.20261123124712-471ea7ab5f81 github.com/zalando/go-keyring v0.2.8 golang.org/x/sys v0.50.0 ) @@ -21,4 +21,4 @@ require ( github.com/pelletier/go-toml/v2 v2.4.3 // indirect ) -replace github.com/vivaui/viva => github.com/Lithe-IDEA/viva v0.6.7-0.20261123062230-3c6c46081fe6 +replace github.com/vivaui/viva => github.com/Lithe-IDEA/viva v0.6.8-0.20261123134538-bb85256c8ffa diff --git a/desktop/go.sum b/desktop/go.sum index ab1b5e2136..98177a3124 100644 --- a/desktop/go.sum +++ b/desktop/go.sum @@ -1,5 +1,5 @@ -github.com/Lithe-IDEA/viva v0.6.7-0.20261123062230-3c6c46081fe6 h1:w1ZfpHUsHEdY/rlQspiZcAAHsNcIEDH0iQ/NvPzVTJ4= -github.com/Lithe-IDEA/viva v0.6.7-0.20261123062230-3c6c46081fe6/go.mod h1:e9In6+J77G7B9ow4enZ2FSOFh7U3q4cQ5iJr3Qn/Olk= +github.com/Lithe-IDEA/viva v0.6.8-0.20261123134538-bb85256c8ffa h1:lNYl2wt5F84gu3b3DiDcjq86T+p0oeN0DZHSkdkbAlA= +github.com/Lithe-IDEA/viva v0.6.8-0.20261123134538-bb85256c8ffa/go.mod h1:e9In6+J77G7B9ow4enZ2FSOFh7U3q4cQ5iJr3Qn/Olk= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/danieljoos/wincred v1.2.3 h1:v7dZC2x32Ut3nEfRH+vhoZGvN72+dQ/snVXo/vMFLdQ= diff --git a/desktop/internal/fileicons/icons.go b/desktop/internal/fileicons/icons.go index a863a7e8a7..f5477d584c 100644 --- a/desktop/internal/fileicons/icons.go +++ b/desktop/internal/fileicons/icons.go @@ -15,6 +15,9 @@ // platform/icons/src/fileTypes/custom.svg; lock is expui/general/locked; readme is // expui/status/info; nodejs is // plugins/kotlin/base/resources/resources/org/jetbrains/kotlin/idea/icons/expui/wizard/nodejs. +// go.svg is the exception: expui/fileTypes/ has no Go icon, and the restored file is byte for +// byte platform/icons/src/language/go_dark.svg (revision +// b3667546dadaf462cc8812e6de88be6d3e76558b). // - folder.svg and excludeRoot.svg: platform/icons/src/expui/nodes/ (revision // e8d21e84ee23f99ae7237fbb4530ff2e7c3b47c5). // - svg/tree/treechevronDown.svg and treechevronRight.svg (and their _dark variants): the previous diff --git a/desktop/internal/fileicons/icons_tree.go b/desktop/internal/fileicons/icons_tree.go index 19002be5a2..26375ab753 100644 --- a/desktop/internal/fileicons/icons_tree.go +++ b/desktop/internal/fileicons/icons_tree.go @@ -15,6 +15,9 @@ // platform/icons/src/fileTypes/custom.svg; lock is expui/general/locked; readme is // expui/status/info; nodejs is // plugins/kotlin/base/resources/resources/org/jetbrains/kotlin/idea/icons/expui/wizard/nodejs. +// go.svg is the exception: expui/fileTypes/ has no Go icon, and the restored file is byte for +// byte platform/icons/src/language/go_dark.svg (revision +// b3667546dadaf462cc8812e6de88be6d3e76558b). // - folder.svg and excludeRoot.svg: platform/icons/src/expui/nodes/ (revision // e8d21e84ee23f99ae7237fbb4530ff2e7c3b47c5). // - svg/tree/treechevronDown.svg and treechevronRight.svg (and their _dark variants): the previous diff --git a/desktop/internal/pluginview/render.go b/desktop/internal/pluginview/render.go index dd49b996f9..54d3dfd617 100644 --- a/desktop/internal/pluginview/render.go +++ b/desktop/internal/pluginview/render.go @@ -641,7 +641,7 @@ func (r *renderer) table(c ui.C, n *Node) { ui.Column(c).FillWidth().Border(1, p.Line).Radius(6).Clip().Children(func() { ui.Row(c.Key("header")).FillWidth().Height(26).PadX(10).Gap(12).Items(ui.Center).Background(p.Sidebar).Children(func() { for i, column := range n.Columns { - cell(c.KeyInt(i), column.Title, i, true) + cell(c, column.Title, i, true) } }) for i, cells := range n.Rows { @@ -652,7 +652,7 @@ func (r *renderer) table(c ui.C, n *Node) { if column < len(cells) { text = cells[column] } - cell(c.KeyInt(column), text, column, false) + cell(c, text, column, false) } }) } diff --git a/desktop/internal/settingswindow/build_directory_view.go b/desktop/internal/settingswindow/build_directory_view.go index 1ff9cab1d4..09d6415d70 100644 --- a/desktop/internal/settingswindow/build_directory_view.go +++ b/desktop/internal/settingswindow/build_directory_view.go @@ -40,8 +40,8 @@ func (w *window) buildPage(c ui.C) { ui.Column(c).FillWidth().MaxWidth(buildPageWidth).PadSides(buildPagePadTop, buildPagePadX, buildPagePadEnd, buildPagePadX).Children(func() { ui.Text(c, titleOf(&w.text.Settings, pageBuild)).FontSize(buildHeading).Weight(gfx.WeightBold).Color(b.text).Ellipsis() ui.Row(c).Height(12).Shrink(0) - w.buildIssues(c.Part("issues"), language) - w.buildDirectory(c.Part("directory"), language) + w.buildIssues(c, language) + w.buildDirectory(c, language) ui.Wrap(c, i18n.Shared(language, "desktop.buildSettings.directoryNote")).FontSize(11.5).Color(b.faint) }) }) @@ -69,7 +69,7 @@ func (w *window) buildIssues(c ui.C, language i18n.Language) { scope := t.current() var chosen *core.ToolchainSettingsIssue all := false - ui.Column(c).FillWidth().MinWidth(0).Shrink(0).PadX(10).PadY(8).Radius(8). + ui.Column(c.Part("issues")).FillWidth().MinWidth(0).Shrink(0).PadX(10).PadY(8).Radius(8). Border(1, colors.border).Background(colors.background).Children(func() { ui.Text(c, issuesTitle(language, view.Counts.Problems)). FontSize(buildSmall).Weight(gfx.WeightSemibold).Color(colors.text).Ellipsis() @@ -92,7 +92,7 @@ func (w *window) buildIssues(c ui.C, language i18n.Language) { ui.Text(c, name).FontSize(buildSmall).Weight(gfx.WeightSemibold).Color(colors.text).Shrink(0) ui.Text(c, w.toolchainReasonText(language, scope, entry, toolchainReason(entry.tool))). FontSize(buildSmall).Color(colors.text).Shrink(1).MinWidth(0).Ellipsis() - ui.Row(k.Part("spacer")).Grow(1) + ui.Spacer(c) ui.Text(c, "›").FontSize(buildSmall).Color(colors.text).Shrink(0) }) } @@ -149,7 +149,7 @@ func (w *window) directory(c ui.C, entries []directoryEntry) { } b := &w.bp var open func() - ui.Column(c).FillWidth().MinWidth(0).Shrink(0).Pad(4).Radius(10).Border(1, b.line).Background(b.surface).Children(func() { + ui.Column(c.Part("directory")).FillWidth().MinWidth(0).Shrink(0).Pad(4).Radius(10).Border(1, b.line).Background(b.surface).Children(func() { for i := range entries { entry := &entries[i] k := c.Key(entry.key) diff --git a/desktop/internal/settingswindow/installed_view.go b/desktop/internal/settingswindow/installed_view.go index a03314e209..e8f86eaa9d 100644 --- a/desktop/internal/settingswindow/installed_view.go +++ b/desktop/internal/settingswindow/installed_view.go @@ -940,7 +940,7 @@ func (w *window) installedFeatures(c ui.C, language i18n.Language, fact PluginFa } else { ui.Text(c, i18n.Shared(language, "native.pluginDisabled")).FontSize(11).Color(w.pal.muted) } - ui.Row(k.Part("spacer")).Grow(1) + ui.Spacer(c) if key := capabilityPage(capability); enabled && key != "" && w.dynamic.selected(key) != nil { if ui.Button(k, i18n.Shared(language, "native.configure")+" →").Link().XSmall().Clicked() { pluginID := fact.ID diff --git a/desktop/internal/settingswindow/plugin_settings_model.go b/desktop/internal/settingswindow/plugin_settings_model.go index 26daf51dc7..1ec647b0d5 100644 --- a/desktop/internal/settingswindow/plugin_settings_model.go +++ b/desktop/internal/settingswindow/plugin_settings_model.go @@ -222,7 +222,7 @@ func (p *pluginSettingsForm) declare(c ui.C) { ui.Effect(c, p.opEffect, p.opKey) } if p.sources != nil && p.sources.key != 0 { - ui.Effect(c.Part("source-editor"), p.sources.effect, p.sources.key) + ui.Effect(c, p.sources.effect, p.sources.key) } } diff --git a/desktop/internal/settingswindow/remote_preferences_state.go b/desktop/internal/settingswindow/remote_preferences_state.go index 79a0e365ef..4e78ce24fb 100644 --- a/desktop/internal/settingswindow/remote_preferences_state.go +++ b/desktop/internal/settingswindow/remote_preferences_state.go @@ -328,9 +328,9 @@ func (r *remotePreferencesState) declare(c ui.C) { return } if r.loadKey != 0 { - ui.Effect(c.Part("remote-preferences-load"), r.loadEffect, r.loadKey) + ui.Effect(c, r.loadEffect, r.loadKey) } if r.saveKey != 0 { - ui.Effect(c.Part("remote-preferences-save"), r.saveEffect, r.saveKey) + ui.Effect(c, r.saveEffect, r.saveKey) } } diff --git a/desktop/internal/settingswindow/remote_trust_state.go b/desktop/internal/settingswindow/remote_trust_state.go index 200c1f805f..c60dd6eeea 100644 --- a/desktop/internal/settingswindow/remote_trust_state.go +++ b/desktop/internal/settingswindow/remote_trust_state.go @@ -245,9 +245,9 @@ func (r *remoteTrustState) declare(c ui.C) { return } if r.loadKey != 0 { - ui.Effect(c.Part("remote-trust-load"), r.loadEffect, r.loadKey) + ui.Effect(c, r.loadEffect, r.loadKey) } if r.saveKey != 0 { - ui.Effect(c.Part("remote-trust-save"), r.saveEffect, r.saveKey) + ui.Effect(c, r.saveEffect, r.saveKey) } } diff --git a/desktop/internal/settingswindow/remote_workspace_view.go b/desktop/internal/settingswindow/remote_workspace_view.go index b8229623c3..ea595f7bb6 100644 --- a/desktop/internal/settingswindow/remote_workspace_view.go +++ b/desktop/internal/settingswindow/remote_workspace_view.go @@ -34,12 +34,12 @@ func (w *window) remoteWorkspacePage(c ui.C) { ui.Text(c, i18n.Shared(language, "desktop.toolchains.loading")).FontSize(12).Color(w.pal.muted) }) } - w.remotePreferencesNotices(c.Part("notices"), language, r) + w.remotePreferencesNotices(c, language, r) return } w.card(c.Part("connection"), i18n.Shared(language, "desktop.remoteSettings.connection"), "", func() { w.remoteProgramRow(c.Part("program"), language, r) - w.remoteSSHConfigRow(c.Part("ssh-config"), language, r) + w.remoteSSHConfigRow(c, language, r) }) w.card(c.Part("reconnection"), i18n.Shared(language, "desktop.remoteSettings.reconnection"), "", func() { w.remoteReconnectRow(c.Part("reconnect"), language, r) @@ -49,7 +49,7 @@ func (w *window) remoteWorkspacePage(c ui.C) { }) w.card(c.Part("closing"), i18n.Shared(language, "desktop.remoteSettings.closing"), "", func() { w.remoteCloseRow(c.Part("close-programs"), language, r) - w.remoteIdleTimeoutRow(c.Part("idle-timeout"), language, r) + w.remoteIdleTimeoutRow(c, language, r) }) w.card(c.Part("storage"), i18n.Shared(language, "desktop.remoteSettings.storage"), "", func() { title := i18n.Shared(language, "desktop.remoteSettings.storage") @@ -61,7 +61,7 @@ func (w *window) remoteWorkspacePage(c ui.C) { w.remotePathText(c.Part("storage-path"), r.source.Saved.Path(), note) }) }) - w.remotePreferencesNotices(c.Part("notices"), language, r) + w.remotePreferencesNotices(c, language, r) }) } @@ -130,7 +130,7 @@ func (w *window) remoteSSHConfigRow(c ui.C, language i18n.Language, r *remotePre if !config.Exists { note = i18n.Shared(language, "desktop.remoteSettings.sshConfigMissing") } - w.settingsRow(c, i18n.Shared(language, "desktop.remoteSettings.sshConfig"), i18n.Shared(language, "desktop.remoteSettings.sshConfigHelp"), func() { + w.settingsRow(c.Part("ssh-config"), i18n.Shared(language, "desktop.remoteSettings.sshConfig"), i18n.Shared(language, "desktop.remoteSettings.sshConfigHelp"), func() { w.remotePathText(c.Part("path"), config.Path, note) }) } @@ -267,7 +267,7 @@ func (w *window) remoteIdleTimeoutRow(c ui.C, language i18n.Language, r *remoteP if seconds == 0 { return } - w.settingsRow(c, i18n.Shared(language, "desktop.remoteSettings.idleTimeout"), i18n.Shared(language, "desktop.remoteSettings.idleTimeoutHelp"), func() { + w.settingsRow(c.Part("idle-timeout"), i18n.Shared(language, "desktop.remoteSettings.idleTimeout"), i18n.Shared(language, "desktop.remoteSettings.idleTimeoutHelp"), func() { ui.Text(c, remoteDuration(language, int(seconds))).FontSize(12).Color(w.pal.text) }) } @@ -297,7 +297,7 @@ func (w *window) remotePreferencesNotices(c ui.C, language i18n.Language, r *rem if r.readFailed == nil && r.failed == nil && !r.saving { return } - ui.Column(c).FillWidth().Shrink(0).Gap(8).Children(func() { + ui.Column(c.Part("notices")).FillWidth().Shrink(0).Gap(8).Children(func() { if r.readFailed != nil { message := remotePreferencesFailureMessage(language, r.readFailed, r.damagedPath) w.box(c.Part("load-failed"), boxErr, func(words gfx.Color) { diff --git a/desktop/internal/settingswindow/source_settings_entries_view.go b/desktop/internal/settingswindow/source_settings_entries_view.go index 12fd057409..bcd2d30b82 100644 --- a/desktop/internal/settingswindow/source_settings_entries_view.go +++ b/desktop/internal/settingswindow/source_settings_entries_view.go @@ -123,13 +123,12 @@ func (w *window) sourceEntryRow(c ui.C, p *sourceSettingsForm, source core.Setti ui.Text(c, label).FontSize(12).Color(w.pal.text).Shrink(0).MaxWidthPercent(60).Ellipsis() ui.Text(c, entry.Detail).FontSize(11).Color(w.pal.muted).Grow(1).Shrink(1).MinWidth(0).Ellipsis() for column, attribute := range field.Attributes { - k := c.Key(attribute.ID) title := attribute.Title + " " + label if attribute.Kind == "boolean" { on := entryBool(entry, attribute.ID) - ui.Row(k).Width(entryFlagWidth).Shrink(0).Items(ui.Center).Children(func() { - box := ui.Row(k).Size(16, 16).Radius(4).Border(1, w.pal.border).Center(). - HitWith(ui.ID(k), title, gfx.HitOptions{Role: gfx.RoleCheckbox, Checked: on, Disabled: disabled}) + ui.Row(c.Key(attribute.ID)).Width(entryFlagWidth).Shrink(0).Items(ui.Center).Children(func() { + box := ui.Row(c).Size(16, 16).Radius(4).Border(1, w.pal.border).Center(). + HitWith(ui.ID(c), title, gfx.HitOptions{Role: gfx.RoleCheckbox, Checked: on, Disabled: disabled}) if on { box = box.Background(w.pal.accent) } @@ -159,7 +158,7 @@ func (w *window) sourceEntryRow(c ui.C, p *sourceSettingsForm, source core.Setti ui.Text(c, optionTitle(*choice)).FontSize(12).Color(w.pal.muted).Width(entryChoiceWidth).Shrink(0).Ellipsis() continue } - if ui.Select(k, choice, indices, optionTitle).Width(entryChoiceWidth).Shrink(0).Label(title).Changed() { + if ui.Select(c.Key(attribute.ID), choice, indices, optionTitle).Width(entryChoiceWidth).Shrink(0).Label(title).Changed() { value := attribute.Options[*choice].Value p.editEntries(source.ID, field, func(control *sourceSettingControl) { setEntryAttribute(&control.input.Entries[index], attribute.ID, value) diff --git a/desktop/internal/settingswindow/stepping_view.go b/desktop/internal/settingswindow/stepping_view.go index e639f9f5f2..86ca62152f 100644 --- a/desktop/internal/settingswindow/stepping_view.go +++ b/desktop/internal/settingswindow/stepping_view.go @@ -409,7 +409,7 @@ func (w *window) debuggerList(c ui.C, language i18n.Language) { ui.Column(k).Grow(1).Shrink(1).MinWidth(0).Children(func() { ui.Row(k).FillWidth().Gap(6).Items(ui.Center).Children(func() { ui.Text(c, adapter.Name).FontSize(buildFont).Weight(gfx.WeightSemibold).Color(b.text).Shrink(1).Ellipsis() - ui.Row(k.Part("spacer")).Grow(1) + ui.Spacer(c) if stored || changed { w.tag(k, tagBlue, i18n.Shared(language, "desktop.settings.stepping.customized")) } diff --git a/desktop/internal/settingswindow/toolchains_state.go b/desktop/internal/settingswindow/toolchains_state.go index 340190063a..2b4122f556 100644 --- a/desktop/internal/settingswindow/toolchains_state.go +++ b/desktop/internal/settingswindow/toolchains_state.go @@ -740,7 +740,7 @@ func (t *toolchainState) declare(c ui.C) { } for _, name := range t.order { if scope := t.scopes[name]; scope.loadKey != 0 { - ui.Effect(c.Key("toolchains:"+name), scope.loadEffect, scope.loadKey) + ui.Effect(c, scope.loadEffect, scope.loadKey) } } if t.saveKey != 0 { @@ -758,8 +758,8 @@ func (t *toolchainState) declare(c ui.C) { t.locations.declare(c) t.remote.declare(c) t.prefs.declare(c) - t.view.declare(c.Part("toolchain-view")) - t.search.declare(c.Part("toolchain-search")) + t.view.declare(c) + t.search.declare(c) } // foldKey is the comparable form of the user's folds. diff --git a/desktop/internal/settingswindow/toolchains_view.go b/desktop/internal/settingswindow/toolchains_view.go index 43fc6cb906..31347df860 100644 --- a/desktop/internal/settingswindow/toolchains_view.go +++ b/desktop/internal/settingswindow/toolchains_view.go @@ -674,7 +674,7 @@ func (w *window) toolchainDetail(c ui.C, language i18n.Language, scope *toolchai ui.Column(c).FillWidth().MinWidth(0).Children(func() { w.toolchainHead(c.Part("head"), language, scope, tool, name, plugin) ui.Row(c).Height(14).Shrink(0) - if w.toolchainProblem(c.Part("problem"), language, scope, entry, current, status, name, plugin) { + if w.toolchainProblem(c, language, scope, entry, current, status, name, plugin) { ui.Row(c).Height(12).Shrink(0) } w.toolchainEffective(c.Part("effective"), language, scope, entry, current, status) @@ -770,7 +770,7 @@ func (w *window) toolchainProblem(c ui.C, language i18n.Language, scope *toolcha text = toolchainReasonLabel(language, current.reason) } prepareRuntime := entry.tool.ManagedRuntime && t.runtimeEffect != nil && !trust - w.box(c, kind, func(words gfx.Color) { + w.box(c.Part("problem"), kind, func(words gfx.Color) { boxIcon(c, icon, words) boxText(c, text, words) if trust && w.button(c.Part("trust"), buttonSmall, i18n.Shared(language, "desktop.buildSettings.trustProject"), t.busy()) { diff --git a/desktop/internal/settingswindow/trusted_locations_state.go b/desktop/internal/settingswindow/trusted_locations_state.go index 12a087771c..7d37c09e0f 100644 --- a/desktop/internal/settingswindow/trusted_locations_state.go +++ b/desktop/internal/settingswindow/trusted_locations_state.go @@ -261,12 +261,12 @@ func (l *trustedLocationsState) declare(c ui.C) { return } if l.loadKey != 0 { - ui.Effect(c.Part("trusted-locations-load"), l.loadEffect, l.loadKey) + ui.Effect(c, l.loadEffect, l.loadKey) } if l.previewKey != 0 { - ui.Effect(c.Part("trusted-locations-preview"), l.previewEffect, l.previewKey) + ui.Effect(c, l.previewEffect, l.previewKey) } if l.saveKey != 0 { - ui.Effect(c.Part("trusted-locations-save"), l.saveEffect, l.saveKey) + ui.Effect(c, l.saveEffect, l.saveKey) } } diff --git a/desktop/internal/settingswindow/trusted_locations_view.go b/desktop/internal/settingswindow/trusted_locations_view.go index 605f4fe168..d2602e0e49 100644 --- a/desktop/internal/settingswindow/trusted_locations_view.go +++ b/desktop/internal/settingswindow/trusted_locations_view.go @@ -72,10 +72,10 @@ func (w *window) remoteTrustList(c ui.C, language i18n.Language, r *remoteTrustS name = i18n.Shared(language, "desktop.trustedLocations.remoteUnnamed") } ui.Row(g.Part("head")).FillWidth().MinWidth(0).Height(28).Gap(8).Items(ui.Center).Children(func() { - ui.Icon(g, icons.Server).Size(14, 14).Color(p.muted).Shrink(0) - ui.Text(g, name).FontSize(12).Weight(gfx.WeightSemibold).Color(p.text).Shrink(1).MinWidth(0).Ellipsis() + ui.Icon(c, icons.Server).Size(14, 14).Color(p.muted).Shrink(0) + ui.Text(c, name).FontSize(12).Weight(gfx.WeightSemibold).Color(p.text).Shrink(1).MinWidth(0).Ellipsis() if place != "" { - ui.Text(g.Part("place"), place).FontSize(12).Mono().Color(p.muted).Grow(1).Shrink(1).MinWidth(0).Ellipsis() + ui.Text(c, place).FontSize(12).Mono().Color(p.muted).Grow(1).Shrink(1).MinWidth(0).Ellipsis() } }) for _, entry := range group.entries { diff --git a/desktop/internal/settingswindow/version_control_view.go b/desktop/internal/settingswindow/version_control_view.go index 3479266c2c..f18f119ad6 100644 --- a/desktop/internal/settingswindow/version_control_view.go +++ b/desktop/internal/settingswindow/version_control_view.go @@ -22,7 +22,7 @@ func (w *window) versionControlPage(c ui.C) { ui.Row(c).Height(4).Shrink(0) ui.Wrap(c, i18n.Shared(language, "desktop.versionControlSettings.intro")).FontSize(buildSmall).Color(b.sub) ui.Row(c).Height(12).Shrink(0) - w.directory(c.Part("directory"), []directoryEntry{{ + w.directory(c, []directoryEntry{{ key: "git", tile: gitTile, icon: icons.GitBranch, title: titleOf(&w.text.Settings, pageGit), desc: i18n.Shared(language, "desktop.versionControlSettings.directoryGit"), open: func() { w.selectSettingsPage(pageGit, "") }, diff --git a/desktop/internal/settingswindow/window_view.go b/desktop/internal/settingswindow/window_view.go index 74c5db56f3..d503ec25ea 100644 --- a/desktop/internal/settingswindow/window_view.go +++ b/desktop/internal/settingswindow/window_view.go @@ -33,8 +33,8 @@ func (w *window) view(c ui.C) { w.footer(c) }) w.keymapImportDialog(c) - w.pluginInstallModal(c.Part("plugin-install")) - w.commandInstallModal(c.Part("command-install")) + w.pluginInstallModal(c) + w.commandInstallModal(c) w.declareWork(c) w.endRegion() } diff --git a/desktop/internal/toolchain/storage_test.go b/desktop/internal/toolchain/storage_test.go index fbffcb3421..ec8364889e 100644 --- a/desktop/internal/toolchain/storage_test.go +++ b/desktop/internal/toolchain/storage_test.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "os" + "os/exec" "path/filepath" "runtime" "strings" @@ -99,7 +100,7 @@ func TestSavePinPreservesIgnoreTextAndOvercomesLaterNegation(t *testing.T) { if _, _, err := SavePin(ctx, core.NewClient(), root, ".", "dev.example:compiler", &core.ToolchainPin{Home: "/fixture/tool", Version: "1.0", Provider: "host:system"}, nil); err != nil { t.Fatal(err) } - if got := string(readExactly(t, ignore)); got != before+"\r\n/toolchains/local.json\r\n" { + if got := string(readExactly(t, ignore)); got != before+"\r\n/.gitignore\r\n/toolchains/local.json\r\n" { t.Fatalf("ignore source = %q", got) } if runtime.GOOS != "windows" { @@ -113,6 +114,70 @@ func TestSavePinPreservesIgnoreTextAndOvercomesLaterNegation(t *testing.T) { } } +// This integration test asks Git itself which of the files written through the +// native SavePin path are ignored; ordinary toolchain tests need no Git binary. +func TestSavePinIgnoresGeneratedFileWithoutHidingSharedFiles(t *testing.T) { + git, err := exec.LookPath("git") + if err != nil { + t.Skip("git executable not found") + } + root, configRoot := t.TempDir(), t.TempDir() + emptyConfig := filepath.Join(configRoot, "gitconfig") + if err := os.WriteFile(emptyConfig, nil, 0o600); err != nil { + t.Fatal(err) + } + emptyTemplate := filepath.Join(configRoot, "template") + if err := os.Mkdir(emptyTemplate, 0o700); err != nil { + t.Fatal(err) + } + // Explicit command environments avoid global mutation and prevent ambient + // repository, index, config-injection and ignore settings from owning the fixture. + environment := make([]string, 0, len(os.Environ())+3) + for _, entry := range os.Environ() { + if !strings.HasPrefix(strings.ToUpper(entry), "GIT_") { + environment = append(environment, entry) + } + } + environment = append(environment, "GIT_CONFIG_GLOBAL="+emptyConfig, "GIT_CONFIG_NOSYSTEM=1", "GIT_TERMINAL_PROMPT=0") + runGit := func(input string, args ...string) string { + t.Helper() + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + command := exec.CommandContext(ctx, git, append([]string{"-c", "core.excludesFile=" + emptyConfig}, args...)...) + command.Dir, command.Env = root, environment + command.Stdin = strings.NewReader(input) + // init with an empty template and check-ignore do not invoke hooks or + // child tools. Bound pipe cleanup as well as the local Git process. + command.WaitDelay = time.Second + output, err := command.CombinedOutput() + if err != nil { + t.Fatalf("git %v: %v\n%s", args, err, output) + } + return string(output) + } + runGit("", "init", "--quiet", "--template="+emptyTemplate) + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + if _, _, err := SavePin(ctx, core.NewClient(), root, ".", "dev.example:compiler", &core.ToolchainPin{ + Home: "/fixture/tool", Version: "1.0", Provider: "host:system", + }, nil); err != nil { + t.Fatal(err) + } + for _, path := range []string{".lithe/toolchains/shared.json", ".lithe/nested/.gitignore"} { + native := filepath.Join(root, filepath.FromSlash(path)) + if err := os.MkdirAll(filepath.Dir(native), 0o700); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(native, nil, 0o600); err != nil { + t.Fatal(err) + } + } + paths := ".lithe/.gitignore\x00.lithe/toolchains/local.json\x00.lithe/toolchains/shared.json\x00.lithe/nested/.gitignore\x00" + if got := runGit(paths, "check-ignore", "--no-index", "--stdin", "-z"); got != ".lithe/.gitignore\x00.lithe/toolchains/local.json\x00" { + t.Fatalf("Git ignored paths = %q", got) + } +} + func TestSnapshotPinBaselineCannotBeMutatedByCaller(t *testing.T) { root := t.TempDir() path := documentPath(root) diff --git a/desktop/internal/toolchain/toolchain_test.go b/desktop/internal/toolchain/toolchain_test.go index 2d28c95e9d..611bfde326 100644 --- a/desktop/internal/toolchain/toolchain_test.go +++ b/desktop/internal/toolchain/toolchain_test.go @@ -335,7 +335,7 @@ func TestSavePinPreservesUnrelatedEntriesAndDetectsConflicts(t *testing.T) { if err != nil { t.Fatal(err) } - if !containsLine(string(ignore), "/toolchains/local.json") { + if !containsLine(string(ignore), "/.gitignore") || !containsLine(string(ignore), "/toolchains/local.json") { t.Fatalf("ignore file = %q", ignore) } // A stale baseline must not overwrite the file another editor changed. diff --git a/desktop/internal/workbench/aicommit_view.go b/desktop/internal/workbench/aicommit_view.go index c28ff73a2a..9dae83c950 100644 --- a/desktop/internal/workbench/aicommit_view.go +++ b/desktop/internal/workbench/aicommit_view.go @@ -10,7 +10,7 @@ func (a *App) drawGenerateCommitButton(c ui.C, p *project) { // The spinner shows the generation is still working, as the macOS client's progress // indicator does in place of its icon; Cancel stops it. ui.Row(c.Part("aiRunning")).Items(ui.Center).Gap(4).Children(func() { - ui.Spinner(c.Part("spinner")) + ui.Spinner(c) if ui.Button(c.Part("ai"), t.Cancel).Ghost().Clicked() { c.After(func() { a.cancelCommitGeneration(p) }) } diff --git a/desktop/internal/workbench/build_options.go b/desktop/internal/workbench/build_options.go index 5dfd787b0a..d69f3c37b6 100644 --- a/desktop/internal/workbench/build_options.go +++ b/desktop/internal/workbench/build_options.go @@ -477,33 +477,35 @@ func (a *App) buildOptionsHeading(c ui.C, title string) { func (a *App) buildIgnoredPathsSection(c ui.C, p *project, ready bool) { g, language := &p.build.options.ignored, a.language() label := i18n.Shared(language, "desktop.build.ignoredPaths") - a.buildOptionsHeading(c, i18n.Shared(language, "desktop.build.detection")) - ui.Row(c).FillWidth().Items(ui.Center).Gap(4).Children(func() { - ui.Text(c, label).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Shrink(0) - ui.Button(c.Part("help"), i18n.Shared(language, "native.moreInformation")).Icon(icons.Info).IconOnly().Ghost().Size(18, 18). - Tooltip(i18n.Shared(language, "desktop.build.ignoredPathsHelp")).TooltipOn(ui.TooltipRight) - ui.Spacer(c) - if g.source == core.BuildIgnoredPathsLocal && !g.inherit { - if ui.Button(c.Part("restore"), i18n.Shared(language, "native.restoreDefault")).Ghost().Small().Disabled(!ready || g.restoring).Clicked() { - c.After(func() { - a.performed("build.ignoredPaths.restoreDefault", surfaceButton) - a.readBuildIgnoredPaths(p, true) - }) + ui.Column(c).FillWidth().Gap(10).Children(func() { + a.buildOptionsHeading(c, i18n.Shared(language, "desktop.build.detection")) + ui.Row(c).FillWidth().Items(ui.Center).Gap(4).Children(func() { + ui.Text(c, label).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Shrink(0) + ui.Button(c.Part("help"), i18n.Shared(language, "native.moreInformation")).Icon(icons.Info).IconOnly().Ghost().Size(18, 18). + Tooltip(i18n.Shared(language, "desktop.build.ignoredPathsHelp")).TooltipOn(ui.TooltipRight) + ui.Spacer(c) + if g.source == core.BuildIgnoredPathsLocal && !g.inherit { + if ui.Button(c.Part("restore"), i18n.Shared(language, "native.restoreDefault")).Ghost().Small().Disabled(!ready || g.restoring).Clicked() { + c.After(func() { + a.performed("build.ignoredPaths.restoreDefault", surfaceButton) + a.readBuildIgnoredPaths(p, true) + }) + } } + }) + ui.TextArea(c.Part("patterns"), &g.text, label, "").FillWidth().Height(72).Disabled(!ready || !g.loaded || g.restoring) + if !g.loaded { + return + } + var source string + switch g.source { + case core.BuildIgnoredPathsLocal: + source = i18n.Shared(language, "desktop.build.ignoredPathsLocal") + case core.BuildIgnoredPathsTeam: + source = i18n.SharedFormat(language, "desktop.build.ignoredPathsTeam", map[string]string{"file": buildTeamOptionsFile}) + default: + source = i18n.Shared(language, "desktop.build.ignoredPathsDefault") } + ui.Wrap(c, source).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) }) - ui.TextArea(c.Part("patterns"), &g.text, label, "").FillWidth().Height(72).Disabled(!ready || !g.loaded || g.restoring) - if !g.loaded { - return - } - var source string - switch g.source { - case core.BuildIgnoredPathsLocal: - source = i18n.Shared(language, "desktop.build.ignoredPathsLocal") - case core.BuildIgnoredPathsTeam: - source = i18n.SharedFormat(language, "desktop.build.ignoredPathsTeam", map[string]string{"file": buildTeamOptionsFile}) - default: - source = i18n.Shared(language, "desktop.build.ignoredPathsDefault") - } - ui.Wrap(c, source).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) } diff --git a/desktop/internal/workbench/build_options_runtime.go b/desktop/internal/workbench/build_options_runtime.go index c9584d81a2..3a455d6b2f 100644 --- a/desktop/internal/workbench/build_options_runtime.go +++ b/desktop/internal/workbench/build_options_runtime.go @@ -263,7 +263,7 @@ func (a *App) buildRuntimeRows(c ui.C, language i18n.Language, e *buildOptionsEd return } ui.Text(c, runtime.executable).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis().Shrink(1).MinWidth(0) - ui.Row(k.Part("spacer")).Grow(1) + ui.Spacer(c) ui.Text(c, buildExecutionSourceLabel(language, runtime.source)).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(0).MaxWidth(160) }) } diff --git a/desktop/internal/workbench/build_tree_view.go b/desktop/internal/workbench/build_tree_view.go index 0fc4d2ca9d..dccf47b0a1 100644 --- a/desktop/internal/workbench/build_tree_view.go +++ b/desktop/internal/workbench/build_tree_view.go @@ -101,7 +101,7 @@ func (a *App) buildSystemsPane(c ui.C, p *project) { switch { case b.loading || !b.loaded: a.buildNotice(c, t.LoadingModel, "", func() { - ui.Spinner(c.Part("spinner")).Size(16, 16) + ui.Spinner(c).Size(16, 16) }) return case b.failed != "": @@ -296,7 +296,7 @@ func (a *App) buildGroupRow(row ui.ListRow, p *project, instance *buildInstance, } switch { case spec.loading: - ui.Spinner(c.Part("spinner")).Size(12, 12) + ui.Spinner(c).Size(12, 12) case spec.warning: ui.Icon(c, icons.CircleAlert).Size(14, 14).Shrink(0).Color(a.colors.Warning) } @@ -423,7 +423,7 @@ func (a *App) buildNoteRow(row ui.ListRow, p *project, instance *buildInstance, color := a.colors.Subtle switch { case spec.loading: - ui.Spinner(c.Part("spinner")).Size(12, 12) + ui.Spinner(c).Size(12, 12) case spec.warning: color = a.colors.Warning ui.Icon(c, icons.CircleAlert).Size(14, 14).Shrink(0).Color(color) diff --git a/desktop/internal/workbench/chrome_view.go b/desktop/internal/workbench/chrome_view.go index 13be9b8b84..dbeb57308f 100644 --- a/desktop/internal/workbench/chrome_view.go +++ b/desktop/internal/workbench/chrome_view.go @@ -142,7 +142,7 @@ func (a *App) titleBar(c ui.C) { a.chromeProject(c) a.chromeBranch(c) } - ui.Row(c).Grow(1) + ui.Spacer(c) zone := ui.Row(c).Items(ui.Center).Gap(chromeGap).Children(func() { for _, i := range a.chrome.items[zoneTitle] { if a.chromeTitleButton(c, i) { @@ -268,7 +268,7 @@ func (a *App) titleButtonMenu(c ui.C, i int, box ui.Box) { if !a.chrome.catalog[i].stripes { return } - ui.ContextMenu(c.Part("menu").KeyInt(i), box, func(menu *ui.MenuItems) { + ui.ContextMenu(c, box, func(menu *ui.MenuItems) { a.stripeMoveMenu(c, menu, i, zoneTitle) }) } @@ -302,7 +302,7 @@ func (a *App) stripe(c ui.C, left bool) { if i := a.stripeZone(c, top, left, dragging); i >= 0 { clicked = i } - ui.Column(c).Grow(1) + ui.Spacer(c) if i := a.stripeZone(c, split, left, dragging); i >= 0 { clicked = i } @@ -339,7 +339,7 @@ func (a *App) stripeZone(c ui.C, z zone, left, dragging bool) int { for _, i := range a.chrome.items[z] { if a.chrome.catalog[i].id == itemToolWindows { box := a.hiddenToolWindowsButton(c, i, z, layout) - ui.ContextMenu(c.Part("menu").KeyInt(i), box, a.stripeButtonMenu(c, i, z)) + ui.ContextMenu(c, box, a.stripeButtonMenu(c, i, z)) continue } // The background button opens a popover, not a tool window, and the settings @@ -384,7 +384,7 @@ func (a *App) stripeZone(c ui.C, z zone, left, dragging bool) int { case hit: clicked = i } - ui.ContextMenu(c.Part("menu").KeyInt(i), box, a.stripeButtonMenu(c, i, z)) + ui.ContextMenu(c, box, a.stripeButtonMenu(c, i, z)) } }) a.chrome.placeZone(z, column) @@ -452,7 +452,7 @@ func (a *App) hiddenToolWindowList(c ui.C, anchor ui.Box, z zone) { if clicked { shown = i } - ui.ContextMenu(c.Part("unhide").KeyInt(i), row, func(menu *ui.MenuItems) { + ui.ContextMenu(c, row, func(menu *ui.MenuItems) { if menu.Item(unhide).Clicked() { restored = i } diff --git a/desktop/internal/workbench/debug_view.go b/desktop/internal/workbench/debug_view.go index 6e21af9558..2d6cf8e9e0 100644 --- a/desktop/internal/workbench/debug_view.go +++ b/desktop/internal/workbench/debug_view.go @@ -137,7 +137,7 @@ func (a *App) debugToolbar(c ui.C, p *project) { } ui.Text(c, status).Shrink(1).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis() } - a.debugAdapterPicker(c.Part("adapter"), p) + a.debugAdapterPicker(c, p) }) } @@ -216,7 +216,7 @@ func (a *App) debugAdapterPicker(c ui.C, p *project) { for index := range indexes { indexes[index] = index } - ui.Select(c, &d.selectedAdapter, indexes, func(index int) string { + ui.Select(c.Part("adapter"), &d.selectedAdapter, indexes, func(index int) string { return d.adapters[index].Declaration.DisplayName }).Label(i18n.Shared(a.language(), "desktop.debug.adapter")).Width(debugAdapterPickerWidth).Height(24).Shrink(1) } diff --git a/desktop/internal/workbench/debug_watch.go b/desktop/internal/workbench/debug_watch.go index 633318dc7f..4a77e5c2dc 100644 --- a/desktop/internal/workbench/debug_watch.go +++ b/desktop/internal/workbench/debug_watch.go @@ -342,7 +342,7 @@ func (a *App) debugWatchView(c ui.C, p *project) { row.Children(func() { ui.Icon(c, icons.Eye).Size(treelist.Icon, treelist.Icon).Shrink(0).MarginTop(debugIconInset).Color(a.colors.Subtle) a.debugWatchText(k, entry, false) - ui.Row(k.Part("spacer")).Grow(1) + ui.Spacer(c) i := index if _, clicked := a.toolIconButton(k.Key("remove"), t.RemoveWatch, icons.X, false, false); clicked { c.After(func() { a.removeDebugWatch(p, i) }) diff --git a/desktop/internal/workbench/difftab_view.go b/desktop/internal/workbench/difftab_view.go index e4892204c4..f4d3efafbb 100644 --- a/desktop/internal/workbench/difftab_view.go +++ b/desktop/internal/workbench/difftab_view.go @@ -130,7 +130,7 @@ func (a *App) diffToolbar(c ui.C, p *project, t *diffTab) { if clicked { t.settingsOpen = !t.settingsOpen } - ui.Menu(c.Part("diff-settings-menu"), gear, &t.settingsOpen, func(menu *ui.MenuItems) { + ui.Menu(c, gear, &t.settingsOpen, func(menu *ui.MenuItems) { menu.WidthRange(180, 260) if menu.Item(i18n.Shared(lang, "desktop.diff.keepWhitespace")).Checked(!t.ignoreSpace).Disabled(t.saved != nil).Clicked() { c.After(func() { a.setDiffWhitespace(p, t, false) }) diff --git a/desktop/internal/workbench/editor_view.go b/desktop/internal/workbench/editor_view.go index 3bc2d33cdd..319a8d4ad9 100644 --- a/desktop/internal/workbench/editor_view.go +++ b/desktop/internal/workbench/editor_view.go @@ -191,13 +191,13 @@ func (a *App) documentView(c ui.C, group string, d *document) { } if p := a.project; p != nil && !d.virtual { items, shown := a.editorMenuItems(c, p, d), false - ui.ContextMenu(c.Key("menu"+name), box, func(menu *ui.MenuItems) { + ui.ContextMenu(c, box, func(menu *ui.MenuItems) { shown = true items(menu) }) a.referenceMenuPainted(d, shown) at := d.actionPanel.menuAt - ui.ContextMenuAt(c.Key("lanemenu"+name), box, &d.actionPanel.menuOpen, gfx.Point{X: at.X, Y: at.Y + at.Height}, a.editorActionLaneMenu(c, p, d)) + ui.ContextMenuAt(c, box, &d.actionPanel.menuOpen, gfx.Point{X: at.X, Y: at.Y + at.Height}, a.editorActionLaneMenu(c, p, d)) a.gitGutterPeek(c, p, d, box) } } @@ -335,7 +335,7 @@ func (a *App) terminalView(c ui.C, t *terminal) { box := ui.Control(c.Part(name), a.text.Terminal.Label, &t.input).Fill().Draw(t.draw) box.DropTarget(&a.dnd.tree, a.terminalTreeAccept, a.terminalTreeDrop) ui.FocusBind(box, &a.focus, focusTarget{term: t.id}) - a.terminalMenu(c, name, box, t) + a.terminalMenu(c, box, t) }) return } @@ -343,7 +343,7 @@ func (a *App) terminalView(c ui.C, t *terminal) { // A project tree row dropped on the terminal pastes its path (terminal_drop.go). box.DropTarget(&a.dnd.tree, a.terminalTreeAccept, a.terminalTreeDrop) ui.FocusBind(box, &a.focus, focusTarget{term: t.id}) - a.terminalMenu(c, name, box, t) + a.terminalMenu(c, box, t) } // terminalInput makes the handlers and the painter of terminal t, once, when it is opened. diff --git a/desktop/internal/workbench/git_gutter.go b/desktop/internal/workbench/git_gutter.go index c90c6d0e7e..53ab0df8eb 100644 --- a/desktop/internal/workbench/git_gutter.go +++ b/desktop/internal/workbench/git_gutter.go @@ -279,7 +279,7 @@ func (a *App) revertGitGutter(p *project, d *document, surface actionSurface) { // gitGutterPeek declares the popover of a clicked marker: the text it replaced, and the stage and // revert actions. It hangs off the file's control. func (a *App) gitGutterPeek(c ui.C, p *project, d *document, anchor ui.Box) { - if d.gutter.peek == nil || p == nil { + if d.gutter.peek == nil || p == nil || !d.gutter.peekOpen { return } h := *d.gutter.peek diff --git a/desktop/internal/workbench/gitlog_popover_view.go b/desktop/internal/workbench/gitlog_popover_view.go index b62a19422a..abcfef3201 100644 --- a/desktop/internal/workbench/gitlog_popover_view.go +++ b/desktop/internal/workbench/gitlog_popover_view.go @@ -135,7 +135,7 @@ func (a *App) drawLogBranchFilter(c ui.C, p *project) { if len(s.refs) == 0 { continue } - ui.Divider(c.Part(s.kind)).PadY(4) + ui.Divider(c).PadY(4) for _, r := range s.refs { if a.logMenuItem(c, r.FullName, r.ShortName, l.reference == r.FullName, false) { c.After(func() { diff --git a/desktop/internal/workbench/memory_monitor.go b/desktop/internal/workbench/memory_monitor.go index 54b0a2a2b9..da224a8572 100644 --- a/desktop/internal/workbench/memory_monitor.go +++ b/desktop/internal/workbench/memory_monitor.go @@ -444,7 +444,7 @@ func (a *App) memoryDetails(c ui.C, anchor ui.Box) { default: parts := m.parts() columns := m.columns() - a.memoryStats(c.Part("stats"), language) + a.memoryStats(c, language) a.memoryBar(c.Part("bar"), parts) a.memoryLegend(c.Part("legend"), language, parts, columns) ui.Divider(c) @@ -565,23 +565,25 @@ func (a *App) memoryLegend(c ui.C, language i18n.Language, parts []core.MemoryCa // with what Core counts under it, and the sum of the ones past the list. func (a *App) memoryEntries(c ui.C, language i18n.Language, columns memoryColumns) { summary := &a.memory.summary - ui.Text(c, i18n.Shared(language, "desktop.memory.processes")).FontSize(a.theme.Metrics.FontSizeS).Weight(gfx.WeightSemibold).Color(a.colors.Subtle) - if len(summary.Entries) == 0 { - ui.Text(c, i18n.Shared(language, "desktop.memory.noOtherProcesses")).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) - return - } - ui.Scroll(c.Part("list")).Scrollbars().FillWidth().MaxHeight(memoryListHeight).Children(func() { - for i, entry := range summary.Entries { - a.memoryRow(c, c.KeyInt(i), language, memoryLine{ - kind: entry.Kind, name: entry.Name, processes: entry.ProcessCount, bytes: entry.Bytes, usage: entry.MemoryUsage, - }, columns) + ui.Column(c).FillWidth().Gap(memorySectionGap).Children(func() { + ui.Text(c, i18n.Shared(language, "desktop.memory.processes")).FontSize(a.theme.Metrics.FontSizeS).Weight(gfx.WeightSemibold).Color(a.colors.Subtle) + if len(summary.Entries) == 0 { + ui.Text(c, i18n.Shared(language, "desktop.memory.noOtherProcesses")).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) + return + } + ui.Scroll(c.Part("list")).Scrollbars().FillWidth().MaxHeight(memoryListHeight).Children(func() { + for i, entry := range summary.Entries { + a.memoryRow(c, c.KeyInt(i), language, memoryLine{ + kind: entry.Kind, name: entry.Name, processes: entry.ProcessCount, bytes: entry.Bytes, usage: entry.MemoryUsage, + }, columns) + } + }) + if summary.Omitted.Count > 0 { + ui.Text(c, i18n.SharedFormat(language, "desktop.memory.omitted", map[string]string{ + "count": strconv.Itoa(summary.Omitted.Count), "value": memorySize(language, summary.Omitted.Bytes), + })).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) } }) - if summary.Omitted.Count > 0 { - ui.Text(c, i18n.SharedFormat(language, "desktop.memory.omitted", map[string]string{ - "count": strconv.Itoa(summary.Omitted.Count), "value": memorySize(language, summary.Omitted.Bytes), - })).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) - } } // memoryLine is what a row of the legend or the list shows. diff --git a/desktop/internal/workbench/problems_view.go b/desktop/internal/workbench/problems_view.go index 1009def6d3..ad525f9ae9 100644 --- a/desktop/internal/workbench/problems_view.go +++ b/desktop/internal/workbench/problems_view.go @@ -89,7 +89,7 @@ func (a *App) problemsToolbar(c ui.C, lang i18n.Language) { if clicked { v.optionsOpen = !v.optionsOpen } - ui.Menu(c.Part("problemsOptionsMenu"), eye, &v.optionsOpen, func(menu *ui.MenuItems) { + ui.Menu(c, eye, &v.optionsOpen, func(menu *ui.MenuItems) { menu.WidthRange(180, 260) menu.Label(i18n.Shared(lang, "desktop.problems.showHeading")) if menu.Item(i18n.Shared(lang, "desktop.problems.showErrors")).Checked(!v.hideErrors).Clicked() { diff --git a/desktop/internal/workbench/remote_browse_view.go b/desktop/internal/workbench/remote_browse_view.go index 8d20e6a26a..17f6472e96 100644 --- a/desktop/internal/workbench/remote_browse_view.go +++ b/desktop/internal/workbench/remote_browse_view.go @@ -40,8 +40,8 @@ func (a *App) remoteBrowserView(c ui.C, b *remoteBrowser) { c.After(a.goRemoteFolder) } }) - a.remoteFolderShortcuts(k.Part("shortcuts"), language, b) - a.remoteFolderCrumbs(k.Part("crumbs"), b) + a.remoteFolderShortcuts(k, language, b) + a.remoteFolderCrumbs(k, b) if b.readErr != "" { a.remoteNotice(k.Part("read"), icons.CircleAlert, a.theme.Danger, b.readErr) } @@ -57,7 +57,7 @@ func (a *App) remoteBrowserView(c ui.C, b *remoteBrowser) { a.remoteFolderList(k.Part("folders"), b) }) if text := remoteSkippedText(language, b.skipped); text != "" { - ui.Paragraph(k.Part("skipped"), text, 2).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) + ui.Paragraph(c, text, 2).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) } }) } @@ -132,7 +132,7 @@ func (a *App) remoteFolderShortcuts(c ui.C, language i18n.Language, b *remoteBro if len(shortcuts) == 0 { return } - ui.Row(c).FillWidth().Gap(6).Items(ui.Center).Children(func() { + ui.Row(c.Part("shortcuts")).FillWidth().Gap(6).Items(ui.Center).Children(func() { ui.Text(c, i18n.Shared(language, "desktop.remote.browse.shortcuts")).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Shrink(0) for i, item := range shortcuts { sc := c.Part("shortcut" + strconv.Itoa(i)) @@ -170,7 +170,7 @@ func (a *App) remoteFolderCrumbs(c ui.C, b *remoteBrowser) { if b.dir == "/" { parts = nil } - ui.Row(c).FillWidth().Gap(2).Items(ui.Center).Children(func() { + ui.Row(c.Part("crumbs")).FillWidth().Gap(2).Items(ui.Center).Children(func() { crumb := func(i int, label, dir string) { if i == len(parts) { ui.Text(c, label).FontSize(a.theme.Metrics.FontSizeS).Weight(gfx.WeightSemibold).Ellipsis().Shrink(1).MinWidth(0) diff --git a/desktop/internal/workbench/remote_detail_view.go b/desktop/internal/workbench/remote_detail_view.go index c1e81a3822..d70552951d 100644 --- a/desktop/internal/workbench/remote_detail_view.go +++ b/desktop/internal/workbench/remote_detail_view.go @@ -40,7 +40,7 @@ func (a *App) remotePage(c ui.C, language i18n.Language) { a.remoteOverview(c, language, *entry) case r.loading && !r.loaded: ui.Column(c).Fill().Center().Children(func() { - ui.Spinner(c.Part("loading")) + ui.Spinner(c) }) default: a.remoteEmptyPage(c, language) @@ -287,7 +287,7 @@ func (a *App) remoteHostSection(c ui.C, language i18n.Language, outcome *remoteP small := a.theme.Metrics.FontSizeS a.remoteSection(c, i18n.Shared(language, "desktop.remote.hostSection"), "", func() { if r.probe != nil { - ui.Spinner(c.Part("testing")).Size(12, 12) + ui.Spinner(c).Size(12, 12) ui.Text(c, i18n.Shared(language, "desktop.remote.testing")).FontSize(small).Color(a.colors.Subtle) if ui.Button(c.Part("stop"), i18n.Shared(language, "desktop.remote.stop")).Link().Clicked() { c.After(a.stopRemoteTest) @@ -418,7 +418,7 @@ func (a *App) remoteOutcomeBox(c ui.C, language i18n.Language, outcome *remotePr l := c.Part("log") ui.Scroll(l).FillWidth().MaxHeight(180).Children(func() { ui.Column(l).FillWidth().PadSides(10, 12, 10, 12).Radius(6).Background(a.colors.Hover).Stroke(1, a.colors.Line).Children(func() { - ui.Paragraph(l.Part("text"), diagnostics, 40).Mono().FontSize(small).Color(a.colors.Subtle) + ui.Paragraph(c, diagnostics, 40).Mono().FontSize(small).Color(a.colors.Subtle) }) }) } @@ -574,7 +574,7 @@ func (a *App) remoteFormPage(c ui.C, language i18n.Language) { switch { case r.probe != nil: ui.Row(c.Part("testing")).FillWidth().Items(ui.Center).Gap(8).Pad(12).Radius(6).Stroke(1, a.colors.Line).Children(func() { - ui.Spinner(c.Part("spinner")).Size(14, 14) + ui.Spinner(c).Size(14, 14) ui.Text(c, i18n.Shared(language, "desktop.remote.testing")).Color(a.colors.Subtle) }) case r.result != nil: diff --git a/desktop/internal/workbench/remote_devcontainer.go b/desktop/internal/workbench/remote_devcontainer.go index a82fff9696..fcd7282d56 100644 --- a/desktop/internal/workbench/remote_devcontainer.go +++ b/desktop/internal/workbench/remote_devcontainer.go @@ -372,8 +372,8 @@ func (a *App) remoteDevcontainerView(c ui.C, language i18n.Language, d *remoteDe ui.Icon(h, icons.FileCode).Size(20, 20).Color(a.colors.Subtle) }) ui.Column(h).Grow(1).Basis(0).MinWidth(0).Gap(4).Children(func() { - ui.Text(h, i18n.Shared(language, "desktop.remote.devcontainer.title")).FontSize(16).Weight(gfx.WeightSemibold).Ellipsis().MinWidth(0) - ui.Paragraph(h.Part("about"), i18n.Shared(language, "desktop.remote.devcontainer.about"), 3).FontSize(small).Color(a.colors.Subtle) + ui.Text(c, i18n.Shared(language, "desktop.remote.devcontainer.title")).FontSize(16).Weight(gfx.WeightSemibold).Ellipsis().MinWidth(0) + ui.Paragraph(c, i18n.Shared(language, "desktop.remote.devcontainer.about"), 3).FontSize(small).Color(a.colors.Subtle) }) }) label := i18n.Shared(language, "desktop.remote.devcontainer.folder") @@ -442,7 +442,7 @@ func (a *App) remoteDevcontainerView(c ui.C, language i18n.Language, d *remoteDe l := c.Part("diagnostics") ui.Scroll(l).FillWidth().MaxHeight(120).Children(func() { ui.Column(l).FillWidth().Pad(10).Radius(6).Background(a.colors.Hover).Stroke(1, a.colors.Line).Children(func() { - ui.Paragraph(l.Part("text"), d.diagnostics, 40).Mono().FontSize(small).Color(a.colors.Subtle) + ui.Paragraph(c, d.diagnostics, 40).Mono().FontSize(small).Color(a.colors.Subtle) }) }) } diff --git a/desktop/internal/workbench/remote_host_containers.go b/desktop/internal/workbench/remote_host_containers.go index 7e73119697..8a65c25d3c 100644 --- a/desktop/internal/workbench/remote_host_containers.go +++ b/desktop/internal/workbench/remote_host_containers.go @@ -159,63 +159,65 @@ func (a *App) enterRemoteHostContainer() { // enter as, the list, and the engines' words when listing failed. func (a *App) remoteHostContainersView(c ui.C, language i18n.Language, list *remoteBrowserContainers) { small := a.theme.Metrics.FontSizeS - ui.Paragraph(c, i18n.Shared(language, "desktop.remote.hostContainers.about"), 4).FontSize(small).Color(a.colors.Subtle) - label := i18n.Shared(language, "desktop.remote.container.user") - ui.Row(c.Part("account")).FillWidth().Gap(8).Items(ui.Center).Children(func() { - ui.Text(c, label).FontSize(small).Shrink(0) - ui.TextField(c.Part("user"), &list.user, label, i18n.Shared(language, "desktop.remote.container.userPlaceholder")).Width(260) - }) - if list.err != "" { - a.remoteNotice(c.Part("error"), icons.CircleAlert, a.theme.Danger, list.err) - } - ui.Column(c.Part("rows")).FillWidth().Grow(1).Shrink(1).MinHeight(0). - Border(1, a.colors.Line).Radius(a.theme.Metrics.RadiusItem()).Clip().Children(func() { - if list.loading || len(list.list) == 0 { - text := i18n.Shared(language, "desktop.remote.hostContainers.empty") - switch { - case list.loading: - text = i18n.Shared(language, "native.loading") - case list.engines == 0 && list.err == "": - text = i18n.Shared(language, "desktop.remote.hostContainers.noEngine") - } - ui.Column(c.Part("empty")).FillWidth().Pad(12).Gap(8).Children(func() { - ui.Paragraph(c, text, 3).FontSize(small).Color(a.colors.Subtle) - for _, words := range list.diagnostics { - ui.Paragraph(c, words, 6).Mono().FontSize(small).Color(a.colors.Subtle) - } - }) - return + ui.Column(c).FillWidth().Grow(1).Shrink(1).MinHeight(0).Gap(12).Children(func() { + ui.Paragraph(c, i18n.Shared(language, "desktop.remote.hostContainers.about"), 4).FontSize(small).Color(a.colors.Subtle) + label := i18n.Shared(language, "desktop.remote.container.user") + ui.Row(c.Part("account")).FillWidth().Gap(8).Items(ui.Center).Children(func() { + ui.Text(c, label).FontSize(small).Shrink(0) + ui.TextField(c.Part("user"), &list.user, label, i18n.Shared(language, "desktop.remote.container.userPlaceholder")).Width(260) + }) + if list.err != "" { + a.remoteNotice(c.Part("error"), icons.CircleAlert, a.theme.Danger, list.err) } - list.rows.Label = func(row int) string { - if row >= 0 && row < len(list.list) { - return list.list[row].Name + ui.Column(c.Part("rows")).FillWidth().Grow(1).Shrink(1).MinHeight(0). + Border(1, a.colors.Line).Radius(a.theme.Metrics.RadiusItem()).Clip().Children(func() { + if list.loading || len(list.list) == 0 { + text := i18n.Shared(language, "desktop.remote.hostContainers.empty") + switch { + case list.loading: + text = i18n.Shared(language, "native.loading") + case list.engines == 0 && list.err == "": + text = i18n.Shared(language, "desktop.remote.hostContainers.noEngine") + } + ui.Column(c.Part("empty")).FillWidth().Pad(12).Gap(8).Children(func() { + ui.Paragraph(c, text, 3).FontSize(small).Color(a.colors.Subtle) + for _, words := range list.diagnostics { + ui.Paragraph(c, words, 6).Mono().FontSize(small).Color(a.colors.Subtle) + } + }) + return } - return "" - } - ui.List(c.Part("list"), &list.rows, len(list.list), func(row ui.ListRow) { - rc := row.C - container := list.list[row.Index] - row.Element.Height(remoteRowHeight).PadX(12).Gap(10).Items(ui.Center) - if row.Selected() { - row.Element.Background(a.colors.Selection) - } else { - row.Element.Hover(ui.Look{}.Background(a.colors.Hover)) + list.rows.Label = func(row int) string { + if row >= 0 && row < len(list.list) { + return list.list[row].Name + } + return "" } - row.Element.Children(func() { - a.remoteTile(rc.Part("tile"), "", container.Name, "", 26, 10) - ui.Column(rc).Grow(1).Basis(0).MinWidth(0).Gap(2).Children(func() { - ui.Text(rc, container.Name).Weight(gfx.WeightMedium).Ellipsis().MinWidth(0) - line := i18n.SharedFormat(language, "desktop.remote.container.row", map[string]string{ - "engine": remoteContainerEngineName(language, container.engine), "image": container.Image, + ui.List(c.Part("list"), &list.rows, len(list.list), func(row ui.ListRow) { + rc := row.C + container := list.list[row.Index] + row.Element.Height(remoteRowHeight).PadX(12).Gap(10).Items(ui.Center) + if row.Selected() { + row.Element.Background(a.colors.Selection) + } else { + row.Element.Hover(ui.Look{}.Background(a.colors.Hover)) + } + row.Element.Children(func() { + a.remoteTile(rc.Part("tile"), "", container.Name, "", 26, 10) + ui.Column(rc).Grow(1).Basis(0).MinWidth(0).Gap(2).Children(func() { + ui.Text(rc, container.Name).Weight(gfx.WeightMedium).Ellipsis().MinWidth(0) + line := i18n.SharedFormat(language, "desktop.remote.container.row", map[string]string{ + "engine": remoteContainerEngineName(language, container.engine), "image": container.Image, + }) + ui.Text(rc, line).FontSize(small).Color(a.colors.Subtle).Ellipsis().MinWidth(0) }) - ui.Text(rc, line).FontSize(small).Color(a.colors.Subtle).Ellipsis().MinWidth(0) + ui.Text(rc, container.Status).FontSize(small).Color(a.colors.Subtle).Ellipsis().Shrink(1).MinWidth(0) }) - ui.Text(rc, container.Status).FontSize(small).Color(a.colors.Subtle).Ellipsis().Shrink(1).MinWidth(0) - }) - }).Scrollbars().FillWidth().Grow(1).Shrink(1).MinHeight(0).Label(i18n.Shared(language, "desktop.remote.container.heading")) - if _, ok := list.rows.Submitted(); ok { - c.After(a.enterRemoteHostContainer) - } + }).Scrollbars().FillWidth().Grow(1).Shrink(1).MinHeight(0).Label(i18n.Shared(language, "desktop.remote.container.heading")) + if _, ok := list.rows.Submitted(); ok { + c.After(a.enterRemoteHostContainer) + } + }) }) } diff --git a/desktop/internal/workbench/remote_import.go b/desktop/internal/workbench/remote_import.go index b666b14c28..a71bbc9101 100644 --- a/desktop/internal/workbench/remote_import.go +++ b/desktop/internal/workbench/remote_import.go @@ -292,7 +292,7 @@ func (a *App) remoteImportView(c ui.C, language i18n.Language, m *remoteImporter } switch { case m.loading: - ui.Column(c.Part("loading")).FillWidth().Grow(1).Center().Children(func() { ui.Spinner(c.Part("spinner")) }) + ui.Column(c.Part("loading")).FillWidth().Grow(1).Center().Children(func() { ui.Spinner(c) }) case m.source == remoteImportMotty && m.mottyErr != "": a.remoteNotice(c.Part("motty-error"), icons.CircleX, a.theme.Danger, m.mottyErr) case m.source == remoteImportMotty && m.motty.Unavailable != "": @@ -526,7 +526,7 @@ func (a *App) remoteMottyFields(c ui.C, language i18n.Language, fields []core.Re ui.Text(c, remoteMottySkipText(language, field.Skip)).FontSize(small).Color(a.colors.Subtle).Grow(1.6).Basis(0).MinWidth(0).Ellipsis() } ui.Row(k.Part("tag")).Width(110).Shrink(0).Children(func() { - ui.Row(k.Part("spacer")).Grow(1) + ui.Spacer(c) if field.Lithe != "" { a.remoteTag(k.Part("imported"), i18n.Shared(language, "desktop.remote.import.field.imported"), a.colors.Success) } else { diff --git a/desktop/internal/workbench/remote_port_rules_view.go b/desktop/internal/workbench/remote_port_rules_view.go index adec8dbf3d..e64ec82fcd 100644 --- a/desktop/internal/workbench/remote_port_rules_view.go +++ b/desktop/internal/workbench/remote_port_rules_view.go @@ -27,7 +27,7 @@ func (a *App) remotePortRules(c ui.C, p *project, rules []core.RemoteForward, id language := a.language() k := c.Part("rules") ui.Row(k.Part("heading")).FillWidth().Height(remotePortsRowHeight).Shrink(0).Items(ui.Center).Gap(4).PadX(shellContentPad).Children(func() { - ui.Text(k.Part("heading-text"), i18n.Shared(language, "desktop.remote.ports.rulesHeading")).Color(a.colors.Text).Ellipsis() + ui.Text(c, i18n.Shared(language, "desktop.remote.ports.rulesHeading")).Color(a.colors.Text).Ellipsis() ui.Button(k.Part("help"), i18n.Shared(language, "native.moreInformation")).Icon(icons.Info).IconOnly().Ghost().Size(16, 16). Tooltip(i18n.Shared(language, "desktop.remote.ports.rulesHelp")) }) @@ -40,7 +40,7 @@ func (a *App) remotePortRules(c ui.C, p *project, rules []core.RemoteForward, id cell = cell.Grow(1).Shrink(1).MinWidth(0) } cell.Children(func() { - ui.Text(k.Part(key+"-text"), text).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis() + ui.Text(c, text).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis() }) } column("listen", i18n.Shared(language, "desktop.remote.ports.ruleColumnListen"), remotePortRulesListenWidth) @@ -122,7 +122,7 @@ func (a *App) remotePortIdleRuleRow(c ui.C, p *project, rule core.RemotePortRule } }) }) - ui.ContextMenu(c.Part("menu"), line, func(menu *ui.MenuItems) { + ui.ContextMenu(c, line, func(menu *ui.MenuItems) { menu.WidthRange(180, 280) if menu.Item(i18n.Shared(language, "desktop.remote.ports.ruleStart")).Icon(icons.Play).Disabled(unavailable).Clicked() { c.After(func() { a.startRememberedRule(p, rule, surfaceContextMenu) }) @@ -203,7 +203,7 @@ func (a *App) remotePortRuleRow(c ui.C, p *project, rule core.RemoteForward) { } }) }) - ui.ContextMenu(c.Part("menu"), line, func(menu *ui.MenuItems) { + ui.ContextMenu(c, line, func(menu *ui.MenuItems) { menu.WidthRange(180, 280) record := remotePortRuleOf(rule) if menu.Item(i18n.Shared(language, "desktop.remote.ports.editLabel")).Icon(icons.Tag).Clicked() { diff --git a/desktop/internal/workbench/remote_ports_view.go b/desktop/internal/workbench/remote_ports_view.go index f9f040b815..548bf7e0bb 100644 --- a/desktop/internal/workbench/remote_ports_view.go +++ b/desktop/internal/workbench/remote_ports_view.go @@ -303,7 +303,7 @@ func (a *App) remotePortsRow(c ui.C, p *project, row remotePortRow) { a.remotePortsRowActions(c, p, row, busy) }) }) - ui.ContextMenu(c.Part("menu"), line, func(menu *ui.MenuItems) { + ui.ContextMenu(c, line, func(menu *ui.MenuItems) { menu.WidthRange(180, 280) if row.forward != nil { forward := *row.forward diff --git a/desktop/internal/workbench/remote_steps.go b/desktop/internal/workbench/remote_steps.go index efd8109e78..0f9f8def2d 100644 --- a/desktop/internal/workbench/remote_steps.go +++ b/desktop/internal/workbench/remote_steps.go @@ -214,7 +214,7 @@ func (a *App) remoteStepRow(c ui.C, language i18n.Language, s *remoteSteps, step case current && s.failed: ui.Icon(c, icons.CircleX).Size(16, 16).Color(a.theme.Danger) case current: - ui.Spinner(c.Part("spinner")).Size(14, 14) + ui.Spinner(c).Size(14, 14) default: ui.Row(c.Part("todo")).Size(12, 12).Radius(6).Stroke(1, a.colors.TabIdleBorder) } diff --git a/desktop/internal/workbench/run_view.go b/desktop/internal/workbench/run_view.go index bac711c538..16ba307a18 100644 --- a/desktop/internal/workbench/run_view.go +++ b/desktop/internal/workbench/run_view.go @@ -217,7 +217,7 @@ func (a *App) runTree(c ui.C, p *project, run *runEntry) { ui.Text(c, a.text.Run.StartedAt(run.started.Format(runStartedLayout))).Color(a.colors.Subtle). Ellipsis().Shrink(buildDetailShrink) }) - ui.Row(k.Part("spacer")).Grow(1) + ui.Spacer(c) if duration != "" { ui.Text(c, duration).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Shrink(0) } @@ -298,7 +298,7 @@ func (a *App) runPortsRow(c ui.C, run *runEntry) { if pill.Clicked() { c.After(func() { a.openRunPort(port, surfaceButton) }) } - ui.ContextMenu(pk.Part("menu"), pill, func(menu *ui.MenuItems) { + ui.ContextMenu(c, pill, func(menu *ui.MenuItems) { if menu.Item(a.text.Run.Ports.Open).Clicked() { c.After(func() { a.openRunPort(port, surfaceContextMenu) }) } @@ -322,13 +322,12 @@ func (a *App) runPortsRow(c ui.C, run *runEntry) { // user stopped it. A service runs until it is stopped, so a spinner for as long as it runs would // never say it started. func (a *App) runStatusMark(c ui.C, run *runEntry, size float32) { - k := c.Part("status") if run.running && run.processRunning { ui.Icon(c, icons.Play).Size(size, size).Shrink(0).Color(a.colors.Success) return } if run.running { - ui.Spinner(k).Size(size, size).Shrink(0) + ui.Spinner(c).Size(size, size).Shrink(0) return } icon, tint := icons.CircleCheck, a.colors.Success diff --git a/desktop/internal/workbench/runconfig_dialog_view.go b/desktop/internal/workbench/runconfig_dialog_view.go index 820e45df18..13b6d97e9e 100644 --- a/desktop/internal/workbench/runconfig_dialog_view.go +++ b/desktop/internal/workbench/runconfig_dialog_view.go @@ -88,7 +88,7 @@ func (a *App) drawRunConfigDialogTree(c ui.C, p *project) { if clicked { c.After(func() { d.toggleNewMenu(runConfigNewMenuToolbar) }) } - a.drawRunConfigNewMenu(k.Part("add-menu"), p, add, runConfigNewMenuToolbar) + a.drawRunConfigNewMenu(k, p, add, runConfigNewMenuToolbar) if a.gitIconButton(k.Part("remove"), i18n.Shared(language, "desktop.runConfig.removeConfiguration"), icons.Minus, false, !p.runConfigDialogRemovable()) { c.After(func() { a.performed("run.configuration.remove", surfaceButton) @@ -144,7 +144,10 @@ func (d *runConfigDialog) toggleNewMenu(at runConfigNewMenu) { // drawRunConfigNewMenu declares the menu of kinds under anchor while it shows at at. func (a *App) drawRunConfigNewMenu(c ui.C, p *project, anchor ui.Box, at runConfigNewMenu) { d := &p.runConfigs.dialog - open := d.newMenu == at + if d.newMenu != at { + return + } + open := true ui.Menu(c, anchor, &open, func(menu *ui.MenuItems) { menu.WidthRange(200, 300) a.runConfigDialogTypeItems(c, menu, p) @@ -378,7 +381,6 @@ func (a *App) drawRunConfigDialogRow(c ui.C, p *project, i int) { return } row := d.rows[i] - k := c.KeyInt(i) if row.key == "" { icon := fileicons.ForDirectory("folder", a.colors.Dark) if row.node.folder == "" { @@ -388,6 +390,7 @@ func (a *App) drawRunConfigDialogRow(c ui.C, p *project, i int) { ui.Text(c, a.runConfigDialogRowLabel(p, row)).FontSize(treeFontSize).Color(a.colors.Text).Shrink(1).MinWidth(0).Ellipsis() return } + k := c.KeyInt(i) unavailable := a.runConfigDraftUnavailable(p, row.key) ui.Row(k).Shrink(1).MinWidth(0).Items(ui.Center).Gap(c.Theme().Metrics.GapItem).PadLeft(treeChevron).Children(func() { icon, color := a.runConfigDraftIcon(p, row.key), a.colors.Subtle @@ -421,7 +424,7 @@ func (a *App) drawRunConfigDialogEmptyTree(c ui.C, p *project) { if link.Clicked() { c.After(func() { d.toggleNewMenu(runConfigNewMenuTree) }) } - a.drawRunConfigNewMenu(c.Part("add-menu"), p, link, runConfigNewMenuTree) + a.drawRunConfigNewMenu(c, p, link, runConfigNewMenuTree) modifiers, key := runConfigAddChord() if chord, ok := keymap.Parse(modifiers, key); ok { ui.Text(c, shortcuts.Keycaps(chord)).Color(a.colors.Subtle) @@ -556,7 +559,7 @@ func (a *App) drawRunConfigDialogStart(c ui.C, p *project) { if link.Clicked() { c.After(func() { d.toggleNewMenu(runConfigNewMenuPane) }) } - a.drawRunConfigNewMenu(c.Part("add-menu"), p, link, runConfigNewMenuPane) + a.drawRunConfigNewMenu(c, p, link, runConfigNewMenuPane) ui.Text(c, i18n.Shared(language, "desktop.runConfig.orSelectToEdit")).Color(a.colors.Subtle) if d.failure != "" { ui.Paragraph(c, d.failure, 4).TextCenter().FillWidth().FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger) diff --git a/desktop/internal/workbench/runconfig_form_view.go b/desktop/internal/workbench/runconfig_form_view.go index b2e713a0a9..66d13f5be1 100644 --- a/desktop/internal/workbench/runconfig_form_view.go +++ b/desktop/internal/workbench/runconfig_form_view.go @@ -293,7 +293,7 @@ func (a *App) drawRunConfigFormFields(c ui.C, p *project, f *runConfigForm, read } }) for _, field := range header { - a.drawRunConfigFormError(c.Key(field.ID), f, field.ID, 0) + a.drawRunConfigFormError(c, f, field.ID, 0) } ui.Divider(c) } @@ -305,12 +305,12 @@ func (a *App) drawRunConfigFormFields(c ui.C, p *project, f *runConfigForm, read title, _ := runConfigFieldTitle(language, field) ui.Column(k).FillWidth().Gap(4).Children(func() { a.drawRunConfigBeforeLaunch(k, p, f.beforeLaunch, title, runConfigFieldHelp(language, f.kind.provider, field), field.Candidates, field.Tasks, ready, func() { a.runConfigFormEdited(p, f) }) - a.drawRunConfigFormError(k, f, field.ID, 0) + a.drawRunConfigFormError(c, f, field.ID, 0) }) } for _, wrong := range f.fields { if !drawn[wrong.ID] { - a.drawRunConfigFormError(c.Key(wrong.ID), f, wrong.ID, 0) + a.drawRunConfigFormError(c, f, wrong.ID, 0) } } } @@ -530,7 +530,7 @@ func (a *App) drawRunConfigFormError(c ui.C, f *runConfigForm, field string, ind if !ok { return } - ui.Row(c.Part("error")).FillWidth().PadSides(0, 0, 0, indent).Children(func() { + ui.Row(c.Key("error:"+field)).FillWidth().PadSides(0, 0, 0, indent).Children(func() { ui.Paragraph(c, runConfigFieldError(a.language(), code), 3).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger) }) } diff --git a/desktop/internal/workbench/runconfig_steps.go b/desktop/internal/workbench/runconfig_steps.go index ceb1a322b7..70a4452407 100644 --- a/desktop/internal/workbench/runconfig_steps.go +++ b/desktop/internal/workbench/runconfig_steps.go @@ -358,7 +358,7 @@ func (a *App) drawRunConfigStepsMenu(c ui.C, p *project, steps *runConfigSteps, return } language := a.language() - ui.Menu(c.Part("add-menu"), anchor, &steps.menu, func(menu *ui.MenuItems) { + ui.Menu(c, anchor, &steps.menu, func(menu *ui.MenuItems) { menu.WidthRange(220, 320) title := i18n.Shared(language, "desktop.runConfig.beforeLaunchMenuTitle") menu.Content(runConfigMenuTitleHeight, func(canvas *gfx.Canvas, bounds gfx.Rect, _ gfx.Theme) { @@ -394,7 +394,7 @@ func (a *App) drawRunConfigStepsChooser(c ui.C, p *project, steps *runConfigStep left = append(left, candidate) } } - ui.Menu(c.Part("choose-menu"), anchor, &steps.choose, func(menu *ui.MenuItems) { + ui.Menu(c, anchor, &steps.choose, func(menu *ui.MenuItems) { menu.WidthRange(220, 360) title := i18n.Shared(language, "desktop.runConfig.beforeLaunchChooseTitle") menu.Content(runConfigMenuTitleHeight, func(canvas *gfx.Canvas, bounds gfx.Rect, _ gfx.Theme) { diff --git a/desktop/internal/workbench/runconfig_view.go b/desktop/internal/workbench/runconfig_view.go index 1afe5edaf1..483fcd3787 100644 --- a/desktop/internal/workbench/runconfig_view.go +++ b/desktop/internal/workbench/runconfig_view.go @@ -427,7 +427,9 @@ func (a *App) drawRunOptionField(c ui.C, language i18n.Language, field *runOptio if field.raw != nil { text = field.title + ": " + string(field.raw) } - ui.Wrap(c, text).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) + ui.Column(c).FillWidth().Children(func() { + ui.Wrap(c, text).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) + }) } } diff --git a/desktop/internal/workbench/search_everywhere_view.go b/desktop/internal/workbench/search_everywhere_view.go index f4a9e4eafa..cd6b1131d3 100644 --- a/desktop/internal/workbench/search_everywhere_view.go +++ b/desktop/internal/workbench/search_everywhere_view.go @@ -118,7 +118,7 @@ func (a *App) everywhereScopes(c ui.C, p *project, language i18n.Language) { for index, label := range labels { var clicked bool if key, help := everywhereScopeHelp(language, index); help != "" { - clicked = a.everywhereHelpTab(c.KeyInt(index), c.Key(key), language, label, help, index == v.scope) + clicked = a.everywhereHelpTab(c.KeyInt(index), key, language, label, help, index == v.scope) } else { tab := ui.Button(c.KeyInt(index), label).Ghost() if index == v.scope { @@ -167,7 +167,7 @@ const ( // height the theme gives the other tabs' buttons (Ghost, Secondary when chosen), so it // reads as one of them; the ⓘ stays a button of its own, so the pointer and the keyboard // both reach its tooltip. -func (a *App) everywhereHelpTab(c, infoKey ui.C, language i18n.Language, label, help string, chosen bool) bool { +func (a *App) everywhereHelpTab(c ui.C, infoKey string, language i18n.Language, label, help string, chosen bool) bool { variant := components.ButtonGhost if chosen { variant = components.ButtonSecondary @@ -188,7 +188,7 @@ func (a *App) everywhereHelpTab(c, infoKey ui.C, language i18n.Language, label, var info ui.Box tab.Children(func() { ui.Text(c, label).FontSize(metrics.FontSizeM).Weight(gfx.WeightMedium).Color(rest.Foreground) - info = ui.Button(infoKey, i18n.Shared(language, "native.moreInformation")).Icon(icons.Info).IconOnly().Ghost(). + info = ui.Button(c.Key(infoKey), i18n.Shared(language, "native.moreInformation")).Icon(icons.Info).IconOnly().Ghost(). Size(everywhereHelpInfoSize, everywhereHelpInfoSize).Tooltip(help) }) return info.Clicked() || tab.Clicked() diff --git a/desktop/internal/workbench/signature_help.go b/desktop/internal/workbench/signature_help.go index 81f560fe04..e9244f2379 100644 --- a/desktop/internal/workbench/signature_help.go +++ b/desktop/internal/workbench/signature_help.go @@ -423,7 +423,7 @@ func (a *App) signatureHelpPopup(c ui.C, completion gfx.Rect) { if highlighted != "" { ui.Row(sc.Part("active-param")).PadX(3).PadY(1).Radius(3). Background(a.colors.Active).Shrink(0).Children(func() { - ui.Text(sc.Part("active-param-text"), highlighted).Mono().FontSize(12). + ui.Text(c, highlighted).Mono().FontSize(12). Weight(gfx.WeightBold).Color(a.colors.Text) }) } diff --git a/desktop/internal/workbench/standalone.go b/desktop/internal/workbench/standalone.go index 83a189a350..a58f5a9c28 100644 --- a/desktop/internal/workbench/standalone.go +++ b/desktop/internal/workbench/standalone.go @@ -53,7 +53,7 @@ func (a *App) standaloneWorkbench(c ui.C) { } ui.Text(c, name).Bold().Ellipsis().Color(a.colors.Text) ui.Text(c, i18n.Shared(language, "desktop.singleFile.mode")).FontSize(11).Color(a.colors.Subtle) - a.drawRunOptionHelp(c.Part("single-file-help"), i18n.Shared(language, "desktop.singleFile.help")) + a.drawRunOptionHelp(c, i18n.Shared(language, "desktop.singleFile.help")) ui.Spacer(c) if ui.Button(c, a.text.Tools.Terminal).Icon(icons.SquareTerminal).IconOnly().Ghost().Disabled(a.project == nil).Tooltip(a.text.Tools.Terminal).Clicked() { c.After(func() { diff --git a/desktop/internal/workbench/tabstrip.go b/desktop/internal/workbench/tabstrip.go index a3dc808aa4..b03eb94f00 100644 --- a/desktop/internal/workbench/tabstrip.go +++ b/desktop/internal/workbench/tabstrip.go @@ -467,7 +467,7 @@ func (a *App) stripTab(c ui.C, place *groupPlace, t shownTab, current string, i StateFrom(closeButton).Hover(ui.Look{}.Color(a.colors.Text)) }) }) - ui.ContextMenu(k.Part("menu"), chip, a.tabMenuItems(c, place.id, t, tabs)) + ui.ContextMenu(c, chip, a.tabMenuItems(c, place.id, t, tabs)) switch { case closeButton.Clicked(): c.After(func() { a.closeTab(t) }) diff --git a/desktop/internal/workbench/terminal_menu.go b/desktop/internal/workbench/terminal_menu.go index 7310db35d1..cab4f62a98 100644 --- a/desktop/internal/workbench/terminal_menu.go +++ b/desktop/internal/workbench/terminal_menu.go @@ -9,13 +9,13 @@ import ( // terminalMenu declares the context menu of terminal t's control: copy the selection, paste // the clipboard, select everything, clear, start a new shell once the old one ended, and close // the tab, as the old client's terminal offered. -func (a *App) terminalMenu(c ui.C, name string, box ui.Box, t *terminal) { +func (a *App) terminalMenu(c ui.C, box ui.Box, t *terminal) { p := a.project if p == nil { return } lang := a.language() - ui.ContextMenu(c.Key("menu"+name), box, func(menu *ui.MenuItems) { + ui.ContextMenu(c, box, func(menu *ui.MenuItems) { menu.WidthRange(180, 260) if menu.Item(i18n.Shared(lang, "menu.copy")).Disabled(!t.view.HasSelection()).Clicked() { text := t.view.SelectionText() diff --git a/desktop/internal/workbench/window_sessions.go b/desktop/internal/workbench/window_sessions.go index 8c64c33a4b..af06df013c 100644 --- a/desktop/internal/workbench/window_sessions.go +++ b/desktop/internal/workbench/window_sessions.go @@ -374,7 +374,7 @@ func (a *App) projectTab(c ui.C, tab *App, i, size int) { if d := p.selectedDocument(p.terms.bench.FocusedGroup); d != nil && d.path != "" { ui.Text(c, "· "+filepath.Base(d.path)).Color(a.colors.Subtle).Ellipsis() } - ui.Row(k.Part("spacer")).Grow(1) + ui.Spacer(c) cc := k.Part("close") closeButton = ui.Row(cc).Size(terminalCloseSize, terminalCloseSize).Shrink(0).Center(). Radius(a.theme.Metrics.RadiusItem()). diff --git a/shared/platform-feature-matrix/features/plugin-injected-toolchains.json b/shared/platform-feature-matrix/features/plugin-injected-toolchains.json index dd927fd837..84f351a8b8 100644 --- a/shared/platform-feature-matrix/features/plugin-injected-toolchains.json +++ b/shared/platform-feature-matrix/features/plugin-injected-toolchains.json @@ -2,7 +2,7 @@ "id": "plugin-injected-toolchains", "area": "扩展", "group": "插件与主题", - "capability": "Viva 从已启用插件的 toolDefinitions 声明发现工具链,将文件事实与有界版本探测交给原 Rust Core 的 candidates/resolve;Build 设置显示实际生效值与来源,草稿经显式 Save/Reset/Cancel 和受保护来源快照写入本机目录 pin,Core 统一提供读预算、严格来源解析与 Git 忽略编辑计划,无变化重置不创建文件,Build/Run/命令型 Tests 使用解析出的程序与环境。支持沿工作区祖先链观测声明的 projectFile 环境与包装器候选,按规范化工作区根在本机用户设置保存与撤销项目工具环境信任(绝不写入工作区 .lithe/),未授权时零版本探测并清晰提示待信任状态,授权后立即重读展示自动生效值并供 Build/Run/Debug 共用。提供方 toolchains/query、完整配置来源编辑与原生 GUI 验收仍未完成。 支持手动目录验证、自动值回显及构建运行时依赖先解析再执行。 可在未打开项目时管理自动发现与手动登记的全局 SDK 默认值,项目可独立覆盖。", + "capability": "Viva 从已启用插件的 toolDefinitions 声明发现工具链,将文件事实与有界版本探测交给原 Rust Core 的 candidates/resolve;Build 设置显示实际生效值与来源,草稿经显式 Save/Reset/Cancel 和受保护来源快照写入本机目录 pin,Core 统一提供读预算、严格来源解析与 Git 忽略编辑计划,维护规则时定点忽略 .lithe/.gitignore 自身且保留团队共享配置,无变化重置不创建文件,Build/Run/命令型 Tests 使用解析出的程序与环境。支持沿工作区祖先链观测声明的 projectFile 环境与包装器候选,按规范化工作区根在本机用户设置保存与撤销项目工具环境信任(绝不写入工作区 .lithe/),未授权时零版本探测并清晰提示待信任状态,授权后立即重读展示自动生效值并供 Build/Run/Debug 共用。提供方 toolchains/query、完整配置来源编辑与原生 GUI 验收仍未完成。 支持手动目录验证、自动值回显及构建运行时依赖先解析再执行。 可在未打开项目时管理自动发现与手动登记的全局 SDK 默认值,项目可独立覆盖。", "macos": { "implementationStatus": "partial", "verificationStatus": "pending", @@ -63,7 +63,7 @@ ] }, "owner": "Plugin Platform", - "verification": "共享 Core:cargo test --manifest-path rust/Cargo.toml -p lithe-core --lib toolchain,核对定义独占与官方短 ID、第二种通用工具、旧候选边界、答案身份/代次、Windows 路径大小写、工作区排除、固定值失效不回落、最近项目要求、冲突选择、最低版本、环境隔离和纯声明扫描;按逐项计时工具生成 HTML/JUnit。macOS 继续补齐下列消费者与保存验收,Windows 须先实现对应 adapter:启动提供方并协商、取消/超时和过期结果隔离、输入新建/删除后整体重查、目录固定保存/取消/冲突回读、插件停用撤回、真实 Build/LSP/Run 消费者取得同一选择、发行目录哈希不变与子进程清理。未完成原生流程前保持 pending,不以 Core 测试代替实机验证。 提供方查询:cargo test -p lithe-core --lib toolchain(含 lsp 引擎脚本后端:只有插件后端被提供 litheToolchains、未协商的提供方不写请求、错误回复原样返回;别名链接只有链接路径事实时仍选中规范 home);MacToolchainDiscoveryTests 用真实临时目录与注入的查询验证全局与目录查询各带独立 operationID/代次、链接 home 规范化、工作区内 home 整份拒绝;ToolchainSettingsFeatureTests 验证监视文件连续变化只重载一次、外部输入观察随关闭释放。真实 mise 插件端到端尚未在应用内验证。 原生布局回归 ToolchainSettingsLayoutTests:同一设置宿主按900/1180/1400/900重复缩放,真实分隔条拖动;来源页按500/666/946/500缩放,检查AX控件边界、卡片不重叠、选择和快照不改变。此几何验证不代表提供方查询或保存功能已完成。 声明式扫描 MacToolchainDiscoveryTests:真实临时目录、注入的用户目录与探测,覆盖 homeLayouts 首个匹配、隐藏与未匹配条目、链接到工作区的条目不探测、只探测 Core 返回的可执行文件、同版本冲突、被拒声明不扫描,以及隔离预览样例清单通过 Core 准入;不运行本机安装的工具。 固定集成新增 MacToolchainDiscoveryTests 的运行前解析回归和 MacBuildToolResolverTests,验证两个目录使用各自 pin、最低版本、独立环境与失败不回落;RunLaunchEnvironmentTests 证明操作返回值不会留下共享执行许可槽。该测试不是完整应用 UI 验收。 生产准入回归 installedToolDeclarationsPassTheProductionHostAdmission 经 RustDeclarativePluginOperations 验证工具定义和提供者。Build PATH 保留声明的附加目录,拒绝空目录项。 Windows 原生解析基础:lithe-project::defined_toolchain 逐项计时覆盖两个工具、声明式扫描、固定目录、最近继承、同版本冲突、最低版本、显式 Wrapper、输入撤销及宿主秘密不进入 RPC。真实 Windows 命令包装和进程清理继续由现有 CI 验证;准入仍关闭。 本次回归另核对同目录两个 Run 独立选择、团队/本机逐项合并和显式清空、私有环境隔离、失效固定值不回落、工作区启动器被动零探测,以及未知默认值迁移失败保留源文件。 本批显式 LITHE_TEST_NODE 驱动真实 Core/Node 会话,逐项计时覆盖单次协商、多次查询、原始错误、无协商拒绝、静默超时、后端意外退出与撤销清理;原生解析验证查询与当前事实、来源在探测中变化及稳定模型摘要。安装状态按 plugin/operation/workspace 隔离且不可跨工作树复制。 #1581 最终合入回归包含固定值与未扫描目录、同轮次/上下文、冲突及提供方超时和不可用的来源展示。 通用默认增量:更改工作区工具 home 后,消费者继承读取新值,按 Run 固定值保持独立;失效明确路径不回落,来源在探测期间改变或越出工作区时拒绝。旧编辑保存保留通用偏好,显式空 v1 文档清除。矩阵保持 pending,未把手写测试文档当成设置页或旧配置迁移验收。 macOS Build 偏好编辑:ToolchainPreferencesTests 验证打开/草稿/取消/空重置不建文件、明确保存/回读与权限保留、外部冲突保留原始草稿基线、仅偏好文档不阻断旧默认迁移、缺失子目录的父链接/最终链接/只读安装目录拒绝及主动取消;原生 Save/Reset 按钮在深浅主题通过实际存储执行。ToolchainSettingsLoaderTests 验证使用方来自当前 Core invocation 并随停用撤回。运行全量 Core 与相关 macOS 逐项计时;完整产品、全局默认、旧消费者和 Windows 设置页仍待验收。 tool 引用验证:共享 fixture/Core 覆盖最近通用目录、根目录、跳过父消费者、目录与工作区默认变化、显式 Run 优先和禁止通用工具反向引用;MacToolchainDiscoveryTests 与 lithe-project::defined_toolchain 的真实临时安装/注入探测验证运行前重读,不冻结安装路径。 本机目录/重载回归覆盖仅消费者偏好、父目录连接、重置撤回、链接/非法层级拒绝、单次重试与可刷新错误、未修改表单更新、冲突草稿保留及自身保存通知不等待/撤销保存。该集成不代替完整 GUI。 运行前来源审计 missingPreferenceLeafBehindAParentAliasIsRejectedBeforeToolWork 覆盖两级父目录及存在/悬空链接,四种情况均在工具探测前拒绝。 ToolchainPluginAdmissionTests 使用正式契约 fixture 与真实 Core 验证市场可安装、完整安装审查、清单加载,以及无后端纯工具定义插件的启用模块和工厂登记;本地编译验证不代替真实 mise 与 Windows 工作流验收。 2026-11-02 本机 Swift 6.4.2:准入、后端、发现和加载器 42 项通过,新增两个准入用例分别 4/6 ms;Swift 6.3.3 在本机 Xcode 27.2 SDK 下编译依赖清单崩溃,不能作为固定工具链通过。真实 mise 0.2.1 发布包 SHA-256 与市场一致,Core 证明修复前 unsupported、修复后 available;真实后端完成协商、查询并停止销毁,当前环境未安装 mise,查询真实返回 miseNotFound,未验证安装列表和应用内工作流。 增补来源保存验收:不存在的 pin 重置不创建状态;拒绝逃出工作区的符号链接/junction;有界 UTF-8 与重复键、未知字段和 dormant pin 校验;Git 后续否定规则、换行/评论/权限保留;公开字节基线不可替代私有快照;已提交但回读失败必须重新加载后才能重试。 Viva 全局 SDK 页:运行 TestVisualSettings/33-settings-toolchains,使用 en、zh-Hans 和 dark/light 的生产无头窗口,核对无项目模式、自动实际值、多版本登记与全局默认选择。通过 run-go-tests-with-timing.mjs 记录单测试 HTML/JUnit;desktop-ci 的 macOS/Windows 每次上传四张图和计时报告。2026-11-15 本机 macOS 与 Windows 11 ARM64 来宾的 GNU x64 系统仿真均通过两个语言各 3 个计时结果,Windows 49 个 SDK/来源/诊断/资源定向用例通过;该证据不替代工具提供方与完整产品工作流验收,整体保持 partial/pending。 Windows #2042:TestToolchainCandidatesUseNativeShellPathsInUserProfiles 以真实 PATH 查找、真实有界版本进程和 Core 候选规则,覆盖 PATH-only/环境变量-only 及空格/中文用户目录;合成工具位于扫描目录之外,全局登记使用私有根。 通过现有 Windows CI 的 scripts/desktop/check.sh 运行;本机逐项计时报告覆盖这些合成场景,完整原生界面验收仍保持 pending。 2026-11-18(#2122):使用 dev.lithe.test.* 合成工具清单运行 TestUntrustedProjectEnvironmentNeverProbesWorkspaceExecutables、TestTrustedWorkspacePersistsInLocalSettingsOnlyAndResolvesSymlinkedVenv、TestTrustedWorkspaceResolvesSubdirectoryEnvironmentAndRejectsEscapingDirectories、TestProjectToolchainTrustSwitchGrantsAndRevokesImmediately 与 TestWorkbenchToolchainTrustPersistsLocallyLogsActionAndEnablesRuntimeResolution,验证未授权零探测、两跳符号链接虚拟环境字面路径保留、macOS 目录符号链接与 Windows 目录联接点指向外部时在探测前拒绝、本机 toolchains/global.json 原子保存与撤销(绝不写工作区 .lithe/)、performedIn 操作轨迹以及中英明暗无头截图 m47/m48;Windows 实机与完整原生 GUI 工作流保持 pending。", + "verification": "共享 Core:cargo test --manifest-path rust/Cargo.toml -p lithe-core --lib toolchain,核对定义独占与官方短 ID、第二种通用工具、旧候选边界、答案身份/代次、Windows 路径大小写、工作区排除、固定值失效不回落、最近项目要求、冲突选择、最低版本、环境隔离和纯声明扫描;按逐项计时工具生成 HTML/JUnit。macOS 继续补齐下列消费者与保存验收,Windows 须先实现对应 adapter:启动提供方并协商、取消/超时和过期结果隔离、输入新建/删除后整体重查、目录固定保存/取消/冲突回读、插件停用撤回、真实 Build/LSP/Run 消费者取得同一选择、发行目录哈希不变与子进程清理。未完成原生流程前保持 pending,不以 Core 测试代替实机验证。 提供方查询:cargo test -p lithe-core --lib toolchain(含 lsp 引擎脚本后端:只有插件后端被提供 litheToolchains、未协商的提供方不写请求、错误回复原样返回;别名链接只有链接路径事实时仍选中规范 home);MacToolchainDiscoveryTests 用真实临时目录与注入的查询验证全局与目录查询各带独立 operationID/代次、链接 home 规范化、工作区内 home 整份拒绝;ToolchainSettingsFeatureTests 验证监视文件连续变化只重载一次、外部输入观察随关闭释放。真实 mise 插件端到端尚未在应用内验证。 原生布局回归 ToolchainSettingsLayoutTests:同一设置宿主按900/1180/1400/900重复缩放,真实分隔条拖动;来源页按500/666/946/500缩放,检查AX控件边界、卡片不重叠、选择和快照不改变。此几何验证不代表提供方查询或保存功能已完成。 声明式扫描 MacToolchainDiscoveryTests:真实临时目录、注入的用户目录与探测,覆盖 homeLayouts 首个匹配、隐藏与未匹配条目、链接到工作区的条目不探测、只探测 Core 返回的可执行文件、同版本冲突、被拒声明不扫描,以及隔离预览样例清单通过 Core 准入;不运行本机安装的工具。 固定集成新增 MacToolchainDiscoveryTests 的运行前解析回归和 MacBuildToolResolverTests,验证两个目录使用各自 pin、最低版本、独立环境与失败不回落;RunLaunchEnvironmentTests 证明操作返回值不会留下共享执行许可槽。该测试不是完整应用 UI 验收。 生产准入回归 installedToolDeclarationsPassTheProductionHostAdmission 经 RustDeclarativePluginOperations 验证工具定义和提供者。Build PATH 保留声明的附加目录,拒绝空目录项。 Windows 原生解析基础:lithe-project::defined_toolchain 逐项计时覆盖两个工具、声明式扫描、固定目录、最近继承、同版本冲突、最低版本、显式 Wrapper、输入撤销及宿主秘密不进入 RPC。真实 Windows 命令包装和进程清理继续由现有 CI 验证;准入仍关闭。 本次回归另核对同目录两个 Run 独立选择、团队/本机逐项合并和显式清空、私有环境隔离、失效固定值不回落、工作区启动器被动零探测,以及未知默认值迁移失败保留源文件。 本批显式 LITHE_TEST_NODE 驱动真实 Core/Node 会话,逐项计时覆盖单次协商、多次查询、原始错误、无协商拒绝、静默超时、后端意外退出与撤销清理;原生解析验证查询与当前事实、来源在探测中变化及稳定模型摘要。安装状态按 plugin/operation/workspace 隔离且不可跨工作树复制。 #1581 最终合入回归包含固定值与未扫描目录、同轮次/上下文、冲突及提供方超时和不可用的来源展示。 通用默认增量:更改工作区工具 home 后,消费者继承读取新值,按 Run 固定值保持独立;失效明确路径不回落,来源在探测期间改变或越出工作区时拒绝。旧编辑保存保留通用偏好,显式空 v1 文档清除。矩阵保持 pending,未把手写测试文档当成设置页或旧配置迁移验收。 macOS Build 偏好编辑:ToolchainPreferencesTests 验证打开/草稿/取消/空重置不建文件、明确保存/回读与权限保留、外部冲突保留原始草稿基线、仅偏好文档不阻断旧默认迁移、缺失子目录的父链接/最终链接/只读安装目录拒绝及主动取消;原生 Save/Reset 按钮在深浅主题通过实际存储执行。ToolchainSettingsLoaderTests 验证使用方来自当前 Core invocation 并随停用撤回。运行全量 Core 与相关 macOS 逐项计时;完整产品、全局默认、旧消费者和 Windows 设置页仍待验收。 tool 引用验证:共享 fixture/Core 覆盖最近通用目录、根目录、跳过父消费者、目录与工作区默认变化、显式 Run 优先和禁止通用工具反向引用;MacToolchainDiscoveryTests 与 lithe-project::defined_toolchain 的真实临时安装/注入探测验证运行前重读,不冻结安装路径。 本机目录/重载回归覆盖仅消费者偏好、父目录连接、重置撤回、链接/非法层级拒绝、单次重试与可刷新错误、未修改表单更新、冲突草稿保留及自身保存通知不等待/撤销保存。该集成不代替完整 GUI。 运行前来源审计 missingPreferenceLeafBehindAParentAliasIsRejectedBeforeToolWork 覆盖两级父目录及存在/悬空链接,四种情况均在工具探测前拒绝。 ToolchainPluginAdmissionTests 使用正式契约 fixture 与真实 Core 验证市场可安装、完整安装审查、清单加载,以及无后端纯工具定义插件的启用模块和工厂登记;本地编译验证不代替真实 mise 与 Windows 工作流验收。 2026-11-02 本机 Swift 6.4.2:准入、后端、发现和加载器 42 项通过,新增两个准入用例分别 4/6 ms;Swift 6.3.3 在本机 Xcode 27.2 SDK 下编译依赖清单崩溃,不能作为固定工具链通过。真实 mise 0.2.1 发布包 SHA-256 与市场一致,Core 证明修复前 unsupported、修复后 available;真实后端完成协商、查询并停止销毁,当前环境未安装 mise,查询真实返回 miseNotFound,未验证安装列表和应用内工作流。 增补来源保存验收:不存在的 pin 重置不创建状态;拒绝逃出工作区的符号链接/junction;有界 UTF-8 与重复键、未知字段和 dormant pin 校验;Git 后续否定规则、换行/评论/权限保留;公开字节基线不可替代私有快照;已提交但回读失败必须重新加载后才能重试。 Viva 全局 SDK 页:运行 TestVisualSettings/33-settings-toolchains,使用 en、zh-Hans 和 dark/light 的生产无头窗口,核对无项目模式、自动实际值、多版本登记与全局默认选择。通过 run-go-tests-with-timing.mjs 记录单测试 HTML/JUnit;desktop-ci 的 macOS/Windows 每次上传四张图和计时报告。2026-11-15 本机 macOS 与 Windows 11 ARM64 来宾的 GNU x64 系统仿真均通过两个语言各 3 个计时结果,Windows 49 个 SDK/来源/诊断/资源定向用例通过;该证据不替代工具提供方与完整产品工作流验收,整体保持 partial/pending。 Windows #2042:TestToolchainCandidatesUseNativeShellPathsInUserProfiles 以真实 PATH 查找、真实有界版本进程和 Core 候选规则,覆盖 PATH-only/环境变量-only 及空格/中文用户目录;合成工具位于扫描目录之外,全局登记使用私有根。 通过现有 Windows CI 的 scripts/desktop/check.sh 运行;本机逐项计时报告覆盖这些合成场景,完整原生界面验收仍保持 pending。 2026-11-18(#2122):使用 dev.lithe.test.* 合成工具清单运行 TestUntrustedProjectEnvironmentNeverProbesWorkspaceExecutables、TestTrustedWorkspacePersistsInLocalSettingsOnlyAndResolvesSymlinkedVenv、TestTrustedWorkspaceResolvesSubdirectoryEnvironmentAndRejectsEscapingDirectories、TestProjectToolchainTrustSwitchGrantsAndRevokesImmediately 与 TestWorkbenchToolchainTrustPersistsLocallyLogsActionAndEnablesRuntimeResolution,验证未授权零探测、两跳符号链接虚拟环境字面路径保留、macOS 目录符号链接与 Windows 目录联接点指向外部时在探测前拒绝、本机 toolchains/global.json 原子保存与撤销(绝不写工作区 .lithe/)、performedIn 操作轨迹以及中英明暗无头截图 m47/m48;Windows 实机与完整原生 GUI 工作流保持 pending。 自忽略回归:TestSavePinIgnoresGeneratedFileWithoutHidingSharedFiles 经真实 Core 和 SavePin 写入,用隔离全局配置的 Git check-ignore 核对 .lithe/.gitignore 与本机 pin 被忽略、共享配置和嵌套 .gitignore 未被忽略;现有保存测试继续核对 CRLF、后续否定规则、权限和无变化保存。Core 与桌面桥接共同执行 toolchain-pin-storage fixture 的 BOM、已生效规则、否定规则与无变化来源场景;两个原生平台完成对应流程前保持 pending。", "notes": "Viva:共享 Core toolchain 命令已接入 desktop/internal/core/toolchain.go;声明式扫描、文件事实、有界版本探测、toolchains.candidates/resolve 与目录 pin 保存位于 desktop/internal/toolchain/ 并有真实 Core 测试;设置窗口 Build 页可按插件声明展示工具、生效值与来源,显式 Save/Reset 写 .lithe/toolchains/local.json,Cancel 不写;Build 命令和 Provider Run 的 toolchain 候选使用 Core 解析出的可执行文件、环境导出和 PATH。提供方后端查询的现行证据见 plugin-toolchain-providers;本条 Windows 与完整 GUI/原生工作流仍保持 pending。 本轮通过外部 Core Draft PR #3 的精确提交接入 toolchains.editPins:平台不再编辑 pin schema;Core/Go 共用 fixture、批量保存和取消/外部并发修改回归通过。命令型 Tests 同样消费解析后的工具链环境。原生 Windows、提供方工具查询、完整 GUI 与发行验收仍 pending。 Windows 原生回归确认保存前后的文件模式以及真实访问控制描述符(所有者、组、DACL/继承保护)保留;元数据先准备到临时文件,再核对取消/冲突并原子发布。此证据不代表提供方查询或 GUI 已验收。 Viva 设置保存前核对读取项目的原生目录身份;项目关闭或切换后旧草稿拒绝写入,已确认保存的发布与回读固定捕获来源。冲突通过共享 i18n 显示并保留草稿,加载/保存失败进入目录日志;macOS 先失败后通过的回归已有计时,新增作用域行为的 Windows 验收尚未执行。 Windows 原生探测统一 Core 正斜杠路径与本机反斜杠/大小写别名,防止重复事实使目录 pin 解析遭拒绝;选择与校验规则仍由原有 Core 决定。 全局 SDK 登记与默认值可在未打开项目时编辑;项目范围保留独立覆盖,读取不创建文件,确认保存后按实际探测回显。新增合成工具原生与无头测试,不改变历史完整验收状态。 Viva 2026-11-16:Build 页每个工具改为一个下拉框,默认回显当前选择(未固定时为“自动(实际目录)”),列出识别到的其他安装、已保存固定值和已校验目录;选“自定义…”才显示目录输入、浏览和“使用此目录”,校验通过后该目录成为列表项并被选中。无版本的安装不可选,在列表下以说明文字列出。自动化:TestToolchainListShowsAutomaticAndHidesTheDirectoryUntilCustom 及原有草稿/保存/冲突用例;截图 TestVisualSettings/33-settings-toolchains、m44-toolchain-directory-menu、m45-toolchain-custom-directory。原生验收仍 pending。 Viva 2026-11-16(#2032):toolchains.candidates 改为同时接收宿主找到的 PATH 命令所在目录(commandHomes),JAVA_HOME 等声明变量和 PATH 上的安装校验通过后以 host:shell 并入安装列表并按规范目录去重,新建项目的工具选择、设置页和运行配置因此能选到只配置在 PATH 或环境变量上的 JDK;自动层的选择不变。Core 回归 toolchain_candidates_offer_shell_homes_that_no_discovery_scan_covers(Lithe-core-rust#67),宿主回归 TestShellHomesAreInstallationsWithoutADiscoveryScan;两者都确认修复前失败。Windows 0.8.0 实机复现了缺陷,修复后的完整 Windows 客户端尚未实机验收,状态保持 pending。 Viva 2026-11-18(#2122):prepareTool 沿工作区祖先链观测 discoveryPlan 返回的 projectFiles、requires、home、中间父目录、pathPrepend 及软链目标;probeAll 在 ProjectCodeAllowed 为 false 时拒绝探测任何工作区内可执行文件;本机信任记录经 Core catalogState/editCatalog 保存在应用用户设置目录 toolchains/global.json,设置页项目作用域提供带 ⓘ 说明的显式信任开关并立即回读生效值,工作台 resolveToolchainSelection 同步读取同一本机信任状态。 Viva 2026-11-18(构建设置重构):工具链页按 docs/design/build-execution-settings.html 重做为“全局默认 / 当前项目”两个作用域、按类别或插件分组、需处理与已手动指定过滤,列表与详情两栏;详情显示当前生效的程序、版本与来源标签和安装列表(自动、发现的安装、手动目录),项目作用域在未信任时显示信任提示。筛选、分组和计数由 Core 设置投影(Lithe-core-rust#99)给出,一个插件可以注册多个 SDK。固定值本身不再算一个来源标签,只有其目录不在其他来源中时才标出提供方。自动化:toolchains_view_test.go、TestVisualSettings 的 33、m44–m49 场景。原生与 Windows 验收仍 pending。 Viva 2026-11-23(#2316):工具定义可写 executableLinksOutsideHome(toolDefinitions 0 内的补充,Lithe-core-rust#177),项目外虚拟环境、Homebrew 式安装里链接到主目录外的程序可被固定、经 homeVariable 或发现规则选中,探测与启动用主目录下的布局路径;observeToolHome 改为沿布局路径观测各级目录与链接目标,Core 才能核对中间目录留在主目录内。宿主回归 TestAnEnvironmentProgramLinkedOutsideItsHomeStartsFromItsLayoutPath 用真实符号链接验证选中布局路径、导出指向环境,没有字段时仍拒绝,旧观测下以 unsafePath 失败;Windows 环境的 Scripts\\python.exe 不是链接,未在 Windows 实机验证,原生与完整工作流仍 pending。", "legacy": { "revision": "5a54c41aa37a4e6e6b68918a4b05765b9dd07a36", diff --git a/shared/platform-feature-matrix/features/settings-about-page.json b/shared/platform-feature-matrix/features/settings-about-page.json index cf50b1b95e..5a1ecdbb83 100644 --- a/shared/platform-feature-matrix/features/settings-about-page.json +++ b/shared/platform-feature-matrix/features/settings-about-page.json @@ -51,6 +51,6 @@ }, "owner": "Settings", "releaseSource": "只有 Desktop Release 为 desktop-v<版本> 标签的提交打包时传 package-desktop.sh --stable(lithe_stable 构建标签),应用内显示不带“预览版”的版本号,package-release.sh 校验每个打包程序都带这个标签;desktop-AutoBuild、本地打包和 go run 都显示“<版本> 预览版”。", - "verification": "发布验收:在 macOS 和 Windows 的正式包中核对欢迎页、关于页和复制的版本信息均与对应桌面发布标签的版本号一致,且均无预览版标识;版本信息和复制内容里的 Go 运行时与 desktop/go.mod 的 toolchain 行一致;同版本的本地构建仍显示预览版。无头窗口测试覆盖:关于页排在 AI 之后、面包屑只有“关于”;预览版显示“0.7.0 预览版”;QQ 群、Issue、Rust Core 和 Viva 上游链接打开对应地址;复制成功与失败(失败时显示原因并上报);版本信息与更新卡片“已是最新”在正式版和预览版下的文字;复制内容与平台、构建、运行时的读取(打包写入的提交与时间优先,含未记录提交和时间不可读)。macOS 生成了中英文、浅色和深色的无头截图(36-settings-about,以及滚到项目卡片的 36-settings-about-projects)。运行 scripts/desktop/desktop-go.sh test -race ./internal/settingswindow ./internal/workbench -run 'TestAbout|TestUpdateLineSays|TestWelcomeTitleAndVersion'。真实窗口、Windows 实机和正式版安装包上的标识尚未验收。 2026-11-23 CI Viva 断言修复:回归 TestAboutPageShowsThePreviewAndCopiesTheFacts、TestWorkbenchDefaultLayout,验证文字叶节点不使用 KeyInt、工具栏弹性占位由容器承担身份,功能与位置保持不变;macOS/Windows 原生验证仍 pending。", + "verification": "发布验收:在 macOS 和 Windows 的正式包中核对欢迎页、关于页和复制的版本信息均与对应桌面发布标签的版本号一致,且均无预览版标识;版本信息和复制内容里的 Go 运行时与 desktop/go.mod 的 toolchain 行一致;同版本的本地构建仍显示预览版。无头窗口测试覆盖:关于页排在 AI 之后、面包屑只有“关于”;预览版显示“0.7.0 预览版”;QQ 群、Issue、Rust Core 和 Viva 上游链接打开对应地址;复制成功与失败(失败时显示原因并上报);版本信息与更新卡片“已是最新”在正式版和预览版下的文字;复制内容与平台、构建、运行时的读取(打包写入的提交与时间优先,含未记录提交和时间不可读)。macOS 生成了中英文、浅色和深色的无头截图(36-settings-about,以及滚到项目卡片的 36-settings-about-projects)。运行 scripts/desktop/desktop-go.sh test -race ./internal/settingswindow ./internal/workbench -run 'TestAbout|TestUpdateLineSays|TestWelcomeTitleAndVersion'。真实窗口、Windows 实机和正式版安装包上的标识尚未验收。 2026-11-23 CI Viva 断言修复:回归 TestAboutPageShowsThePreviewAndCopiesTheFacts,移除文字叶节点上的 KeyInt 并保持原有 ui.Spacer 弹性占位,功能和布局不变;macOS/Windows 原生验证仍 pending。", "notes": "Viva 设置侧栏在 AI 之后增加一级页面“关于”:顶部是图标、名称、简介和复制按钮(复制版本、平台、构建与运行时,用于提交 Issue);“版本信息”显示版本、平台、构建(提交与日期)和 Go 运行时;“更新”是完整的更新设置:自动检查更新、更新渠道、发布源(保存与恢复默认)和立即检查,不再重复当前版本与构建;“加入交流”有 QQ 群 163027877 与微信群(飞书页面);“项目”有源码仓库、Issue、Rust Core(Lithe-IDEA/Lithe-core-rust)和 Viva 上游(vivaui/viva,图标是 Viva 标志,由 generate-desktop-icons.sh 从固定版本的 Viva 源码编译)。不显示 Core C ABI 版本。版本号来自 desktop/viva.toml;Go 运行时是 runtime.Version(),即构建所用的工具链,CI 的 setup-go 按 desktop/go.mod 的 toolchain 行安装;欢迎页、关于页和复制内容都按同一规则显示正式版或预览版。2026-11-18:外观与行为下的独立“更新”页删除,更新设置整体迁入关于页。" } diff --git a/shared/platform-feature-matrix/features/workbench-tool-stripe-icons.json b/shared/platform-feature-matrix/features/workbench-tool-stripe-icons.json index 1d72374c61..5cde641dc5 100644 --- a/shared/platform-feature-matrix/features/workbench-tool-stripe-icons.json +++ b/shared/platform-feature-matrix/features/workbench-tool-stripe-icons.json @@ -5,7 +5,7 @@ "capability": "工具窗口栏使用 IntelliJ New UI 的工具窗口图标和尺寸", "owner": "Workbench", "notes": "Viva 共享实现。项目、提交、结构、查找、Git、终端、问题、运行、调试、构建、通知、服务使用 IntelliJ Community(Apache-2.0,修订 c7f91397daa3a961b4e78bc634fe467a0a7d9ade)的 20×20 New UI 工具窗口图标,许可见 desktop/internal/toolicons/NOTICE;IDEA 没有对应图标的入口(引用、测试、安全、背景)和隐藏入口列表的“…”使用 Lucide 图标,描边减到 1.8 以接近 IDEA 的线宽;插件声明的通用工具图标名映射到同一套图标。icons.go 由 scripts/desktop/generate-desktop-file-icons.sh --tools-only 从 SVG 生成,运行时不读写文件。尺寸:40pt 工具栏、30pt 按钮、20pt 图标、10pt 间距。", - "verification": "打开工作区,对照 IntelliJ IDEA New UI 检查左右工具窗口栏:图标形状和大小一致,选中按钮为主题主色圆角底配反色图标;拖动按钮时拖动预览里的图标居中,插入线落在两个按钮正中。浅色和深色主题各看一次。自动化:stripe_test.go 的 TestToolStripeButtonsHaveTheToolWindowBarSizes。 2026-11-23 CI Viva 断言修复:回归 TestAboutPageShowsThePreviewAndCopiesTheFacts、TestWorkbenchDefaultLayout,验证文字叶节点不使用 KeyInt、工具栏弹性占位由容器承担身份,功能与位置保持不变;macOS/Windows 原生验证仍 pending。", + "verification": "打开工作区,对照 IntelliJ IDEA New UI 检查左右工具窗口栏:图标形状和大小一致,选中按钮为主题主色圆角底配反色图标;拖动按钮时拖动预览里的图标居中,插入线落在两个按钮正中。浅色和深色主题各看一次。自动化:stripe_test.go 的 TestToolStripeButtonsHaveTheToolWindowBarSizes。 2026-11-23 CI Viva 断言修复:移除 ui.ContextMenu 等非消费调用上的 Key/Part 传递,保留原有 ui.Spacer 弹性占位,避免 Context 身份泄漏到后续 Spacer 节点并消除叶节点/未消费 Part 断言;macOS/Windows 原生验证仍 pending。", "macos": { "implementationStatus": "implemented", "verificationStatus": "pending",