Files
magpie/internal/settings/codex_open_test.go
T
yetone 3d4c8edcea gui: Open the Codex app is in Codex's row menu, not a button on its row
ee1553913 (Yink88564391 on X) put an Open button on Codex's Agents row,
between its Details and its model picker, so that row's Details sat
further left than every other row's (the owner, 11-13: "导致整个页面在
视觉上不是对齐的"). The button is gone. Codex's row menu, beside Open in
terminal, has "Open the Codex app" where the desktop app is installed
and Open Codex with doesn't say Terminal (openApp); it posts agents/open
with the id alone as the button did. With no app, Open in terminal is
the menu's only way, as before the button. The tray panel and the web
build have neither. Its CSS and the "Open Codex in a terminal" words go;
comments and the setting's error say "Open Codex with", not the button.

codex-open-button.test.cjs now opens the menu, and checks every
connected row's Details and model picker start at one x.

Run (mica): GUI codex-open-button 62/62, agent-open-terminal 24/24,
agent-prefs 56/56, i18n-keys, i18n-en-no-cjk, chromium and webkit,
en/zh/zh-TW/ja/de, 900 and 400px; go vet internal/gui, settings,
provider; go test internal/gui, settings, provider, agent -run
"Codex|Budget|Settings" ok; gofmt clean.
Broken by hand: the button put back on the row turns the line-up check
red (codex 479 vs claude 532 at 900px, every language).
Again at 5c1c38f63 after the rebase onto dbaf9d68c (mica): codex-open-button 62/62,
i18n-keys, go test internal/gui -run "Budget|Codex" ok.
Not tried: a real Codex app open from the menu; Windows and Linux.
2026-11-13 04:22:45 +08:00

14 lines
377 B
Go

package settings
import "testing"
// Open Codex with is this computer's own: another
// computer's sync does not carry it in.
func TestCodexOpenIsThisComputers(t *testing.T) {
from := Settings{CodexOpen: "app"}
from.KeepOwn(Settings{CodexOpen: "terminal"})
if from.CodexOpen != "terminal" {
t.Fatalf("a sync replaced the computer's own choice: %q", from.CodexOpen)
}
}