The Codex row on the Agents page now has an Open button beside the start button. It opens the Codex desktop app (mac and Windows) when it is installed, else Codex's CLI in a terminal. "Open Codex with" in Codex's details (Automatic, Codex app, Terminal) picks which; it is this computer's own setting (settings.CodexOpen, kept across a sync and a Settings save). The row menu's Open in terminal still opens the terminal. The web build has no button. Run (mica): go test internal/gui, agent, settings, settingsapi, provider ok; gofmt clean; GOOS=windows vet and GOOS=linux -tags nogui vet clean; GUI codex-open-button (62), agent-open-terminal (24), i18n-keys, codex-service-tier in chromium and webkit, en/zh/zh-TW/ja/de, narrow. agent-prefs lists the new row. Broken by hand: codexOpensApp always false turns TestCodexOpenButton red. Budget: coreScriptBudget +1,112 for this code, packed small, no page to move it to. Reds on main before this change, same count ate18aca103without it: agent-details-ready (16 chromium), gui-ja and gui-de (one string), agent-prefs panel-sheet test (5 chromium), and from4e0026661plugin-signed-out-account, plugin-signin-no-url, saved-signedout-remove, signin-proxy. Not caused here; not fixed here. Not tried: a real Windows launch of the Codex app, a real macOS app open, Linux.
14 lines
396 B
Go
14 lines
396 B
Go
package settings
|
|
|
|
import "testing"
|
|
|
|
// The Open button's choice for Codex 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)
|
|
}
|
|
}
|