Skip to content

Commit 5a1d491

Browse files
authored
Merge branch 'main' into fix/bitbucket-self-hosted-cloud-calls
2 parents 5542b87 + 54084ae commit 5a1d491

173 files changed

Lines changed: 5982 additions & 4264 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.

‎.agents/skills/test-t3-mobile/SKILL.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ Start `vp run dev:client` from `apps/mobile`, or reuse a healthy Metro belonging
4141
to this checkout. Open its printed development-client URL with AgentDevice
4242
`open com.t3tools.t3code.dev <url>` and all returned target arguments.
4343
The device must be able to reach both Metro and the isolated backend.
44+
Append `&disableAutoLaunch=1&disableFab=1` to the development-client URL query
45+
when developer chrome would obscure screenshots or taps; the SDK 58 dev client
46+
applies these preferences before the app loads.
4447

4548
## Pair and verify
4649

‎.github/workflows/mobile-eas-preview.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ jobs:
6666
if: steps.expo-token.outputs.present == 'true'
6767
uses: expo/expo-github-action@v8
6868
with:
69-
eas-version: latest
69+
# eas-cli 22 renamed `project` to `app` in build JSON, and
70+
# continuous-deploy-fingerprint still reads `build.project.ownerAccount`.
71+
# Unpin once https://github.com/expo/expo-github-action/issues/358 is fixed.
72+
eas-version: 21.8.0
7073
token: ${{ secrets.EXPO_TOKEN }}
7174
# npm, not pnpm: this only installs eas-cli into the action's own
7275
# tool dir, and pnpm 11 hard-fails that install on dtrace-provider's

‎.macroscope/check-run-agents/effect-service-conventions.md‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ showToolCalls: true
2222

2323
# Effect service review
2424

25-
Review changed TypeScript for the conventions below. They apply when a pull request creates, moves, refactors, or consumes an Effect service. Review only the lines the PR changed; older code in the same file that predates these conventions is not a finding. Do not demand repository-wide cleanup.
25+
Review changed TypeScript for the conventions below. They apply when a pull request creates, moves, refactors, or consumes an Effect service, or adds server behavior. Authors read the same rules in `docs/internals/effect-services.md`; keep the two in step. Review only the lines the PR changed; older code in the same file that predates these conventions is not a finding. Do not demand repository-wide cleanup.
2626

2727
## Imports and module namespaces
2828

@@ -31,11 +31,16 @@ Review changed TypeScript for the conventions below. They apply when a pull requ
3131
- Named imports stay correct for whole packages such as `@t3tools/contracts` and for modules used only for a pure helper, error, schema, config value, or type. Do not request `import type * as Contracts`.
3232
- When a barrel exposes a whole service module, prefer `export * as TokenStore from "./tokenStore.ts"` over individually renamed `make` and `layer` exports.
3333

34+
## Placement
35+
36+
- Flag new or broadened feature logic in a transport handler: a WebSocket RPC handler in `apps/server/src/ws.ts`, an HTTP route handler, or an MCP tool handler. A handler decodes input, calls one service method, and maps the service's errors to the transport's error. Filesystem, Git, process, or persistence work, folder naming, multi-step command dispatch, retries, or rollback inside a handler belongs in a service method; ask for it to move to the domain's existing service, or a new one when none owns the domain. Existing inline handlers are legacy; flag only changed lines.
37+
- Flag a new exported free function that does a server capability's effectful work (filesystem, Git, processes, persisted state) and is called from a handler, when it should be a service method. Plain functions for pure work (formatting, naming, parsing) are fine.
38+
3439
## Service definition
3540

3641
- One canonical module per service in this order: imports, error and schema declarations, the `Context.Service` tag with its interface inline, `make`, then `layer`.
3742
- Define the interface inline in `Context.Service`. Do not add a standalone `FooShape` interface; refer to the inferred type as `Foo["Service"]`.
38-
- Export a real `make` when the module owns construction. Do not write `make = Effect.succeed(...)` only to force `Layer.effect`; use `Layer.succeed`, `Layer.scoped`, or whichever constructor matches.
43+
- Define a real `make` when the module owns construction, and export it only when another module imports it; knip fails CI on an unused export, so do not ask for an export nothing uses. Do not write `make = Effect.succeed(...)` only to force `Layer.effect`; use `Layer.succeed`, `Layer.scoped`, or whichever constructor matches.
3944
- Use plain `make` and `layer` in a module named for its implementation (`BunPtyAdapter.ts`). Keep implementation-specific names when one abstract port module holds several implementations (`makeCloudflaredRelayClient`, `layerCloudflared` in `RelayClient.ts`). `infra/relay/src/db.ts` may keep its inline `Layer.succeed(RelayDb, db)`.
4045
- When a service moves, delete the old files and update every consumer, including orchestration, MCP, tests, and integration harnesses. Do not leave compatibility re-export shims.
4146

‎AGENTS.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You can think of T3 Code as an open source "bring-your-own-subscription" alterna
66

77
## What makes T3 Code special?
88

9-
We have over 200,000 users who love T3 Code. It's important we maintain the things they love as we continue to iterate on the product. Here's a brief list of the things we can never compromise on.
9+
We have over 400,000 users who love T3 Code. It's important we maintain the things they love as we continue to iterate on the product. Here's a brief list of the things we can never compromise on.
1010

1111
### 1. Open at the core
1212

@@ -69,6 +69,7 @@ The most common defect in this repo is a change that works on the path you teste
6969
- **Entry points.** A behavior reachable from the chat view is usually also reachable from Settings, the command palette, and a keybinding. Fixing one is not fixing the feature.
7070
- **Clients.** Web, desktop (wraps web, adds Electron shell/IPC), and mobile (React Native, separate navigation). Shared logic lives in `packages/client-runtime`
7171
- **Providers.** Codex, Claude, Cursor, Grok, OpenCode, and Antigravity each have an adapter. Provider-shaped features need a decision per adapter, even if the decision is "not supported here".
72+
- **Agents.** A capability a user can trigger is usually one an agent should reach through MCP tools, and scheduled tasks run the same paths. That only works when it is a service method, not handler code.
7273
- **Contracts.** Anything crossing the wire is typed in `packages/contracts`. Change the schema and the server, web, mobile, and desktop all follow.
7374
- **Reverse states.** If you added a way in, add the way out and the way to see it. Snooze needs unsnooze. Close needs reopen. A one-way door is a bug.
7475
- **Connection modes.** Local, remote/relay, and tunnel behave differently. Multi-device and multi-environment cases are real.
@@ -148,7 +149,7 @@ Full glossary with file links: `docs/internals/glossary.md`
148149

149150
## Where code lives
150151

151-
- `apps/server` - WebSocket, orchestration, providers, checkpointing. Effect-heavy: read `.repos/effect-smol/LLMS.md` before writing Effect code.
152+
- `apps/server` - WebSocket, orchestration, providers, checkpointing. Effect-heavy: read [Effect services](docs/internals/effect-services.md) before adding server code, and `.repos/effect-smol/LLMS.md` for the Effect library itself.
152153
- `apps/web` - React/Vite UI. `apps/desktop` wraps it, `apps/mobile` is React Native, `apps/marketing` is the site.
153154
- `packages/contracts` - Effect/Schema contracts plus small derived helpers. No heavy runtime logic.
154155
- `packages/shared` - shared runtime utils, subpath exports, no barrel.
@@ -158,6 +159,7 @@ Full glossary with file links: `docs/internals/glossary.md`
158159
## Taste
159160

160161
- Complexity belongs at the adapter boundary. Orchestration stays pure, UI stays dumb.
162+
- Server features are services; transports stay thin. A `ws.ts` RPC handler, HTTP route, or MCP tool decodes input, calls one service method, and maps errors. See [Effect services](docs/internals/effect-services.md).
161163
- `apps/web/src/components/ui` exports own their look. Pick a `variant` or `size`; do not restyle one with `className`. If none fits and the look is a generic concept, add a variant to the component; a look that belongs to one feature stays in that feature's own component, not in `components/ui`. Layout classes (width, flex, margin, position) belong on the parent. `shadcn/no-restyle` fails lint on violations.
162164
- Inferred types over annotations. `any` is the enemy.
163165
- Comments describe how a thing is used, and move when the code moves. To be used mostly to describe functions, not to annotate every line of behavior.

‎apps/desktop/src/preview/Manager.test.ts‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,7 @@ describe("PreviewManager", () => {
16011601
),
16021602
);
16031603

1604-
effectIt.effect("emulates prefers-color-scheme and re-applies it across webview swaps", () =>
1604+
effectIt.effect("re-applies opaque base and color scheme across webview swaps", () =>
16051605
withManager((manager) =>
16061606
Effect.gen(function* () {
16071607
const makeWebContents = (id: number) => {
@@ -1650,6 +1650,16 @@ describe("PreviewManager", () => {
16501650
yield* manager.registerWebview("tab_scheme", 42);
16511651
yield* Effect.yieldNow;
16521652

1653+
// Guests start with a transparent base; dark-scheme pages need an opaque
1654+
// one or Chromium skips their dark canvas.
1655+
const opaqueBase = {
1656+
color: { r: 255, g: 255, b: 255, a: 1 },
1657+
};
1658+
expect(first.sendCommand).toHaveBeenCalledWith(
1659+
"Emulation.setDefaultBackgroundColorOverride",
1660+
opaqueBase,
1661+
);
1662+
16531663
yield* manager.setColorScheme("tab_scheme", "dark");
16541664

16551665
expect(first.sendCommand).toHaveBeenCalledWith("Emulation.setEmulatedMedia", {
@@ -1662,6 +1672,10 @@ describe("PreviewManager", () => {
16621672
yield* manager.registerWebview("tab_scheme", 43);
16631673
yield* Effect.yieldNow;
16641674

1675+
expect(replacement.sendCommand).toHaveBeenCalledWith(
1676+
"Emulation.setDefaultBackgroundColorOverride",
1677+
opaqueBase,
1678+
);
16651679
expect(replacement.sendCommand).toHaveBeenCalledWith("Emulation.setEmulatedMedia", {
16661680
features: [{ name: "prefers-color-scheme", value: "dark" }],
16671681
});

‎apps/desktop/src/preview/Manager.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,6 +1418,19 @@ const makeNativeOperations = Effect.fn("PreviewManager.makeOperations")(function
14181418
),
14191419
{ concurrency: "unbounded", discard: true },
14201420
);
1421+
// Electron gives `<webview>` guests a transparent base background, and
1422+
// Chromium only paints a dark canvas for dark color-scheme pages over an
1423+
// opaque base. Without this, dark-scheme pages with no background of
1424+
// their own (text/plain, e.g. .md files) render white text on white.
1425+
// White matches the webview's existing white backing, so light pages look
1426+
// the same; Chromium still swaps in its dark canvas for dark-scheme pages.
1427+
yield* attemptPromise(
1428+
{ operation: "initializeDebugger.defaultBackground", webContentsId: wc.id },
1429+
() =>
1430+
wcDebugger.sendCommand("Emulation.setDefaultBackgroundColorOverride", {
1431+
color: { r: 255, g: 255, b: 255, a: 1 },
1432+
}),
1433+
);
14211434
return [
14221435
control,
14231436
replaceMap(sessions, (copy) => {

‎apps/desktop/src/settings/DesktopClientSettings.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ const clientSettings: ClientSettings = {
6565
sidebarThreadSortOrder: "created_at",
6666
sidebarThreadPreviewCount: 6,
6767
legacySidebarEnabled: false,
68+
sidebarWorkingShelfEnabled: false,
6869
loadBalancingEnabled: false,
6970
loadBalancingWeights: { "environment-1": 75, "environment-2": 0 },
7071
pullRequestMergeMethodOverrides: {},
177 KB
Loading

‎apps/marketing/src/layouts/Layout.astro‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
import { getImage, Image } from "astro:assets";
33
import appIcon from "../assets/icon.webp";
4-
import desktopScreenshot from "../assets/app-desktop.webp";
4+
import socialCard from "../assets/social-card.webp";
55
import dmSansLatinUrl from "../assets/fonts/dm-sans-latin.woff2?url";
66
import "../styles/fonts.css";
77
import {
@@ -23,19 +23,19 @@ const {
2323
pageClass,
2424
} = Astro.props;
2525
26-
// Social preview card. Link unfurlers (Instagram, iMessage, X, Slack) want a
27-
// 1200x630 jpg or png at an absolute URL. Built from the hero screenshot so it
28-
// stays in sync with the homepage.
26+
// Social preview card, shared by og:image and twitter:image. Link unfurlers
27+
// (Instagram, iMessage, X, Slack) want a 1200x630 jpg or png at an absolute URL.
28+
// The source is a 2x export so the downscale stays sharp.
2929
const socialImage = await getImage({
30-
src: desktopScreenshot,
30+
src: socialCard,
3131
width: 1200,
3232
height: 630,
33-
fit: "cover",
34-
position: "top",
3533
format: "jpg",
3634
quality: 90,
3735
});
3836
const socialImageUrl = new URL(socialImage.src, Astro.site);
37+
const socialImageAlt =
38+
"T3 Code: the open-source control plane for coding agents, with Claude Code, Codex, Cursor, OpenCode, Grok and Antigravity.";
3939
const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
4040
---
4141

@@ -53,12 +53,13 @@ const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
5353
<meta property="og:image" content={socialImageUrl} />
5454
<meta property="og:image:width" content="1200" />
5555
<meta property="og:image:height" content="630" />
56-
<meta property="og:image:alt" content="The T3 Code desktop app with a thread open." />
56+
<meta property="og:image:alt" content={socialImageAlt} />
5757
<meta name="twitter:card" content="summary_large_image" />
5858
<meta name="twitter:site" content="@t3dotgg" />
5959
<meta name="twitter:title" content={title} />
6060
<meta name="twitter:description" content={description} />
6161
<meta name="twitter:image" content={socialImageUrl} />
62+
<meta name="twitter:image:alt" content={socialImageAlt} />
6263
<link
6364
rel="preload"
6465
href={dmSansLatinUrl}

‎apps/marketing/src/lib/site.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ export const ANDROID_PLAY_STORE_URL =
77
"https://play.google.com/store/apps/details?id=com.t3tools.t3code";
88

99
export const MARKETING_STATS = {
10-
githubStars: "22k+",
11-
users: "300,000",
10+
githubStars: "24k+",
11+
users: "400,000",
1212
} as const;

0 commit comments

Comments
 (0)