Skip to content

fix(desktop): key workspace model picker off presetId, not icon override - #6802

Draft
bshaan77 wants to merge 1 commit into
superset-sh:mainfrom
bshaan77:fix/model-picker-preset-id
Draft

fix(desktop): key workspace model picker off presetId, not icon override#6802
bshaan77 wants to merge 1 commit into
superset-sh:mainfrom
bshaan77:fix/model-picker-preset-id

Conversation

@bshaan77

@bshaan77 bshaan77 commented Aug 23, 2026

Copy link
Copy Markdown

Problem

Setting a custom icon on an agent in Settings → Agents silently removes that agent's model and effort pickers in the new-workspace modal.

useV2AgentChoices maps iconId: config.iconId ?? config.presetId, where config.iconId is the user's icon override — a built-in icon key or an uploaded data: URI. Both workspace-create surfaces (NewWorkspaceScreen, PromptGroup) then derive selectedPresetId from that iconId and feed it to getAgentModelSupport() / getAgentEffortSupport(), whose catalogs are keyed by preset id. As soon as the icon override diverges from the preset id, the lookup misses and the pickers vanish — an uploaded image icon can never match.

It can also show the wrong catalog, not just none: give a Claude agent the Codex built-in icon and the modal offers Codex's model list; the host then silently drops the out-of-catalog model id at launch (buildAgentModelArgs returns []), so the selection looks accepted but never applies. Keying off presetId also re-aligns the renderer with the host, which already validates model/effort against config.presetId, and with useAgentModelPreference's own documented contract ("keyed by presetId").

Repro

  1. Settings → Agents → Claude → set any icon override (different built-in icon or uploaded image)
  2. Open the new-workspace modal and select Claude
  3. Model and effort pickers are gone (before) / present (after)

Fix

Key selectedPresetId off presetId in both surfaces, and give the hard-coded SUPERSET_AGENT an explicit presetId: "superset" so chat behavior is unchanged. iconId stays display-only (icon rendering in AgentSelect is untouched).

Checks

  • apps/desktop bun run typecheck clean
  • biome check clean on changed files
  • Manually traced every selectedPresetId consumer in both components (model support, effort support, preference-storage keys, submit hook) — semantics unchanged for agents without icon overrides and for Superset chat

🤖 Generated with Claude Code


Summary by cubic

Model and effort pickers in the new-workspace modal now key off agent presetId instead of the icon override. Previously, deriving from iconId hid or mis-mapped pickers when users changed an agent icon; now catalogs and selections match the chosen preset.

  • Use presetId for selectedPresetId in NewWorkspaceScreen and PromptGroup; iconId stays display-only.
  • Add presetId: "superset" to SUPERSET_AGENT to keep Superset chat behavior unchanged.
  • Aligns renderer with host validation and preference keys, preventing out-of-catalog model selections from being silently dropped at launch.

Written for commit 0cf418d. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

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

Review profile: CHILL

Plan: Pro Plus

Run ID: cc4dfea1-8112-4e7f-8489-3ad26e7ae476

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.

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.

1 participant