Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): sticky provider options and Grok composer affordances #5426

ClosedEnzoTironi(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/5426/headopened View on GitHub

What Changed

  • Sticky composer options fall back when the per-thread draft has no options, so picker changes (e.g. Grok effort) reach sendTurn on existing threads
  • Sticky does not override the thread/project model slug
  • Sticky options re-keyed under the selected instance id (custom instances work)
  • Gate built-in /plan /default slash items on showInteractionModeToggle
  • Remove Grok "Early Access" badge

Fixes #5421

Why

Without sticky option fallback, changing effort on an existing thread kept stale thread-turn options. Folding sticky into selectedModel would silently switch models — fixed so sticky is options-only.

UI Changes

Grok Early Access badge removed

Before (badge present):

Before: Grok shows Early Access badge

After (badge removed; Cursor still has Early Access):

After: Grok has no Early Access badge

Composer effort control (sticky options apply to this picker)

Grok 4.5 Reasoning effort menu

Sticky is send-payload behavior (no new components). /plan slash only when the provider exposes plan mode.

Checklist

  • This PR is small and focused (~+237 / 4 files)
  • I explained what changed and why
  • Before/after screenshots for badge removal
  • Effort picker screenshot (sticky option surface)
  • Video N/A

Test plan

  • composerDraftStore unit tests (sticky options, model preserve, instance re-key)

Model: grok-4.5 (Grok Build)


Note

Medium Risk Changes send-time model option resolution across threads and custom provider instances; wrong precedence could ship stale or cross-provider options, though behavior is heavily unit-tested.

Overview Sticky composer options now feed deriveEffectiveComposerModelState when the per-thread draft has no options for the selected instance, so picker changes (e.g. Grok reasoning effort) apply on existing threads without overriding the thread/project model slug. Resolution is instance-scoped: options from other instances or kind-keyed legacy drafts no longer block sticky, and sticky options are re-keyed under the active custom instance id.

Grok is included in setProviderModelOptions draft persistence, the Grok Early Access badge is removed in settings metadata, and built-in /plan / /default slash menu items only appear when showInteractionModeToggle is true (hiding no-ops on providers like OpenCode).

Unit tests cover sticky vs draft/thread precedence and Grok sticky persistence.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1d77552aa8f7c1719673f70a87f2607136726186. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Add sticky provider options and Grok composer affordances in the chat composer

  • deriveEffectiveComposerModelState now accepts stickyModelSelectionByProvider and uses it as a fallback when the draft lacks options for the selected provider instance, without affecting model slug resolution.
  • Option lookups are scoped to the selected provider instance via a new optionsForInstance helper, replacing the broader modelSelectionByProviderToOptions.
  • Grok is added to the providers whose options are persisted in setProviderModelOptions, matching the behavior of codex, claudeAgent, cursor, and opencode.
  • /plan and /default slash commands are gated behind composerProviderControls.showInteractionModeToggle, hiding them for providers that don't expose an interaction mode toggle.
  • The "Early Access" badge is removed from the Grok provider entry in providerDriverMeta.ts.
Macroscope summarized 1d77552.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 3d1ee52c-3742-43a8-b678-ff97d59e5982

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs human review

      This PR introduces a new feature (sticky provider options) that changes how model options persist across threads, adding new user-facing capability. New features introducing runtime behavior changes warrant human review.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Review findings from Bugbot/Macroscope for this slice are fixed on the Zoen product tip (zoen/main @ 16474ab0d). Will restack / re-push these PR heads after further slim-slicing. Open remaining: effort restart without session.exited (or adopt #5403 set_model path).

    5. UI screenshots

      Badge removal

      Before — Grok had Early Access:

      before

      After — badge removed (Cursor keeps Early Access):

      after

      Sticky options surface (effort picker)

      effort

    6. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit cb97299bf5b3629c74e06d35b6b21389e0cf1e8a. Configure [here](https://www.cursor.com/dashboard/bugbot).
    7. Head fork was deleted and GitHub closed this PR permanently (cannot reopen).

      Correct recovery PR: pull request title must not be blank

      Same commits/branch tip as this one. #5424 and #5425 stay closed on purpose (absorbed into the Grok native parity PR).

Sign in to join this conversation.