fix(web): read SidebarV2 provider icons from all environments, not just primary
In the sidebar, provider icons were derived only from primaryServerProvidersAtom. That atom is empty unless a primary connection target is set, so in hosted-static and multi-environment setups a thread belonging to a remote (non-primary) environment rendered without its provider icon.
The fix builds providerEntryByInstanceId from environmentServerConfigsAtom across all environments, so each thread looks up its provider instance by id from the environment it actually belongs to.
| Before | After |
|---|---|
Fixes https://github.com/pingdotgg/t3code/issues/5289
Model: DeepSeek V4 Flash via OpenCode.
[!NOTE] Low Risk UI-only lookup change in the sidebar; no auth, data, or API behavior changes.
Overview Sidebar V2 no longer builds the provider-instance lookup from
primaryServerProvidersAtomalone. That source only reflects the primary connection target and is often empty in hosted-static or multi-environment setups, so threads on other environments showed no provider icon.The lookup map is now assembled from
environmentServerConfigsAtom, mergingderiveProviderInstanceEntriesacross every environment’sconfig.providers. Each thread still resolves its icon by instance id, but the metadata comes from the environment the thread belongs to.Reviewed by Cursor Bugbot for commit a097adce1b36db2fb100c6c324ef43943718e785. Bugbot is set up for automated code reviews on this repo. Configure here.
[!NOTE]
Fix provider icons in SidebarV2 to read from all environments, not just primary
SidebarV2.tsx previously used
primaryServerProvidersAtomto build the provider icon map, so icons only appeared for providers in the primary environment. It now usesallEnvironmentServerConfigsAtom, aggregating entries across all environment configs into a single map keyed byinstanceId. Risk: if multiple environments share a duplicateinstanceId, the last environment's entry wins.Macroscope summarized a097adc.
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
37616092-1194-4691-ac3e-ae27d450d40eYou can disable this status message by setting the
reviews.review_statustofalsein 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.
Comment @coderabbitai help to get the list of available commands.
Approvability
Verdict: Approved a097adc
Straightforward bug fix that expands icon lookup from primary environment only to all environments. The change is self-contained to sidebar icon display with clear intent and limited risk.
You can customize Macroscope's approvability policy. Learn more.