Skip to content

merge: sync upstream 82a3318 (v0.6.5) - #32

Merged
xiaoyumuxi merged 13 commits into
mainfrom
sync/upstream-82a3318
Nov 17, 2026
Merged

xiaoyumuxi merged 13 commits into
mainfrom
sync/upstream-82a3318

Conversation

@xiaoyumuxi

Copy link
Copy Markdown

Merge upstream main 82a3318 (v0.6.5) into fork main 6553826. Merge this PR with a merge commit, never squash, so upstream stays an ancestor of fork main and every published Lithe pin stays reachable.

Upstream range

d345275..82a3318, 12 commits:

Conflicts

All resolved in upstream's favour.

Fork patches

Superseded by upstream (the merged files are byte-identical to upstream):

Still fork-only, each with an open upstream PR:

No new fork-only code in this merge.

Validation

On macOS 27 / arm64, Go 1.27.4, on 2895b97:

  • gofmt -l $(git ls-files '*.go'): clean.
  • go vet ./...: clean (only the existing didModifyRange: deprecation warning from cgo).
  • GOOS=windows GOARCH=amd64 go build ./... and GOOS=windows GOARCH=arm64 go build ./...: pass.
  • GOOS=linux GOARCH=amd64 go vet ./update/ ./ui/ ./components/ ./app/: clean.
  • go test ./...: everything passes except 14 packaging tests in cmd/viva (the program was built for macOS 13.0 or later but [mac] min_system says 12.0). That is the local toolchain: the same 14 tests fail on upstream 82a3318 and on fork main 6553826 before this merge, as recorded in merge: sync upstream b17e605 (resumable update downloads) #29.
  • git merge-base --is-ancestor upstream/main HEAD: true.
  • Tag v0.6.5 (tag object df9e4a2, commit 9107119) was missing from the fork and has been pushed; fork tags now match git ls-remote --tags --refs https://github.com/vivaui/viva.git.

t8y2 and others added 13 commits November 16, 2026 20:26
A disabled control is skipped by hit testing, so a right click on one
never reached the application. A toolbar button the user can hide or
move still needs its context menu, and the application had to hit-test
its own geometry to find it. Add HitOptions.SecondaryWhenDisabled: a
disabled control that declares it becomes the target of a secondary
press only. Primary presses, keys and activation still pass over it.

The router resolves the hover for a secondary press with the new flag,
so the press target and the application's PointerDown delivery both see
the control. Plain PointerAt callers pass false and keep the old hit
rules. Used by motty#940 for the SFTP toolbar and the dock tools.
The generated AGENTS.md is the only document tools/aieval sends, and the
skill is what an external agent installs. Both were long undivided prose
with copy-paste mistakes.

- add a task index, an error-to-fix table and a headless check list to the
  generated guide, and split the duplicated sections
- rewrite the skill as a task router with a verification loop
- split the 9k-character declarative-layout paragraph (en and zh), add a
  tested table example, and install recipes.md with the skill
- add go tests for symbols, links, quoted panics and eval-task coverage
EnsureClosed only moved the program image aside. Native files the program loads at runtime, such as conpty.dll, stayed locked and File failed on them: a GUI install showed "cannot open file for writing" and a silent install skipped the file without updating it.

Apply the same delete-then-rename-aside treatment before each extra file, clean the moved copies on the next install, and mark locked extra files for reboot removal when uninstalling.
The default Linux build runs on X11, where SetTitle returned
ErrUnsupported; only the opt-in GTK shell applied titles. The X11 window
now applies them on its event loop, as SetSize does: SetTitle stores the
latest title and posts a command, and the loop writes WM_NAME and
_NET_WM_NAME. An empty title clears both.

Titles are checked in app.Window.SetTitle before any backend sees them.
A title with a NUL byte or invalid UTF-8 returns an error and changes
nothing. Windows used to accept such a title and drop it silently, and
Darwin truncated or emptied it, so the backends now agree.

This follows vivaui#304, which landed as 68f1a05 and added SetTitle without
the X11 path or the title checks.

Tests cover the X11 command path with a fake xcb API, the headless
windows listing with rejected titles and a closed window, and a Windows
read-back through GetWindowTextW. The docs table gets a window title row.
An application menu runs its entry outside the window's event handlers, so the focus, clipboard and repaint a command returns were dropped: choosing Find from the menu bar opened the bar while the keyboard stayed in the terminal. MenuBarItem.OnSelect now returns the gfx.EventResult a key handler returns, and the runtime applies it to the window that last became active and wakes the window for the frame that shows it.

The application keeps producing results; applying focus and scheduling the repaint stay in the runtime, so Motty's menu actions only return what their commands did. The companion motty commit uses this for Find, the command palette, the assistant, the host panel, the local terminal and tab switching.
A menu's key equivalent reached its entry directly, so a command that depends
on the focused control ran the wrong branch: Edit > Copy in Motty's assistant
panel copied the terminal selection and ignored a selection in an assistant
answer, because the shortcut handler never saw Cmd+C.

Offer a menu entry's chord to the window first, as AppKit offers a key to the
focused content before the menu: a character chord to the shortcut handler, a
named key to the key handler, both with the focused control as the target.
OnSelect runs only when that handler declines, so pressing a shortcut and
choosing its entry run one command.

The routing stays in the application; the runtime only supplies the focused
target and carries out what the handler returned.
Upstream now carries the fork's window title work (fork #1, #5 and #17 as
68f1a05, extended by 76aba78 with X11 titles and NUL/invalid UTF-8
rejection) and the Windows patch payload staging (fork c029d61 as 84a9897).

Conflicts were resolved in upstream's favour:
- app/title.go, app/title_test.go: upstream's version.
- README.md, docs/conformance.md: upstream's text; the fork's SetTitle
  notes are dropped because upstream documents the same API.
- cmd/viva/initfiles/AGENTS.md.txt: upstream's rewrite, keeping only the
  fork-only ScrollArea.Bars / PageConfig.BarStyle and Tooltip style notes.
@xiaoyumuxi
xiaoyumuxi merged commit 80a307a into main Nov 17, 2026
20 of 21 checks passed
xiaoyumuxi added a commit that referenced this pull request Nov 17, 2026
* docs(release): v0.6.5 notes

* docs: point at v0.6.5

* feat(gfx): let a disabled control take secondary presses

A disabled control is skipped by hit testing, so a right click on one
never reached the application. A toolbar button the user can hide or
move still needs its context menu, and the application had to hit-test
its own geometry to find it. Add HitOptions.SecondaryWhenDisabled: a
disabled control that declares it becomes the target of a secondary
press only. Primary presses, keys and activation still pass over it.

The router resolves the hover for a secondary press with the new flag,
so the press target and the application's PointerDown delivery both see
the control. Plain PointerAt callers pass false and keep the old hit
rules. Used by motty#940 for the SFTP toolbar and the dock tools.

* docs(agents): index the guide by task and guard it in tests

The generated AGENTS.md is the only document tools/aieval sends, and the
skill is what an external agent installs. Both were long undivided prose
with copy-paste mistakes.

- add a task index, an error-to-fix table and a headless check list to the
  generated guide, and split the duplicated sections
- rewrite the skill as a task router with a verification loop
- split the 9k-character declarative-layout paragraph (en and zh), add a
  tested table example, and install recipes.md with the skill
- add go tests for symbols, links, quoted panics and eval-task coverage

* fix(winpkg): replace loaded native files during install

EnsureClosed only moved the program image aside. Native files the program loads at runtime, such as conpty.dll, stayed locked and File failed on them: a GUI install showed "cannot open file for writing" and a silent install skipped the file without updating it.

Apply the same delete-then-rename-aside treatment before each extra file, clean the moved copies on the next install, and mark locked extra files for reboot removal when uninstalling.

* fix(linux): restore read-only editor input before the first key

* fix(update): stage a Windows patch payload before quitting

* fix(linux): search XDG config dirs for Vulkan ICD manifests

* feat(app): add window title support across native and headless backends

* feat(app): set X11 window titles and reject unusable ones

The default Linux build runs on X11, where SetTitle returned
ErrUnsupported; only the opt-in GTK shell applied titles. The X11 window
now applies them on its event loop, as SetSize does: SetTitle stores the
latest title and posts a command, and the loop writes WM_NAME and
_NET_WM_NAME. An empty title clears both.

Titles are checked in app.Window.SetTitle before any backend sees them.
A title with a NUL byte or invalid UTF-8 returns an error and changes
nothing. Windows used to accept such a title and drop it silently, and
Darwin truncated or emptied it, so the backends now agree.

This follows vivaui#304, which landed as 68f1a05 and added SetTitle without
the X11 path or the title checks.

Tests cover the X11 command path with a fake xcb API, the headless
windows listing with rejected titles and a closed window, and a Windows
read-back through GetWindowTextW. The docs table gets a window title row.

* feat(app): carry out menu action results on the active window

An application menu runs its entry outside the window's event handlers, so the focus, clipboard and repaint a command returns were dropped: choosing Find from the menu bar opened the bar while the keyboard stayed in the terminal. MenuBarItem.OnSelect now returns the gfx.EventResult a key handler returns, and the runtime applies it to the window that last became active and wakes the window for the frame that shows it.

The application keeps producing results; applying focus and scheduling the repaint stay in the runtime, so Motty's menu actions only return what their commands did. The companion motty commit uses this for Find, the command palette, the assistant, the host panel, the local terminal and tab switching.

* fix(app): run menu shortcuts through the focused handler

A menu's key equivalent reached its entry directly, so a command that depends
on the focused control ran the wrong branch: Edit > Copy in Motty's assistant
panel copied the terminal selection and ignored a selection in an assistant
answer, because the shortcut handler never saw Cmd+C.

Offer a menu entry's chord to the window first, as AppKit offers a key to the
focused content before the menu: a character chord to the shortcut handler, a
named key to the key handler, both with the focused control as the target.
OnSelect runs only when that handler declines, so pressing a shortcut and
choosing its entry run one command.

The routing stays in the application; the runtime only supplies the focused
target and carries out what the handler returned.

---------

Co-authored-by: t8y2 <1156263951@qq.com>
Co-authored-by: ccq <76206374+caichangqing1120@users.noreply.github.com>
Co-authored-by: Lichenkang <2188718831@qq.com>
Co-authored-by: Dean Cen <cen915544637@gmail.com>
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.

5 participants