Skip to content

fix(browser): match German Intelligence effort labels; keep current tier when none match - #357

Open
Jonasdero wants to merge 4 commits into
steipete:mainfrom
Jonasdero:fix/browser-german-effort-labels
Open

fix(browser): match German Intelligence effort labels; keep current tier when none match#357
Jonasdero wants to merge 4 commits into
steipete:mainfrom
Jonasdero:fix/browser-german-effort-labels

Conversation

@Jonasdero

Copy link
Copy Markdown

Summary

  • Match German Intelligence effort labels (Sofort / Mittel / Hoch / Sehr hoch, Intelligenz, Pro Erweitert) — LEVEL_TOKENS was English + Chinese only, and normalize() stripped umlauts before matching could see them, so a German workspace could never have its effort set at all
  • Match Latin effort labels as whole words/phrases instead of substrings, so row descriptions (Hoch – für sehr komplexe Aufgaben) and unrelated UI words (Hochladen, Ermitteln) can no longer decide the tier; sehr hoch / extra high now require the adjacent phrase rather than two independent tokens
  • Stop hard-wiring Pro for GPT-5.6 + heavy: 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
  • Document why launched Chrome is pinned to --lang=en-US and why localized matching is still required despite it

Follow-up to #354 / #353, which fixed extra-high vs heavy for the English UI only.

Why the German path exists at all

--lang=en-US --accept-lang=en-US,en in buildChromeFlags() (src/browser/chromeLifecycle.ts) applies only to Chrome that Oracle launches. --browser-attach-running and --remote-chrome never 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's textContent, 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 single matchesTokens() used by both matchesLevel and matchesAnyEffortLevel.

Proof

pnpm vitest run — 1676 passed, 43 skipped (169 files); pnpm exec tsc --noEmit and oxlint clean; pnpm run build OK.

New unit coverage drives a German Intelligence menu table-style: light→Sofort, standard→Mittel, extended→Hoch, extra-high→Sehr hoch, plus negative cases proving Sehr hoch never satisfies extended, Hoch never satisfies extra-high, Hoch – für sehr komplexe Aufgaben is still extended, and Hochladen matches nothing. Two tests that asserted GPT-5.6 + heavy switches to Pro now assert option-not-found.

Live browser smoke, built CLI, GPT-5.6 Sol, manual-login profile temporarily launched with --lang=de-DE so ChatGPT rendered German (flag reverted before commit; verified git status clean):

flag session [browser] Thinking time:
--browser-thinking-time light de-smoke-light Sofort5.5
--browser-thinking-time standard de-smoke-standard Mittel
--browser-thinking-time extended de-smoke-extended Hoch
--browser-thinking-time extra-high de-smoke-extra-high Sehr hoch
--browser-thinking-time heavy de-smoke-heavy option not found (requested Heavy); keeping the effort already selected in ChatGPT.

All five runs report resolvedLabel=GPT-5.6 Sol; verified=yes — notably the heavy run, which on 0.17.0 would have clicked Pro. A control run on the normal en-US launch profile still reports Extra High (already selected) for extra-high, so English behaviour is unchanged.

Docs: docs/browser-mode.md notes the supported label languages and the keep-current-tier fallback; CHANGELOG updated under 0.17.1.

@clawsweeper re-review

… 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.
@Jonasdero
Jonasdero force-pushed the fix/browser-german-effort-labels branch from 7580787 to 794b468 Compare August 5, 2026 14:01
@Jonasdero Jonasdero closed this Aug 5, 2026
@Jonasdero
Jonasdero deleted the fix/browser-german-effort-labels branch August 5, 2026 14:02
@Jonasdero
Jonasdero restored the fix/browser-german-effort-labels branch August 5, 2026 14:02
@Jonasdero Jonasdero reopened this Aug 5, 2026
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 Urgent regression or broken agent/channel workflow affecting real users now. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 5, 2026, 4:51 PM ET / 20:51 UTC.

ClawSweeper review

What this changes

This 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 provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

⚠️ Needs maintainer review before merge - 3 items remain

Keep open: the German-label work is useful, but the branch removes the established GPT-5.6 heavy → explicit Pro selection when a Pro row is available. The same P1 blocker remains at the unchanged reviewed head.

Priority: P1
Reviewed head: 794b46893299dfff6c5826126f117f759d596412

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The localization patch has strong live proof and focused coverage, but one compatibility-critical selection path remains incorrect.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies after-fix live browser output for all German effort levels plus an English control run; it is sufficient proof for the localization behavior, though it also exposes the remaining heavy contract mismatch.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies after-fix live browser output for all German effort levels plus an English control run; it is sufficient proof for the localization behavior, though it also exposes the remaining heavy contract mismatch.
Evidence reviewed 4 items Current documented contract: Current main documents that GPT-5.6 Sol maps extra-high to Extra High and heavy to Pro.
Current implementation behavior: Current main explicitly finds the standalone Pro row for a GPT-5.6 heavy request in the Intelligence menu before generic effort matching.
Merged contract provenance: The currently documented distinction between Extra High and explicit Pro was introduced by the merged follow-up for the related report; no release tag contains that commit, so it is current-main behavior.
Findings 1 actionable finding [P1] Preserve standalone Pro selection for heavy
Security None None.

How this fits together

Oracle 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]
Loading

Before merge

  • Preserve standalone Pro selection for `heavy` (P1) - Restore the guarded GPT-5.6 heavy lookup for a standalone Pro row. Current main and the documented contract reserve heavy for explicit Pro; changing this path to option-not-found leaves an existing user on whatever lower tier was already selected even though Pro is available.
  • Resolve merge risk (P1) - Merging would make existing GPT-5.6 users with --browser-thinking-time heavy or browser.thinkingTime: "heavy" retain a lower current tier even when the UI exposes the documented standalone Pro choice.
  • Complete next step (P2) - A single source-path repair can restore the established heavy behavior without changing the localized matching design.

Findings

  • [P1] Preserve standalone Pro selection for heavysrc/browser/actions/thinkingTime.ts:461-476
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch surface 5 files; production +93/-72, tests +179/-3 The behavior change is concentrated in the browser effort selector with substantial focused regression coverage.

Merge-risk options

Maintainer options:

  1. Restore explicit Pro for heavy (recommended)
    Restore the GPT-5.6 heavy branch that selects a standalone Pro row, while retaining the keep-current fallback only when that row is absent.
  2. Accept changed heavy semantics
    Intentionally change heavy to mean best-effort no-op when its exact token is absent, then obtain maintainer approval and revise the documented contract.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Restore guarded GPT-5.6 `heavy` selection of a standalone Pro row; retain the no-match fallback only when no Pro row exists, and add regression coverage for both cases.

Technical review

Best possible solution:

Keep localized matching and the no-match fallback, but retain the guarded standalone-Pro selection for GPT-5.6 heavy; only leave the current tier unchanged when no explicit Pro row exists.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main documents and implements heavy as explicit Pro for GPT-5.6, while this branch removes that selection and changes its regression tests to expect no matching option.

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 heavy.

Full review comments:

  • [P1] Preserve standalone Pro selection for heavysrc/browser/actions/thinkingTime.ts:461-476
    Restore the guarded GPT-5.6 heavy lookup for a standalone Pro row. Current main and the documented contract reserve heavy for explicit Pro; changing this path to option-not-found leaves an existing user on whatever lower tier was already selected even though Pro is available.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against d0898f4bd765.

Labels

Label justifications:

  • P1: The patch would regress the documented heavy browser workflow for GPT-5.6 users with an available Pro row.
  • merge-risk: 🚨 compatibility: Existing CLI and persisted heavy settings would stop selecting their documented explicit Pro tier after upgrade.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body supplies after-fix live browser output for all German effort levels plus an English control run; it is sufficient proof for the localization behavior, though it also exposes the remaining heavy contract mismatch.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix live browser output for all German effort levels plus an English control run; it is sufficient proof for the localization behavior, though it also exposes the remaining heavy contract mismatch.

Evidence

Acceptance criteria:

  • [P1] pnpm vitest run tests/browser/thinkingTime.test.ts.
  • [P1] pnpm exec tsc --noEmit.
  • [P1] Redacted live GPT-5.6 browser smoke confirming heavy selects a visible Pro row.

What I checked:

  • Current documented contract: Current main documents that GPT-5.6 Sol maps extra-high to Extra High and heavy to Pro. (docs/browser-mode.md:104, d0898f4bd765)
  • Current implementation behavior: Current main explicitly finds the standalone Pro row for a GPT-5.6 heavy request in the Intelligence menu before generic effort matching. (src/browser/actions/thinkingTime.ts:461, d0898f4bd765)
  • Merged contract provenance: The currently documented distinction between Extra High and explicit Pro was introduced by the merged follow-up for the related report; no release tag contains that commit, so it is current-main behavior. (src/browser/actions/thinkingTime.ts:461, a1825d09aede)
  • Re-review continuity: The current head is the same SHA as the prior completed review, whose P1 finding required preserving explicit Pro selection for heavy; the PR body and changed tests still intentionally expect option-not-found instead. (tests/browser/thinkingTime.test.ts:612, 794b46893299)

Likely related people:

  • ozeron: Authored the merged follow-up that separated extra-high from explicit Pro and established the current behavior this patch must preserve. (role: introduced current selection contract; confidence: high; commits: a1825d09aede; files: src/browser/actions/thinkingTime.ts, docs/browser-mode.md)
  • dragonfsky: Introduced the GPT-5.6 unified effort-picker support that owns the affected browser menu path. (role: GPT-5.6 picker contributor; confidence: high; commits: 220fbd18bfc7; files: src/browser/actions/thinkingTime.ts)
  • Peter Steinberger: Has the strongest sustained history in the browser thinking-time implementation and documentation. (role: recent area contributor; confidence: medium; commits: 467b41805961, f7efb31d41e3; files: src/browser/actions/thinkingTime.ts, docs/browser-mode.md)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore standalone-Pro selection for GPT-5.6 heavy and keep the fallback only when Pro is absent.
  • Re-run the existing live browser smoke with a visible Pro row and record that heavy selects Pro; redact account details before posting output.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-05T14:06:38.810Z sha 794b468 :: needs changes before merge. :: [P1] Preserve heavy selecting the available Pro row
  • reviewed 2026-08-05T16:33:24.885Z sha 794b468 :: needs changes before merge. :: [P1] Preserve heavy selecting the available Pro row
  • reviewed 2026-08-05T19:40:56.509Z sha 794b468 :: needs changes before merge. :: [P1] Preserve heavy selecting the available Pro row

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P1 Urgent regression or broken agent/channel workflow affecting real users now. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant