Skip to content

🤖 fix: Ctrl+I stays out of the command palette, fast mode toast names the real reason - #5756

Open
ThomasK33 wants to merge 4 commits into
mainfrom
fix-focus-followups
Open

ThomasK33 wants to merge 4 commits into
mainfrom
fix-focus-followups

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Two follow-ups from #5744. Ctrl+I in the workspace view no longer moves focus behind the open command palette. The fast mode shortcut now says "this model has no fast mode" for models that have none on any route, instead of blaming the provider route.

Fixes #5752
Refs #5753

Background

Implementation

  • isCommandPaletteTarget(target) in keybinds.ts replaces the inline [cmdk-root] checks. The creation Ctrl+I handler, the workspace Ctrl+I handler and the background-processes shortcut use it.
  • getFastModeUnavailableReason(model, providersConfig) first finds the model's capability identity from the provider config, independent of the route: an explicit mapping or the Coder upstream, then a custom provider's wire dialect (an anthropic-messages provider serving claude-opus-5-5 counts as Opus). It then asks getFastModeProvider about that model on its own provider, called directly. If fast mode works there, the route is the reason. Otherwise the model is.

Validation

New bug-bash repros in tests/bugbash/repros/focusAndLabels.e2e.ts, web and phone. Both fail on main on their own assertion:

Repro Result on main
Ctrl+I in the workspace view leaves focus in the command palette (#5752) ASSERTION_FAILED: expect.toBeFocused
The fast mode shortcut says when the model has no fast mode (#5753) ASSERTION_FAILED: expect.toBeVisible

I restored App.tsx and useAIViewKeybinds.ts from main in a scratch build to get the failures above, then restored the fix: the whole file passes.

The #5753 repro is tagged mock-only. It switches the shared workspace from Opus 5.5 to Haiku 4.5 and back, and the model search matches model ids, not the labels the test can read. Mock mode always starts on Opus 5.5, while real mode starts on BUGBASH_APP_MODEL. Both model switches run inside the try/finally. The finally switches back to Opus 5.5 only when the label is not Opus 5.5 already, so it also works when the first switch fails part way. make test-bugbash-repros on 61fc4f5e21: the mock phase (--tag mock-only) passed 8 of 8 tests, this repro included on web and phone. The main phase (--exclude-tag mock-only) passed 28 of 28. make static-check passed. The older #5693 toast repro stays in the main phase: it checks the "Fast mode is not available" prefix, which both reasons share. A unit test in fastModeServiceTier.test.ts covers the model/route branches: Gemini, Haiku and grok-code-fast-1 give "model". Gateway Opus, OpenRouter GPT and Grok 4.7 give "route". It also covers the provider-config cases: mapped team-opus gives "route", mapped team-haiku gives "model", and an anthropic-messages custom provider serving Opus gives "route". With the config lookup removed, it fails.

Failure-path check of that finally (scratch edits, not committed, on 61fc4f5e21, web and phone). Each variant also checks, at the end of the finally, that the model picker shows Opus 5.5:

Scratch edit Result
Throw right after the first switch (workspace on Haiku 4.5) The finally switched back and saw Opus 5.5. The test failed with the forced error.
Throw before the first switch (workspace still on Opus 5.5) The finally skipped the switch and saw Opus 5.5. The test failed with the forced error.
Control: throw after the switch, switch-back turned off ASSERTION_FAILED: expect.toBeVisible on the Opus 5.5 check, so the check can see a wrong model.

A scratch probe test that ran next in the same app also saw Opus 5.5 in all three variants, the control included. e2e gives each test a fresh browser context, and the picker keeps an existing workspace's model only in browser storage. So in this harness a model switch does not leak into later tests, and the finally only keeps the test's own state clean.

Known limit, tracked in #5764: a model with an unknown identity (an openai-compatible custom provider, an unknown Coder instance) gets the "model" reason.

Risks

Low. Ctrl+I now does nothing while focus is in the command palette, in both views. Only the toast text changes for fast mode.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T21:20:47.677405Z 61fc4f5 New commits
🔒 Security Review ✅ Completed 2026-10-06T21:20:00.093844Z 61fc4f5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c9de4267ca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/utils/fastModeServiceTier.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b45f645b2c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/bugbash/repros/focusAndLabels.e2e.ts Outdated
@ThomasK33

ThomasK33 commented Oct 6, 2026 •

Copy link
Copy Markdown
Member Author

Stopped: blocked, no further changes

This PR is blocked and stays open. I will not push, rerun or merge it. The branch stays.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

The first model switch now runs inside the try, so the finally also runs when
that switch fails. The finally restores Opus 5.5 only when the label is not
Opus 5.5 already.
@ThomasK33
ThomasK33 force-pushed the fix-focus-followups branch from b45f645 to 61fc4f5 Compare October 6, 2026 21:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61fc4f5e21

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// The model's capability identity comes from the provider config, not from the route: an
// explicit mapping ("Treat as") or a Coder instance's upstream, then a custom provider's
// wire dialect (an anthropic-messages provider serving claude-opus-5-5 is an Opus model).
let capabilityModel = normalizeToCanonical(resolveModelForMetadata(modelString, providersConfig));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recognize Copilot-hosted Anthropic models

When a Fast-capable Claude model is selected through GitHub Copilot (for example, github-copilot:claude-opus-5-5), this preserves the Copilot prefix because that gateway intentionally has no canonicalizer. The subsequent direct-provider check therefore rejects the model and the new toast incorrectly says the model has no Fast mode, even though direct Anthropic supports it and only the Copilot route is incompatible. Resolve Copilot's recognizable upstream model family before classifying the reason.

Useful? React with 👍 / 👎.

@ThomasK33

Copy link
Copy Markdown
Member Author

Parked on 61fc4f5e21: valid review finding in the automatic round.

  • Review assessments used: 9 of the 10-assessment cap. The normal review on 61fc4f5e21 raised one P2, "Recognize Copilot-hosted Anthropic models" (src/browser/utils/fastModeServiceTier.ts:84). The security review raised nothing new.
  • I confirmed the finding. getFastModeUnavailableReason("github-copilot:claude-opus-5-5", null) returns "model", and "anthropic:claude-opus-5-5" returns "route". So a user on Copilot-hosted Opus 5.5 sees "this model has no fast mode", but the real cause is the Copilot route.
  • This is the same class of defect as the known limit tracked in 🤖 Fast mode toast: unknown model identity should give the route reason #5764 (unknown model identity falls back to "model"). Copilot just did not appear in that list.
  • Codex Comments is red only because this thread is open. The other required checks were still running when I parked.
  • I left the thread open and stopped. I will make no further push. The final check (assessment 10) did not run, and I will not merge.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

This branch has not been deployed

No deployments
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.

🤖 Ctrl+I in the workspace view can move focus behind the command palette

1 participant