From 581e8f8d87eadad0551d3a993b5d456ff22f4705 Mon Sep 17 00:00:00 2001 From: MIT-Consulting Date: Sat, 21 Nov 2026 23:44:38 -0500 Subject: [PATCH 1/2] fix(mobile): replace undefined text-foreground-subtle token with text-foreground-muted Co-authored-by: Cursor --- .../threads/thread-command-output.tsx | 2 +- .../src/features/threads/thread-work-log.tsx | 4 +- apps/mobile/src/lib/mobileTheme.test.ts | 38 +++++++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/apps/mobile/src/features/threads/thread-command-output.tsx b/apps/mobile/src/features/threads/thread-command-output.tsx index ee74a86e3db5b..2a929d96e5f7c 100644 --- a/apps/mobile/src/features/threads/thread-command-output.tsx +++ b/apps/mobile/src/features/threads/thread-command-output.tsx @@ -73,7 +73,7 @@ export function ThreadCommandOutput(props: { }} > {data?.output.truncated ? ( - + Earlier output not shown ) : null} diff --git a/apps/mobile/src/features/threads/thread-work-log.tsx b/apps/mobile/src/features/threads/thread-work-log.tsx index 8f22d0b511651..f0bc00e11385e 100644 --- a/apps/mobile/src/features/threads/thread-work-log.tsx +++ b/apps/mobile/src/features/threads/thread-work-log.tsx @@ -971,7 +971,7 @@ const ThreadWorkLogRow = function ThreadWorkLogRow( ) : null} {timestamp.toLocaleString(undefined, { month: "short", @@ -1185,7 +1185,7 @@ const ThreadWorkLogRow = function ThreadWorkLogRow( row.workEntry.questionAnswer && hasQuestionAnswer(row.workEntry.questionAnswer) ? "text-foreground" - : "text-foreground-subtle" + : "text-foreground-muted" } >{` ${answerPreview}`} ) : null} diff --git a/apps/mobile/src/lib/mobileTheme.test.ts b/apps/mobile/src/lib/mobileTheme.test.ts index 0b35a5ba27d31..c2c66f6088be3 100644 --- a/apps/mobile/src/lib/mobileTheme.test.ts +++ b/apps/mobile/src/lib/mobileTheme.test.ts @@ -1,3 +1,5 @@ +import * as NodeFS from "node:fs"; +import * as NodePath from "node:path"; import { describe, expect, it } from "vite-plus/test"; import { BUILT_IN_THEME_IDS, @@ -322,4 +324,40 @@ describe("mobile themes", () => { ).toBeGreaterThanOrEqual(4.5); } }); + + it("declares every foreground color token referenced by mobile source files", () => { + const declaredTokens = new Set( + Object.keys(readDefaultMobileThemeVariables("dark")).map((key) => + key.replace(/^--color-/, ""), + ), + ); + const srcDir = NodePath.resolve(import.meta.dirname, ".."); + const collectSourceFiles = (dir: string): Array => { + const files: Array = []; + for (const entry of NodeFS.readdirSync(dir, { withFileTypes: true })) { + const fullPath = NodePath.join(dir, entry.name); + if (entry.isDirectory()) { + files.push(...collectSourceFiles(fullPath)); + } else if ( + (entry.name.endsWith(".ts") || entry.name.endsWith(".tsx")) && + !entry.name.includes(".test.") + ) { + files.push(fullPath); + } + } + return files; + }; + const tokenPattern = /\b(?:text|bg|border|accent)-(foreground-[a-z0-9-]+)\b/g; + const missing: Array = []; + for (const file of collectSourceFiles(srcDir)) { + const content = NodeFS.readFileSync(file, "utf8"); + for (const match of content.matchAll(tokenPattern)) { + const token = match[1]!; + if (!declaredTokens.has(token)) { + missing.push(`${NodePath.relative(srcDir, file)}: ${match[0]}`); + } + } + } + expect(missing).toEqual([]); + }); }); From 3fa2adb9e275fab2e203ff5451b907b42699b397 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sun, 22 Nov 2026 04:58:28 +0000 Subject: [PATCH 2/2] test(mobile): drop source-scanning token test A colour fix is proved with captures, not a test that greps the source tree. Co-Authored-By: Claude Opus 5.5 --- apps/mobile/src/lib/mobileTheme.test.ts | 38 ------------------------- 1 file changed, 38 deletions(-) diff --git a/apps/mobile/src/lib/mobileTheme.test.ts b/apps/mobile/src/lib/mobileTheme.test.ts index c2c66f6088be3..0b35a5ba27d31 100644 --- a/apps/mobile/src/lib/mobileTheme.test.ts +++ b/apps/mobile/src/lib/mobileTheme.test.ts @@ -1,5 +1,3 @@ -import * as NodeFS from "node:fs"; -import * as NodePath from "node:path"; import { describe, expect, it } from "vite-plus/test"; import { BUILT_IN_THEME_IDS, @@ -324,40 +322,4 @@ describe("mobile themes", () => { ).toBeGreaterThanOrEqual(4.5); } }); - - it("declares every foreground color token referenced by mobile source files", () => { - const declaredTokens = new Set( - Object.keys(readDefaultMobileThemeVariables("dark")).map((key) => - key.replace(/^--color-/, ""), - ), - ); - const srcDir = NodePath.resolve(import.meta.dirname, ".."); - const collectSourceFiles = (dir: string): Array => { - const files: Array = []; - for (const entry of NodeFS.readdirSync(dir, { withFileTypes: true })) { - const fullPath = NodePath.join(dir, entry.name); - if (entry.isDirectory()) { - files.push(...collectSourceFiles(fullPath)); - } else if ( - (entry.name.endsWith(".ts") || entry.name.endsWith(".tsx")) && - !entry.name.includes(".test.") - ) { - files.push(fullPath); - } - } - return files; - }; - const tokenPattern = /\b(?:text|bg|border|accent)-(foreground-[a-z0-9-]+)\b/g; - const missing: Array = []; - for (const file of collectSourceFiles(srcDir)) { - const content = NodeFS.readFileSync(file, "utf8"); - for (const match of content.matchAll(tokenPattern)) { - const token = match[1]!; - if (!declaredTokens.has(token)) { - missing.push(`${NodePath.relative(srcDir, file)}: ${match[0]}`); - } - } - } - expect(missing).toEqual([]); - }); });