feat: port the client to MyGo native UI (0.3.0)
Switch from Asuka to MyGo, keeping the API client and the feature set: - servers: saved servers, passwordless and password login, proxy, self-signed certificates, per-server device tokens (Keystore), connect form, instance list sheet with switch/disconnect - sessions: virtualized list, search, new session, rename/archive/delete, running indicator, event stream keeps it live - chat: pushed window with system back bar, streaming Markdown via ui/markdown, reasoning and tool rows with image previews, footer menu (read aloud via a Kotlin TTS plugin, copy, fork), user message menu (copy, revert, fork), context usage ring and detail sheet, attachments (photos/files via the document picker), permissions - release builds allow plain http:// LAN servers (Go's net/http dials directly, no cleartext manifest needed) - a local fork of MyGo (third_party/mygo) lowers the Android host's minSdk to 24 (Android 7.0); Go 1.27.4 via mise Version 0.3.0.
This commit is contained in:
1 parent
2fb4a8ea79
commit
6c0ee61750
2538 files changed
+675779
-4792
No files matched your search
Vendored
+50
@@ -0,0 +1,50 @@
|
||||
package ui
|
||||
|
||||
import "testing"
|
||||
|
||||
// TestHoverAsPopupCloses checks that a select's trigger, the pointer
|
||||
// resting on it, hovers in the frame its popup closes, as the popup's
|
||||
// backdrop covered it: it did not until the next frame, so a trigger
|
||||
// lit while open or hovered went dark for a frame.
|
||||
func TestHoverAsPopupCloses(t *testing.T) {
|
||||
for _, how := range []string{"click", "escape"} {
|
||||
t.Run(how, func(t *testing.T) {
|
||||
choice := 1
|
||||
var tt *Tester
|
||||
lit := map[uint64]bool{} // each frame's last pass
|
||||
tt = coreNewTester(func(c *context) {
|
||||
coreColumn(c).Padding(20).Children(func() {
|
||||
s := coreSelectBase(c, &choice)
|
||||
s.Trigger.Size(80, 24).Label("Pick")
|
||||
lit[c.rt.frame] = s.Trigger.Hovered() || s.Open()
|
||||
s.Popup(func(panel *node) {
|
||||
panel.Width(120)
|
||||
for v := range 3 {
|
||||
s.Item(v).Height(24).Label(string(rune('A' + v)))
|
||||
}
|
||||
})
|
||||
})
|
||||
}, 300, 200)
|
||||
tt.Frame()
|
||||
tt.Move(40, 32)
|
||||
tt.Frame()
|
||||
tt.ClickAt(40, 32)
|
||||
tt.Frame()
|
||||
if !lit[tt.rt.frame] {
|
||||
t.Fatal("the popup did not open")
|
||||
}
|
||||
from := tt.rt.frame
|
||||
if how == "click" {
|
||||
tt.ClickAt(40, 32) // on the backdrop, over the trigger
|
||||
} else {
|
||||
tt.Key(0, KeyEscape)
|
||||
}
|
||||
tt.Frame()
|
||||
for f := from; f <= tt.rt.frame; f++ {
|
||||
if on, ok := lit[f]; ok && !on {
|
||||
t.Fatalf("frame %d: the trigger under the pointer went dark", f)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user