fix: handle missing agent config in conversation tabs#1920
fix: handle missing agent config in conversation tabs#1920janburzinski wants to merge 1 commit intogeneralaction:mainfrom
Conversation
Greptile SummaryThis PR adds a one-line null guard in
Confidence Score: 5/5Safe to merge — a minimal, targeted guard that prevents a runtime crash without altering any other behavior. The change is a single defensive check in a UI rendering callback. When a No files require special attention.
|
| Filename | Overview |
|---|---|
| src/renderer/features/tasks/conversations/conversation-tabs.tsx | Adds a null guard before accessing config.logo in renderTabPrefix to prevent crashes when a conversation's providerId has no matching entry in agentConfig. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["renderTabPrefix(s)"] --> B["config = agentConfig[s.data.providerId]"]
B --> C{config exists?}
C -- No --> D["return null (no logo rendered)"]
C -- Yes --> E["Render AgentLogo with config.logo, alt, isSvg, invertInDark"]
E --> F["Tab prefix displayed"]
Reviews (1): Last reviewed commit: "fix: handle missing agent config in conv..." | Re-trigger Greptile
summary
if agentConfig has no entry for conversations provider ew just dont read the logo
this fixes the unexpected "Something went wrong Cannot read properties of undefined (reading 'logo')"