Skip to content

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

Open
EnzoTironi wants to merge 4 commits into
pingdotgg:mainfrom
EnzoTironi:pr/web-sticky-options
Open

feat(web): sticky provider options and Grok composer affordances#5504
EnzoTironi wants to merge 4 commits into
pingdotgg:mainfrom
EnzoTironi:pr/web-sticky-options

Conversation

@EnzoTironi

@EnzoTironi EnzoTironi commented Aug 6, 2026

Copy link
Copy Markdown

Recovery: New PR after head fork EnzoTironi/t3code was deleted (auto-closed #5426). Same branch tip.

Original: #5426

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 how composer model options are merged for send payloads across instances and sticky state; well-covered by new unit tests but affects multi-provider draft behavior.

Overview
Fixes composer option resolution (e.g. Grok reasoning effort) so picker changes on existing threads reach sendTurn without changing the thread/project model slug.

deriveEffectiveComposerModelState now takes stickyModelSelectionByProvider and resolves options per selected instance via optionsForInstance, with precedence: draft options for the current instance → sticky → thread/project. Cross-instance and legacy kind-keyed draft entries no longer block sticky; Grok is included in setProviderModelOptions persistence.

Built-in /plan and /default slash menu items only appear when showInteractionModeToggle is true. Grok’s Early Access settings badge is removed.

Reviewed by Cursor Bugbot for commit 907d061. Bugbot is set up for automated code reviews on this repo. Configure here.

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 907d061.

Draft options for another provider/instance no longer short-circuit sticky
or thread options for the currently selected instance.
When the selected instance already has a draft entry without options, skip
legacy kind-key option fallback so sticky/thread options can apply — matching
the model path which only falls back when the instance entry is missing.
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

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: a76ce7b5-c6ee-44bc-8ae0-b1d4dad97030

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 6, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new feature with cross-thread sticky model options state and provider-specific UI behavior changes (conditional slash commands). New features with runtime behavior changes and new state management warrant human review.

You can customize Macroscope's approvability policy. Learn more.

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web: sticky provider options win over stale thread selection

1 participant