Repository navigation
fix(desktop): 固定 Viva 到 fork main 213c78a(同步上游 967a331,含弹出面板滚轮修复) - #2157
Merged
Merged
Conversation
- go.mod 的 replace 从 fork 113224d 升到 213c78a:上游 059256b..967a331 的 11 个提交,以及 fork #40(滚轮落在 Popover、Dialog 或模态 Drawer 上时停在面板里) - fileTree.wheel 的注释不再引用无关的 vivaui/viva#203,改为写明 Tree 不处理横向滚轮 - 新增 TestProjectMenuWheelLeavesTheTreeUnderItAlone:项目菜单上的滚轮不滚动下面的项目树 Refs #1821
1 task done
xiaoyumuxi
marked this pull request as ready for review
November 18, 2026 09:43
12 of 15 tasks
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
准备桌面端 0.8.6。按 Viva fork 维护规则,发版前要把上游同步进 fork
main、合入我们的补丁,再升级 Lithe 固定的 commit,并清理上游已经有新写法的绕过代码。本次 fork
main已经同步完毕:967a331。main现为213c78a。改动 / Changes
desktop/go.mod、desktop/go.sum:Viva 固定版本从 fork113224d(上游059256b)升到 fork213c78a(上游967a331)。require github.com/vivaui/viva v0.6.6-0.20261118084452-967a3312ecd0replace github.com/vivaui/viva => github.com/Lithe-IDEA/viva v0.6.6-0.20261118092011-213c78ad1611desktop/internal/workbench/filetree_view.go:fileTree.wheel的注释原来引用 ui: List scroll-to needs several frames to settle, and ListState has int-only keys, no focus query and one Label for name and type-ahead vivaui/viva#203,但那个 Issue 讲的是 List 的滚动定位,跟这里无关。改成写明真正的原因:Viva 的 Tree 不处理横向滚轮(只有 List 注册了横向滚轮),横向滚轮由窗口的OnScroll交给这里处理。代码没有改。desktop/internal/workbench/filetree_test.go:新增TestProjectMenuWheelLeavesTheTreeUnderItAlone,作为 Add Windows CI workflow configuration #40 的回归测试。Viva 同步报告
基线
main059256b967a331main113224d213c78afork 上的两次合入:
37818d0。213c78a。上游变化(
059256b..967a331,11 个提交)这些都是新增 API 或修正,Lithe 都不需要改代码:
Alignment放置内容Box.SplitterThickness),默认 8 不变shell.go的shellSplitter = 8跟默认值一致ColorPickerState.Draftnested_refs.go的drawRepositorySwatch是只读的仓库色块,不是取色控件,不替换MenuItems.ContentPage)SelectID)shell_view.go的toolTabsWith是仿 IDEA 的工具窗口标签,是有意的设计,不是绕过上游
9d61b0c(swatch、picker、combobox 绘制时不再每次创建闭包)在 fork 同步之后才合入上游,留到下次同步。补丁状态
main,跟上游合并没有冲突。上游 PR vivaui/viva#349 仍在评审main上,没有待合入的没有冲突。
绕过代码
本次能删的:没有。这次的上游提交没有改 Tree、List 的滚轮逻辑,也没有改
SplitterState.Key,#1821 列出的问题都还在。还需要保留的:
.Disabled(...),以及plugin_settings_view.go的readOnlyFieldBox.Disabled不影响文本输入,需要在 Viva 里加补丁,按维护者安排之后再做root.go的OnKey、OnShortcut,以及editor_view.go的onShortcut、onKeyfiletree_view.go的fileTree.wheel,editor_view.go的onScroll、verticalWheellogwindow/toolbar.go:436检查过 #40 之后,
fileTree.wheel不会绕过 #40。滚轮落在面板上时,OnScroll不会被调用,新增的回归测试覆盖了这一点。fork CI
fork #41 的
size检查失败:hello 是 4292210 B,上限 3840000 B。上游967a331自己的 CI 也同样失败,是上游的问题,不影响 Lithe。不在本 PR 范围内 / Out of scope
Box.Disabled也禁用文本输入):按维护者安排之后再做。9d61b0c:下次同步。类型专属:fix
复现与根因
OnScroll。已在 fork Add Windows CI workflow configuration #40 修复,本 PR 升级固定版本带入这个修复。检查项
desktop/internal/workbench/filetree_test.go的TestProjectMenuWheelLeavesTheTreeUnderItAlone;修复前的结果见“验证”fileTree.wheel只改注释;全部桌面端包的 vet 和测试已跑.agents/notes/implemented/bug-fix/记录:修复在 Viva,Lithe 侧有回归测试范围检查 / Scope checks
功能矩阵 / Feature matrix
N/A:依赖升级和缺陷修复,没有新增宿主能力。
插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空shared/i18n/:没有新增文案UI 验证 / UI evidence
N/A:没有布局、样式或文案变化;滚轮行为由无头测试覆盖。macOS 原生窗口的手工验收还没做。
统一日志系统 / Structured logging
N/A:没有改日志。
界面文案 / i18n
N/A:没有新增或修改界面文案。
逻辑归属 / Logic placement
N/A:没有新增业务逻辑。
性能与内存 / Performance and memory
N/A:没有改编辑器模块,也没有新增后台功能。上游这次的改动只涉及 Select、Field、Splitter、ColorPicker、菜单和 Tabs。
设置 / Settings
N/A:没有改设置。
插件契约 / Plugin contract
N/A:没有改契约,也没有升级 Core。
发行包与资源 / Bundle and resources
N/A:没有新增运行时资源。
无用代码与重构 / Dead code and refactoring
refactor标签的 Issue,没有在本 PR 顺手处理:都已记在 [Feature] 在 Lithe-IDEA/viva 补齐输入框禁用/只读、Tree 横向滚轮与行内 label、Splitter 按键路由,移除 Lithe 的对应绕过代码 #1821验证 / Verification
213c78a:go build ./...、GOOS=windows GOARCH=amd64/arm64 go build ./...、go vet ./...、gofmt -l ui cmd213c78a:除cmd/viva外所有包的go testcmd/viva的 13 个打包测试在本机报 macOS 13 与min_system 12.0不符,同步前的113224d上一样失败,是本机 Go 1.27.4 的部署目标问题scripts/desktop/desktop-go.sh vet ./...scripts/desktop/desktop-go.sh test ./...TestProjectMenuWheelLeavesTheTreeUnderItAlone,临时换回旧版本 fork113224dthe wheel over the menu scrolled the tree: first row 0 -> 30, sideways 400213c78adevelop-lithe第三节插件归属自查命令未能执行的检查和原因:
GOOS=windows,amd64 和 arm64),没有在 Windows 上运行。提交前确认 / Final checks
main创建;目标分支:feat、fix、docs 为main,release 以发布流程要求为准.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图