Skip to content

merge: sync upstream main (a3ba5df6) into fork - #78

Merged
xiaoyumuxi merged 6 commits into
mainfrom
sync/upstream-a3ba5df6
Nov 29, 2026
Merged

xiaoyumuxi merged 6 commits into
mainfrom
sync/upstream-a3ba5df6

Conversation

@xiaoyumuxi

Copy link
Copy Markdown

把上游 vivaui/viva main 同步进 Lithe-IDEA/Lithe-viva main:上游从 fork 已包含的 a1af7583(#75)前进到 a3ba5df6,共 5 个提交。之后 Lithe 把固定版本从 fork #76 的分支 head 04cd1f62 换回 fork main。

带进来的上游改动

冲突

6 个冲突文件都来自 fcf7cba5 和 fork 自己的 Markdown 索引(#70、#73)。

  • components/markdown.go、components/markdown_index.go、对应的 cmd/viva/templates/*.txt、cmd/viva/components_gen.go:上游版本是在 fork 版本基础上去掉了 fork 独有的部分,即 Labeled 块的绘制、MarkdownView.AllocatedBytes()、BlockAnchorTop()。上游相对 fork 没有新增一行,所以保留 fork 版本;结果等于“上游 + 我们的补丁”。Lithe 的文档注释(editorview/docblocks.go)这三样都在用。go generate ./cmd/viva 之后模板没有差异。
  • components/markdown_index_test.go:以上游测试为准,再补上 fork 独有功能的覆盖:
    • 线性对照网格测试里加入 fork 的“程序构造 + Labeled”用例,和上游的两个解析用例放在一起。
    • 保留 fork 的三个构建器测试:Labeled 与不透明链接、AppendTable 的超高单元格、带引用层级的 AppendParagraph。它们是构建器 API 仅有的测试。
    • 基准测试用上游版本。

fork 独有的 Labeled 块、markdown.Document 构建器、AllocatedBytes / BlockAnchorTop 还没有进上游,仍是我们的补丁。

验证(macOS Apple Silicon,go1.27.4)

  • gofmt -l components cmd/viva:没有输出
  • go generate ./cmd/viva:没有差异
  • GOOS=windows GOARCH=amd64 go build ./...、GOOS=windows GOARCH=arm64 go build ./...
  • GOOS=linux CGO_ENABLED=0 go vet ./base/ ./ui/ ./components/ ./gfx/ ./markdown/ ./ui/video/
  • go test ./... -count=1:app、base、components、markdown、ui、ui/video、window、tools/docs、tools/appaudit、internal/media 等全部通过。失败的只有既有的两类,与本次同步无关:
  • 真实窗口:没有跑,在 Lithe 升级固定版本的 PR 里再验。

合入方式:Create a merge commit(不 squash)。

t8y2 and others added 6 commits November 28, 2026 23:49
appaudit reads Go source and points at what keeps an application busy
with nothing to do or stalls its window thread: a time.NewTicker or
time.Tick, a file-system call in a function handed a canvas, a page or a
draw context, and a RequestFrameIn of a frame or less with no condition
(an if, a loop or an early return) around it. A line that does it on
purpose says why with //appaudit:allow <reason>. It is a heuristic: a
finding is a place to look.

Viva runs it over itself in CI; its one ticker, the development reload
host's source scan, says why. Motty runs it in its companion commit,
where it would have caught the two polling loops that commit's
predecessors replaced with notifications.
Brings in the five upstream commits after a1af758:
- 086247a feat(ui): let text fields inspect a paste before taking it (vivaui#505, same as fork #76)
- a3eda45 fix(base): keep a text that fits exactly when rounding falls short (vivaui#507, fork #77 plus the across-the-flow case)
- fcf7cba perf(markdown): index MarkdownView paint and hit testing (vivaui#489)
- a3ba5df feat(video): add shared-texture video playback and GIF/APNG decoders (vivaui#508)
- b036c88 feat(tools): audit applications for idle wakes and window-thread I/O

Conflicts, all from fcf7cba against the fork's own markdown index (fork #70, #73):
- components/markdown.go, components/markdown_index.go and their cmd/viva templates,
  cmd/viva/components_gen.go: upstream's version is the fork's with the fork-only parts
  taken out (Labeled blocks, MarkdownView.AllocatedBytes, BlockAnchorTop); upstream adds
  no line of its own, so the fork's version is kept. Lithe uses all three.
- components/markdown_index_test.go: upstream's tests, with the fork's programmatic
  Labeled case added to the linear-reference grid and the fork's three builder tests
  (Labeled and opaque links, AppendTable tall cell, quoted AppendParagraph) kept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants