Repository navigation
fix(desktop): 同步 Viva 上游至 d354e3c8(上游 39376802)并更新固定版本 - #2235
Merged
Merged
Conversation
1lck
marked this pull request as ready for review
November 20, 2026 11:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
为桌面端
desktop-v0.8.11发版执行.agents/skills/release-lithe/SKILL.md与.agents/notes/implemented/process/2026-11-11-viva-fork-maintenance-and-commit-pin.md规定的发版前 Viva 上游同步流程。将Lithe-IDEA/Lithe-viva的main与vivaui/viva:main(39376802)对齐后,更新desktop/go.mod与desktop/go.sum固定到最新 forkmain。改动 / Changes
desktop/go.mod、desktop/go.sum:require github.com/vivaui/viva从v0.6.7-0.20261120014117-f5b634bbcebf升至v0.6.7-0.20261120083913-39376802ea2b(上游基线39376802ea2b521b86191bcc4a9501f965ae837d)。replace github.com/vivaui/viva从github.com/Lithe-IDEA/viva v0.6.7-0.20261120025921-46b10fdfd80d升至github.com/Lithe-IDEA/viva v0.6.7-0.20261120105529-d354e3c8f5c5(fork PR Lithe-IDEA/Lithe-viva#49 以 merge commit 合入后的maind354e3c8f5c57b78abbbfe1715d92dfd0a8ea562)。Viva 同步报告(按 2026-11-11 Note 要求)
main:46b10fdf(基于上游f5b634bb)。f5b634bb..39376802(10 个提交:2d33a5f6Linux Wayland 文档、1110807emacOS 文档 URL 打开处理、59095f9e焦点陷阱滚轮屏蔽、a0ee8867方头路径端点绘制、eafe4206List 滚轮偏移限制、798e0b9fmacOS 文本标签非法 UTF-8 替换、c7d5db50Windows message-only window 唤醒、74a0bffbOLE 文件拖出、81d10812ColorPicker 面板层级、39376802Select 图标宽度测量)。main:d354e3c8f5c57b78abbbfe1715d92dfd0a8ea562;desktop/go.mod新固定伪版本v0.6.7-0.20261120105529-d354e3c8f5c5;上游 tag 与 fork 保持一致(无新增缺失 tag);git merge-base --is-ancestor upstream/main main验证通过。59095f9e)、Select 带图标时的自动测量计入图标宽度(39376802)、Windows 使用 message-only window 唤醒Post(c7d5db50)、macOS 标签替换无效 UTF-8(798e0b9f)以及app新增系统文件拖出(74a0bffb)。现有桌面端调用点无需修改即可兼容编译与测试。eafe4206已将 fork PR fix: restore Maven project detection #47(909139da,即vivaui/viva#357ui: clamp List wheel offsets to the measured extent)正式合入上游main;Lithe-vivaPR w3多终端 #49 采用--merge合入后无冲突、历史完整保留。fix/popover-wheel-stays-in-panel即vivaui/viva#349等)继续保留在 forkmain。base/scroll.go(上游59095f9e为ScrollState添加scope gfx.ID并在View.Wheel读取f.Surface.TrappedFocusScope(),而 fork 保留了barStyle ScrollBarStyle与vivaui/viva#349的wheelPanel/wheelArea浮层拦截)。ScrollState字段,保留View.Wheel中panel := f.wheelPanel(...)与f.wheelArea(panel, event)的弹窗浮层拦截,并在wheelArea循环中直接使用上游59095f9e的焦点陷阱拦截逻辑(trap := f.Surface.TrappedFocusScope(),跳过scope != trap的滚动区域),确保View.Wheel与base/page.go的RouteWheel均同时遵守焦点陷阱与浮层拦截;ui相关回归测试全部通过。Lithe-viva源码,[Feature] 在 Lithe-IDEA/viva 补齐输入框禁用/只读、Tree 横向滚轮与行内 label、Splitter 按键路由,移除 Lithe 的对应绕过代码 #1821 剩余 5 项当前仍不可删除:.Disabled(...)(base/box.go:444Disabled仍只作用于 Button/Checkbox/Switch/Tabs)。readOnlyField(plugin_settings_view.go仍需 Viva 原生只读输入框与文本选择支持)。fileTree.wheel(desktop/internal/workbench/filetree_view.go,Lithe-viva中仅List注册p.wheelXRoute = (*Page).ListWheelX,Tree仍无内置横向滚轮路由)。verticalWheel(base/list.go:1240ListWheelX仍对横向滚轮直接应用DeltaX,未见由 Viva 统一接管应用层纵向防斜漂拦截)。Lithe-viva本地运行go vet ./...通过;go test ./base ./ui ./gfx ./components ./app ./update ./internal/...与定向轮询/陷阱测试(TestWheelOverAnAreaBehindATrappedDialogGoesNowhere、TestPopover*、TestListWheelClamps*)全绿通过;GOOS=windows GOARCH=amd64 go build ./...与GOOS=windows GOARCH=arm64 go build ./...均通过;go test ./...除cmd/viva(既有 macOS SDK 版本下 fixturemin_system = 12.0不匹配,以及上游39376802未重生成cmd/viva/templates/select.go.txt)外其余包全部通过;git merge-base --is-ancestor upstream/main main返回 0。不在本 PR 范围内 / Out of scope
desktop/internal/pluginview/render.go:24,140的既有viva vet(kept-context)提示(合入前已存在,本 PR 未修改)。类型专属:fix
复现与根因
.agents/skills/release-lithe/SKILL.md在发布desktop-v0.8.11前同步 Viva 上游f5b634bb..39376802并升级固定版本。git log -S或git blame查):不适用(发版前常规 Viva 上游同步)。desktop/go.mod)。检查项
Lithe-viva与桌面 Go 核心测试套件及交叉编译验证兼容性。Lithe-IDEA现有调用点无需更改,编译与测试全绿。desktop/go.mod,已在 fork 验证 Windowsamd64/arm64交叉编译通过。desktop/go.mod、desktop/go.sum;既有pluginview/render.go:24,140viva vet告警沿自#2220前基线且仓库无refactor标签,未在本 PR 修改。.agents/notes/implemented/bug-fix/记录:行为约束未变。范围检查 / Scope checks
功能矩阵 / Feature matrix
desktop/go.mod/desktop/go.sum依赖固定版本,无用户可观察平台能力新增或变更,附加matrix-exempt标签。./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(validated 218 platform capabilities)与MATRIX_UPDATE_EXEMPT=true ./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD通过。.artifacts/下生成的矩阵视图。插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的rg自查命令,结果为空。shared/i18n/;插件构建资源没有写进文档。UI 验证 / UI evidence
N/A:仅同步 Viva 依赖固定版本,未改动布局、控件、样式或文案。
统一日志系统 / Structured logging
N/A:未新增或修改日志事件、错误处理或降级路径。
界面文案 / i18n
node scripts/i18n/generate-i18n.mjs --check与node scripts/i18n/verify-app-language-localization.mjs验证基线通过(11904/11904)。逻辑归属 / Logic placement
N/A:未新增或修改业务逻辑。
性能与内存 / Performance and memory
N/A:未改动启动、后台任务或渲染热路径。
设置 / Settings
N/A:未改动设置。
插件契约 / Plugin contract
N/A:未改动 Core 或插件契约。
发行包与资源 / Bundle and resources
zsh scripts/desktop/verify/verify-runtime-bundle-immutability.sh通过。无用代码与重构 / Dead code and refactoring
#2220与本 PR 记录desktop/internal/pluginview/render.go:24,140存量提示;因仓库无refactor标签,未在本 PR 顺手改动。验证 / Verification
./scripts/desktop/desktop-go.sh test ./internal/workbench ./internal/editorview ./internal/settingswindow ./internal/buildinfo281.091s、editorview1.130s、settingswindow5.889s、buildinfo2.205s)./scripts/desktop/desktop-go.sh vet ./..../scripts/desktop/generate-desktop-icons.shdesktop/internal/icons/icons.go、viva_mark.go零 diff./scripts/desktop/desktop-go.sh --exec go run github.com/vivaui/viva/cmd/viva vet ./...desktop/internal/pluginview/render.go:24,140kept-context(零新增告警)./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh&MATRIX_UPDATE_EXEMPT=true ...verify-platform-feature-matrix-change.sh origin/main HEADvalidated 218 platform capabilities)./scripts/agent-notes/verify-agent-notes.shok: 189 active Agent Note(s) verified)zsh scripts/desktop/verify/verify-runtime-bundle-immutability.shnode scripts/i18n/generate-i18n.mjs --check&node scripts/i18n/verify-app-language-localization.mjs11904/11904)Lithe-viva:go vet ./...、go test ./base ./ui ./gfx ./components ./app ./update ./internal/...、GOOS=windows GOARCH=amd64/arm64 go build ./...go test ./...中仅cmd/viva因既有 SDK 部署目标与上游未重生成select.go.txt失败)未能执行的检查和原因: 未在 Windows / Linux 本机实机运行桌面测试(本机为 macOS,Windows 交叉编译已在 fork 验证通过)。
提交前确认 / Final checks
main创建;目标分支:fix 为main.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图