Skip to content

fix(chat): keep unconfirmed effort menus for agents other than Pi (fixes main OMP tests) - #36242

Merged
AmoabaKelvin merged 1 commit into
mainfrom
nwparker/omp-thinking-choices-crossing
Oct 30, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
nwparker/omp-thinking-choices-crossing

Conversation

@nwparker

@nwparker nwparker commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​24 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​24
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​11

ELI5

Two changes merged close together and disagreed about one rule. One says "if Orca isn't sure which thinking levels a model has, hide the menu". The other says "for OMP, show the levels we recorded even when that model isn't running yet". Main's tests have failed since both landed. This keeps the "hide" rule for Pi, where it was meant, and lets every other agent show the menu again.

What Changed

  • Before, on main:
    • The thinking picker hid the menu for any model whose choices weren't confirmed by a running session (effortsKnown: false).
    • For OMP, that removed the recorded thinking choices Restore OMP thinking choices for non-running models #36158 restored for models that aren't running.
    • Claude and Codex rows marked the same way also lost their effort menu, with no test covering it.
    • Four OMP test files fail on main: NativeChatSessionOptionPickers, structured-agent-session-omp-menu-persistence, acp-structured-options, and mobile use-mobile-structured-agent-options.
  • After: only Pi hides unconfirmed menus (fix(pi): the thinking menu before the first message matches the chat's #34592's intent: Pi menus are exact, and guessing would rewrite a saved "off"). OMP, Claude and Codex offer them as they did before fix(pi): the thinking menu before the first message matches the chat's #34592.
  • Mechanism: discoveredModel and structuredAgentSessionOptionCatalog take an optional agent, passed from the session state and the launch picker. effortOption drops an unconfirmed menu only when the agent is pi.

Why

#34592 (Pi) added the blanket check in structured-agent-session-discovered-model.ts, and #36158 (OMP), merged afterwards, depends on the opposite behaviour. Both PRs' tests encode their own intent and both pass with this change. Reverting the check outright would break #34592's Pi test. Changing the OMP expectations would ship the regression, because the OMP picker really did lose its choices.

Linked Issue

Main breakage from #34592 crossing #36158.

Visual Proof

N/A: this restores the behaviour the existing OMP picker tests already pin; there is no new UI.

Testing

  • On main 8aac9c1, ran each file on its own and reproduced all four failures. With this change, all four pass. The mobile test fails without the change and passes 34/34 with it.

  • Added structured-agent-session-discovered-model.test.ts: Pi hides an unconfirmed menu, while OMP, Claude, Codex and no agent offer it.

  • Ran src/shared, src/main/{acp,pi,native-chat,claude,codex} and the renderer native-chat suites: 29316 passed, none failed. That includes fix(pi): the thinking menu before the first message matches the chat's #34592's Pi option-view tests.

  • Ran pnpm tc, typecheck:ci, check:code-quality:changed, oxlint, the anti-slop lint, the ast-grep gates and check:process-host-imports. All pass.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Flag-off / User-risk: there is no flag. OMP users get recorded thinking choices back for models that aren't running. Claude and Codex models with unconfirmed effort lists show their menu again, as before fix(pi): the thinking menu before the first message matches the chat's #34592. Pi is unchanged.
  • No wire change; the logic is client-side shared code. SSH and mobile use the same shared function.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

#34592 made the effort picker hide any model whose effort menu is
unconfirmed (effortsKnown: false), which Pi needs because its menus are exact.
#36158 relies on OMP showing exactly such recorded menus for models that are
not running, so the two merged into failing OMP tests on main. The hide now
applies to Pi only; OMP, Claude and Codex offer unconfirmed menus as before.
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5821e00e-ce44-4221-a707-e435f7470479
Commits

Reviewing files that changed from the base of the PR and between 8aac9c1 and e640543.

Files selected for processing: 4
  • src/shared/agent-launch-picker-catalog.ts
  • src/shared/structured-agent-session-discovered-model.test.ts
  • src/shared/structured-agent-session-discovered-model.ts
  • src/shared/structured-agent-session-options.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Walkthrough

Model option construction now passes agent identity to effort-choice handling. When effort availability is unconfirmed, the logic suppresses choices for Pi and retains them for other agents. Tests cover Pi, OMP, Claude, Codex, and an unspecified agent.

Priority: Normal

Merge Risk: Minimal · up to e6405

Pi hides unconfirmed effort choices while other agents retain them. No merge-blocking issue was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the primary change: unconfirmed effort menus remain available for agents other than Pi.
Description check Passed The description is detailed and covers the change, rationale, testing, scope, and checklist. The Linked Issue section does not contain an actual issue reference, and the standard lint, typecheck, test…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description is detailed and covers the change, rationale, testing, scope, and checklist. The Linked Issue section does not contain an actual issue reference, and the standard lint, typecheck, test, and build checklist items remain unchecked, but the description is otherwise mostly complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 4 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants