Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/renderer/components/providers/ProviderIcon.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ describe("ProviderIcon", () => {
expect(screen.getByText("H")).toBeInTheDocument();
expect(screen.queryByText("C")).not.toBeInTheDocument();
});

it("uses the Claude profile id for the badge when no display label is provided", () => {
render(<ProviderIcon kind="claude:personal" fallbackLabel="claude:personal" />);

expect(screen.getByText("P")).toBeInTheDocument();
expect(screen.queryByText("C")).not.toBeInTheDocument();
});
});
1 change: 1 addition & 0 deletions src/renderer/components/providers/ProviderIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ function claudeProfileBadgeLabel(kind: string, fallbackLabel: string | undefined
const profileId = kind.slice("claude:".length);
const label = fallbackLabel?.trim();
if (!label) return profileId;
if (label === kind || label.toLowerCase().startsWith("claude:")) return profileId;
const profileLabel = label.replace(/^claude\s+/i, "").trim();
return profileLabel || profileId;
}
Expand Down