@devries-cameron20 / t3code Mirror · read-only / commits / 94b80eaf4f
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 12:00 UTC

fix(web): language dialects use their base language's icon (#22455)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: maria-rcks <maria@kuuro.net>

Yuruzuu committed Oct 31, 2026 at 04:40 UTC 94b80eaf4f2c07d0cde2e35cda7852509f62ebae
2 files changed +23
apps/web/src/pierre-icons.test.ts
+19
@@ -3,6 +3,7 @@ import { assert, describe, it } from "vite-plus/test";
3 import {
4 hasSpecificPierreIconForFileName,
5 resolvePierreIconForEntry,
6 + syntheticFileNameForLanguageId,
7 T3_PIERRE_ICONS,
8 } from "./pierre-icons";
9
@@ -64,4 +65,22 @@ describe("Pierre file icons", () => {
65 assert.include(T3_PIERRE_ICONS.spriteSheet, `id="${iconName}"`);
66 }
67 });
68 +
69 + it.each([
70 + ["luau", "lua"],
71 + ["xsd", "xml"],
72 + ["xsl", "xml"],
73 + ["xslt", "xml"],
74 + ])("gives %s files and fences the %s icon", (dialect, base) => {
75 + const baseIcon = resolvePierreIconForEntry(`file.${base}`, "file")?.name;
76 + assert.equal(baseIcon, `t3-file-icon-${base}`);
77 + for (const path of [`src/init.${dialect}`, `src/INIT.${dialect.toUpperCase()}`]) {
78 + assert.equal(resolvePierreIconForEntry(path, "file")?.name, baseIcon);
79 + assert.isTrue(hasSpecificPierreIconForFileName(path));
80 + }
81 + assert.equal(
82 + resolvePierreIconForEntry(syntheticFileNameForLanguageId(dialect), "file")?.name,
83 + baseIcon,
84 + );
85 + });
86 });
apps/web/src/pierre-icons.ts
+4
@@ -176,6 +176,7 @@ export const T3_PIERRE_ICONS = {
176 kt: "t3-file-icon-kotlin",
177 kts: "t3-file-icon-kotlin",
178 lua: "t3-file-icon-lua",
179 + luau: "t3-file-icon-lua",
180 php: "t3-file-icon-php",
181 ps1: "t3-file-icon-powershell",
182 psm1: "t3-file-icon-powershell",
@@ -184,6 +185,9 @@ export const T3_PIERRE_ICONS = {
185 scala: "t3-file-icon-scala",
186 toml: "t3-file-icon-toml",
187 xml: "t3-file-icon-xml",
188 + xsd: "t3-file-icon-xml",
189 + xsl: "t3-file-icon-xml",
190 + xslt: "t3-file-icon-xml",
191 },
192 } satisfies FileTreeIcons;
193