Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
7813de8
fix(viva): avoid named keys on text and spacer leaf widgets
lithe-support[bot] Nov 23, 2026
ca7928c
fix(viva): remove identity keys from static text, paragraphs, and wraps
lithe-support[bot] Nov 23, 2026
bd45c11
fix(viva): use keyed growable containers instead of unnamed Spacer le…
lithe-support[bot] Nov 23, 2026
b065c3f
fix(viva): leave breadcrumb, toolbar, and keyed-row text and icons an…
lithe-support[bot] Nov 23, 2026
b71d3bc
fix(viva): eliminate keyed leaf widgets in run, remote, and tab views
lithe-support[bot] Nov 23, 2026
b77b41e
fix(viva): avoid keyed text and icons in run config, notifications an…
lithe-support[bot] Nov 23, 2026
b240b8d
fix(viva): complete keyed leaf cleanup in settings and remaining work…
lithe-support[bot] Nov 23, 2026
8451d50
fix(viva): remove unused loop indices after leaf key cleanup
lithe-support[bot] Nov 23, 2026
d3d45b6
fix(viva): avoid leaf identity keys on remote and configuration displ…
lithe-support[bot] Nov 23, 2026
ee9d7b8
fix(viva): preserve parent context for keyed rows and drop unused loo…
lithe-support[bot] Nov 23, 2026
3582319
fix(viva): remove unused hex row index after anonymous text migration
lithe-support[bot] Nov 23, 2026
6817bb2
fix(viva): use anonymous leaf text in keyed modal and list rows
lithe-support[bot] Nov 23, 2026
18f3b29
Merge remote-tracking branch 'origin/main' into lithe-support/ci-viva…
1lck Nov 23, 2026
b424232
fix(viva): upgrade fork pin, fix remaining key leaks, and absorb #232…
1lck Nov 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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。
Expand Down Expand Up @@ -86,6 +87,7 @@ Windows 的工具发现和构建模型测试要保留两条真实本机边界:
- **单独为每次查询启动一份提供方进程。** 同一插件同时提供语言配置和工具链时,进程启动与初始化会重复。共享后端可在同一连接中区分操作,并由同一个插件生命周期释放。
- **每次都重新向提供方请求。** 工具选择会在设置和多个运行入口反复执行。采用短期有界缓存和原生观察,输入变动时重查,空闲时无需轮询。
- **在宿主 CI 下载真实插件和工具做 Windows 回归。** 会引入具体插件依赖、网络与安装布局,不能稳定控制失败形态;宿主只测试合成工具的通用流程,真实工具在插件仓库验收。
- **忽略整个 `.lithe/`,或在每次读取时补写 `.gitignore`。** 前者会隐藏应由团队共享的配置,后者破坏只读加载和无变化保存的约束。自忽略只在既有的来源维护计划中补齐,并由现有原子写入适配器执行。

## 后果

Expand Down Expand Up @@ -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 时不把它记作已通过。
4 changes: 2 additions & 2 deletions desktop/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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
4 changes: 2 additions & 2 deletions desktop/go.sum
Original file line number Diff line number Diff line change
@@ -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=
Expand Down
3 changes: 3 additions & 0 deletions desktop/internal/fileicons/icons.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions desktop/internal/fileicons/icons_tree.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion desktop/internal/pluginview/canvas.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions desktop/internal/pluginview/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/ai_generation_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
22 changes: 11 additions & 11 deletions desktop/internal/settingswindow/build_directory_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
})
Expand Down Expand Up @@ -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()
Expand All @@ -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.Spacer(k)
ui.Text(k, "›").FontSize(buildSmall).Color(colors.text).Shrink(0)
ui.Spacer(c)
ui.Text(c, "›").FontSize(buildSmall).Color(colors.text).Shrink(0)
})
}
if view.Counts.Problems > len(view.Issues) {
Expand Down Expand Up @@ -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)
Expand All @@ -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)
})
}
})
Expand Down
4 changes: 2 additions & 2 deletions desktop/internal/settingswindow/build_kind_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions desktop/internal/settingswindow/build_style.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
14 changes: 7 additions & 7 deletions desktop/internal/settingswindow/command_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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)
}
})
})
Expand All @@ -523,8 +523,8 @@ 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)
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)
})
Expand Down
Loading
Loading