Skip to content

fix(desktop): 同步 Viva 上游 df223f97,固定 fork d71b14c6 - #2540

Merged
1lck merged 1 commit into
mainfrom
fix/sync-viva-df223f97
Nov 30, 2026
Merged

1lck merged 1 commit into
mainfrom
fix/sync-viva-df223f97

Conversation

@1lck

@1lck 1lck commented Nov 30, 2026

Copy link
Copy Markdown
Owner

关联 Issue / Linked issue

PR 类型 / Type

  • fix:缺陷修复

改动说明 / What changes

背景 / Why

桌面端发版(desktop-v0.8.22)前需按 release-lithe 与 2026-11-11-viva-fork-maintenance-and-commit-pin.md 同步 Viva 上游并清点 fork 未合入补丁:此前 Lithe-IDEA/Lithe-viva main 落后 vivaui/viva main 15 个提交,且 fork 尚有未合入的 PR #81(Windows WebView2 原生消息投递)。

改动 / Changes

  • 同步 Lithe-IDEA/Lithe-viva:通过 merge commit PR Lithe-IDEA/Lithe-viva#82 将 vivaui/viva 上游 df223f971192 合入 fork main(并确认 tag 与上游完全一致),随后验证并合入 fork PR Lithe-IDEA/Lithe-viva#81,fork main 更新至 d71b14c669bd。
  • 更新 desktop/go.mod 与 desktop/go.sum:require 升至 v0.6.11-0.20261130044453-df223f971192,replace 升至 github.com/Lithe-IDEA/viva v0.6.11-0.20261130071102-d71b14c669bd。
  • 更新 shared/platform-feature-matrix/features/plugin-web-tool-windows.json:记录新固定 Viva 版本及 PR add: add comments to the rust core #81 引入的 Windows WebView2 原生消息投递变更说明(实机 WebView2 CSP 与导航验收仍保持 pending)。

Viva 同步报告

  1. 基线
    • 同步前:fork main 68d1a34e4abe(v0.6.11-0.20261129154924-68d1a34e4abe),上游基线 a3ba5df6ba40(v0.6.11-0.20261129062444-a3ba5df6ba40)。
    • 合入上游范围:a3ba5df6..df223f97(共 15 个提交),同步 PR Lithe-IDEA/Lithe-viva#82 以 merge commit 合入。
    • 同步后:fork main d71b14c669bd(v0.6.11-0.20261130071102-d71b14c669bd),上游基线 df223f971192(v0.6.11-0.20261130044453-df223f971192)。
  2. 上游带来的主要变化(affecting Lithe)
    • 文本选择支持多击(词/行)与 Shift+点击扩展选区(bf27870b、d0bc7dee、1ae779f9)。
    • Windows 菜单助记键首次按键投递修复(df223f97,vivaui/viva#515)、无连字渲染时保持单字形单格(405e1b61)、Windows OpenWith 窗口前置(5ff87fab)、Windows WebView 自定义 scheme 路径与源保留(77f6ae74,vivaui/viva#510,与 fork Fix staging/unstaging of files in changes group checkbox #80 相同)。
    • ColorPicker 面板摆脱滚动裁剪(26c2022b)、List 新行滚动展示不再盖住下方行(e8ba9843)、TextArea ShowCount 位置修复(9fc9d19f)、Sticky 吸顶支持(000af633)、CodeMerge 冲突计数导航(b1aaeb70)及 Config.OnShow / Windows 提权能力。
  3. 我们自己的补丁状态
    • 已进入上游(本次重合):fork PR #80(d8ef7a93)对应的上游 vivaui/viva#510(77f6ae74)已合入上游 main。
    • 本次新合入 fork main:Lithe-IDEA/Lithe-viva#81(fix(windows): deliver WebView messages through the native channel,作者 @WhiteZeek),对应上游 vivaui/viva#516 已由作者于 2026-11-30 关闭,当前仅保留在 fork main。
    • 仍在 fork 的既有补丁:包括 rowBackground 连续树着色(f031d0df)、markdown 索引与程序化构建(a311b108、097bdbd4)、Windows 目录替换监听(8d5bd50e)、TooltipOn / EllipsisTooltipOn 扩展及既有窗口/菜单/滚轮/列表键校验补丁,均保持可合并无冲突。
  4. 冲突
    • 无合并冲突(git merge upstream/main 与 gh pr merge 81 均无冲突)。
  5. [Feature] 在 Lithe-IDEA/viva 补齐输入框禁用/只读、Tree 横向滚轮与行内 label、Splitter 按键路由,移除 Lithe 的对应绕过代码 #1821 绕过代码复核(基于同步后源码核对)
    • 第 1 项(输入框 Disabled):框架已支持;Lithe 侧「忙碌时不可输入」测试与变灰外观验收仍待补,保持不变。
    • 第 3 项(Tree 横向滚轮):base/tree.go 仍无 wheelXRoute / ScrollX,保留 filetree_view.go 的 fileTree.wheel 与转发。
    • 第 4 项(List 过滤纵向主分量):base/list.go 的 ListWheelX 仍只要 DeltaX != 0 即横向滚动,保留 editor_view.go 的 verticalWheel。
    • 第 5 项(Splitter 方向键与终端/编辑器快捷键路由):base/control.go Handlers 仍无 chord 钩子,且 editor_view.go 的 splitterKey 同时负责持久化尺寸变化,保留现有实现。

不在本 PR 范围内 / Out of scope

  • #1821 剩余第 1、3、4、5 项待后续上游能力齐备后清理。
  • Windows 实机 WebView2 CSP 与 PR add: add comments to the rust core #81 原生消息投递整机验收(已在 plugin-web-tool-windows.json 保持 pending)。
  • desktop/internal/workbench/agents.go:207,220 既有的 2 处 viva vet kept-context 提示(origin/main 已存在,不在本依赖升级 PR 中顺手重构)。

类型专属:fix

复现与根因

  • 复现步骤、实际结果、期望结果:无用户可观察缺陷本身;发版前需同步 Viva 上游并更新 Lithe 固定 commit(此前 fork 落后上游 15 个提交且有 1 个 open PR add: add comments to the rust core #81)。
  • 根因(引入该行为的提交或 PR):正常上游演进与发版前同步周期。
  • 影响平台:跨平台(macOS、Windows、Linux)。

检查项


范围检查 / Scope checks

功能矩阵 / Feature matrix

  • 已更新 shared/platform-feature-matrix/features/plugin-web-tool-windows.json:如实记录 Viva 新固定版本与 PR add: add comments to the rust core #81 状态,Windows 原生验收保持 pending。
  • 已运行 ./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh 和 ./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD。
  • 没有提交 .artifacts/ 下生成的矩阵视图。

插件归属 / Plugin ownership

  • 已在仓库根目录运行 develop-lithe 第三节“插件归属与宿主零依赖”的自查命令,结果为空。
  • [N/A] 新增或修改的测试只使用测试内联的合成插件、Core 契约 fixture 或插件市场索引快照:本 PR 未新增测试。
  • 没有为具体插件提供的能力新建或更新宿主功能矩阵条目。
  • 插件文案没有写进 shared/i18n/;插件的构建步骤、资源路径和补丁没有写进 docs/ci-builds.md、Agent Note 或 Skill。
  • [N/A] 修改了通用扩展点、可能影响已发布插件的,已在受影响插件的仓库运行它的测试:未修改通用扩展点。

UI 验证 / UI evidence

N/A:本次未改动 Lithe 界面布局、控件、样式或文案。

统一日志系统 / Structured logging

N/A:未新增或修改生命周期、错误边界或日志事件。

界面文案 / i18n

N/A:未新增或修改任何界面文案。

逻辑归属 / Logic placement

N/A:仅更新 Go 依赖固定版本与功能矩阵文档记录,未在平台层新增或修改业务逻辑。

性能与内存 / Performance and memory

N/A:未新增后台任务、子进程、缓存或依赖项。

设置 / Settings

N/A:未新增或修改设置项。

插件契约 / Plugin contract

N/A:未修改 Rust Core 插件契约或 PINNED_CORE_REVISION。

发行包与资源 / Bundle and resources

N/A:未新增或修改运行时资源或构建下载步骤。

无用代码与重构 / Dead code and refactoring


验证 / Verification

命令或操作 平台 结果
Lithe-viva: GOOS=windows GOARCH=amd64 go build ./... & arm64 go build ./... Windows (交叉编译) 通过(fork main d71b14c6)
Lithe-viva: go vet ./... & GOOS=windows GOARCH=amd64 go vet ./... macOS / Windows 通过
Lithe-viva: go test ./...(同步后)& go test ./internal/platform/...(PR #81) macOS 除 cmd/viva 夹具 min_system=12.0 与本机 Go 工具链 13.0 不匹配(在未修改 upstream/main df223f97 上完全复现)外,其余全包通过
./scripts/desktop/desktop-go.sh test ./... macOS (arm64) workbench(400.37s)及全部 UI/Core 包通过;4 个非 UI 包在并发高负载下超时后已单独串行(-p 1)通过:cli(2.71s)、loginenv(0.74s)、pluginservice(39.90s)、localshell(重置工具子壳忽略的 SIGHUP 为 SIG_DFL 后 7.56s 全包通过)
./scripts/desktop/generate-desktop-icons.sh & generate-desktop-file-icons.sh macOS (arm64) 通过,git diff 为空
./scripts/desktop/desktop-go.sh --exec go run github.com/vivaui/viva/cmd/viva vet ./... macOS (arm64) 仅 desktop/internal/workbench/agents.go:207,220 报 2 条 origin/main 既有 kept-context 提示(未在本 PR 改动)
./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh macOS 通过(validated 230 platform capabilities)
./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD macOS 通过
插件零依赖 rg 自查 macOS 结果为空,通过

未能执行的检查和原因:

  • Windows 实机 go test 与 WebView2 原生 CSP/消息投递验收(当前在 macOS 主机,交由 GitHub Actions Windows CI 与后续实机验证)。
  • Lithe-viva JS/Wasm 桥接测试(本机缺少 go_js_wasm_exec)。

提交前确认 / Final checks

  • 分支从最新的 main 创建;目标分支:main
  • 以 Draft 提交,本地验证通过后标记 ready
  • 没有无关改动,没有提交 .build/、target/、dist/、.artifacts/ 等产物
  • 本次构建或测试没有遗留 Lithe 进程

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 3 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

@1lck
1lck merged commit 3ab9e0f into main Nov 30, 2026
7 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: high ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant