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
@@ -0,0 +1,69 @@
|
||||
//go:build linux && !android && (amd64 || arm64)
|
||||
|
||||
package e2e
|
||||
|
||||
import (
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
|
||||
"github.com/egoist/mygo"
|
||||
"github.com/egoist/mygo/internal/linux"
|
||||
"github.com/egoist/mygo/ui"
|
||||
)
|
||||
|
||||
// TestAccessLiveRegionAttributes reads, as Orca does through ATK, the
|
||||
// object attributes of landmarks and live regions: their ARIA role in
|
||||
// xml-roles, how a live region is read, and, on what is inside it, how
|
||||
// the region around it is.
|
||||
func TestAccessLiveRegionAttributes(t *testing.T) {
|
||||
var frames atomic.Int32
|
||||
w := newWindow(t, mygo.WindowOptions{Title: "Live regions", Width: 400, Height: 400, Content: ui.View(landmarksAndLiveRegions(&frames))})
|
||||
eventually(t, "a frame", func() bool { return frames.Load() > 0 })
|
||||
if _, ok := accessibility(w); !ok {
|
||||
t.Skip("accessibility automation not available on this platform")
|
||||
}
|
||||
find := func(label string) (n linux.TestAccessNode, ok bool) {
|
||||
mygo.RunOnMain(func() {
|
||||
nodes, _ := linux.TestAccessibility(w.NativeHandle())
|
||||
for _, node := range nodes {
|
||||
if node.Label == label {
|
||||
n, ok = node, true
|
||||
}
|
||||
}
|
||||
})
|
||||
return n, ok
|
||||
}
|
||||
for _, c := range []struct {
|
||||
label string
|
||||
attrs map[string]string
|
||||
}{
|
||||
{"Activity", map[string]string{"xml-roles": "region"}},
|
||||
{"Site search", map[string]string{"xml-roles": "search"}},
|
||||
{"Messages", map[string]string{"xml-roles": "log", "live": "polite", "container-live": "polite", "container-live-role": "log", "atomic": "false"}},
|
||||
{"Hi", map[string]string{"container-live": "polite", "container-live-role": "log", "container-relevant": "additions text"}},
|
||||
{"Time left", map[string]string{"xml-roles": "timer"}},
|
||||
{"Top bar", map[string]string{"xml-roles": "banner"}},
|
||||
{"Messages area", map[string]string{"xml-roles": "main"}},
|
||||
{"Folders", map[string]string{"xml-roles": "complementary"}},
|
||||
{"Footer", map[string]string{"xml-roles": "contentinfo"}},
|
||||
{"Settings panel", map[string]string{"xml-roles": "tabpanel"}},
|
||||
{"Error", map[string]string{"xml-roles": "alert", "live": "assertive", "atomic": "true"}},
|
||||
{"Name is required", map[string]string{"container-live": "assertive", "container-atomic": "true"}},
|
||||
} {
|
||||
eventually(t, c.label+"'s attributes", func() bool {
|
||||
n, ok := find(c.label)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
for k, v := range c.attrs {
|
||||
if n.Attributes[k] != v {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
if n, _ := find("Time left"); n.Attributes["live"] != "" || n.Attributes["container-live"] != "" {
|
||||
t.Errorf("the timer is a live region: %v", n.Attributes)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user