Commit Graph
6 Commits
Author SHA1 Message Date
yetone 1493acb468 gui: Codex's memories default reads right on Codex 0.167.0 and before
Codex 0.167.0 (openai/codex#58091) moved its default memory models:
extraction from gpt-5.6-luna to gpt-6-luna, consolidation from
gpt-5.6-terra to gpt-6.1-terra. The memories square's unset text and the
Settings row's tooltip named the old pair. They now say "Codex's own
memory models", true on either version, in en, zh, zh-TW, ja and de.
The code comments (agent/codex.go, gateway/codex_memory.go,
gateway/codex_follow.go, the tests' headers) name both pairs with the
Codex version that uses them. No behaviour changes: magpie routes these
calls by kind (memgen, memory_consolidation), not by the model name.

Run on mote at the pre-rebase base 4e7661adc, both engines:
node --test codex-memories, codex-memories-settings, agent-prefs,
codex-sheet-providers, settings-general, i18n-keys, i18n-en-no-cjk:
127 of 128 ok. The one red is i18n-keys "a plugin's words are its own"
("No session ID", "View routing"), red on main before this change and
filed as #5327, #5332 and #5426. go vet of internal/agent and
internal/gateway for darwin, linux and windows, and gofmt -l: clean.
Not broken by hand: text-only change; codex-memories.test.cjs asserts
the new en and zh strings, so the old text fails it.
Not tried: a real Codex 0.167.0 writing memories through magpie.
2026-11-06 09:59:56 +08:00
yetone ce8b67de37 gui tests: a page's first load gets a minute, not a click's 5s (#4470)
claude-switch-only set page.setDefaultTimeout(5000) and then called
page.goto with no timeout of its own, so Playwright held the first load
of app.js, i18n.js and the plugins to the 5s bar meant for clicks. On a
busy box (a whole-suite run at load 130-160) that load took longer and
goto timed out. The same pattern is in 988 GUI test files (1174 pages):
every one of them now also sets setDefaultNavigationTimeout(60000) on
the same page, right after its default, so goto, reload and waitForURL
wait on the load itself with room, while clicks and waits keep their
short bar. group-from-model-add's own 20s navigation bar is raised to the
same minute. claude-switch-only also gives its first provider row (drawn
from the page's first reads) a minute before clicking it.

nav-timeout.test.cjs (no browser) reads every GUI test file and names
each page given a default under a minute without a navigation timeout of
at least a minute, so a new file can't bring the pattern back.

What was run (WSL magpie-desktop, Playwright 1.62.0, load 70-260 from
other sessions):
- node --check on every file in internal/gui/tests: all parse.
- nav-timeout.test.cjs against origin/main's test files: red (names the
  1174 pages); against this tree: its only reds were my own probe copies
  of the old files, since removed.
- By hand: claude-switch-only with app.js served 7s late (a busy box's
  first load), --test-name-pattern "1100 en": origin/main's file 4 of 4
  red with "page.goto: Timeout 5000ms exceeded"; this file 4 of 4 green.
- claude-switch-only.test.cjs, both engines, en/zh/ja/de, 1100 and 420:
  32 of 32. group-from-model-add, usage-access-key-card and i18n-keys:
  green. agent-plugin-agents: Chromium green; WebKit's de 420 subtest red
  on a 5s waitForFunction at line 115 (a wait after load, not the
  navigation), at load ~230.

Not tried: the whole GUI suite (about 1000 files; the change is one
mechanical line per page), Windows or mote (mote's browsers, #4125).
2026-10-31 02:09:18 +08:00
yetone a1174674da codex: subagents and memories follow the session's magpie model; auto-review can too (cybercaius on Discord)
Codex's side calls ask for one of Codex's own models by its bare name
whatever the conversation is on: a subagent goes on the model the lead
names in spawn_agent, memories on gpt-5.6-luna/terra, auto-review on
codex-auto-review. With Codex signed in to ChatGPT and the conversation
routed onto one of magpie's models, each of those went to the ChatGPT
account instead (cybercaius: "can't pick follow the main model").

- gateway (codexFollowTo, codexLeads): a collab_spawn or memory call
  that asks for a bare model, with nothing set for it (no magpie
  subagent model, no [agents] default_subagent_model, no [memories]
  extract/consolidation_model in Codex's config), goes on the model its
  conversation's own turns go on (parent thread, own thread, else the
  key's last turn), when that is a magpie model the key may use. A task
  the ChatGPT backend sealed stays on ChatGPT. The trace shows a
  subagent's pick as {asked -> to}.
- agent.CodexSideSet reads Codex's config.toml for those keys; an
  unreadable config counts as set (leave as sent).
- Auto-review gets "Same as the session" (settings value "session"):
  codexcat writes each magpie entry's own id as its
  auto_review_model_override. Not the default: codex-auto-review runs
  free on a ChatGPT sign-in (#1593).
- GUI: the option in all languages; Memories' default text says it
  follows the session. app.js stays under its budget by folding five
  identical writingPrefs then/catch chains into prefWrite.

Ran (sandbox HOME, -tags nogui -count=1 -timeout 45m):
- go test ./internal/gateway ./internal/agent ./internal/codexcat
  ./internal/settings ./internal/cli ./internal/gui: ok.
  ./internal/provider: FAIL with "close of synctest channel from outside
  bubble" in filememo.Forget (TestUnreadLoginsWriteErrorsKeepCredentials),
  which is #3632 on main; this change touches nothing there.
- TestCodexSubagentFollowsTheSession and TestCodexMemoriesFollowTheSession
  go red with codexFollowTo returning "" (broken by hand).
  TestCodexSideCallsKeepTheConfigsModel, TestCodexSideCallsStayOnChatGPT,
  TestCodexSideSet, TestCodexAutoReviewFollowsTheSession pass.
- GUI (playwright 1.62.0, chromium + webkit): codex-auto-review (en, zh,
  zh-TW, ja, de), codex-memories, codex-memories-settings, codex-titles,
  codex-predictions, codex-descriptions, settings-general, agent-prefs,
  i18n-keys: 120/120 pass. TestCoreScriptBudget passes, budget unchanged.
- gofmt -l clean; go vet -tags nogui for linux, windows and darwin ok.

Again after rebasing on origin/main 49f15d124 (25341b4ca on top touches
only internal/redact; rebuilt): nogui builds (darwin, linux,
windows), TestCoreScriptBudget, the tests above, and the GUI files 120/120.

Not tried: a real Codex with a real ChatGPT account and a relay model.
2026-10-26 15:35:12 +08:00
yetone 3ee37aea64 gui: Codex's card has no subagent-model or memories square beside its settings rows
Codex's sheet has "Codex subagent model" and "Codex memories model" as
named rows (renderCodexSubagentModel, renderCodexMemories), just under
the card, and the card also drew a square for each: the same setting
twice (the owner, 10-25, a screenshot of the notebook square beside the
memories row). The squares are no longer drawn for the Codex those rows
read (id "codex", not gateway mode); they are left out of the extras
count and of the extras toggle too. A Codex in WSL, which the rows don't
read, keeps its squares.

Tests: codex-memories and codex-subagent-model run the square on a WSL
Codex and check Codex's own card has none; codex-subagent-model picks
and resets through #codexSubagentModelRow; codex-memories-settings
resets through the row instead of the square.

Run: GUI codex-memories, codex-memories-settings, codex-subagent-model,
codex-subagents-lead, desktop-subagent-model, Chromium and WebKit, every
language and width they have: 82 of 82. Earlier run of these plus
codex-start-model-field, subagent-effort, agent-prefs, agent-tweak-fold,
gateway-mode and mobile-web at concurrency 4: only the expected square
reds plus two page.goto/click timeouts under load (codex-subagents-lead
webkit zh-TW 560, desktop-subagent-model webkit zh 1100), both green in
the 82-of-82 run. After the rebase on origin/main the change was trimmed (one sq helper
for the extras toggle and count) and the budgets raised to its size:
app.js 1,322,537, core 1,530,050, with no room added (TestCoreScriptBudget
ok). Rerun at that tree: codex-memories, codex-memories-settings,
codex-subagent-model, agent-tweak-fold, gateway-mode, 58 of 60; the two
reds are gateway-mode's masking tab, red the same on origin/main
9dc7d6eb8 run alone (#3586). Not run: the full GUI suite or go test ./....
2026-10-25 17:04:02 +08:00
yetone 14b6b2b2ad settings: the model Codex writes its memories with is picked in Settings › General too, under "Codex auto-review model" (#985, Hu9956: it was only the notebook square on Codex's card, unlabeled beside the subagent squares, and wasn't found; on a Free account two rounds of memory consolidation took the 30-day window from 100 to 34) — a "Codex memories model" row with a line that says what happens: unset, Codex's own gpt-5.6-luna and gpt-5.6-terra whatever model the conversation is on; set, this model. Its button opens the same app model picker as the square, on Codex's own memories field, and a pick goes through the same setPick and /api/set, so the row and the square are one setting: renderAgents draws the row again after every pick, from either place. No Codex with the field to pick (or gateway mode): no row. The square stays; its tooltip and aria-label now read "Codex memories model: …" in place of the bare "memories: …". zh/ja/de strings added. codex-memories-settings (Chromium and WebKit, 440px and 1100px, en/zh/ja/de: the row beside auto-review, no native select, fits the row, a pick posts {codex, memories} and lights the square, Default on the square puts the row back to Codex's own, no click scrolls Settings; no Codex, no row) fails on origin/main 97c2fac1 (no row) and passes 18/18; codex-memories (its square label updated), codex-auto-review, codex-titles, i18n-keys, gui-ja, gui-de and click-scroll pass. No Go change. 2026-10-06 14:13:19 +08:00
yetone eafb1845e8 agent, gui: Codex's row has a square for the model it writes its memories with (Yc on Discord) — Codex sums each thread up with gpt-5.6-luna and consolidates its memories with gpt-5.6-terra (medium), whatever model it runs, and nothing in magpie could change that. Codex reads both from config.toml's [memories] extract_model and consolidation_model (codex-rs/config/src/types.rs; the defaults are memory_extraction_preferred_model / memory_consolidation_preferred_model in model-provider). Codex's row now has a memories square beside the subagents' one, opening the app's model picker: a model picked writes both keys, Default removes them (and a [memories] table left empty), the user's other [memories] keys stay. A model of magpie's is offered and taken only while Codex runs through magpie, as for subagents, and is removed when Codex steps out of magpie or is disconnected, since Codex could no longer find it. Unset, its title says what Codex uses. en/zh/ja/de. TestCodexMemoriesModel and TestCodexMemoriesUnwire (temp HOME) fail without the change; codex-memories.test.cjs (WebKit, en and zh: the square and its unset title, no square with nothing to pick, the model picker with Default first, a pick posted and lit, Default posts "", no select, no scroll, no left border) fails without it. subagent-effort, click-scroll, codex-titles, agent-start-pick and desktop-tiers pass in WebKit. go vet, go build (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui ./... under a temp HOME pass. 2026-10-05 19:11:34 +08:00