diff --git a/gui_off.go b/gui_off.go
index e403f7f0c..f0ed1e3f8 100644
--- a/gui_off.go
+++ b/gui_off.go
@@ -7,3 +7,5 @@ import "errors"
const hasGUI = false
func runGUI(bool, string) error { return errors.New("this build has no GUI; run `magpie tui`") }
+
+func runPanel() error { return runGUI(false, "") }
diff --git a/gui_on.go b/gui_on.go
index dc327e025..f63dc04ac 100644
--- a/gui_on.go
+++ b/gui_on.go
@@ -15,3 +15,11 @@ func runGUI(showMain bool, link string) error {
proc.UserPath()
return gui.Run(version, showMain, link)
}
+
+// runPanel starts the app with its quick panel open, or toggles the panel
+// of the one already running.
+func runPanel() error {
+ proc.UserPath()
+ gui.OpenPanel = true
+ return gui.Run(version, false, "")
+}
diff --git a/internal/gui/api.go b/internal/gui/api.go
index 3bb9f2941..3653773b4 100644
--- a/internal/gui/api.go
+++ b/internal/gui/api.go
@@ -267,11 +267,26 @@ func Handler(w Windows, gw *gateway.Server) http.Handler {
s := settings.Load()
// and the text size, which the Mac's header measures against the
// traffic lights
- b, _ := json.Marshal(map[string]any{"lang": s.Lang, "theme": s.Theme, "textSize": s.TextSize, "web": isWeb(w)})
+ boot := map[string]any{"lang": s.Lang, "theme": s.Theme, "textSize": s.TextSize, "web": isWeb(w)}
+ // on Omarchy the page takes its theme's look before it paints
+ if th, ok := omarchyTheme(); ok {
+ boot["omarchy"] = th
+ }
+ b, _ := json.Marshal(boot)
rw.Header().Set("Content-Type", "text/javascript; charset=utf-8")
rw.Header().Set("Cache-Control", "no-store")
rw.Write(append(append([]byte("window.bootPrefs = "), b...), ";\n"...))
})
+ // the Omarchy theme as it is now, asked again every few seconds so a
+ // theme picked in Omarchy's menu reaches the page at once; null off Omarchy
+ mux.HandleFunc("GET /api/omarchy", func(rw http.ResponseWriter, r *http.Request) {
+ if th, ok := omarchyTheme(); ok {
+ writeJSON(rw, th)
+ return
+ }
+ writeJSON(rw, nil)
+ })
+ omarchyRoutes(mux, w)
mux.HandleFunc("GET /api/state", func(rw http.ResponseWriter, r *http.Request) {
writeJSON(rw, state())
})
diff --git a/internal/gui/app.go b/internal/gui/app.go
index c84fb3e81..040d29287 100644
--- a/internal/gui/app.go
+++ b/internal/gui/app.go
@@ -20,6 +20,7 @@ import (
"github.com/wailsapp/wails/v3/pkg/events"
"github.com/yetone/magpie/internal/library"
+ "github.com/yetone/magpie/internal/omarchy"
"github.com/yetone/magpie/internal/settings"
"github.com/yetone/magpie/internal/shortcut"
"github.com/yetone/magpie/internal/stats"
@@ -72,6 +73,8 @@ type host struct {
panelHeight int // the panel's, in points
panelPage int // what its page last asked for, in CSS pixels
textSize atomic.Int64 // Settings' text size, in percent (settings.TextSizes)
+ hyprRoom int // how tall it may grow under Hyprland's bar; 0 elsewhere
+ clicks sync.Once // Hyprland's clicks heard, to close the panel on one outside it
glides atomic.Int64 // the newest panel glide; older ones stop
query string // what the windows' URLs carry (a forced theme)
@@ -125,6 +128,10 @@ func (h *host) ChooseFolder(title string) (string, error) {
SetTitle(title).AttachToWindow(h.main).PromptForSingleSelection()
}
+// panelTitle names the panel for Hyprland's rule, which places it (the
+// main window is "magpie")
+const panelTitle = "magpie panel"
+
// FitPanel grows or shrinks the panel to its content and keeps it anchored
// under the tray icon; a shown panel glides there when g says how. height
// is the page's, in its CSS pixels: at a larger text size the panel is
@@ -155,6 +162,9 @@ func (h *host) panelW() int { return zoomed(panelWidth, h.zoom()) }
// panelRoom is how tall the panel can be on its screen: the work area,
// less the gap under the menu bar (or over the taskbar) and a little air.
func (h *host) panelRoom() int {
+ if h.hyprRoom > 0 { // under Hyprland's bar, down to the work area's foot
+ return h.hyprRoom
+ }
if _, rh := screenRoom(h.panel); rh > 0 {
return rh - 16
}
@@ -358,6 +368,11 @@ func Run(version string, showMain bool, link string) error {
}()
h.tray = h.app.SystemTray.New()
+ if runtime.GOOS == "linux" {
+ // set before the tray starts, it is the item's id too, which
+ // Omarchy's bar pins it by (Wails calls it "Wails" otherwise)
+ h.tray.SetLabel("magpie")
+ }
h.tray.SetTooltip("magpie")
if runtime.GOOS == "darwin" {
h.tray.SetTemplateIcon(trayIcon)
@@ -377,7 +392,7 @@ func Run(version string, showMain bool, link string) error {
h.ShowMain("")
return
}
- h.tray.ToggleWindow()
+ h.togglePanel()
})
// Wails shows a Windows webview 3s after Show whether or not WebView2
@@ -389,6 +404,7 @@ func Run(version string, showMain bool, link string) error {
} else {
h.app.Event.OnApplicationEvent(events.Common.ApplicationStarted, func(*application.ApplicationEvent) {
plainTitlebar(h.main) // Linux: the page's header is the title bar
+ nameWindow(h.panel, panelTitle)
markReady()
})
}
@@ -401,6 +417,9 @@ func Run(version string, showMain bool, link string) error {
if showMain {
h.whenReady(func() { h.ShowMain("") })
}
+ if OpenPanel {
+ h.whenReady(func() { application.InvokeAsync(h.togglePanel) })
+ }
if link != "" {
h.Import(link)
}
@@ -439,6 +458,8 @@ func singleInstance(h *host) *application.SingleInstanceOptions {
case ImportLink(args) != "":
h.Import(ImportLink(args))
case len(args) == 1 && args[0] == "tray":
+ case len(args) == 1 && args[0] == "panel":
+ h.whenReady(func() { application.InvokeAsync(h.togglePanel) })
default:
h.whenReady(func() { h.ShowMain("") })
}
@@ -508,3 +529,59 @@ func panelOptions(goos, theme string) application.WebviewWindowOptions {
}
return o
}
+
+// OpenPanel has Run open the quick panel once it starts, as `magpie panel`
+// does; a second `magpie panel` toggles it in the running one. Omarchy's bar
+// icon runs it (see omarchy.AddWidget).
+var OpenPanel bool
+
+// togglePanel opens the quick panel by the tray icon, or closes it.
+func (h *host) togglePanel() {
+ if omarchy.Hyprland() {
+ if h.panel.IsVisible() {
+ h.hidePanel()
+ return
+ }
+ h.placePanel()
+ }
+ h.tray.ToggleWindow()
+}
+
+// placePanel puts the panel, about to open, under Hyprland's bar at the
+// click, the way Omarchy's own drop-downs sit: a Wayland window can't place
+// itself, so Hyprland is given a rule for it (see omarchy.PlacePanel).
+func (h *host) placePanel() {
+ x, y, room, ok := omarchy.PanelAt(h.panelW())
+ if !ok {
+ return
+ }
+ if err := omarchy.PlacePanel(panelTitle, x, y); err != nil {
+ log.Println("hyprland:", err)
+ return
+ }
+ h.hyprRoom = room
+ h.clicks.Do(func() {
+ go omarchy.WatchClicks(func() {
+ switch {
+ case !h.panel.IsVisible(): // Escape closed it
+ omarchy.StopClicks()
+ case omarchy.ClickedOutside(panelTitle):
+ application.InvokeAsync(h.hidePanel)
+ }
+ })
+ })
+ if err := omarchy.ReportClicks(); err != nil {
+ log.Println("hyprland:", err)
+ }
+ if _, ht := h.panel.Size(); ht > room && room >= panelMin {
+ h.panelHeight = room
+ h.panel.SetSize(h.panelW(), room)
+ }
+}
+
+// hidePanel closes the panel on Hyprland, where it has no focus-lost to
+// close on (see omarchy.ReportClicks).
+func (h *host) hidePanel() {
+ h.panel.Hide()
+ go omarchy.StopClicks()
+}
diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js
index ccce4f54b..8859973fa 100644
--- a/internal/gui/assets/app.js
+++ b/internal/gui/assets/app.js
@@ -7540,8 +7540,20 @@ function applyPrefs(s, rate) {
return was !== locale;
}
+// Omarchy's bar: magpie's icon there as a widget of its own (Settings → Bar
+// icon), offered only in the app on Omarchy
+let barIcon = null;
+function renderBarIcon() {
+ $("#barIconRow").hidden = !barIcon?.available;
+ if (!barIcon?.available) return;
+ $("#barIconSegs").replaceChildren(segs([["off", t("Off")], ["on", t("On")]], barIcon.on ? "on" : "off", (v) =>
+ api("omarchy/widget", { on: v === "on" }).then((b) => { barIcon = b; renderBarIcon(); })
+ .catch((e) => { status(t(e.message), "err"); renderBarIcon(); })));
+}
+
async function loadSettings() {
const since = prefsWrites;
+ if (window.bootPrefs?.omarchy && !barIcon) api("omarchy/widget").then((b) => { barIcon = b; renderBarIcon(); }).catch(() => {});
const s = await api("settings");
if (!prefsSettled(since) && prefs) return; // the save draws the page when it's in
prefs = s;
@@ -7638,6 +7650,7 @@ function renderSettings() {
$("#dockSegs").replaceChildren(segs([["off", t("Hide")], ["window", t("With window")], ["on", t("Show")]],
s.dock ? "on" : s.dockWindow ? "window" : "off", (v) => savePrefs({ ...keep, dock: v === "on", dockWindow: v === "window" })));
renderSessionTerminal(s, keep);
+ renderBarIcon();
// the system's record, set on its own, not with the other choices
$("#loginSegs").replaceChildren(segs([["off", t("Off")], ["on", t("On")]], s.login ? "on" : "off", (v) =>
writingPrefs(api("settings/login", { on: v === "on" })).then((ns) => { prefs = ns; renderSettings(); }).catch((e) => { status(t(e.message), "err"); renderSettings(); })));
diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.js
index ff81f13c1..280d7a18b 100644
--- a/internal/gui/assets/i18n.js
+++ b/internal/gui/assets/i18n.js
@@ -72,6 +72,8 @@ const I18N = {
"Don't remind me": "不再提示",
"Hide this line; Add a provider still offers it back": "收起这行提示;之后仍可在「添加供应商」里加回来",
"Tray icon": "托盘图标",
+ "Bar icon": "状态栏图标",
+ "magpie’s icon beside Omarchy’s own in the bar; right-click opens the window": "把 magpie 图标放进 Omarchy 状态栏,与系统图标并排;右键打开窗口",
"Dock": "程序坞",
"Open at login": "开机自启",
"Start magpie in the tray when you log in, so agents find the gateway from the start": "登录系统时在托盘里启动 magpie,各个 Agent 一开始就能连上网关",
@@ -974,6 +976,7 @@ const I18N = {
"Unavailable app ({id})": "应用不可用({id})",
"Appearance": "外观",
"Light or dark, or whatever the system is showing": "浅色、深色,或跟随系统",
+ "Follows the Omarchy theme, as picked in Omarchy's menu": "跟随 Omarchy 主题,在 Omarchy 菜单里切换",
"Language": "语言",
"Applies at once, no restart": "立即生效,无需重启",
"Text size": "文字大小",
diff --git a/internal/gui/assets/index.html b/internal/gui/assets/index.html
index 0b5fd1b02..9590cb311 100644
--- a/internal/gui/assets/index.html
+++ b/internal/gui/assets/index.html
@@ -5,9 +5,11 @@
magpie
+
+
@@ -158,8 +160,8 @@
Preferences
-
Appearance
Light or dark, or whatever the system is showing
-
+
Appearance
Light or dark, or whatever the system is showing
Follows the Omarchy theme, as picked in Omarchy's menu
+
Language
Applies at once, no restart
@@ -173,6 +175,10 @@
Tray icon
What clicking magpie’s icon in the menu bar or tray opens
+
+
Bar icon
magpie’s icon beside Omarchy’s own in the bar; right-click opens the window
+
+
Usage in the menu bar
diff --git a/internal/gui/assets/omarchy.css b/internal/gui/assets/omarchy.css
new file mode 100644
index 000000000..40c25a90c
--- /dev/null
+++ b/internal/gui/assets/omarchy.css
@@ -0,0 +1,66 @@
+/* Omarchy: magpie drawn in Omarchy's own design language, only on Omarchy.
+ omarchy.js puts the class on and the theme's colours, font, border
+ and rounding (from ~/.local/state/omarchy/current/theme and Hyprland) in
+ the variables; everything here is scoped under html.omarchy, so no other
+ system sees any of it. Omarchy's shell draws flat: no shadows, no blur, no
+ rounding (Hyprland's decoration:rounding, 0 by default), popups framed by
+ the window border's colour, uppercase letter-spaced labels, and a row
+ picked out by a faint fill with its text in the accent. */
+
+/* what only Omarchy shows, and what it hides: the Appearance setting follows
+ Omarchy's theme instead of offering light and dark */
+.om-only { display: none !important; }
+html.omarchy .om-hide { display: none !important; }
+html.omarchy .om-only { display: revert !important; }
+html.omarchy .om-theme-name { color: var(--accent); font-size: 12px; white-space: nowrap; }
+
+html.omarchy, html.omarchy body { font-family: var(--font); font-size: var(--om-size); }
+html.omarchy body { -webkit-font-smoothing: antialiased; }
+
+/* square, or rounded as far as Hyprland rounds its windows; what spins or
+ draws a dial stays round, as does a slider.s knob; a status dot goes square, like Omarchy.s workspace marks */
+html.omarchy *, html.omarchy *::before, html.omarchy *::after { border-radius: var(--om-radius) !important; }
+html.omarchy :is(.pq-dial, .pq-dial b, .sk-ring, .si-spin, .mk-spin, .signing .spinner, .eslide .knob, .effort-ticks i),
+html.omarchy input[type="range"]::-webkit-slider-thumb { border-radius: 50% !important; }
+
+/* no shadows or frosted glass: surfaces are the theme's background */
+html.omarchy * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
+html.omarchy :is(.pop, .modal .dialog, .status.lift, body.panel .profiles.open, .list, body.panel .list, .seg > .thumb) { box-shadow: none; }
+html.omarchy body.panel { background: var(--bg); border: var(--om-border) solid var(--om-edge); }
+
+/* popups, menus and dialogs: framed by the window border's colour */
+html.omarchy :is(.pop, body.panel .profiles.open, .status.lift) { background: var(--pop-bg); border: var(--om-border) solid var(--om-edge) !important; }
+html.omarchy .modal { background: color-mix(in srgb, var(--bg) 55%, transparent); }
+html.omarchy .modal .dialog { background: var(--bg); border: var(--om-border) solid var(--om-edge); }
+
+/* labels as Omarchy's shell sets its headings: uppercase, spaced out */
+html.omarchy :is(.label, .pop li.group, .kpi span, .editor .ehead + * .k) { letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }
+html.omarchy .brand { letter-spacing: 0; font-weight: 700; }
+
+/* the tabs: no track, the chosen one a faint square with its text in the accent */
+html.omarchy .seg { background: transparent; }
+html.omarchy .seg > .thumb { background: var(--om-sel); }
+html.omarchy :is(.seg button.on, .ptabs button.on, .opt.on) { color: var(--accent); }
+html.omarchy :is(.segs, .ptabs) { background: transparent; }
+html.omarchy :is(.segs, .ptabs) > .thumb { background: var(--om-sel); box-shadow: inset 0 0 0 1px var(--om-sel-line); }
+
+/* lists: a hairline frame, rows picked out by a faint fill */
+html.omarchy .list { border: 1px solid var(--line); background: transparent; }
+html.omarchy .row:hover { background: var(--om-hover); }
+
+/* controls: Omarchy's buttons are a faint fill under a thin edge */
+html.omarchy .field, html.omarchy body.panel .field, html.omarchy body.panel .field:hover { background: var(--om-hover); box-shadow: inset 0 0 0 1px var(--om-hover-line); }
+html.omarchy .field:hover { background: var(--om-sel); }
+html.omarchy .field.open, html.omarchy body.panel .field.open { box-shadow: inset 0 0 0 1px var(--accent); }
+html.omarchy .icon:hover { background: var(--om-sel); color: var(--accent); }
+html.omarchy .text.primary { background: var(--accent); color: var(--accent-fg); }
+
+/* a menu's row under the cursor or keys: the fill and the accent, like Walker's */
+html.omarchy :is(.pop li.sel, .pop li:hover:not(.group), .row-menu .rm-item:not(:disabled):is(:hover, :focus)) { background: var(--om-sel); color: var(--accent); }
+html.omarchy :is(.pop li.sel, .pop li:hover) :is(.v, .n) { color: inherit; }
+
+/* Linux's close button: square like the rest */
+html.omarchy .icon.winclose { background: transparent; }
+html.omarchy .icon.winclose:hover { background: var(--red-soft); color: var(--red); }
+
+html.omarchy ::selection { background: var(--om-sel); color: var(--accent); }
diff --git a/internal/gui/assets/omarchy.js b/internal/gui/assets/omarchy.js
new file mode 100644
index 000000000..cdfe7e650
--- /dev/null
+++ b/internal/gui/assets/omarchy.js
@@ -0,0 +1,46 @@
+// On Omarchy (omarchy.org) magpie's windows take the look of Omarchy's own
+// panels: the current theme's palette and font, square corners and the
+// active border's colour (omarchy.css, under html.omarchy). The theme comes
+// with boot.js before the first paint and is asked again every few seconds
+// while the page shows, so one picked in Omarchy's menu is taken at once.
+// Everywhere else nothing here does anything.
+(() => {
+ const root = document.documentElement;
+ let stamp = "";
+ let style = null;
+ function apply(th) {
+ if (!th || !th.vars) return;
+ root.classList.add("omarchy");
+ root.dataset.omarchyMode = th.mode || "dark";
+ if (th.stamp === stamp) return;
+ stamp = th.stamp;
+ const decls = Object.entries(th.vars).map(([k, v]) => `${k}: ${v} !important;`).join(" ");
+ if (!style) {
+ style = document.createElement("style");
+ style.id = "omarchy-theme";
+ document.head.append(style);
+ }
+ // on the root and the body both, so neither the light/dark palettes nor
+ // the panel's own tints (set on the body) win over the theme
+ style.textContent = `:root.omarchy, :root.omarchy body { ${decls} color-scheme: ${th.mode === "light" ? "light" : "dark"}; }`;
+ for (const e of document.querySelectorAll(".om-theme-name")) e.textContent = th.name || "";
+ window.omarchyTheme = th;
+ window.dispatchEvent(new CustomEvent("omarchy-theme", { detail: th }));
+ }
+ const boot = window.bootPrefs && window.bootPrefs.omarchy;
+ if (!boot) return;
+ apply(boot);
+ // the settings' theme name is drawn after this script runs
+ document.addEventListener("DOMContentLoaded", () => { for (const e of document.querySelectorAll(".om-theme-name")) e.textContent = th().name || ""; });
+ const th = () => window.omarchyTheme || boot;
+ async function poll() {
+ if (document.visibilityState === "visible") {
+ try {
+ const r = await fetch("/api/omarchy", { cache: "no-store" });
+ if (r.ok) apply(await r.json());
+ } catch {}
+ }
+ setTimeout(poll, 2500);
+ }
+ setTimeout(poll, 2500);
+})();
diff --git a/internal/gui/omarchy.go b/internal/gui/omarchy.go
new file mode 100644
index 000000000..6b1fa9047
--- /dev/null
+++ b/internal/gui/omarchy.go
@@ -0,0 +1,72 @@
+package gui
+
+import (
+ "encoding/json"
+ "log"
+ "net/http"
+ "os"
+
+ "github.com/yetone/magpie/internal/omarchy"
+)
+
+// onOmarchy is whether magpie runs on Omarchy, asked once: its windows then
+// take Omarchy's look and its bar's place instead of the tray's.
+var onOmarchy = omarchy.Detect()
+
+// omarchyTheme is the Omarchy theme the page draws with, when on Omarchy.
+func omarchyTheme() (omarchy.Theme, bool) {
+ if !onOmarchy {
+ return omarchy.Theme{}, false
+ }
+ return omarchy.Current()
+}
+
+// barIcon is whether magpie can put its icon in Omarchy's bar (the desktop
+// app on Omarchy's Hyprland; not a browser's page), and whether it has.
+func barIcon(w Windows) map[string]bool {
+ ok := onOmarchy && !isWeb(w) && omarchy.Hyprland()
+ return map[string]bool{"available": ok, "on": ok && omarchy.WidgetOn()}
+}
+
+// omarchyRoutes are Settings' Bar icon: magpie's icon in Omarchy's bar
+// beside its own, opening the quick panel, instead of in the tray's drawer.
+func omarchyRoutes(mux *http.ServeMux, w Windows) {
+ mux.HandleFunc("GET /api/omarchy/widget", func(rw http.ResponseWriter, r *http.Request) {
+ writeJSON(rw, barIcon(w))
+ })
+ mux.HandleFunc("POST /api/omarchy/widget", func(rw http.ResponseWriter, r *http.Request) {
+ var in struct{ On bool }
+ if err := json.NewDecoder(r.Body).Decode(&in); err != nil {
+ fail(rw, err)
+ return
+ }
+ if !barIcon(w)["available"] {
+ http.Error(rw, "Omarchy's bar isn't here", http.StatusConflict)
+ return
+ }
+ var err error
+ if in.On {
+ var exe string
+ if exe, err = os.Executable(); err == nil {
+ err = omarchy.AddWidget(exe)
+ }
+ } else {
+ err = omarchy.RemoveWidget()
+ }
+ if err != nil {
+ fail(rw, err)
+ return
+ }
+ writeJSON(rw, barIcon(w))
+ })
+ // a widget put in by an older magpie, or one elsewhere, runs this one
+ if barIcon(w)["on"] {
+ go func() {
+ if exe, err := os.Executable(); err == nil {
+ if err := omarchy.KeepWidget(exe); err != nil {
+ log.Println("omarchy bar icon:", err)
+ }
+ }
+ }()
+ }
+}
diff --git a/internal/gui/tests/README.md b/internal/gui/tests/README.md
index 4db994dcf..c01c57fd9 100644
--- a/internal/gui/tests/README.md
+++ b/internal/gui/tests/README.md
@@ -208,10 +208,17 @@ new model at once, in the window and in the tray panel's opened row and its
line, the page left where it was; the answer keeps it and says so; a refused
pick puts the old model back with the reason; in English and Chinese.
+`omarchy.test.cjs` holds Omarchy's look to Omarchy: with no Omarchy theme in
+boot.js the page has no omarchy class or theme style, shows the Appearance
+choices and no Bar icon row, and asks nothing of /api/omarchy; with one, the
+theme's background, square corners and its name in place of the choices, and
+Settings → Bar icon, whose On and Off each post and move nothing, hidden when
+the app says Omarchy's bar isn't there; in English and Chinese.
+
With Node.js and Playwright available:
```sh
-node --test internal/gui/tests/menu-scroll.test.cjs internal/gui/tests/click-scroll.test.cjs internal/gui/tests/panel-fold.test.cjs internal/gui/tests/panel-routing.test.cjs internal/gui/tests/gateway-fold.test.cjs internal/gui/tests/routing-kind.test.cjs internal/gui/tests/balance-fix.test.cjs internal/gui/tests/cli-update.test.cjs internal/gui/tests/login-import.test.cjs internal/gui/tests/agy-launch.test.cjs internal/gui/tests/currency.test.cjs internal/gui/tests/usage-ledger.test.cjs internal/gui/tests/update-check.test.cjs node --test internal/gui/tests/signin-callback.test.cjs internal/gui/tests/routing-steady.test.cjs internal/gui/tests/old-webkit.test.cjs internal/gui/tests/session-terminal.test.cjs internal/gui/tests/text-size.test.cjs internal/gui/tests/zcode-site.test.cjs
+node --test internal/gui/tests/menu-scroll.test.cjs internal/gui/tests/click-scroll.test.cjs internal/gui/tests/panel-fold.test.cjs internal/gui/tests/panel-routing.test.cjs internal/gui/tests/gateway-fold.test.cjs internal/gui/tests/routing-kind.test.cjs internal/gui/tests/balance-fix.test.cjs internal/gui/tests/cli-update.test.cjs internal/gui/tests/login-import.test.cjs internal/gui/tests/agy-launch.test.cjs internal/gui/tests/currency.test.cjs internal/gui/tests/usage-ledger.test.cjs internal/gui/tests/update-check.test.cjs internal/gui/tests/omarchy.test.cjs node --test internal/gui/tests/signin-callback.test.cjs internal/gui/tests/routing-steady.test.cjs internal/gui/tests/old-webkit.test.cjs internal/gui/tests/session-terminal.test.cjs internal/gui/tests/text-size.test.cjs internal/gui/tests/zcode-site.test.cjs
```
If Playwright is installed outside the repository, set `NODE_PATH` to the
diff --git a/internal/gui/tests/old-webkit.test.cjs b/internal/gui/tests/old-webkit.test.cjs
index c66045d4b..c3ccd4487 100644
--- a/internal/gui/tests/old-webkit.test.cjs
+++ b/internal/gui/tests/old-webkit.test.cjs
@@ -132,9 +132,12 @@ test("no built-in newer than Safari 15.0 unless compat.js fills it in", async ()
test("compat.js is the first of the page's own scripts", async () => {
const html = await read("index.html");
- const srcs = [...html.matchAll(/