Skip to content

Commit cf1b640

Browse files
authored
Merge branch 'main' into t3code/implement-reasoning-cycle-handoff
2 parents 02d8868 + 6c58362 commit cf1b640

145 files changed

Lines changed: 10113 additions & 1732 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/deploy-relay.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }}
6464
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
6565
APNS_PRIVATE_KEY: ${{ secrets.APNS_PRIVATE_KEY }}
66+
FCM_SERVICE_ACCOUNT: ${{ secrets.FCM_SERVICE_ACCOUNT }}
6667

6768
- name: Publish relay deploy commit status
6869
uses: actions/github-script@v8

‎apps/desktop/resources/dmg/dmg-background-latest.svg‎

Lines changed: 15 additions & 19 deletions
Loading

‎apps/desktop/resources/dmg/dmg-background-nightly.svg‎

Lines changed: 4 additions & 1 deletion
Loading
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { expect, it } from "@effect/vitest";
2+
import * as Effect from "effect/Effect";
3+
import { ChildProcessSpawner } from "effect/unstable/process";
4+
import { vi } from "vite-plus/test";
5+
6+
vi.mock("@napi-rs/keyring", () => {
7+
throw new Error("Cannot find native binding");
8+
});
9+
10+
it("loads browser import code without a keyring native binding", async () => {
11+
await expect(import("./ChromiumKeys.ts")).resolves.toBeDefined();
12+
});
13+
14+
it.effect("reports an unavailable keychain when the macOS binding cannot load", () =>
15+
Effect.gen(function* () {
16+
const { ChromiumKeyError, resolveChromiumKeys } = yield* Effect.promise(
17+
() => import("./ChromiumKeys.ts"),
18+
);
19+
const error = yield* resolveChromiumKeys({
20+
platform: "darwin",
21+
keychainService: "Chrome Safe Storage",
22+
keychainAccount: "Chrome",
23+
linuxSecretApplication: undefined,
24+
}).pipe(Effect.flip);
25+
26+
expect(error).toBeInstanceOf(ChromiumKeyError);
27+
expect(error.reason).toBe("keychainUnavailable");
28+
expect(error.cause).toBeInstanceOf(Error);
29+
}).pipe(
30+
Effect.provideService(
31+
ChildProcessSpawner.ChildProcessSpawner,
32+
ChildProcessSpawner.make(() => Effect.die("must not spawn")),
33+
),
34+
),
35+
);

‎apps/desktop/src/preview/BrowserImport/ChromiumKeys.test.ts‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as Sink from "effect/Sink";
77
import * as Stream from "effect/Stream";
88
import * as PlatformError from "effect/PlatformError";
99
import { ChildProcessSpawner } from "effect/unstable/process";
10+
import { beforeEach, vi } from "vite-plus/test";
1011

1112
import {
1213
ChromiumKeyError,
@@ -17,6 +18,18 @@ import {
1718
} from "./ChromiumKeys.ts";
1819
import { LinuxBrowserSecretPath } from "./LinuxBrowserSecret.ts";
1920

21+
const { getPassword } = vi.hoisted(() => ({ getPassword: vi.fn<() => string | null>() }));
22+
23+
vi.mock("@napi-rs/keyring", () => ({
24+
Entry: class {
25+
getPassword = getPassword;
26+
},
27+
}));
28+
29+
beforeEach(() => {
30+
getPassword.mockReset();
31+
});
32+
2033
type CapturedCommand = {
2134
readonly command: string;
2235
readonly args: ReadonlyArray<string>;
@@ -63,6 +76,47 @@ const helperLayer = (input: {
6376
),
6477
);
6578

79+
describe("macOS Chromium secrets", () => {
80+
const request = {
81+
platform: "darwin",
82+
keychainService: "Chrome Safe Storage",
83+
keychainAccount: "Chrome",
84+
linuxSecretApplication: undefined,
85+
} as const;
86+
const noProcesses = Layer.succeed(
87+
ChildProcessSpawner.ChildProcessSpawner,
88+
ChildProcessSpawner.make(() => Effect.die("must not spawn")),
89+
);
90+
91+
it.effect("derives the cookie key from the keychain secret", () =>
92+
Effect.gen(function* () {
93+
getPassword.mockReturnValue("macos-secret");
94+
const keys = yield* resolveChromiumKeys(request);
95+
expect(keys.cbcV10?.toString("hex")).toBe("3df7306fb1eac353289565a2f6b64f74");
96+
}).pipe(Effect.provide(noProcesses)),
97+
);
98+
99+
it.effect("reports a missing keychain entry", () =>
100+
Effect.gen(function* () {
101+
getPassword.mockReturnValue(null);
102+
const error = yield* resolveChromiumKeys(request).pipe(Effect.flip);
103+
expect(error.reason).toBe("keychainItemMissing");
104+
}).pipe(Effect.provide(noProcesses)),
105+
);
106+
107+
it.effect("preserves a denied keychain approval", () =>
108+
Effect.gen(function* () {
109+
const denied = new Error("User denied access");
110+
getPassword.mockImplementation(() => {
111+
throw denied;
112+
});
113+
const error = yield* resolveChromiumKeys(request).pipe(Effect.flip);
114+
expect(error.reason).toBe("needsKeychainApproval");
115+
expect(error.cause).toBe(denied);
116+
}).pipe(Effect.provide(noProcesses)),
117+
);
118+
});
119+
66120
describe("Linux Chromium secrets", () => {
67121
it.effect("retains a missing helper failure alongside the keyring-free fallback", () =>
68122
Effect.gen(function* () {

‎apps/desktop/src/preview/BrowserImport/ChromiumKeys.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*
1818
* @module ChromiumKeys
1919
*/
20-
import * as Keyring from "@napi-rs/keyring";
2120
import * as NodeCrypto from "node:crypto";
2221

2322
import { HostProcessEnvironment } from "@t3tools/shared/hostProcess";
@@ -102,6 +101,12 @@ const readKeychainSecret = Effect.fn("ChromiumKeys.readKeychainSecret")(function
102101
service: string,
103102
account: string,
104103
) {
104+
// Only macOS cookie imports need this binding; loading it at startup can
105+
// prevent the desktop from opening on platforms that never use it.
106+
const Keyring = yield* Effect.tryPromise({
107+
try: () => import("@napi-rs/keyring"),
108+
catch: (cause) => new ChromiumKeyError({ reason: "keychainUnavailable", cause }),
109+
});
105110
const secret = yield* Effect.try({
106111
try: () => new Keyring.Entry(service, account).getPassword(),
107112
catch: (cause) => {

‎apps/mobile/app.config.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ const config: ExpoConfig = {
186186
icon: variant.assets.appIcon,
187187
userInterfaceStyle: "automatic",
188188
updates: {
189-
enabled: true,
189+
enabled: repoEnv.T3CODE_MOBILE_UPDATES_ENABLED !== "0",
190190
url: "https://u.expo.dev/d763fcb8-d37c-41ea-a773-b54a0ab4a454",
191191
checkAutomatically: "ON_LOAD",
192192
fallbackToCacheTimeout: 0,
@@ -237,6 +237,9 @@ const config: ExpoConfig = {
237237
android: {
238238
icon: variant.assets.appIcon,
239239
package: variant.androidPackage,
240+
...(repoEnv.T3CODE_ANDROID_GOOGLE_SERVICES_FILE
241+
? { googleServicesFile: repoEnv.T3CODE_ANDROID_GOOGLE_SERVICES_FILE }
242+
: {}),
240243
adaptiveIcon: {
241244
backgroundColor: variant.assets.androidAdaptiveBackgroundColor,
242245
...(variant.assets.androidAdaptiveBackgroundImage
@@ -356,6 +359,10 @@ const config: ExpoConfig = {
356359
[
357360
"expo-build-properties",
358361
{
362+
android: {
363+
// Keep the supported floor explicit and covered by native notification tests.
364+
minSdkVersion: 24,
365+
},
359366
ios: {
360367
deploymentTarget: "18.0",
361368
// AppCheckCore 11.3+ includes Swift and needs module maps for these Objective-C dependencies.

‎apps/mobile/generated-uniwind-default-theme-variables.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
"--color-card": "#ffffff",
77
"--color-card-alt": "#f5f5f5",
88
"--color-card-translucent": "rgba(255, 255, 255, 0.8)",
9+
"--color-thread-canvas": "#f5f5f5",
10+
"--color-thread-selected": "#ffffff",
11+
"--color-thread-selected-foreground": "#262626",
12+
"--color-thread-selected-foreground-muted": "#737373",
13+
"--color-composer-panel": "rgba(245, 245, 245, 0.88)",
14+
"--color-composer-surface": "rgba(255, 255, 255, 0.94)",
15+
"--color-composer-border": "rgba(0, 0, 0, 0.1)",
916
"--color-foreground": "#262626",
1017
"--color-foreground-secondary": "#525252",
1118
"--color-foreground-muted": "#737373",
@@ -76,6 +83,13 @@
7683
"--color-card": "#171717",
7784
"--color-card-alt": "#1c1c1c",
7885
"--color-card-translucent": "rgba(17, 17, 17, 0.8)",
86+
"--color-thread-canvas": "#1c1c1c",
87+
"--color-thread-selected": "#171717",
88+
"--color-thread-selected-foreground": "#f5f5f5",
89+
"--color-thread-selected-foreground-muted": "#8e8e93",
90+
"--color-composer-panel": "rgba(28, 28, 28, 0.92)",
91+
"--color-composer-surface": "rgba(23, 23, 23, 0.9)",
92+
"--color-composer-border": "rgba(255, 255, 255, 0.08)",
7993
"--color-foreground": "#f5f5f5",
8094
"--color-foreground-secondary": "#a3a3a3",
8195
"--color-foreground-muted": "#8e8e93",

‎apps/mobile/generated-uniwind-themes.css‎

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@
128128
--color-card: #fdfafd;
129129
--color-card-alt: #faf3fb;
130130
--color-card-translucent: rgba(253, 250, 253, 0.8);
131+
--color-thread-canvas: #faf3fb;
132+
--color-thread-selected: #fdfafd;
133+
--color-thread-selected-foreground: #501854;
134+
--color-thread-selected-foreground-muted: #ac1668;
135+
--color-composer-panel: rgba(250, 243, 251, 0.88);
136+
--color-composer-surface: rgba(253, 250, 253, 0.94);
137+
--color-composer-border: rgba(238, 225, 237, 0.54);
131138
--color-foreground: #501854;
132139
--color-foreground-secondary: #ac1668;
133140
--color-foreground-muted: #8d1255;
@@ -256,6 +263,13 @@
256263
--color-card: #2c2631;
257264
--color-card-alt: #29232d;
258265
--color-card-translucent: rgba(44, 38, 49, 0.8);
266+
--color-thread-canvas: #29232d;
267+
--color-thread-selected: #2c2631;
268+
--color-thread-selected-foreground: #f9f8fb;
269+
--color-thread-selected-foreground-muted: #e7d0dd;
270+
--color-composer-panel: rgba(41, 35, 45, 0.92);
271+
--color-composer-surface: rgba(44, 38, 49, 0.9);
272+
--color-composer-border: rgba(39, 36, 44, 0.46);
259273
--color-foreground: #f9f8fb;
260274
--color-foreground-secondary: #e7d0dd;
261275
--color-foreground-muted: #e7d0dd;
@@ -384,6 +398,13 @@
384398
--color-card: #ecefed;
385399
--color-card-alt: #f3f7f4;
386400
--color-card-translucent: rgba(236, 239, 237, 0.8);
401+
--color-thread-canvas: #f3f7f4;
402+
--color-thread-selected: #ecefed;
403+
--color-thread-selected-foreground: #241523;
404+
--color-thread-selected-foreground-muted: #746c73;
405+
--color-composer-panel: rgba(243, 247, 244, 0.88);
406+
--color-composer-surface: rgba(236, 239, 237, 0.94);
407+
--color-composer-border: rgba(203, 213, 209, 0.54);
387408
--color-foreground: #241523;
388409
--color-foreground-secondary: #746c73;
389410
--color-foreground-muted: #6e696f;
@@ -512,6 +533,13 @@
512533
--color-card: #36413c;
513534
--color-card-alt: #1b2821;
514535
--color-card-translucent: rgba(54, 65, 60, 0.8);
536+
--color-thread-canvas: #1b2821;
537+
--color-thread-selected: #36413c;
538+
--color-thread-selected-foreground: #fffaff;
539+
--color-thread-selected-foreground-muted: #919595;
540+
--color-composer-panel: rgba(27, 40, 33, 0.92);
541+
--color-composer-surface: rgba(54, 65, 60, 0.9);
542+
--color-composer-border: rgba(65, 95, 79, 0.46);
515543
--color-foreground: #fffaff;
516544
--color-foreground-secondary: #919595;
517545
--color-foreground-muted: #9da5a2;
@@ -640,6 +668,13 @@
640668
--color-card: #edeff1;
641669
--color-card-alt: #f5f7f8;
642670
--color-card-translucent: rgba(237, 239, 241, 0.8);
671+
--color-thread-canvas: #f5f7f8;
672+
--color-thread-selected: #edeff1;
673+
--color-thread-selected-foreground: #241523;
674+
--color-thread-selected-foreground-muted: #746c75;
675+
--color-composer-panel: rgba(245, 247, 248, 0.88);
676+
--color-composer-surface: rgba(237, 239, 241, 0.94);
677+
--color-composer-border: rgba(205, 212, 220, 0.54);
643678
--color-foreground: #241523;
644679
--color-foreground-secondary: #746c75;
645680
--color-foreground-muted: #6f6873;
@@ -768,6 +803,13 @@
768803
--color-card: #333b45;
769804
--color-card-alt: #17212b;
770805
--color-card-translucent: rgba(51, 59, 69, 0.8);
806+
--color-thread-canvas: #17212b;
807+
--color-thread-selected: #333b45;
808+
--color-thread-selected-foreground: #fffaff;
809+
--color-thread-selected-foreground-muted: #8d8f97;
810+
--color-composer-panel: rgba(23, 33, 43, 0.92);
811+
--color-composer-surface: rgba(51, 59, 69, 0.9);
812+
--color-composer-border: rgba(64, 85, 103, 0.46);
771813
--color-foreground: #fffaff;
772814
--color-foreground-secondary: #8d8f97;
773815
--color-foreground-muted: #969ca6;
@@ -896,6 +938,13 @@
896938
--color-card: #f1efee;
897939
--color-card-alt: #f9f7f5;
898940
--color-card-translucent: rgba(241, 239, 238, 0.8);
941+
--color-thread-canvas: #f9f7f5;
942+
--color-thread-selected: #f1efee;
943+
--color-thread-selected-foreground: #241523;
944+
--color-thread-selected-foreground-muted: #766c74;
945+
--color-composer-panel: rgba(249, 247, 245, 0.88);
946+
--color-composer-surface: rgba(241, 239, 238, 0.94);
947+
--color-composer-border: rgba(221, 210, 206, 0.54);
899948
--color-foreground: #241523;
900949
--color-foreground-secondary: #766c74;
901950
--color-foreground-muted: #74686f;
@@ -1024,6 +1073,13 @@
10241073
--color-card: #433835;
10251074
--color-card-alt: #291e1a;
10261075
--color-card-translucent: rgba(67, 56, 53, 0.8);
1076+
--color-thread-canvas: #291e1a;
1077+
--color-thread-selected: #433835;
1078+
--color-thread-selected-foreground: #fffaff;
1079+
--color-thread-selected-foreground-muted: #968e8f;
1080+
--color-composer-panel: rgba(41, 30, 26, 0.92);
1081+
--color-composer-surface: rgba(67, 56, 53, 0.9);
1082+
--color-composer-border: rgba(102, 76, 63, 0.46);
10271083
--color-foreground: #fffaff;
10281084
--color-foreground-secondary: #968e8f;
10291085
--color-foreground-muted: #a59996;
@@ -1152,6 +1208,13 @@
11521208
--color-card: #f0eff2;
11531209
--color-card-alt: #f8f7f9;
11541210
--color-card-translucent: rgba(240, 239, 242, 0.8);
1211+
--color-thread-canvas: #f8f7f9;
1212+
--color-thread-selected: #f0eff2;
1213+
--color-thread-selected-foreground: #241523;
1214+
--color-thread-selected-foreground-muted: #766c76;
1215+
--color-composer-panel: rgba(248, 247, 249, 0.88);
1216+
--color-composer-surface: rgba(240, 239, 242, 0.94);
1217+
--color-composer-border: rgba(214, 209, 222, 0.54);
11551218
--color-foreground: #241523;
11561219
--color-foreground-secondary: #766c76;
11571220
--color-foreground-muted: #726874;
@@ -1280,6 +1343,13 @@
12801343
--color-card: #383443;
12811344
--color-card-alt: #1d1929;
12821345
--color-card-translucent: rgba(56, 52, 67, 0.8);
1346+
--color-thread-canvas: #1d1929;
1347+
--color-thread-selected: #383443;
1348+
--color-thread-selected-foreground: #fffaff;
1349+
--color-thread-selected-foreground-muted: #8e8a95;
1350+
--color-composer-panel: rgba(29, 25, 41, 0.92);
1351+
--color-composer-surface: rgba(56, 52, 67, 0.9);
1352+
--color-composer-border: rgba(77, 67, 102, 0.46);
12831353
--color-foreground: #fffaff;
12841354
--color-foreground-secondary: #8e8a95;
12851355
--color-foreground-muted: #9690a1;

‎apps/mobile/global.css‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
--color-card: #ffffff;
2020
--color-card-alt: #f5f5f5;
2121
--color-card-translucent: rgba(255, 255, 255, 0.8);
22+
--color-thread-canvas: #f5f5f5;
23+
--color-thread-selected: #ffffff;
24+
--color-thread-selected-foreground: #262626;
25+
--color-thread-selected-foreground-muted: #737373;
26+
--color-composer-panel: rgba(245, 245, 245, 0.88);
27+
--color-composer-surface: rgba(255, 255, 255, 0.94);
28+
--color-composer-border: rgba(0, 0, 0, 0.1);
2229

2330
/* Text */
2431
--color-foreground: #262626;
@@ -123,6 +130,13 @@
123130
--color-card: #171717;
124131
--color-card-alt: #1c1c1c;
125132
--color-card-translucent: rgba(17, 17, 17, 0.8);
133+
--color-thread-canvas: #1c1c1c;
134+
--color-thread-selected: #171717;
135+
--color-thread-selected-foreground: #f5f5f5;
136+
--color-thread-selected-foreground-muted: #8e8e93;
137+
--color-composer-panel: rgba(28, 28, 28, 0.92);
138+
--color-composer-surface: rgba(23, 23, 23, 0.9);
139+
--color-composer-border: rgba(255, 255, 255, 0.08);
126140

127141
/* Text */
128142
--color-foreground: #f5f5f5;

0 commit comments

Comments
 (0)