Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): read SidebarV2 provider icons from all environments, not just primary #5300

Closedashraftown(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/5300/headopened View on GitHub

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.

BeforeAfter
BeforeAfter

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 primaryServerProvidersAtom alone. 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, merging deriveProviderInstanceEntries across every environment’s config.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](https://cursor.com/bugbot) for commit a097adce1b36db2fb100c6c324ef43943718e785. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Fix provider icons in SidebarV2 to read from all environments, not just primary

SidebarV2.tsx previously used primaryServerProvidersAtom to build the provider icon map, so icons only appeared for providers in the primary environment. It now uses allEnvironmentServerConfigsAtom, aggregating entries across all environment configs into a single map keyed by instanceId. Risk: if multiple environments share a duplicate instanceId, the last environment's entry wins.

Macroscope summarized a097adc.
    1. 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: 37616092-1194-4691-ac3e-ae27d450d40e

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. 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](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).

Sign in to join this conversation.