Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
350b05a
fix(server): a Claude turn no longer ignores messages added to its se…
matthewcosier Nov 23, 2026
f17114b
fix(server): projects behind a git insteadOf rewrite are recognized a…
Muzammil-Bit Nov 23, 2026
9219968
fix(web): hide Mark unread on threads with no completed run (#41365)
juliusmarminge Nov 23, 2026
fd44bde
fix(web): keep OpenDocument image descriptions in alt text (#41383)
geezoria Nov 23, 2026
2ee7a4f
fix(server): t3_thread_read returns the newest page to outside MCP cl…
mfazekas Nov 23, 2026
5b643a4
fix(server): pull request tools say when repository is not owner/repo…
iamshadmantaqi Nov 23, 2026
7d8a145
fix(server): storage cleanup retries and keeps reporting git metadata…
juliusmarminge Nov 23, 2026
302e94a
fix(desktop): ⇧⌘V (Paste as Text) pastes text in the composer on macO…
tiliakoos Nov 23, 2026
9292b03
perf(server): replay stored events about twice as fast (#26719)
hieu-lee Nov 23, 2026
0a0389e
fix(server): Codex async alerts keep their delivery marker in the thr…
juliusmarminge Nov 23, 2026
e0267fe
fix(desktop): recover frozen macOS backends on relaunch (#41401)
juliusmarminge Nov 23, 2026
e54ef0f
fix(cli): npx no longer skips the install offer for a directory or no…
only21mil Nov 23, 2026
5aa8fa0
fix(server): PR tools build URLs through the refined forge they are e…
juliusmarminge Nov 23, 2026
5e570ea
fix(desktop): a link opened while the macOS window is closed opens a …
Marve10s Nov 23, 2026
eeb1951
fix(server): slow provider batches stay whole while a write waits on …
juliusmarminge Nov 23, 2026
a1839ca
fix(server): agent browsers' DevTools ports no longer show as servers…
tiliakoos Nov 23, 2026
f274d47
fix(mobile): apply Android language changes immediately (#38982)
qi-hey Nov 23, 2026
7e624c0
fix(web): chat links open their menu from the keyboard on macOS (#37405)
Kenmege Nov 23, 2026
630de36
fix(server): report failed Finder reveals for missing files (#38748)
VinzentHubrich Nov 23, 2026
7474a28
fix(server): Word attachments leave hidden text out of what agents re…
only21mil Nov 23, 2026
5f506c4
fix(server): skip CodeRabbit review acknowledgement wakes (#32300)
voltcrash Nov 23, 2026
c768764
fix(cli): expand ~ in t3 environment link --from (#41430)
Marve10s Nov 23, 2026
27ecc0f
fix(cli): reject incomplete workflow signal addresses locally (#41431)
only21mil Nov 23, 2026
6ec46a6
fix(opencode): Usage → Limits no longer warns when no Console workspa…
nthewara Nov 23, 2026
0db39e6
fix(cli): uninstall removes a script launcher whose target names the …
only21mil Nov 23, 2026
3ab1ee2
fix(server): long setup scripts complete in macOS zsh (#37836)
sync Nov 23, 2026
c6fe23d
fix(server): preview type sends key events to the page (#41432)
juliusmarminge Nov 23, 2026
e6e863c
fix(shared): Open in Cursor skips a broken cursor on PATH (#38212)
N4M3Z Nov 23, 2026
5e12857
fix(cli): expand ~ in t3 policy templates --policy (#41438)
Marve10s Nov 23, 2026
4311566
fix(server): read relocated shared strings in XLSX attachments (#41441)
Lucenx9 Nov 23, 2026
2bc7878
fix(server): import Claude sessions whose first prompt carries a larg…
juliusmarminge Nov 23, 2026
d1a6c35
fix(server): keep PowerPoint slides with alternate relationship prefi…
Lucenx9 Nov 23, 2026
06f513d
fix(server): another agent's queued message no longer holds back an a…
juliusmarminge Nov 23, 2026
c977a70
feat(scripts): server metrics record machine load and derive noise fl…
juliusmarminge Nov 23, 2026
2041936
feat(scripts): server metrics measure many threads working at once wi…
juliusmarminge Nov 23, 2026
059d1bd
docs: point provider setup at ACP Registry agents like GitHub Copilot…
juliusmarminge Nov 23, 2026
8f724d6
fix: treat empty PATH entries as the working directory in launcher an…
Motaghi Nov 23, 2026
962bda2
test(web): open history documents without reloading the app in iframe…
juliusmarminge Nov 23, 2026
f1e3906
feat(scripts): server metrics reconnect a user's devices by default a…
juliusmarminge Nov 23, 2026
4280147
fix(cli): clarify provider-specific model option examples (#41484)
nettee Nov 23, 2026
36413ad
feat(scripts): server metrics get a --quick profile, one-line failure…
juliusmarminge Nov 23, 2026
1bc44f2
fix(server): analytics report every model name (#41237)
t3dotgg Nov 23, 2026
5793cad
fix(server): workflows find a project named by its Windows folder (#4…
Marve10s Nov 23, 2026
fd0331c
fix(client-runtime): a workflow reply with no space before the limit …
Marve10s Nov 23, 2026
9d6c750
test(web): load history documents without re-evaluating the app graph…
juliusmarminge Nov 23, 2026
28c58b1
fix(server): an unfinished control sequence no longer delays terminal…
juliusmarminge Nov 23, 2026
fab237d
fix(server): service commands no longer stop systemd-oomd watching th…
juliusmarminge Nov 23, 2026
0948100
fix(server): a compaction or manual continuation keeps its session bu…
navidnadali Nov 23, 2026
f0d9015
fix(server): Azure DevOps PRs read by number get their full URL (#41472)
4dwaffle Nov 23, 2026
0359b04
fix(desktop): agent screenshots and clicks work while T3 Code is hidd…
3xcalibur-tech Nov 23, 2026
555512f
fix(server): a PR whose merge is refused for conflicts shows as confl…
micnem Nov 23, 2026
593885b
fix(cli): a symlinked spelling of the T3 home is the same home for se…
only21mil Nov 23, 2026
37a70fa
fix(server): preserve number formats when XLSX styles are relocated (…
Lucenx9 Nov 23, 2026
7997916
fix(web): Markdown previews load relative images in timestamped and r…
only21mil Nov 23, 2026
a2d6416
fix(server): RTF text in an ANSI font reads as code page 1252 under a…
Marve10s Nov 23, 2026
14c697c
fix(web): RTF previews read text in an ANSI font as code page 1252 un…
Marve10s Nov 23, 2026
77c230e
fix(web): notebook previews show errors saved without a traceback (#4…
only21mil Nov 23, 2026
e6ba483
fix(server): a declined steer of a delegated completion still wakes t…
juliusmarminge Nov 23, 2026
856b105
test(server): HTML preview revision test no longer depends on a fine …
t3dotgg Nov 23, 2026
ba70b56
test(server): PeerLinks refused-address test no longer reuses its clo…
t3dotgg Nov 23, 2026
3b08d97
fix(web): the desktop app plays thread sounds after a reload (#41518)
iamshadmantaqi Nov 23, 2026
36e9195
merge upstream/main into fork
adampeterhiggins Nov 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion apps/desktop/scripts/main-process-bundle.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ it("keeps lazy Linux imports and worker bundles from executing desktop startup t
const directory = await NodeFSP.mkdtemp(NodePath.join(NodeOS.tmpdir(), "t3-desktop-bundle-"));
try {
const workerEntries = [
"src/backend/DesktopBackendRecoveryWorker.ts",
"src/electron/WindowsForegroundFocusWorker.ts",
"src/snapShot/GlobalShiftShortcutWorker.ts",
"src/snapShot/RegionSnapShotWorker.ts",
"src/snapShot/SnapShotAccessibilityWorker.ts",
];
await Promise.all([
NodeFSP.mkdir(NodePath.join(directory, "src/backend"), { recursive: true }),
NodeFSP.mkdir(NodePath.join(directory, "src/electron"), { recursive: true }),
NodeFSP.mkdir(NodePath.join(directory, "src/snapShot"), { recursive: true }),
]);
Expand Down Expand Up @@ -104,7 +106,10 @@ void import("./linux.ts").then(({ result }) => process.emit("ready", result));`,
for (const entry of workerEntries) {
load(NodePath.join(outputDirectory, entry.replace(/^src\//, "").replace(/\.ts$/, ".cjs")));
}
assert.deepEqual(workers, [42, 42, 42, 42]);
assert.deepEqual(
workers,
workerEntries.map(() => 42),
);
assert.deepEqual(startups, [42]);
} finally {
await NodeFSP.rm(directory, { recursive: true, force: true });
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/app/DesktopApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ const startLocalBackend = Effect.gen(function* () {
return yield* new DesktopDevelopmentBackendPortRequiredError();
}

yield* DesktopBackendPool.recoverLocalBackend;
// A backend started while another server holds this home's lock can only exit with code 78.
if (
!(settings.wslOnly && settings.wslBackendEnabled) &&
Expand Down
69 changes: 58 additions & 11 deletions apps/desktop/src/app/DesktopWebLinks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { assert, describe, it } from "@effect/vitest";
import * as NodeEvents from "node:events";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as Option from "effect/Option";

import * as DesktopWindow from "../window/DesktopWindow.ts";
import * as ElectronWindow from "../electron/ElectronWindow.ts";
Expand All @@ -12,15 +13,32 @@ import * as DesktopWebLinks from "./DesktopWebLinks.ts";
const makeWindow = () => {
const sent: Array<string> = [];
const revealed: Array<unknown> = [];
const webContents = Object.assign(new NodeEvents.EventEmitter(), {
isDestroyed: () => false,
send: (channel: string, url: string) => {
if (channel === WEB_LINK_OPEN_CHANNEL) sent.push(url);
},
});
const window = { webContents } as unknown as Electron.BrowserWindow;
const reload = () =>
webContents.emit("did-start-navigation", { isMainFrame: true, isSameDocument: false });
const open = () => {
const webContents = Object.assign(new NodeEvents.EventEmitter(), {
isDestroyed: () => false,
send: (channel: string, url: string) => {
if (channel === WEB_LINK_OPEN_CHANNEL) sent.push(url);
},
});
return { webContents } as unknown as Electron.BrowserWindow;
};
let window = Option.some(open());
const reload = () => {
if (Option.isSome(window)) {
window.value.webContents.emit("did-start-navigation", {
isMainFrame: true,
isSameDocument: false,
});
}
};
const close = () => {
const closed = window;
window = Option.none();
if (Option.isSome(closed)) closed.value.webContents.emit("destroyed");
};
const reopen = () => {
window = Option.some(open());
};
const layer = DesktopWebLinks.layer.pipe(
Layer.provide(
Layer.succeed(DesktopWindow.DesktopWindow, {
Expand All @@ -31,13 +49,14 @@ const makeWindow = () => {
Layer.succeed(
ElectronWindow.ElectronWindow,
ElectronWindow.ElectronWindow.of({
currentMainOrFirst: Effect.succeedSome(window),
main: Effect.sync(() => window),
currentMainOrFirst: Effect.sync(() => window),
reveal: (target: Electron.BrowserWindow) => Effect.sync(() => void revealed.push(target)),
} as unknown as ElectronWindow.ElectronWindow["Service"]),
),
),
);
return { sent, revealed, layer, reload };
return { sent, revealed, layer, reload, close, reopen };
};

describe("DesktopWebLinks", () => {
Expand All @@ -59,6 +78,7 @@ describe("DesktopWebLinks", () => {
yield* webLinks.setRendererReady(false);
yield* webLinks.receive("https://example.com/fourth");
assert.strictEqual(sent.length, 3);
assert.strictEqual(revealed.length, 2);
}).pipe(Effect.provide(layer));
});

Expand All @@ -75,4 +95,31 @@ describe("DesktopWebLinks", () => {
assert.deepStrictEqual(sent, ["https://example.com/during-reload"]);
}).pipe(Effect.provide(layer));
});

it.effect("asks for a window when a link arrives after the main window closed", () => {
const { sent, revealed, layer, close, reopen } = makeWindow();
return Effect.gen(function* () {
const webLinks = yield* DesktopWebLinks.DesktopWebLinks;
close();
yield* webLinks.receive("https://example.com/at-launch");
assert.strictEqual(revealed.length, 0);

reopen();
yield* webLinks.setRendererReady(true);
assert.deepStrictEqual(sent, ["https://example.com/at-launch"]);
assert.strictEqual(revealed.length, 1);

close();
yield* webLinks.receive("https://example.com/after-close");
assert.deepStrictEqual(sent, ["https://example.com/at-launch"]);
assert.strictEqual(revealed.length, 2);

reopen();
yield* webLinks.setRendererReady(true);
assert.deepStrictEqual(sent, [
"https://example.com/at-launch",
"https://example.com/after-close",
]);
}).pipe(Effect.provide(layer));
});
});
13 changes: 8 additions & 5 deletions apps/desktop/src/app/DesktopWebLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const make = Effect.gen(function* () {
const pending: Array<string> = [];
let listening: Electron.WebContents | null = null;
let detachListening: (() => void) | null = null;
let rendererHasListened = false;

const stopListening = () => {
detachListening?.();
Expand All @@ -55,6 +56,7 @@ const make = Effect.gen(function* () {
if (listening === webContents) return;
stopListening();
listening = webContents;
rendererHasListened = true;
const onNavigation = (
event: Electron.Event<Electron.WebContentsDidStartNavigationEventParams>,
) => {
Expand All @@ -71,11 +73,12 @@ const make = Effect.gen(function* () {
});

return DesktopWebLinks.of({
receive: Effect.fn("DesktopWebLinks.receive")(function (url) {
return Effect.suspend(() => {
pending.push(url);
return flush;
});
receive: Effect.fn("DesktopWebLinks.receive")(function* (url) {
pending.push(url);
yield* flush;
if (!rendererHasListened || Option.isSome(yield* electronWindow.main)) return;
// macOS fires `activate` only on reopen, not when a link opens the app.
yield* desktopWindow.activate.pipe(Effect.ignore);
}),
setRendererReady: Effect.fn("DesktopWebLinks.setRendererReady")(function (ready) {
return ready ? startListening : Effect.sync(stopListening);
Expand Down
55 changes: 55 additions & 0 deletions apps/desktop/src/backend/DesktopBackendManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,61 @@ describe("DesktopBackendManager", () => {
}),
);

it.effect("delivers fd3 bootstrap while ownership recording is pending", () =>
Effect.gen(function* () {
const recording = yield* Deferred.make<void>();
const finishRecording = yield* Deferred.make<void>();
const receivedBootstrap = yield* Deferred.make<Option.Option<string>>();
const exitObserved = yield* Deferred.make<void>();
const childExit = yield* Deferred.make<ChildProcessSpawner.ExitCode>();
const forgotten = yield* Ref.make(false);
const layerSpawner = Layer.succeed(
ChildProcessSpawner.ChildProcessSpawner,
ChildProcessSpawner.make(
Effect.fnUntraced(function* (command) {
if (!ChildProcess.isStandardCommand(command)) {
return yield* Effect.die("Expected a standard local backend command");
}
const fd = command.options.additionalFds?.fd3;
if (fd?.type !== "input" || fd.stream === undefined) {
return yield* Effect.die("Expected a bootstrap stream on fd 3");
}
yield* fd.stream.pipe(
Stream.decodeText(),
Stream.mkString,
Effect.timeoutOption(Duration.seconds(1)),
Effect.flatMap((payload) => Deferred.succeed(receivedBootstrap, payload)),
Effect.forkScoped,
);
return makeProcess({ exitCode: Deferred.await(childExit) });
}),
),
);
const run = yield* DesktopBackendManager.runBackendProcess({
...baseConfig,
desktopTelemetryStream: Stream.empty,
onExitObserved: () => Deferred.succeed(exitObserved, undefined).pipe(Effect.asVoid),
trackProcess: () =>
Deferred.succeed(recording, undefined).pipe(
Effect.andThen(Deferred.await(finishRecording)),
Effect.as(Ref.set(forgotten, true)),
),
}).pipe(Effect.provide(Layer.merge(layerSpawner, layerHealthyHttpClient)), Effect.forkChild);

yield* Deferred.await(recording);
yield* TestClock.adjust(Duration.seconds(2));
const payload = yield* Deferred.await(receivedBootstrap);
assert.isTrue(Option.isSome(payload), "desktop bootstrap missed the reader deadline");
assert.deepEqual(yield* decodeBootstrap(Option.getOrThrow(payload)), baseConfig.bootstrap);
yield* Deferred.succeed(childExit, ChildProcessSpawner.ExitCode(0));
yield* Deferred.await(exitObserved);
assert.isFalse(yield* Ref.get(forgotten));
yield* Deferred.succeed(finishRecording, undefined);
yield* Fiber.join(run);
assert.isTrue(yield* Ref.get(forgotten));
}),
);

it.effect("reports a SIGKILL exit without an exit code", () =>
Effect.gen(function* () {
const exitCause = PlatformError.systemError({
Expand Down
14 changes: 14 additions & 0 deletions apps/desktop/src/backend/DesktopBackendManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ export const BackendProcessError = Schema.Union([
]);
export type BackendProcessError = typeof BackendProcessError.Type;

type TrackBackendProcess = (pid: number) => Effect.Effect<Effect.Effect<void>>;

interface RunBackendProcessOptions extends DesktopBackendStartConfig {
readonly desktopTelemetryStream: Stream.Stream<Uint8Array>;
readonly desktopBrowserStream?: Stream.Stream<Uint8Array>;
Expand All @@ -205,6 +207,7 @@ interface RunBackendProcessOptions extends DesktopBackendStartConfig {
) => Effect.Effect<void>;
readonly readinessTimeout?: Duration.Duration;
readonly outputDrainTimeout?: Duration.Duration;
readonly trackProcess?: TrackBackendProcess;
readonly onStarted?: (pid: number) => Effect.Effect<void>;
readonly onExitObserved?: () => Effect.Effect<void>;
readonly onReady?: (pid: number) => Effect.Effect<void>;
Expand Down Expand Up @@ -254,6 +257,7 @@ export interface BackendInstanceSpec {
readonly id: BackendInstanceId;
readonly label: Effect.Effect<string>;
readonly configResolve: Effect.Effect<DesktopBackendStartConfig, PlatformError.PlatformError>;
readonly trackProcess?: TrackBackendProcess;
/** Receives the ready run's URL and pid; reading current config could race a subsequent restart. */
readonly onReady?: (httpBaseUrl: URL, pid: number) => Effect.Effect<void>;
readonly onShutdown?: () => Effect.Effect<void>;
Expand Down Expand Up @@ -503,6 +507,10 @@ export const runBackendProcess = Effect.fn("runBackendProcess")(function* (
}),
),
);
// The child has a deadline for reading fd 3. Keep recovery bookkeeping off its startup path.
const tracking = options.trackProcess
? yield* options.trackProcess(handle.pid).pipe(Effect.forkScoped)
: undefined;
const outputFibers: Array<Fiber.Fiber<void, never>> = [];
const serverReady = yield* Deferred.make<void>();

Expand Down Expand Up @@ -646,6 +654,11 @@ export const runBackendProcess = Effect.fn("runBackendProcess")(function* (
Effect.exit,
);
yield* options.onExitObserved?.() ?? Effect.void;
// A cancelled run may leave a survivor. Only forget after observing a real exit.
if (tracking && Exit.isSuccess(exit)) {
const forgetProcess = yield* Fiber.join(tracking);
yield* forgetProcess;
}
yield* Effect.forEach(outputFibers, Fiber.await, {
concurrency: "unbounded",
discard: true,
Expand Down Expand Up @@ -944,6 +957,7 @@ export const makeBackendInstance = Effect.fn("makeBackendInstance")(function* (

const program = runBackendProcess({
...config.value,
...(spec.trackProcess === undefined ? {} : { trackProcess: spec.trackProcess }),
desktopTelemetryStream: desktopTelemetryPublisher.encoded,
desktopBrowserStream: desktopBrowserHost.events,
onDesktopBrowserCommand: desktopBrowserHost.handleCommandLine,
Expand Down
34 changes: 33 additions & 1 deletion apps/desktop/src/backend/DesktopBackendPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { ChildProcessSpawner } from "effect/process";

import * as DesktopBackendConfiguration from "./DesktopBackendConfiguration.ts";
import * as DesktopBackendManager from "./DesktopBackendManager.ts";
import * as DesktopBackendRecoveryProcess from "./DesktopBackendRecoveryProcess.ts";
import * as DesktopHomeOwner from "./DesktopHomeOwner.ts";
import * as DesktopEnvironment from "../app/DesktopEnvironment.ts";
import * as DesktopObservability from "../app/DesktopObservability.ts";
Expand All @@ -37,9 +38,29 @@ import * as ElectronDialog from "../electron/ElectronDialog.ts";
import * as ElectronApp from "../electron/ElectronApp.ts";
import { m } from "../i18n/messages.ts";

const { logWarning: logBackendPoolWarning } =
const { logInfo: logBackendPoolInfo, logWarning: logBackendPoolWarning } =
DesktopObservability.makeComponentLogger("desktop-backend-pool");

const makeRecovery = Effect.gen(function* () {
const environment = yield* DesktopEnvironment.DesktopEnvironment;
if (environment.platform !== "darwin" || !environment.isPackaged) return undefined;
const runFork = Effect.runForkWith(yield* Effect.context<never>());
return DesktopBackendRecoveryProcess.make({
appDataDirectory: environment.appDataDirectory,
stateDir: environment.stateDir,
onRecovery: (pid) =>
runFork(logBackendPoolInfo("recovering a backend left by a previous desktop", { pid })),
onError: (operation) =>
runFork(logBackendPoolWarning("desktop backend recovery failed", { operation })),
});
});

export const recoverLocalBackend = makeRecovery.pipe(
Effect.flatMap((recovery) =>
recovery === undefined ? Effect.void : Effect.promise((signal) => recovery.recover(signal)),
),
);

const decodeServerRuntime = Schema.decodeUnknownEffect(
Schema.fromJsonString(Schema.Struct({ pid: Schema.Number, port: Schema.Number })),
);
Expand Down Expand Up @@ -127,6 +148,7 @@ export const layer = Layer.effect(
const electronApp = yield* ElectronApp.ElectronApp;
const appSettings = yield* DesktopAppSettings.DesktopAppSettings;
const { primaryBackendStartup } = yield* DesktopState.DesktopState;
const recovery = yield* makeRecovery;
// Parent instance scopes to the pool so shutdown runs stop finalizers before the OS kills backends.
const layerScope = yield* Scope.Scope;
const factoryContext = yield* Effect.context<BackendInstanceFactoryRequirements>();
Expand Down Expand Up @@ -226,6 +248,16 @@ export const layer = Layer.effect(
// Resolve lazily: startup loads persisted settings after pool initialization.
label: configuration.resolvePrimaryLabel,
configResolve: configuration.resolvePrimary,
...(recovery === undefined
? {}
: {
trackProcess: (pid) =>
Effect.promise(() => recovery.track(pid)).pipe(
Effect.map((forget) =>
forget === undefined ? Effect.void : Effect.promise(forget),
),
),
}),
// Absorb window errors so readiness can reset restartAttempt.
onReady: (httpBaseUrl, pid) =>
FiberHandle.run(updateMarkerWait, releaseUpdateMarker(httpBaseUrl, pid)).pipe(
Expand Down
Loading