fix(ui): follow toolkit's MVVM-only widgets, unblocking the upgrade to Android - #223
Merged
Conversation
window v0.44.0 wires in the Android back-end: Open dials the go-widgets/android host inside an APK — a thin Java host owning the Activity and surface, with the Go side owning layout, widgets and hit-testing over a shared memfd — and falls through to X11/Wayland under Termux, chosen by whether $GW_ANDROID_SOCKET is exported. Nothing in reader has to know which: the upgrade is the whole port. #222 having already recabled the widgets to their MVVM-only APIs, that upgrade is all that stands between this repo and android/arm64, which it now builds for. The cross-build matrix gains that target, so the capability is guarded rather than proven once by hand. arm64 is the only Android arch Go links CGO-free, so it is the only one worth adding. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tannevaled
force-pushed
the
fix/toolkit-mvvm-only
branch
from
August 18, 2026 20:35
8094f35 to
56e6f5d
Compare
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.
go-widgets/toolkitconverted 20+ widgets in one sweep (v0.189 → v0.204) from "settable field plus anOnChangeslot" to "state is anmvvm.Observable, reached through an accessor". reader pinned toolkit v0.188.0, so nothing was broken for its users — but it could not move, and 34 compile errors stood between it and any newer toolkit.Why that blockage now costs something
go-widgets/windowv0.44.0 wires in the Android back-end:Opendials thego-widgets/androidhost inside an APK, and falls through to X11/Wayland under Termux. reader gets Android by upgrading — once it can upgrade.It builds for
android/arm64as of this commit, and the cross-build matrix gains that target so the capability is CI-guarded rather than proven once by hand.The port
Four APIs moved; each call site follows to its accessor.
SearchEntry.TextText() *Observable[string]TreeView.ScrollRowScrollRow() *Observable[int]TreeView.SelectedSelected() *Observable[*TreeNode]Spinner.ActiveActive() *Observable[bool].Textis not a safe blanket rename — non-converted widgets still have aTextfield — so the sweep is by identifier, not by symbol.app/bind.gois the one non-mechanical changeAn MVVM-only widget has no field to seed and no callback to compose, so
BindFieldcannot express it. What it has is a property that must agree with the ViewModel's — which ismvvm.BindTwoWay, added in mvvm v0.8.0 for exactly this shape:The reasoning about which thread may
Setthese is unchanged and still documented at the call site.TestSearchEntryWidgetstood in for the binder by filling theOnChangeslot; it now subscribes to the widget's own Observable, which is what the binder actually does.Gate
gofmtclean ·go vetclean · 100.0% coverage ·-raceclean · window boundary green · every cross-build target including android/arm64.js/wasmstill fails onmodernc.org/sqliteexactly as it does onmain(verified againstorigin/mainas a control) — pre-existing, and not in the matrix.🤖 Generated with Claude Code