@devries-cameron20 / t3code-1 / commits / 393d1ffc9e
Fork 0

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

refactor(mobile): test terminal palettes through public theme API (#10002)

Julius Marminge committed Sep 5, 2026 at 00:26 UTC 393d1ffc9ee52696e4b5f226a956e9d4c65b2f6a
2 files changed +8 -21
apps/mobile/src/features/terminal/terminalTheme.test.ts
+7 -20
@@ -3,15 +3,11 @@ import { BUILT_IN_THEMES, getThemeColorsForAppearance } from "@t3tools/shared/th
3
4 import { themeColorToNativeColor } from "../../lib/mobileTheme";
5
6 -import {
7 - buildGhosttyThemeConfig,
8 - getMobileTerminalTheme,
9 - getPierreTerminalTheme,
10 -} from "./terminalTheme";
6 +import { buildGhosttyThemeConfig, getMobileTerminalTheme } from "./terminalTheme";
7
12 -describe("getPierreTerminalTheme", () => {
13 - it("returns the Pierre light terminal palette", () => {
14 - expect(getPierreTerminalTheme("light")).toMatchObject({
8 +describe("getMobileTerminalTheme", () => {
9 + it("preserves the default light terminal palette", () => {
10 + expect(getMobileTerminalTheme("t3-code", "light")).toMatchObject({
11 background: "#f2f2f7",
12 foreground: "#6C6C71",
13 cursorForeground: "#009fff",
@@ -19,23 +15,14 @@ describe("getPierreTerminalTheme", () => {
15 });
16 });
17
22 - it("returns the Pierre dark terminal palette", () => {
23 - expect(getPierreTerminalTheme("dark")).toMatchObject({
18 + it("preserves the default dark terminal palette", () => {
19 + expect(getMobileTerminalTheme("t3-code", "dark")).toMatchObject({
20 background: "#0a0a0a",
21 foreground: "#adadb1",
22 cursorForeground: "#009fff",
23 cursorBackground: "#0a0a0a",
24 });
25 });
30 -});
31 -
32 -describe("getMobileTerminalTheme", () => {
33 - it("preserves the Pierre terminal for the default theme", () => {
34 - for (const scheme of ["light", "dark"] as const) {
35 - expect(getMobileTerminalTheme("t3-code", scheme)).toEqual(getPierreTerminalTheme(scheme));
36 - }
37 - });
38 -
26 it("applies the selected palette without replacing ANSI status colors", () => {
27 const standard = getMobileTerminalTheme("t3-code", "dark");
28 const ocean = getMobileTerminalTheme("ocean", "dark");
@@ -58,7 +45,7 @@ describe("getMobileTerminalTheme", () => {
45
46 describe("buildGhosttyThemeConfig", () => {
47 it("serializes theme colors into a ghostty config file", () => {
61 - const config = buildGhosttyThemeConfig(getPierreTerminalTheme("dark"));
48 + const config = buildGhosttyThemeConfig(getMobileTerminalTheme("t3-code", "dark"));
49
50 expect(config).toContain("background = #0a0a0a");
51 expect(config).toContain("foreground = #adadb1");
apps/mobile/src/features/terminal/terminalTheme.ts
+1 -1
@@ -74,7 +74,7 @@ const PIERRE_DARK_THEME: TerminalTheme = {
74 ],
75 };
76
77 -export function getPierreTerminalTheme(scheme: TerminalAppearanceScheme): TerminalTheme {
77 +function getPierreTerminalTheme(scheme: TerminalAppearanceScheme): TerminalTheme {
78 return scheme === "light" ? PIERRE_LIGHT_THEME : PIERRE_DARK_THEME;
79 }
80