fix(webui): finish provider icon fallback and tile audit

This commit is contained in:
Xubin Ren committed 2026-09-19 17:59:17 +08:00
1 parent cd2410a55b
commit 8f6e609c4e
3 files changed
+32 -6

No files matched your search

+9
View File
@@ -82,6 +82,15 @@ describe("provider brand logos", () => {
expect(providerBrand("github_copilot")?.logoUrl).toBe("https://raw.githubusercontent.com/primer/octicons/main/icons/copilot-24.svg");
});
it("never substitutes a favicon proxy's placeholder for SearXNG", () => {
const brand = providerBrand("searxng")!;
expect(brand.logoUrl).toBe(brand.logoUrls[0]);
expect(brand.logoUrls).toEqual([
"https://raw.githubusercontent.com/searxng/searxng/master/searx/static/themes/simple/img/favicon.svg",
"https://raw.githubusercontent.com/searxng/searxng/master/searx/static/themes/simple/img/favicon.png",
]);
});
it("keeps OpenRouter voice settings on the first-party brand domain", () => {
expect(providerBrand("openrouter")?.logoUrl).toBe("https://openrouter.ai/brand/logos/transparent/glyph/svg/glyph-grape.svg");
expect(providerBrand("openrouter")?.logoUrls).toContain("https://openrouter.ai/favicon.ico");
+7 -2
View File
@@ -14,7 +14,9 @@ describe("settings provider icons", () => {
expect(icon.className.split(/\s+/).some((value) => value.startsWith("border"))).toBe(false);
}
it.each(["openai_codex", "anthropic", "deepseek", "gemini", "xai_grok", "longcat", "openrouter", "github_copilot", "xiaomi_mimo"])(
it.each([
"openai_codex", "anthropic", "deepseek", "gemini", "xai_grok", "longcat", "openrouter", "github_copilot",
])(
"shows %s on a single white tile with a small inset after loading",
(provider) => {
const { container } = render(<ProviderIcon provider={provider} showBrandLogos />);
@@ -41,7 +43,10 @@ describe("settings provider icons", () => {
},
);
it.each(["aihubmix", "bedrock", "exa", "groq", "lm_studio", "minimax", "minimax_anthropic", "modelscope", "moonshot", "olostep", "tavily", "zhipu"])(
it.each([
"aihubmix", "bedrock", "exa", "groq", "lm_studio", "minimax", "minimax_anthropic",
"modelscope", "moonshot", "olostep", "tavily", "xiaomi_mimo", "zhipu",
])(
"does not double-frame %s's primary tile, but preserves unknown fallback assets",
(provider) => {
const { container } = render(<ProviderIcon provider={provider} showBrandLogos />);