Repository navigation
fix(windows): give wmSetTitle its own message number - #17
Merged
Merged
Conversation
This was referenced Nov 14, 2026
xiaoyumuxi
added a commit
to 1lck/Lithe-IDEA
that referenced
this pull request
Nov 14, 2026
desktop/go.mod 的 replace 从 fork main 609dd47 升到 4829f2b, 多出两项补丁: - Lithe-IDEA/Lithe-viva#17:wmSetTitle 改用 0x8053,修复 #16 合入上游 后与 wmSetSize 撞号导致的 Windows 编译失败。补的是 fork 独有的 Window.SetTitle,上游没有对应 PR。 - Lithe-IDEA/Lithe-viva#18:新增 app.OpenPathInBrowser,上游 PR 为 vivaui/viva#272。 require 仍是上游基线 b63e4a0,没有变化。 功能矩阵 embedded-viewers:Viva 的“在浏览器中打开”写明交给默认网页 浏览器、不跟随 .html 的文件关联,并注明 Windows 需实机确认;证据补上 browser_preview.go 及其测试,自动回归的 -run 加上 OpenInBrowser。
24 of 28 tasks
xiaoyumuxi
added a commit
to 1lck/Lithe-IDEA
that referenced
this pull request
Nov 14, 2026
* wip(desktop): 在浏览器中打开 HTML 的回归测试(待 Viva 默认浏览器 API) * fix(desktop): 在浏览器中打开 HTML 改为交给默认浏览器 预览栏的“在浏览器中打开”原来拼出 file:// 地址交给 app.OpenURL, Viva 只接受 http、https、mailto,于是总是报错。改为调用 Viva 新增的 app.OpenPathInBrowser:交给默认浏览器(打开 http 链接的应用), 不跟随 .html 的文件关联,与旧客户端一致。 - 在后台调用,macOS 上要等 open 报告结果,不阻塞窗口线程。 - 失败时记录 app.operation_failed(operation=editor_open_in_browser), 并在日志目录测试里登记。 - 回归测试断言文件交给了 LastOpenedInBrowser,既不是 OpenPath 也不是 OpenURL。 依赖 Lithe-IDEA/Lithe-viva#18(上游 vivaui/viva#272)合入 fork main 后升级 desktop/go.mod 的固定版本,在此之前本分支编译不过。 * fix(desktop): Viva 固定到含 OpenPathInBrowser 的 fork main desktop/go.mod 的 replace 从 fork main 609dd47 升到 4829f2b, 多出两项补丁: - Lithe-IDEA/Lithe-viva#17:wmSetTitle 改用 0x8053,修复 #16 合入上游 后与 wmSetSize 撞号导致的 Windows 编译失败。补的是 fork 独有的 Window.SetTitle,上游没有对应 PR。 - Lithe-IDEA/Lithe-viva#18:新增 app.OpenPathInBrowser,上游 PR 为 vivaui/viva#272。 require 仍是上游基线 b63e4a0,没有变化。 功能矩阵 embedded-viewers:Viva 的“在浏览器中打开”写明交给默认网页 浏览器、不跟随 .html 的文件关联,并注明 Windows 需实机确认;证据补上 browser_preview.go 及其测试,自动回归的 -run 加上 OpenInBrowser。 * fix(desktop): 在浏览器中打开成功后才记录 app.action.performed 与设置页链接和修复前的行为一致:打开失败时只记录 app.operation_failed 和提示,不再同时记一条已执行的操作。
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.
What this changes
wmSetTitleininternal/platform/windows/title_windows.gomoves from0x8052to0x8053, the next number that no private window message uses. The comment beside it now says why the number must differ fromwmSetSize.Why
maindoes not compile for Windows since #16. Upstream addedwmSetSize = 0x8052(internal/platform/windows/window_windows.go:66), and the fork'sWindow.SetTitle(#1) had already taken0x8052forwmSetTitle. #16 merged both without a text conflict, so the window procedure'sswitch kindnow has two cases with the same value:The checks on #16 showed it:
cross-vet,native (windows-latest),windows-arm64-textandwindows-materialsfailed. Lithe-IDEA's desktop client pinsmain(609dd47) throughreplacefor delta updates, so its Windows build fails the same way.Upstream has no
wmSetTitle(#1 was not sent upstream), so this fix has no upstream counterpart.The private messages the Windows package uses after this change: 0x8001–0x8007 (32769–32775), 0x8010–0x8012, 0x8016–0x8017 (32790–32791), 0x8040, 0x8050, 0x8051, 0x8052 (
wmSetSize), 0x8053 (wmSetTitle).How it was verified
test -z "$(gofmt -l $(git ls-files '*.go'))": no files listedgo vet ./...on macOS (darwin/arm64): passesgo test ./... -count=1: not run locally. The change is in awindows-only file, which darwin tests do not build; this PR's Windows jobs run it.GOOS=windows GOARCH=amd64|arm64 CGO_ENABLED=0 go vet ./internal/platform/windows/ ./app/... ./headless/... ./update/...andgo build ./...pass for both architectures. On 609dd47 without the change, the same build fails with the duplicate case above.Where the boundary sits
A framework fix: the message numbers are internal to the Windows backend.
Cost
Nothing.
After merging
Lithe-IDEA bumps
replace github.com/vivaui/viva => github.com/Lithe-IDEA/vivaindesktop/go.modto the commit this PR lands as onmain.Not part of this fix:
size,webandwindows-materialsfail on upstreammaintoo (b63e4a0 and 5b177b7), so they stay red here:size:hello darwin/arm64is 4172546 bytes, over the 3840000-byte limit.web:TestApplyPatchChecksNameAndVersionsfails on js withupdate: invalid feed: os "js" has no patch support.