Skip to content

Commit e01255d

Browse files
committed
Merge remote-tracking branch 'origin/main' into triage-a/15626
# Conflicts: # apps/server/src/usage/UsageService.test.ts # apps/server/src/usage/UsageService.ts
2 parents 56e1d0a + 51347ac commit e01255d

1,848 files changed

Lines changed: 121365 additions & 36727 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.

‎.coderabbit.config.ts‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1-
import { defineConfig } from "@coderabbitai/config";
1+
import { defineConfig, type CodeRabbitContext } from "@coderabbitai/config";
22

3-
export default defineConfig({
3+
// Org members and collaborators merge their own pull requests. On anyone else's, CodeRabbit
4+
// requests changes until its comments are resolved, then approves.
5+
const UNGATED_AUTHORS = new Set(["OWNER", "MEMBER", "COLLABORATOR"]);
6+
const isGated = ({ pr }: CodeRabbitContext) => !UNGATED_AUTHORS.has(pr?.authorAssociation ?? "");
7+
8+
export default defineConfig((ctx) => ({
49
reviews: {
510
high_level_summary: false,
611
review_status: false,
12+
request_changes_workflow: isGated(ctx),
13+
allow_author_approval: !isGated(ctx),
714
auto_review: {
815
enabled: true,
916
},
1017
pre_merge_checks: {
1118
docstrings: { mode: "off" },
19+
override_requested_reviewers_only: isGated(ctx),
1220
},
1321
path_filters: [
1422
// Vendored read-only reference checkouts of upstream Effect and Alchemy
@@ -34,4 +42,4 @@ export default defineConfig({
3442
],
3543
},
3644
},
37-
});
45+
}));

‎.github/workflows/release.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ jobs:
330330
# No Electron setup here: `t3` (apps/server) has no Electron dependency
331331
# and none of its tests touch the runtime. Only the non-server `test`
332332
# job, which covers @t3tools/desktop, needs the download.
333+
- name: Install Chromium for server browser integration tests
334+
run: node apps/server/node_modules/playwright-core/cli.js install --with-deps --only-shell chromium
335+
333336
- name: Test
334337
run: vp run --filter t3 test --shard ${{ matrix.shard }}/${{ strategy.job-total }}
335338

‎AGENTS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ Architecture and its constraints: `docs/internals/overview.md`. Glossary: `docs/
150150
## Taste
151151

152152
- Complexity belongs at the adapter boundary. Orchestration stays pure, UI stays dumb.
153+
- Client mutations use `createEnvironmentRpcCommand`. Add protected methods to `CLIENT_GUARDED_RPC_SCOPES` in contracts and use the command's `permissionAtom` for UI availability. Grants are checked at execution against the destination environment; the server remains authoritative. Keep raw RPC clients inside `rpc/`, and extend the permission behavior tests when adding a protected method.
153154
- 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).
154155
- `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. See [Web UI](docs/internals/web-ui.md).
155156
- Inferred types over annotations. `any` is the enemy.

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Full docs live in [docs/](./docs). There's no docs site yet.
9494
- [Project settings](./docs/user/project-settings.md)
9595
- [Appearance preferences](./docs/user/appearance.md)
9696
- [Remote access from a phone or another machine](./docs/user/remote-access.md)
97+
- [Connect Claude Code, Codex, ChatGPT and other agents over MCP](./docs/user/outside-agents.md)
9798
- [Keeping app and server in sync](./docs/user/updating.md)
9899
- [Source control integrations](./docs/user/source-control.md)
99100
- Multiple accounts: [Codex](./docs/user/providers-codex.md) · [Claude](./docs/user/providers-claude.md)

‎apps/desktop/package.json‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424
"@t3tools/tailscale": "workspace:*",
2525
"dbus-next": "0.10.2",
2626
"effect": "catalog:",
27-
"electron": "44.4.2",
27+
"electron": "44.4.5",
2828
"electron-store": "^8.2.0",
2929
"electron-updater": "^6.8.9",
30+
"electron-webauthn": "catalog:",
3031
"ffi-rs": "1.3.2",
3132
"playwright-core": "1.60.0",
32-
"react-grab": "^0.1.32"
33+
"react-grab": "^0.1.32",
34+
"tldts": "catalog:"
3335
},
3436
"devDependencies": {
3537
"@effect/vitest": "catalog:",
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>com.t3tools.t3code</id>
4+
<metadata_license>CC0-1.0</metadata_license>
5+
<project_license>MIT</project_license>
6+
<name>T3 Code</name>
7+
<summary>Desktop GUI for coding agents</summary>
8+
<developer id="com.t3tools">
9+
<name>T3 Tools Inc.</name>
10+
</developer>
11+
<description>
12+
<p>
13+
T3 Code is an open-source desktop app for coding agents. Work with your
14+
existing agent subscriptions, review code changes, and run commands in
15+
your projects.
16+
</p>
17+
<p>
18+
Connect from desktop, web, or mobile to continue working remotely.
19+
</p>
20+
</description>
21+
<launchable type="desktop-id">t3code.desktop</launchable>
22+
<icon type="stock">t3code</icon>
23+
<provides>
24+
<binary>t3code</binary>
25+
</provides>
26+
<categories>
27+
<category>Development</category>
28+
</categories>
29+
<url type="homepage">https://t3.codes</url>
30+
<url type="bugtracker">https://github.com/pingdotgg/t3code/issues</url>
31+
<url type="vcs-browser">https://github.com/pingdotgg/t3code</url>
32+
</component>

‎apps/desktop/src/app/DesktopApp.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import * as DesktopAppIdentity from "./DesktopAppIdentity.ts";
1717
import * as DesktopClerk from "./DesktopClerk.ts";
1818
import * as DesktopApplicationMenu from "../window/DesktopApplicationMenu.ts";
1919
import * as DesktopWindow from "../window/DesktopWindow.ts";
20+
import * as PreviewPasskeys from "../preview/Passkeys.ts";
2021
import * as DesktopBackendPool from "../backend/DesktopBackendPool.ts";
2122
import * as DesktopEnvironment from "./DesktopEnvironment.ts";
2223
import * as DesktopLegacyLocalStorage from "./DesktopLegacyLocalStorage.ts";
@@ -276,6 +277,7 @@ const startup = Effect.gen(function* () {
276277
const safeStorage = yield* ElectronSafeStorage.ElectronSafeStorage;
277278
const updates = yield* DesktopUpdates.DesktopUpdates;
278279
const environment = yield* DesktopEnvironment.DesktopEnvironment;
280+
const previewPasskeys = yield* PreviewPasskeys.PreviewPasskeys;
279281

280282
yield* shellEnvironment.installIntoProcess;
281283
const hasCommandLinePasswordStore =
@@ -329,6 +331,7 @@ const startup = Effect.gen(function* () {
329331
});
330332
}
331333
yield* appIdentity.configure;
334+
yield* previewPasskeys.configure;
332335
yield* applicationMenu.configure;
333336
yield* updates.configure;
334337
yield* DesktopRemoteUpdates.listen;

‎apps/desktop/src/app/DesktopAppIdentity.test.ts‎

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ describe("DesktopAppIdentity", () => {
217217
const identity = yield* DesktopAppIdentity.DesktopAppIdentity;
218218
yield* identity.configure;
219219

220-
assert.deepEqual(calls.setName, ["T3 Code (Alpha)"]);
220+
assert.deepEqual(calls.setName, ["T3 Code Alpha"]);
221221
assert.equal(calls.setAboutPanelOptions[0]?.applicationName, "T3 Code (Alpha)");
222222
assert.equal(calls.setAboutPanelOptions[0]?.applicationVersion, "1.2.3");
223223
assert.equal(calls.setAboutPanelOptions[0]?.version, "0123456789ab");
@@ -237,6 +237,39 @@ describe("DesktopAppIdentity", () => {
237237
);
238238
});
239239

240+
it.effect.each([
241+
{ stage: "Alpha", environment: {} },
242+
{
243+
stage: "Nightly",
244+
environment: { appVersion: "0.0.43-nightly.20260929.2428" },
245+
},
246+
{
247+
stage: "Dev",
248+
environment: { env: { VITE_DEV_SERVER_URL: "http://localhost:5173" } },
249+
},
250+
])("uses a valid native User-Agent product name for $stage", ({ stage, environment }) => {
251+
const calls: ElectronAppCalls = {
252+
setAboutPanelOptions: [],
253+
setDockIcon: [],
254+
setName: [],
255+
};
256+
257+
return withIdentity(
258+
Effect.gen(function* () {
259+
const identity = yield* DesktopAppIdentity.DesktopAppIdentity;
260+
yield* identity.configure;
261+
262+
const runtimeName = calls.setName[0];
263+
assert.isDefined(runtimeName);
264+
assert.equal(runtimeName, `T3 Code ${stage}`);
265+
// RFC 9110's token grammar, after Electron removes ASCII spaces.
266+
assert.match(runtimeName.replaceAll(" ", ""), /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/);
267+
assert.equal(calls.setAboutPanelOptions[0]?.applicationName, `T3 Code (${stage})`);
268+
}),
269+
{ calls, environment },
270+
);
271+
});
272+
240273
it.effect("sets the dock icon only when running unpackaged", () => {
241274
const calls: ElectronAppCalls = {
242275
setAboutPanelOptions: [],

‎apps/desktop/src/app/DesktopAppIdentity.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ export const make = Effect.gen(function* () {
9191

9292
const configure = Effect.gen(function* () {
9393
const commitHash = yield* resolveAboutCommitHash;
94-
yield* electronApp.setName(environment.displayName);
94+
// Electron removes spaces from this name to build the native User-Agent
95+
// product token, but leaves parentheses intact. Keep the runtime name valid
96+
// without rewriting preview sessions (which breaks Turnstile, #7110).
97+
yield* electronApp.setName(
98+
`${environment.branding.baseName} ${environment.branding.stageLabel}`,
99+
);
95100
yield* electronApp.setAboutPanelOptions({
96101
applicationName: environment.displayName,
97102
applicationVersion: environment.appVersion,

0 commit comments

Comments
 (0)