Skip to content

fix(web): resolve sidebar provider icons from the thread's own environment - #7292

Merged
t3dotgg merged 1 commit into
pingdotgg:mainfrom
vitalyiegorov:fix/sidebar-env-scoped-provider-icons
Aug 21, 2026
Merged

t3dotgg merged 1 commit into
pingdotgg:mainfrom
vitalyiegorov:fix/sidebar-env-scoped-provider-icons

fix(web): resolve sidebar provider icons from the thread's own enviro…

a84833a
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - UI Consistency succeeded Aug 19, 2026 in 3m 36s

UI Consistency: All clear

All clear

Details

Note

Your check run agent prompt is: .macroscope/check-run-agents/ui-consistency.md
More information about how Check Run Agents work can be found in our Help Center.


🔍 Agent activity — reasoning, no tool calls

💭 I'm looking at the diff in Sidebar.tsx and providerInstances.ts, which scopes data rather than changing UI styling. I want to verify whether environmentServerConfigsAtom properly includes the primary environment, since switching from primaryServerProvidersAtom to a map keyed by environmentId could affect whether threads on the primary environment still resolve their provider configs correctly. I'm checking createEnvironmentServerConfigsAtom's value type, which maps environment IDs to objects with environment and optional providers, and verifying whether the diff logic correctly references config.providers. I'm confirming that mapping config to config.providers is correct since providers sits at the top level of ServerConfig. Now I want to check how thread.environmentId lines up with the keys used in Sidebar and ThreadRow, and whether the old primaryServerProvidersAtom resolution path could regress for primary environment threads. If the primary environment's config hasn't loaded yet, the map simply won't have an entry, matching the prior behavior since both paths pull from the same configValueAtom source, so icons would be equally delayed either way. I'm also checking that the branded EnvironmentId type and ServerProviders array are structurally assignable to the plain string and array types deriveProviderEntriesByEnvironment expects, which they should be. I'm also weighing whether this data-scoping fix even falls under the UI-consistency review scope, since it touches provider icon/accent-color rendering tied to shared primitive color indirection rather than layout or Tailwind concerns. I'm checking how driverKind and accentColor drive the icon rendering, and confirming that falling back to an empty provider entries map when the environment lookup misses is safe since the memoized references stay stable. This PR is purely data logic, not styling, so the UI consistency check may not strictly apply—though provider icon accent colors could be a relevant edge case. I'm also considering a potential regression: threads belonging to environments missing from the catalog map (like cached or offline threads) previously defaulted to primary providers, and this change might affect that fallback behavior. I'm weighing whether this counts as a real regression: previously a remote thread would show an icon even with a possibly wrong accent color, but now if the environment's config isn't loaded, the icon vanishes entirely, which could break row layout consistency. I'm trying to decide if this disappearing-icon behavior is significant enough to flag as a visual preservation issue. I notice the hook declaration just moved to a different line position, but since both are unconditional calls, the hook order isn't actually broken. Now I'm checking whether there's a genuine UI-consistency issue worth flagging, looking at the ProviderIn component next. The memoized row components seem fine since the map identities stay stable across renders. I want to verify the type compatibility between the spread server configs and what deriveProviderInstanceEntries expects, so I should check providerInstances.ts. The implementation looks clean and consistent. Checking for other affected consumers, the mobile sidebar is out of scope since it's outside apps/web/src, and this diff is purely logic rather than UI/CSS, so there's no consistency issue to flag here—"All clear" seems like the right call given the check's focus. I want to double-check one potential regression: whether local threads could lose their icons due to mismatched environment ID formats, but since serverConfigs.get(thread.environmentId) is already used elsewhere in the same component for capabilities, the keys clearly match, which is reassuring. I also verify there are no leftover unused imports—ProviderInstanceEntry is still referenced, primaryServerProvidersAtom was removed with no other usages, and environmentServerConfigsAtom remains properly imported. The test file's provider() helper with the added accentColor also compiles fine, so I'm confident concluding this as clean.


Agent Credits: 121 credits