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
2 changes: 1 addition & 1 deletion gui/src/pages/ClaudeCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function ClaudeCode({ apiBase }: { apiBase: string }) {
}, [load]);

const modelOptions = useMemo(() => {
const options = (state?.available ?? []).map(m => ({ value: m, label: String(modelLabel(m)) }));
const options = (state?.available ?? []).map(m => ({ value: m, label: modelLabel(m) }));
return [{ value: "", label: t("claude.smallFastModelUnsetOption") }, ...options];
}, [state?.available, t]);

Expand Down
31 changes: 31 additions & 0 deletions gui/tests/claudecode-fetch-errors.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,34 @@ test("ClaudeCode save treats an empty 200 body as success", async () => {
testWindow.close();
}
});

test("ClaudeCode helper model options render icon-backed model names", async () => {
globalThis.fetch = (async (input) => {
if (String(input).endsWith("/api/claude-code")) {
return Response.json({ ...CLAUDE_OK, available: ["gpt-5.6-luna"] });
}
return new Response(null, { status: 404 });
}) as typeof fetch;
Comment thread
coderabbitai[bot] marked this conversation as resolved.

const { container, root, testWindow } = await mountClaudeCode();
try {
const helperModel = container.querySelector<HTMLButtonElement>(
'[role="combobox"][aria-label="Background helper model"]',
);
expect(helperModel).toBeTruthy();

await act(async () => {
helperModel!.click();
await Promise.resolve();
});

const optionText = [...testWindow.document.querySelectorAll<HTMLElement>('[role="option"]')]
.map(option => option.textContent)
.join("\n");
expect(optionText).toContain("gpt-5.6-luna");
expect(optionText).not.toContain("[object Object]");
} finally {
await act(async () => root.unmount());
testWindow.close();
}
});
Loading