ac4af582301a4e8a29245dbba767eba31334ddf9
9
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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). |
||
|
|
00d44d6928 |
routing: Codex's composer predictions story says their model is picked in Codex's row on the Agents page (#3425, chiperman)
Routing's Kind description for composer_predictions still sent users to Settings › General › Codex composer predictions. That setting moved to Codex's row on the Agents page. chiperman's commit (5e372e168) fixed the Routing text in five languages. It is ported here with their zh, zh-TW and ja; the de wording is mine. Grepping for other texts that still name the old Settings place for a setting that moved into an agent's row found four more, now fixed: - app.js compactField, the provider editor's "Compact at": empty follows Long conversations, now "in their settings on the Agents page (else in Settings)". The field's text is one string now, and the header comment no longer repeats it, so app.js stays inside its budget (unchanged). - gateway sealedWayOut: "Codex subagents on any model" is in Codex's settings on magpie's Agents page, not "magpie's Settings". - gateway codex_titles: "Codex composer predictions are off" and "Codex titles are off" answers name the same place. - cli `magpie model` help text. Each gateway message has a test that fails on the old wording, and the GUI files assert the new place and the absence of the old one. Run on origin/main |
||
|
|
ea1ba22c32 |
gateway, gui: Codex's composer predictions go where Settings › General says, Off among them (#1970)
pluo's Usage view showed Codex calls of kind composer_predictions at
133k-231k tokens each with no cache read: ChatGPT.app's Codex guesses the
user's next message with a hidden turn on a fork of the thread, on the
thread's own model, reading the whole conversation again each time. It
asks only when the thread's provider is "openai", so through Codex's own
ChatGPT sign-in (and a custom table pointed at magpie). The app's bundle
(fge) asks for {suggestion: string|null} and uses b.suggestion||null.
What changed:
- settings.CodexPredictions: "" as Codex sends it, "off", or a model id
(provider/model, group/<id>); anything else is refused on load.
- gateway: codexPredictionsTo + codexPrediction, wired beside the
descriptions at both entrypoints (gateway.go and codex_backend.go).
Off answers {"suggestion":null} from magpie and sends nothing (the
title Off path made generic as sentNowhere). A model's answer goes back
only as the object Codex asked for (predictionJSON: think tags and code
fences stripped, suggestion trimmed, blank = null). Plain text is never
taken as a suggestion, since Codex would put it in the user's composer
as their next message; it gives null and is recorded as a failure
("prediction: ...").
- usage: purpose "Prediction" for composer_predictions (purposes.js
regenerated).
- gui: POST /api/settings/codex-predictions, kept by the general save;
Settings › General row "Codex composer predictions" (Codex's own / Off /
magpie's models, the app's picker), hidden in gateway mode; Routing's
story for the kind says Codex's own switch (Settings › General › Show
predictions) and magpie's. i18n in zh, zh-TW, ja, de.
- docs: gateway-routing.md's Codex section, reference.md's gateway-mode
list. site/ docs left for the owner.
What was run:
- go test -tags nogui ./internal/gateway/ (full, -timeout 40m),
./internal/gui/ ./internal/settings/ ./internal/usage/: pass.
New: TestCodexPredictionsSetting (default to ChatGPT, off sent nowhere,
model routed, plain turn untouched, ledger kinds), TestNoPrediction,
TestCodexPredictionOnMagpie (/v1/responses and the backend path),
TestPredictionJSON; gui TestCodexPredictionsSetting.
- Broken by hand, each went red: backend wiring removed; plain text
accepted as a suggestion; the general save not keeping the setting;
the Routing story's kind check.
- Playwright codex-predictions.test.cjs: chromium + webkit, 1100 and 420
wide, en/zh/zh-TW/ja/de (20 pass). routing-kind (with the new kind),
codex-descriptions, codex-titles, i18n-keys, gateway-mode,
purpose-filter, routing-purpose-state, settings-general,
settings-sections, settings-search: pass.
- gofmt -l clean; go vet darwin, linux -tags nogui, windows.
Not tried: the real ChatGPT.app's predictions against magpie (the
feature is gated server-side by /wham/predictions/config and isn't on for
the owner's account); the reply shape is from the app's bundle.
|
||
|
|
4701ed9812 |
gui tests: the Routing request-pick tests measure the row once the day's click has settled
routing-proxy failed 2 to 3 runs in 8 in Chromium alone, and routing-zcode-blocked 1 in 2, with "picking the request moved the page". That rate goes back at least 800 commits, so no single commit turned it red. Traced: the row's top was read right after the day's last request row appeared. Those rows grow #rt above the list (294 -> 471 px), and the day button's click is held in place by scrolling the view (219 px) for 4s (held.until in app.js), but the ResizeObserver that does it runs before the next paint, after the test's read. So `was` was taken from a frame no user sees (the day button read 431 against 389 where it was clicked and where it is painted), and the request click then measured the correction. The app keeps its guarantee; the test measured too early. The same read sat in ten tests: remote-group-served, routing-blocked, -burst-speed, -kind, -proxy, -served, -shape, -upstream, -wb-refused and -zcode-blocked. Each now reads the row once its top is the same on two animation frames in a row. routing-failed-open already waited for that. Run: routing-proxy and routing-zcode-blocked six times each in Chromium (0 failures each, against 3/8 and 1/2 before). All ten files in Chromium and WebKit, en and zh, pass. With the click hold switched off in the served app.js (keepHeld and heldSizes) and a pick that scrolls the view by 60px, routing-proxy fails 2/2 in both engines. |
||
|
|
3ce0a0bf27 |
fix: 收敛中文界面文案 (#846)
删去中文提示里的过程叙述和动机解释,保留数字、条件和后果;同步更新相关测试的中文断言。 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
6fa7a8c30b | routing: Codex's home-page suggestions are named, and the story says where Codex turns them off (#705, DuGuaiYA: ambient_suggestions calls on gpt-6-luna every few seconds, 58.5k tokens each, shown by their raw name) — the Codex app drafts the suggested prompts on its home page by itself (thread_source ambient_suggestions, on gpt-6-luna, searching the project's files and connected apps) and checks them with a second call (ambient_suggestion_safety); magpie's Routing and Usage pages showed both by their raw names with the generic "made this call itself" story. Both now read Suggestions (提示词建议), and the story says what the calls are and that Codex's Settings › Configuration › Suggested prompts (设置 › 配置 › 提示词建议) turns them off, as the Codex app 26.x bundle names the setting (settings.agent.ambientSuggestions, key ambient-suggestions-enabled). routing-kind.test.cjs checks both tags and the story in English and Chinese; it fails on the old code. GUI: routing-kind, routing-side-calls and the routing/account tests pass on WebKit (group-from-model-add's two failures are origin/main's); go test ./internal/gui passes. | ||
|
|
8c74f935fd | gui: Codex's title reconsideration and title_generation calls are tagged Title in Routing and Usage, not shown by their raw names (#742, a first step: what Codex's own calls are should be plain to see) — magpie keeps every x-openai-subagent and thread_source Codex sends as the call's kind (guardian/guardian_review/auto_review, review, compact, memory_consolidation/memgen, thread_title, collab_spawn…), and routing.js's KIND map names each, but thread_title_reconsideration (the turn in which Codex's TUI reconsiders a thread's title) and title_generation were left out, though the gateway's isTitleKind treats both as titles (they inherit the chat's session and follow the Codex titles setting), so their tag read "thread_title_reconsideration" under a "made this call itself" tooltip. Both map to Title (标题) now; Codex's recap turn (thread_source "system") keeps its raw name, being no title, review or memory. routing-kind.test.cjs adds a thread_title_reconsideration route, expected as Title/标题, which fails on the old map; its /api/providers fixture gains presets and excluded (app.js read them and put an error in the footer status) and its viewport is 100px taller, so the seventh row isn't under the footer when it is clicked. BROWSER=webkit node --test internal/gui/tests/routing-kind.test.cjs passes 6 runs in a row; chromium could not launch on this machine (Chrome for Testing: icudtl.dat not found in bundle), before and after. go test -tags nogui ./internal/gui/... passes. | ||
|
|
ba2128b7e5 |
Explain sealed subagent routing and clarify quota messages (#703)
* routing: explain sealed subagent eligibility and clarify quota messages * routing: address review wording and document consistency |
||
|
|
f9c99cf370 | gateway: a call Codex makes for itself says so on the Routing page, and goes to a pool account with what Codex says about it (碳碳双键: 为何 codex 桌面选的 5.6sol,但是请求记录…显示的全是 gpt-6-luna) — magpie changes no model: Codex sends its own calls on Luna (the guardian review of an approval, x-openai-subagent: guardian; a thread's title; memories) and, on Luna Reserve once the plan's allowance is used up, every turn with x-openai-codex-luna-reserve. Relayed to Codex's own sign-in these headers went on as they came, but a turn the pool of Codex's accounts served was signed afresh and went without them. Now x-openai-*, x-codex-* (turn metadata, installation, window, parent thread), session_id, conversation_id, x-client-request-id and version go on with it too; never a sign-in (Authorization, chatgpt-account-id, anything with authorization in its name) nor Codex's device attestation, the pool account's own going in its place, nor what holds for Codex's own account alone (x-openai-codex-luna-reserve, as another account's allowance may be left, and x-codex-turn-state, the backend's routing of the turn for that account). The trace, the Recent calls and the usage log keep the call's kind (kind, from x-openai-subagent; memgen; luna_reserve), and the Requests list, a replay and the request's story show it as a grey tag by the model — Approval check / 审批判定, Title / 标题, Memory / 记忆, Subagent / 子代理, Review / 审查, Compaction / 压缩, Luna Reserve / Luna 储备, an unknown one as Codex names it — the story saying Codex made the call itself and picks its model. The Requests list's model column fits its content (up to 36%) so model and tag keep their room, the tag giving way first. Tested with a fake ChatGPT backend on the pool path (acct-1 used up, acct-2 answering: both get the headers and neither the client's sign-in; fails without the change), callKind/codexHeader cases, and a new internal/gui/tests/routing-kind.test.cjs in Chromium and WebKit, en and zh (tags, the model shown whole, the story, a click leaving the row where it is); the other GUI tests, go build -tags nogui, GOOS=windows go build and go test -tags nogui pass |