gui: native WebView host as nested module yetano.dev/yetano/core/gui

Extracted from prototypes/yetano-webview (AP1): packages assets,
document, bridge and window (macOS Cocoa/WKWebView via cgo, Windows
Win32/WebView2 pure Go). No local HTTP listener or port: assets go
through the WebView's resource handler, app routes through the native
message binding. Own go.mod and gui/vX.Y.Z tags keep cgo and the
WebView dependencies out of the main core module. Adds backend-free
tests for the window's dispatch/destroy guards and a yet-gui migration
guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
terminarandClaude Opus 5.5 committed 2026-10-23 14:47:26 +02:00
1 parent 90132e2d76
commit 8c63d42a27
27 files changed
+4849 -3

No files matched your search

+25 -1
View File
@@ -13,6 +13,11 @@ every Yetano program offers (`core/manual`, `core/completion`,
docs/program-conventions.md in the meta-repository), and secret
references in configuration (`core/secretref`).
The native WebView GUI host is a **separate, nested module**,
`yetano.dev/yetano/core/gui` (tags `gui/vX.Y.Z`), so this module keeps
its single dependency and stays free of cgo -- see
[gui/README.md](gui/README.md).
```text
yetano.dev/yetano/core
yetano.dev/yetano/core/paths
@@ -23,6 +28,12 @@ yetano.dev/yetano/core/doctor
yetano.dev/yetano/core/configcmd
yetano.dev/yetano/core/version
yetano.dev/yetano/core/secretref
yetano.dev/yetano/core/gui (own module, tags gui/vX.Y.Z)
yetano.dev/yetano/core/gui/assets
yetano.dev/yetano/core/gui/document
yetano.dev/yetano/core/gui/bridge
yetano.dev/yetano/core/gui/window
```
Target platforms: Linux, FreeBSD, macOS, Windows. No Unix assumptions
@@ -349,7 +360,9 @@ one-line form for log lines and web UI footers.
Tagged as plain semver on this repository (`v0.1.0`, ...), per the
meta-repo `AGENTS.md`'s versioning rules: an existing tag is never
force-moved to a different commit.
force-moved to a different commit. The nested `gui` module has its own
prefixed tags (`gui/v0.1.0`, ...); a change there needs no main-module
tag and vice versa.
## core/secretref
@@ -373,3 +386,14 @@ log.Print(r.Redact(err.Error())) // resolved values become "***"
plain values it accepted before checks `IsReference` and treats anything
else as a literal. Used by yavebu,
yacry and yadenes.
## core/gui (separate module)
`yetano.dev/yetano/core/gui` is the native WebView host for desktop
programs (macOS: Cocoa + WKWebView; Windows: Win32 + WebView2): embedded
assets served through the WebView's own resource handler, the page's
`fetch`/XHR routed to Go handlers over the native message binding,
streaming, abort and reload handling -- never a local HTTP listener or
port. Packages `assets`, `document`, `bridge`, `window`; extracted from
`prototypes/yetano-webview` (AP1). Details, invariants, measured platform
pitfalls and the yet-gui migration: [gui/README.md](gui/README.md).