Skip to content

Commit 43693dc

Browse files
Merge branch 'main' into fix/wsl-preflight-node-version-check
2 parents e92a198 + 5c66110 commit 43693dc

43 files changed

Lines changed: 2179 additions & 365 deletions

Some content is hidden

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

‎apps/desktop/src/electron/ElectronMenu.test.ts‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ const TestLayer = ElectronMenu.layer.pipe(
3131
Layer.provide(Layer.succeed(HostProcessPlatform, "linux")),
3232
);
3333

34+
const makeWindow = (zoomFactor = 1): Electron.BrowserWindow =>
35+
({
36+
id: 7,
37+
webContents: { getZoomFactor: () => zoomFactor },
38+
}) as unknown as Electron.BrowserWindow;
39+
3440
describe("ElectronMenu", () => {
3541
beforeEach(() => {
3642
buildFromTemplateMock.mockReset();
@@ -70,7 +76,7 @@ describe("ElectronMenu", () => {
7076

7177
const electronMenu = yield* ElectronMenu.ElectronMenu;
7278
const selectedItemId = yield* electronMenu.showContextMenu({
73-
window: {} as Electron.BrowserWindow,
79+
window: makeWindow(),
7480
items: [{ id: "copy", label: "Copy" }],
7581
position: Option.none(),
7682
});
@@ -81,20 +87,24 @@ describe("ElectronMenu", () => {
8187

8288
it.effect("resolves with none when the menu closes without a click", () =>
8389
Effect.gen(function* () {
90+
let popupOptions: Electron.PopupOptions | undefined;
8491
buildFromTemplateMock.mockImplementation(() => ({
8592
popup: (options: Electron.PopupOptions) => {
93+
popupOptions = options;
8694
options.callback?.();
8795
},
8896
}));
8997

9098
const electronMenu = yield* ElectronMenu.ElectronMenu;
9199
const selectedItemId = yield* electronMenu.showContextMenu({
92-
window: {} as Electron.BrowserWindow,
100+
window: makeWindow(2),
93101
items: [{ id: "copy", label: "Copy" }],
94102
position: Option.some({ x: 10.8, y: 20.2 }),
95103
});
96104

97105
assert.isTrue(Option.isNone(selectedItemId));
106+
assert.equal(popupOptions?.x, 21);
107+
assert.equal(popupOptions?.y, 40);
98108
assert.deepEqual(buildFromTemplateMock.mock.calls[0]?.[0][0], {
99109
label: "Copy",
100110
enabled: true,

‎apps/desktop/src/electron/ElectronMenu.ts‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,20 @@ function normalizeContextMenuItems(source: readonly ContextMenuItem[]): ContextM
9494
return normalizedItems;
9595
}
9696

97+
// Renderer positions arrive in CSS pixels; popup() expects window points, so
98+
// page zoom must be factored in or menus drift proportionally to their
99+
// distance from the window origin.
97100
const normalizePosition = (
98101
position: Option.Option<ElectronMenuPosition>,
102+
zoomFactor: number,
99103
): Option.Option<ElectronMenuPosition> =>
100104
Option.filter(
101105
position,
102-
({ x, y }) => Number.isFinite(x) && Number.isFinite(y) && x >= 0 && y >= 0,
103-
).pipe(Option.map(({ x, y }) => ({ x: Math.floor(x), y: Math.floor(y) })));
106+
({ x, y }) =>
107+
Number.isFinite(x) && Number.isFinite(y) && x >= 0 && y >= 0 && Number.isFinite(zoomFactor),
108+
).pipe(
109+
Option.map(({ x, y }) => ({ x: Math.floor(x * zoomFactor), y: Math.floor(y * zoomFactor) })),
110+
);
104111

105112
export const make = Effect.gen(function* () {
106113
const platform = yield* HostProcessPlatform;
@@ -214,7 +221,10 @@ export const make = Effect.gen(function* () {
214221

215222
try {
216223
const menu = Electron.Menu.buildFromTemplate(buildTemplate(normalizedItems, complete));
217-
const popupPosition = normalizePosition(input.position);
224+
const popupPosition = normalizePosition(
225+
input.position,
226+
input.window.webContents.getZoomFactor(),
227+
);
218228
const popupOptions = Option.match(popupPosition, {
219229
onNone: (): Electron.PopupOptions => ({
220230
window: input.window,
Lines changed: 4 additions & 0 deletions
Loading

‎apps/marketing/src/pages/index.astro‎

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ const mobileEndorsementRows = [
3333
<span class="hero-float-mark hf-cursor" title="Cursor">
3434
<img src="/harnesses/cursor_light.svg" alt="" />
3535
</span>
36+
<span class="hero-float-mark hf-grok" title="Grok">
37+
<img src="/harnesses/grok-dark.svg" alt="" />
38+
</span>
3639
</div>
3740

3841
<div class="container hero-inner">
@@ -41,7 +44,7 @@ const mobileEndorsementRows = [
4144
</h1>
4245

4346
<p class="hero-sub">
44-
Orchestrate Claude Code, Codex, OpenCode and Cursor from one surface.
47+
Orchestrate Claude Code, Codex, OpenCode, Cursor, and Grok from one surface.
4548
Bring your own subscription. Fork the whole thing.
4649
</p>
4750

@@ -173,7 +176,7 @@ const mobileEndorsementRows = [
173176
<h2>Bring your own sub</h2>
174177
<p>
175178
T3 Code doesn't resell tokens. Plug in Claude Code, Codex, OpenCode,
176-
or Cursor with the credentials you already have — we orchestrate
179+
Cursor, or Grok with the credentials you already have — we orchestrate
177180
them, you keep your plan.
178181
</p>
179182
</div>
@@ -207,6 +210,13 @@ const mobileEndorsementRows = [
207210
<div class="harness-tag">cursor-agent</div>
208211
</div>
209212
</div>
213+
<div class="harness">
214+
<div class="harness-mark"><img src="/harnesses/grok-dark.svg" alt="" /></div>
215+
<div class="harness-meta">
216+
<div class="harness-name">Grok CLI</div>
217+
<div class="harness-tag">grok login</div>
218+
</div>
219+
</div>
210220
</div>
211221

212222
<div class="harness-footer">
@@ -615,8 +625,9 @@ const mobileEndorsementRows = [
615625

616626
.hero-float-mark.hf-claude { background: radial-gradient(circle at 30% 25%, rgba(217, 119, 87, 0.22), rgba(20, 20, 24, 0.92) 65%); top: 8%; left: 7%; animation-delay: 0s; transform: rotate(-8deg); }
617627
.hero-float-mark.hf-codex { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.08), rgba(20, 20, 24, 0.92) 65%); top: 6%; right: 7%; animation-delay: -2.5s; transform: rotate(6deg); }
618-
.hero-float-mark.hf-opencode { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.06), rgba(20, 20, 24, 0.92) 65%); top: 32%; left: 5%; animation-delay: -5s; transform: rotate(4deg); }
628+
.hero-float-mark.hf-opencode { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.06), rgba(20, 20, 24, 0.92) 65%); top: 30%; left: 5%; animation-delay: -5s; transform: rotate(4deg); }
619629
.hero-float-mark.hf-cursor { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.08), rgba(20, 20, 24, 0.92) 65%); top: 30%; right: 5%; animation-delay: -7s; transform: rotate(-5deg); }
630+
.hero-float-mark.hf-grok { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.08), rgba(20, 20, 24, 0.92) 65%); top: 52%; left: 6%; animation-delay: -1.2s; transform: rotate(3deg); }
620631

621632
@media (max-width: 1180px) {
622633
.hero-float-mark { width: 76px; height: 76px; border-radius: 20px; }
@@ -625,6 +636,7 @@ const mobileEndorsementRows = [
625636
.hero-float-mark.hf-codex { top: 2%; right: 3%; }
626637
.hero-float-mark.hf-opencode { top: 26%; left: 2%; }
627638
.hero-float-mark.hf-cursor { top: 24%; right: 2%; }
639+
.hero-float-mark.hf-grok { top: 48%; left: 2%; transform: rotate(3deg); }
628640
}
629641

630642
@media (max-width: 820px) {
@@ -659,17 +671,18 @@ const mobileEndorsementRows = [
659671
height: 44px;
660672
}
661673

662-
/* Two above the title, two flanking the call-to-action area. */
674+
/* Three stacked on the left, two on the right — keeps the center CTA clear. */
663675
.hero-float-mark.hf-claude {
664676
top: 44px;
665677
left: 10px;
666678
transform: rotate(-10deg);
667679
}
668680

669-
.hero-float-mark.hf-codex {
670-
top: 44px;
671-
right: 10px;
672-
transform: rotate(8deg);
681+
.hero-float-mark.hf-grok {
682+
top: 240px;
683+
left: 4px;
684+
right: auto;
685+
transform: rotate(-4deg);
673686
}
674687

675688
.hero-float-mark.hf-opencode {
@@ -679,6 +692,12 @@ const mobileEndorsementRows = [
679692
transform: rotate(-6deg);
680693
}
681694

695+
.hero-float-mark.hf-codex {
696+
top: 44px;
697+
right: 10px;
698+
transform: rotate(8deg);
699+
}
700+
682701
.hero-float-mark.hf-cursor {
683702
top: 474px;
684703
right: 4px;
@@ -688,6 +707,14 @@ const mobileEndorsementRows = [
688707
}
689708

690709
@media (max-width: 340px) {
710+
.hero-float-mark.hf-grok {
711+
top: 220px;
712+
left: 0;
713+
width: 52px;
714+
height: 52px;
715+
border-radius: 14px;
716+
}
717+
691718
.hero-float-mark.hf-opencode,
692719
.hero-float-mark.hf-cursor {
693720
top: 580px;
@@ -704,6 +731,7 @@ const mobileEndorsementRows = [
704731
right: 0;
705732
}
706733

734+
.hero-float-mark.hf-grok img,
707735
.hero-float-mark.hf-opencode img,
708736
.hero-float-mark.hf-cursor img {
709737
width: 30px;
@@ -750,7 +778,7 @@ const mobileEndorsementRows = [
750778

751779
.harness-grid {
752780
display: grid;
753-
grid-template-columns: repeat(4, 1fr);
781+
grid-template-columns: repeat(5, 1fr);
754782
gap: 0;
755783
border: 1px solid var(--border);
756784
border-radius: var(--radius);
@@ -1205,6 +1233,10 @@ const mobileEndorsementRows = [
12051233
.harness-grid { grid-template-columns: 1fr 1fr; }
12061234
.harness { border-right: 0; border-bottom: 1px solid var(--border); }
12071235
.harness:nth-child(odd) { border-right: 1px solid var(--border); }
1236+
.harness:nth-child(5):last-child {
1237+
grid-column: 1 / -1;
1238+
border-right: 0;
1239+
}
12081240
.git-inner { grid-template-columns: 1fr; gap: 40px; }
12091241
.open-grid { grid-template-columns: 1fr; }
12101242
}

‎apps/mobile/src/Stack.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { DynamicColorIOS, Platform, Pressable, ScrollView, StyleSheet } from "re
1515
import { useResolveClassNames } from "uniwind";
1616

1717
import { AppText as Text } from "./components/AppText";
18+
import { renderCompactBrandTitle } from "./components/CompactBrandTitle";
1819
import { ArchivedThreadsRouteScreen } from "./features/archive/ArchivedThreadsRouteScreen";
1920
import { useAgentNotificationNavigation } from "./features/agent-awareness/notificationNavigation";
2021
import { ClerkSettingsSheetDetentProvider } from "./features/cloud/ClerkSettingsSheetDetent";
@@ -377,7 +378,8 @@ export const RootStack = createNativeStackNavigator({
377378
...GLASS_HEADER_OPTIONS,
378379
contentStyle: { backgroundColor: "transparent" },
379380
headerBackVisible: false,
380-
title: "Threads",
381+
headerTitle: renderCompactBrandTitle,
382+
title: "T3 Code",
381383
},
382384
}),
383385
Thread: createNativeStackScreen({
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import { View } from "react-native";
2+
3+
import { AppText as Text } from "./AppText";
4+
import { T3Wordmark } from "./T3Wordmark";
5+
import { useThemeColor } from "../lib/useThemeColor";
6+
7+
/**
8+
* Compact brand lockup sized for native navigation bars.
9+
*/
10+
export function CompactBrandTitle() {
11+
const iconColor = useThemeColor("--color-icon");
12+
const mutedColor = useThemeColor("--color-foreground-muted");
13+
const subtleColor = useThemeColor("--color-subtle");
14+
15+
return (
16+
<View
17+
aria-level={1}
18+
accessibilityLabel="T3 Code"
19+
accessible
20+
role="heading"
21+
style={{ alignItems: "center", flexDirection: "row", gap: 6 }}
22+
>
23+
<T3Wordmark color={iconColor} height={11} />
24+
<Text
25+
style={{
26+
color: mutedColor,
27+
fontFamily: "DMSans-Medium",
28+
fontSize: 14,
29+
letterSpacing: -0.35,
30+
}}
31+
>
32+
Code
33+
</Text>
34+
<View
35+
style={{
36+
backgroundColor: subtleColor,
37+
borderRadius: 999,
38+
paddingHorizontal: 6,
39+
paddingVertical: 2,
40+
}}
41+
>
42+
<Text
43+
style={{
44+
color: mutedColor,
45+
fontFamily: "DMSans-Bold",
46+
fontSize: 9,
47+
letterSpacing: 0.9,
48+
textTransform: "uppercase",
49+
}}
50+
>
51+
Alpha
52+
</Text>
53+
</View>
54+
</View>
55+
);
56+
}
57+
58+
export function renderCompactBrandTitle() {
59+
return <CompactBrandTitle />;
60+
}

‎apps/mobile/src/features/home/HomeRouteScreen.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useNavigation } from "@react-navigation/native";
44
import { useMemo, useState } from "react";
55

66
import { NativeHeaderToolbar, NativeStackScreenOptions } from "../../native/StackHeader";
7+
import { renderCompactBrandTitle } from "../../components/CompactBrandTitle";
78
import { useProjects, useThreadShells } from "../../state/entities";
89
import { usePendingNewTasks } from "../../state/use-pending-new-tasks";
910
import { useWorkspaceState } from "../../state/workspace";
@@ -86,7 +87,9 @@ export function HomeRouteScreen() {
8687
>
8788
<>
8889
{/* Restore the compact title in case the split branch blanked it. */}
89-
<NativeStackScreenOptions options={{ title: "Threads", headerTitle: "Threads" }} />
90+
<NativeStackScreenOptions
91+
options={{ title: "T3 Code", headerTitle: renderCompactBrandTitle }}
92+
/>
9093
<HomeHeader
9194
environments={environments}
9295
searchQuery={searchQuery}

‎apps/mobile/src/features/threads/sidebar-navigation-shell.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import type { ReactNode } from "react";
1212
import { Platform, useColorScheme } from "react-native";
1313

14+
import { renderCompactBrandTitle } from "../../components/CompactBrandTitle";
1415
import { nativeHeaderScrollEdgeEffects } from "../../native/StackHeader";
1516

1617
const SCROLL_EDGE_EFFECTS = nativeHeaderScrollEdgeEffects(Platform.OS, Platform.Version);
@@ -34,10 +35,11 @@ const SIDEBAR_SCREEN_OPTIONS: SidebarScreenOptions = {
3435
headerShadowVisible: false,
3536
headerShown: true,
3637
headerStyle: { backgroundColor: "transparent" },
38+
headerTitle: renderCompactBrandTitle,
3739
headerTitleStyle: { fontSize: 18, fontWeight: "800" },
3840
headerTransparent: true,
3941
scrollEdgeEffects: SCROLL_EDGE_EFFECTS,
40-
title: "Threads",
42+
title: "T3 Code",
4143
unstable_navigationItemStyle: "editor",
4244
};
4345

0 commit comments

Comments
 (0)