fix(browser): match German Intelligence effort labels; keep current tier when none match - #357
fix(browser): match German Intelligence effort labels; keep current tier when none match#357Jonasdero wants to merge 4 commits into
Conversation
… match ChatGPT's Intelligence effort menu is localized, but LEVEL_TOKENS only carried English and Chinese variants, so a German workspace (Sofort / Mittel / Hoch / Sehr hoch) could never have its effort set at all — normalize() even stripped umlauts before matching could see them. - Add German tokens and NFC-compose + fold ä/ö/ü/ß before the ASCII+CJK strip. - Guard 'hoch' (must not be 'sehr hoch') and 'sehr hoch' (must be both), mirroring the existing English high / extra high guards. - Recognize "Intelligenz" and Denkdauer/Denkzeit menu labels. - Drop the GPT-5.6 heavy pre-pass that returned the first Pro row before any effort-label matching: a request that matches no row now leaves the tab's current selection alone instead of silently switching to Pro. Accepting an already-Pro pill for 5.6 heavy stays, but only before a click — it no longer doubles as post-click verification.
Follow-up to the German label support, from second-model review:
- Match Latin effort labels as whole words/phrases, not substrings. Row text
carries descriptions ("Hoch – für sehr komplexe Aufgaben") and unrelated UI
words contain the labels ("Hochladen", "Ermitteln"), both of which used to
decide the tier. 'sehr hoch' / 'extra high' now require the adjacent phrase
instead of two independent tokens.
- Fold that logic into one matchesTokens() used by matchesLevel and
matchesAnyEffortLevel, so per-row classification has a single source of truth.
- Keep substring semantics where the text is a whole menu's textContent
(countEffortLevels, isProEffortMenu): adjacent rows concatenate without a
separator there ("Pro StandardPro Extended"), so word boundaries do not hold.
- Accept "Pro Erweitert" wherever "Pro Extended" was hard-coded, and recognize
"Intelligenz" / Denkdauer / Denkzeit menu labels.
The pinned locale only applies to Chrome that Oracle launches; attach-running and remote-chrome runs inherit the user's locale, so localized label matching is still required.
When no effort row matches we no longer click anything, so the tab retains whatever tier was already selected — which is not necessarily the default.
7580787 to
794b468
Compare
|
Codex review: needs changes before merge. Reviewed August 5, 2026, 4:51 PM ET / 20:51 UTC. ClawSweeper reviewWhat this changesThis PR adds German and phrase-aware matching for ChatGPT browser effort menus and retains the current tier when no requested row can be found. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readinessKeep open: the German-label work is useful, but the branch removes the established GPT-5.6 Priority: P1 Review scores
Verification
How this fits togetherOracle browser mode translates the CLI thinking-time setting into a selection in ChatGPT’s rendered effort menu before submitting a prompt. The selected tier is then logged and retained in session metadata for the browser run. flowchart LR
A[CLI thinking-time option] --> B[Browser automation]
B --> C[ChatGPT effort menu]
C --> D[Localized label matching]
D --> E[Selected effort tier]
E --> F[Browser session log]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep localized matching and the no-match fallback, but retain the guarded standalone-Pro selection for GPT-5.6 Do we have a high-confidence way to reproduce the issue? Yes, from source: current main documents and implements Is this the best way to solve the issue? No. The localization and phrase-boundary work is a narrow solution, but the unmatched-row fallback must not replace the existing standalone-Pro path for Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d0898f4bd765. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
Summary
Sofort/Mittel/Hoch/Sehr hoch,Intelligenz,Pro Erweitert) —LEVEL_TOKENSwas English + Chinese only, andnormalize()stripped umlauts before matching could see them, so a German workspace could never have its effort set at allHoch – für sehr komplexe Aufgaben) and unrelated UI words (Hochladen,Ermitteln) can no longer decide the tier;sehr hoch/extra highnow require the adjacent phrase rather than two independent tokensheavy: a level with no matching row leaves the tab's current effort alone instead of silently switching the model to Pro, and the log now says so--lang=en-USand why localized matching is still required despite itFollow-up to #354 / #353, which fixed
extra-highvsheavyfor the English UI only.Why the German path exists at all
--lang=en-US --accept-lang=en-US,eninbuildChromeFlags()(src/browser/chromeLifecycle.ts) applies only to Chrome that Oracle launches.--browser-attach-runningand--remote-chromenever build those flags (src/browser/controlPlan.ts) and inherit the user's own Chrome locale, and a ChatGPT account language setting can localize the UI even on the launch path. Both are now stated in a comment above the flags so the next reader doesn't conclude English is the only case to handle.Whole-menu vs per-row text
countEffortLevels()/isProEffortMenu()read a whole menu'stextContent, where adjacent row labels concatenate without a separator ("Pro StandardPro Extended"), so word-boundary matching does not hold there and substring matching is kept deliberately. Per-row classification goes through a singlematchesTokens()used by bothmatchesLevelandmatchesAnyEffortLevel.Proof
pnpm vitest run— 1676 passed, 43 skipped (169 files);pnpm exec tsc --noEmitandoxlintclean;pnpm run buildOK.New unit coverage drives a German Intelligence menu table-style:
light→Sofort,standard→Mittel,extended→Hoch,extra-high→Sehr hoch, plus negative cases provingSehr hochnever satisfiesextended,Hochnever satisfiesextra-high,Hoch – für sehr komplexe Aufgabenis stillextended, andHochladenmatches nothing. Two tests that asserted GPT-5.6 +heavyswitches to Pro now assertoption-not-found.Live browser smoke, built CLI, GPT-5.6 Sol, manual-login profile temporarily launched with
--lang=de-DEso ChatGPT rendered German (flag reverted before commit; verifiedgit statusclean):[browser] Thinking time:--browser-thinking-time lightde-smoke-lightSofort5.5--browser-thinking-time standardde-smoke-standardMittel--browser-thinking-time extendedde-smoke-extendedHoch--browser-thinking-time extra-highde-smoke-extra-highSehr hoch--browser-thinking-time heavyde-smoke-heavyoption not found (requested Heavy); keeping the effort already selected in ChatGPT.All five runs report
resolvedLabel=GPT-5.6 Sol; verified=yes— notably theheavyrun, which on 0.17.0 would have clicked Pro. A control run on the normal en-US launch profile still reportsExtra High (already selected)forextra-high, so English behaviour is unchanged.Docs:
docs/browser-mode.mdnotes the supported label languages and the keep-current-tier fallback; CHANGELOG updated under 0.17.1.@clawsweeper re-review