Skip to content

feat(web): persist modelOptions, refactor provider specific logic#1121

Merged
juliusmarminge merged 8 commits intopingdotgg:mainfrom
maria-rcks:feat/sticky-codex-composer-settings
Mar 20, 2026
Merged

feat(web): persist modelOptions, refactor provider specific logic#1121
juliusmarminge merged 8 commits intopingdotgg:mainfrom
maria-rcks:feat/sticky-codex-composer-settings

Conversation

@maria-rcks
Copy link
Collaborator

@maria-rcks maria-rcks commented Mar 15, 2026

What Changed

  • persist the last used Codex model, thinking effort, and fast mode in local browser state
  • use those values as the defaults for new threads
  • keep explicit thread choices from being overwritten by the sticky defaults

Why

When you changed these in one thread and opened another, they reset.

This keeps the last used Codex settings sticky across thread switching and app reloads, without changing plan mode or access mode.

I and some people may prefer models in medium over high and only would want to use high in some threads

Closes #384

Supersedes #1004
Supersedes #1056

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
151224.mp4

(sorry for the crappy demo, the macbook its on its way)

Note

Persist sticky model and model options across new threads in the composer

  • Adds stickyModel and stickyModelOptions to the persisted composer draft store, so model/provider selections and traits (effort, fast mode, thinking) carry over when creating a new thread.
  • New threads in useHandleNewThread now inherit the sticky model, its inferred provider, and any sticky model options from the store.
  • Introduces setProviderModelOptions to the store for targeted per-provider option updates, with an optional persistSticky flag used by ClaudeTraitsPicker and CodexTraitsPicker when traits change.
  • Adds a composerProviderRegistry to centralize provider-specific composer state, traits menu, and traits picker rendering, replacing inline conditional logic in ChatView.
  • Introduces resolveSelectableModel in @t3tools/shared/model to map user input (slug, display name, or alias) to a canonical model slug, now used by ProviderModelPicker and resolveAppModelSelection; the latter now accepts provider-indexed custom models instead of a flat array.

Macroscope summarized ab1e7c7.

@coderabbitai
Copy link

coderabbitai bot commented Mar 15, 2026

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

Run ID: 8be5c6f2-2b8b-478f-8cac-24b2b213cadd

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 15, 2026
@maria-rcks maria-rcks changed the title feat(web): persist sticky codex model settings feat(web): persist model, thinking and fast mode in new threads Mar 15, 2026
@zortos293
Copy link
Contributor

Very needed QOL feature. It’s very annoying having to switch models every time you start a new thread.

@maskdotdev
Copy link
Contributor

maskdotdev commented Mar 15, 2026

Updating fast mode in newer threads affects the mode in older threads see below:

Edit: Looked a bit deeper, it seems older threads only stay isolated if they have an explicit per thread override in the draft store. If they do not, they inherit the shared sticky value

pr1121-review-compressed-noaudio.mp4

@maria-rcks
Copy link
Collaborator Author

@maskdotdev lmk if its fixed now

@maskdotdev
Copy link
Contributor

@maskdotdev lmk if its fixed now

awesome work! its fixed

@maria-rcks maria-rcks force-pushed the feat/sticky-codex-composer-settings branch 2 times, most recently from 8a99b59 to 4fc2b90 Compare March 17, 2026 19:10
}
});

it("snapshots sticky codex traits into a new draft thread", async () => {
Copy link
Member

Choose a reason for hiding this comment

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

would be good with another test that asserts precedence of draft state -> sticky composer settings -> defaults

@maria-rcks maria-rcks force-pushed the feat/sticky-codex-composer-settings branch from 4e5be2b to 92c5dee Compare March 18, 2026 00:09
@juliusmarminge juliusmarminge force-pushed the feat/sticky-codex-composer-settings branch from 92c5dee to 5d3f329 Compare March 20, 2026 17:01
- Store sticky model and trait options separately for Codex and Claude
- Share model/trait resolution logic across composer UI
- Add coverage for provider selection and sticky trait persistence
@github-actions github-actions bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Mar 20, 2026
@juliusmarminge juliusmarminge changed the title feat(web): persist model, thinking and fast mode in new threads feat(web): persist modelOptions, refactor provider specific logic Mar 20, 2026
@juliusmarminge juliusmarminge merged commit d373389 into pingdotgg:main Mar 20, 2026
8 of 9 checks passed
aaditagrawal pushed a commit to aaditagrawal/t3code that referenced this pull request Mar 21, 2026
…ngdotgg#1121)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
gabrielMalonso pushed a commit to gabrielMalonso/t3code that referenced this pull request Mar 21, 2026
…ngdotgg#1121)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
bulbulogludemir added a commit to bulbulogludemir/krabbycode that referenced this pull request Mar 21, 2026
Ported from pingdotgg/t3code (bc12421..9e29c9d):

- feat: persist modelOptions, refactor provider-specific logic (pingdotgg#1121)
  Sticky model/options in composer, composerProviderRegistry, shared
  resolveSelectableModel utility
- fix(ChatView): update scroll button styles (pingdotgg#1246)
- fix(web): show health banner for selected provider (pingdotgg#1223)
- fix(web): update add-project toggle label in cancel state (pingdotgg#1248)
- Prefer Claude user ID for telemetry identity (pingdotgg#1249)
- feat: configurable base directory (pingdotgg#826)
  Renamed stateDir → baseDir, T3CODE_STATE_DIR → T3CODE_HOME,
  deriveServerPaths for attachmentsDir/logsDir/dbPath/anonymousIdPath

All changes adapted for Krabby branding and merged with existing features.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
sfncore pushed a commit to sfncore/t3code that referenced this pull request Mar 24, 2026
…draft threads, settings refactor

Merges 18 upstream commits including:
- feat: terminal toggle button in chat header (pingdotgg#633)
- feat: resizable chat sidebar (pingdotgg#1347)
- feat: stream git hook progress events (pingdotgg#1214)
- feat: configurable base directory (pingdotgg#826)
- feat: persist model options (pingdotgg#1121)
- refactor: simplify settings layout (pingdotgg#1288)
- refactor: flatten Git service layer (pingdotgg#1255)
- fix: draft-thread project scripts (pingdotgg#1178)
- fix: draft attachment persistence warnings (pingdotgg#1153)
- fix: PTY adapter runtime loading (pingdotgg#1311)
- fix: Claude SDK filesystem settings (pingdotgg#1334)
- Various UI fixes and polish

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(settings): ability to change default thinking level

4 participants