@devries-cameron20 / t3code Mirror · read-only / commits / ceb06de3bb
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, 09:30 UTC

fix(mobile): keep source text bold for numeric font weights (#23688)

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>

Victor Vogel committed Oct 31, 2026 at 03:33 UTC ceb06de3bb4d51caeeb23caf77f4cde803e7e544
2 files changed +16 -1
apps/mobile/modules/t3-source-text/src/util.test.ts new
+15
@@ -0,0 +1,15 @@
1 +import { expect, it, vi } from "vite-plus/test";
2 +
3 +import { flattenStyles } from "./util";
4 +
5 +vi.mock("react-native", () => ({
6 + I18nManager: { isRTL: false },
7 + StyleSheet: {
8 + flatten: (styles: ReadonlyArray<object | undefined>) => Object.assign({}, ...styles),
9 + },
10 +}));
11 +
12 +it("encodes numeric bold weights as bold source-text runs", () => {
13 + expect(flattenStyles({ fontWeight: 700 }, undefined).fontWeight).toBe("bold");
14 + expect(flattenStyles({ fontWeight: "400" }, { fontWeight: "700" }).fontWeight).toBe("bold");
15 +});
apps/mobile/modules/t3-source-text/src/util.ts
+1 -1
@@ -64,7 +64,7 @@ function fontWeightToNativeProp(fontWeight: TextStyle["fontWeight"]): NativeFont
64 return "semibold";
65 case 700:
66 case "700":
67 - return "semibold";
67 + return "bold";
68 case 800:
69 case "800":
70 return "bold";