Skip to content

Conversation

@Samigos
Copy link
Contributor

@Samigos Samigos commented Feb 9, 2026

Persist model, effort, access mode, and collaboration mode selections per thread in localStorage.

Persist model, effort, access mode, and collaboration mode selections per thread in localStorage.
@Dimillian
Copy link
Owner

hmmmmmmm but a new thread take which default?

@Dimillian
Copy link
Owner

@codex review

Copy link

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

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: 85b7f1d112

ℹ️ 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 on lines 184 to 192
useEffect(() => {
if (!enabled) {
return;
}
if (selectionKey === lastSelectionKey.current) {
return;
}
lastSelectionKey.current = selectionKey;
setSelectedModeId(preferredModeId);

Choose a reason for hiding this comment

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

P2 Badge Preserve a valid collaboration mode on thread switch

When the per-thread selectionKey changes, this effect unconditionally replaces the current selection with preferredModeId (which is null for threads without stored overrides), so switching to such a thread clears selectedCollaborationModeId even though the mode list is already loaded and a default is available. Because no refetch runs on thread change, the selection stays null, which in turn makes useCollaborationModeSelection produce a null payload and drops collaboration-mode settings for those threads. Consider keeping the existing selection or falling back to the computed default when preferredModeId is null or not present in modes.

Useful? React with 👍 / 👎.

@Samigos
Copy link
Contributor Author

Samigos commented Feb 9, 2026

hmmmmmmm but a new thread take which default?

It seems it uses no plan-mode, last used codex model, last used effort and on-request access mode.

@Dimillian
Copy link
Owner

hmmmm not sure we wants that

@Samigos
Copy link
Contributor Author

Samigos commented Feb 9, 2026

Ok, what do you think would be best?

To me, the problem is that every time I change an agent, I carry the last parameters and it can be confusing if I'm working on multiple at the same time.

@Dimillian
Copy link
Owner

Hmmmm I think we should have those param in the main app settings (I think we already do, but partially?)
Maybe make a new entry in there, where youc an set the default for those settings (and so move the access one from the Codex section), so there you can set your default that will be used for each new thread.

@Samigos
Copy link
Contributor Author

Samigos commented Feb 9, 2026

Hmmmm I think we should have those param in the main app settings (I think we already do, but partially?) Maybe make a new entry in there, where youc an set the default for those settings (and so move the access one from the Codex section), so there you can set your default that will be used for each new thread.

To clarify, when you say main app settings, which tab do you mean?
image

@Dimillian
Copy link
Owner

Not sure where it fit best or if we need a new section 😆

@Samigos
Copy link
Contributor Author

Samigos commented Feb 10, 2026

Ok, I think it works great now, but I'd appreciate it if someone does some testing, just to make sure!
Also, @codex review

Copy link

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

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: c0281deb78

ℹ️ 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".

return;
}
lastSelectionKey.current = selectionKey;
setSelectedModeId(preferredModeId);

Choose a reason for hiding this comment

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

P1 Badge Preserve a valid collaboration mode on thread switches

When selectionKey changes, this effect unconditionally assigns preferredModeId (which is null for threads without a stored override in App.tsx) to selectedModeId. In that common case, the hook clears the existing/default mode, and because lastFetchedWorkspaceId is already set for the workspace, no refetch runs to restore a default selection; subsequent sends from that thread omit collaborationMode until the user manually reselects one.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Check now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

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

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: f3f3b9bf2a

ℹ️ 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".

Samigos and others added 2 commits February 10, 2026 18:26
… modes

Branch summary (Codex params + settings + collaboration modes)

Settings -> Codex
- Added a 'Default parameters' section that lets users pick default model, reasoning effort, and access mode.
- Model options are aggregated from connected workspaces via getModelList(), de-duped by slug, and sorted by a 'latest' heuristic.
- Reasoning effort options are derived from the selected model's supportedReasoningEfforts (lowercased) and default to 'medium'.
- Removed any explicit 'default' option from model/effort pickers; the section context is the default.
- Styled these controls like other settings cards.

Thread-scoped Codex params
- Persist per-thread overrides for model/effort/collaboration/access.
- Keep per-thread changes from mutating the global defaults; global defaults only change in the no-thread composer.
- Seed newly created threads once (avoid post-send flips) so model/effort/collab/access remain stable after the first message.

Collaboration modes
- On thread switch, prefer the thread override; otherwise reset to the workspace default so plan/code selections don't bleed across threads.
- When sending the first message from the no-thread composer, snapshot collaboration mode and access mode and apply them to the created thread.
- Validate preferredModeId on selectionKey changes: if a stored override is stale (mode removed/renamed), fall back to the workspace default instead of disabling collaboration payloads.

Tests
- Added a regression test for stale preferredModeId fallback in useCollaborationModes.
# Conflicts:
#	src/App.tsx
@Samigos
Copy link
Contributor Author

Samigos commented Feb 10, 2026

@Dimillian I was about to fix the conflicts! We good?

@Dimillian
Copy link
Owner

@Dimillian I was about to fix the conflicts! We good?

Yes finishing touches

@Dimillian Dimillian merged commit 15eccee into Dimillian:main Feb 10, 2026
6 checks passed
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