Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
4564962
fix(mobile): inline markdown images page through their message's imag…
juliusmarminge Nov 15, 2026
bcdd6a5
fix(mobile): /model suggestion opens the model picker (#37109)
StiensWout Nov 15, 2026
178570d
fix(desktop): release cancelled Codex callback listeners during brows…
romil-bijarnia Nov 15, 2026
94edd64
perf(server): skip compression for the desktop's local connection (#3…
voltcrash Nov 15, 2026
f28c74a
fix(server): outside MCP clients stop being offered thread-bound tool…
RVZO6 Nov 15, 2026
c8a1b5f
fix(ssh): preserve literal home paths in Include expansion (#33288)
Lucenx9 Nov 15, 2026
2b83dd0
fix(server): finish closed terminal kills before shutdown (#37113)
StiensWout Nov 15, 2026
7d9c365
fix(web): keep distinct images with matching attachment metadata (#37…
StiensWout Nov 15, 2026
8dba23e
fix(web): large terminal pastes reach the program intact (#37103)
StiensWout Nov 15, 2026
f0a3321
fix(server): settling a thread keeps exec and foreground Bash termina…
juliusmarminge Nov 15, 2026
96290af
fix(codex): keep browser access prompts available in full access (#37…
Yash-Singh1 Nov 15, 2026
46f3ab3
fix(web): open terminal file links naming the server hostname (#37133)
StiensWout Nov 15, 2026
1b14aad
fix(mobile): recheck the current branch before selecting it (#37121)
StiensWout Nov 15, 2026
834eb51
fix(acp): wait for session/load to reply before prompting (#37139)
shivamhwp Nov 15, 2026
d8c7855
fix(web): terminal mouse reports hit the drawn cell (#37148)
StiensWout Nov 15, 2026
def4cd4
fix(server): run_scheduled_task_now returns why a started run failed …
SouthCarpet Nov 15, 2026
70abb6c
fix(azure-devops): pull request titles like `@notes.txt` are saved as…
juliusmarminge Nov 15, 2026
789d10f
fix(web): Sharing & access can select a desktop-local WSL backend (#3…
juliusmarminge Nov 15, 2026
0afd8c0
fix(mobile): pasted GIFs on iOS keep their animation (#37143)
StiensWout Nov 15, 2026
4b9cf57
fix(acp): Copilot's reply after a background agent wakes it opens a c…
juliusmarminge Nov 15, 2026
a16796b
fix(shared): ß no longer splits words in generated folder and branch …
lowlyleon Nov 15, 2026
86a9d9f
fix(server): name the missing project when a change request's reposit…
Sidreyas Nov 15, 2026
ff9dca8
fix(server): an oversized provider request reads as too large, not ra…
Sidreyas Nov 15, 2026
649d9fc
fix(provider-acp): Grok early task completion no longer replaces the …
juliusmarminge Nov 15, 2026
7379f19
fix(web): keypad navigation works with NumLock off (#37175)
StiensWout Nov 15, 2026
8897a6e
fix(web): keep thread mentions when editing sent messages (#37183)
StiensWout Nov 15, 2026
dcaedc9
fix(server): skills linked by a SessionStart hook appear in the $ pic…
caitlon Nov 15, 2026
2becf31
fix(server): Windows spawn workers no longer leak a short child's out…
juliusmarminge Nov 15, 2026
be8c4c6
fix(web): repaint terminal when programs change default colors (#37193)
StiensWout Nov 15, 2026
cb251b9
fix(web): composer suggestions stay reachable in short windows (#37179)
StiensWout Nov 15, 2026
6071022
fix(server): Claude session name follows thread renames without waiti…
juliusmarminge Nov 15, 2026
6d3f642
fix(web): Enter sends when a panel-conditioned shortcut is inactive (…
StiensWout Nov 15, 2026
7e69e88
fix(server): project search starts working once a slow content index …
juliusmarminge Nov 15, 2026
304cf14
fix(web): terminal file links preserve numeric filename suffixes (#37…
StiensWout Nov 15, 2026
5070931
fix(mobile): cutting text in the iOS composer can be undone (#37158)
StiensWout Nov 15, 2026
449deb6
fix(web): modified F3 reaches ncurses terminal bindings (#37211)
juliusmarminge Nov 15, 2026
d21d8d8
fix(mobile): iOS video previews keep their contain fit instead of som…
juliusmarminge Nov 15, 2026
9c1dfbb
fix(server): delegate_task names the CLI version that hides a model (…
juliusmarminge Nov 15, 2026
0b489da
fix(web): switching a draft’s machine keeps its selected models (#37208)
StiensWout Nov 15, 2026
a3708b5
fix(web): concealed terminal text stays hidden under the cursor (#37141)
StiensWout Nov 15, 2026
45dbb44
fix(web): legacy mouse reports reach the PTY byte for byte (#37223)
StiensWout Nov 15, 2026
0de6ddb
fix(web): editing a queued message into /btw no longer saves it to th…
juliusmarminge Nov 15, 2026
16854a7
fix(web): usage chart and share-bar figures reach screen readers (#37…
juliusmarminge Nov 15, 2026
b5d9c71
fix(web): screen readers announce each Usage figure with its label (#…
juliusmarminge Nov 15, 2026
3e7f5ec
fix(desktop): a renderer that keeps crashing is reloaded with a backo…
juliusmarminge Nov 15, 2026
256dce7
fix(web,mobile): @ picker finds older settled threads on linked machi…
StiensWout Nov 15, 2026
14f295e
fix(terminal): one web viewer answers shared PTY queries (#37233)
StiensWout Nov 15, 2026
c2e54e3
fix(acp): recognize sessions already owned by a thread (#37244)
drstrangerujn Nov 15, 2026
aee2311
fix(acp): show local agent reported version (#37229)
drstrangerujn Nov 15, 2026
09fc222
fix(server): imported Claude sessions are titled after the prompt ins…
juliusmarminge Nov 15, 2026
2182097
fix(server): theme set help names which clients apply the theme (#37259)
juliusmarminge Nov 15, 2026
ed7f069
test(desktop): two-account callback test uses two distinct ports (#37…
t3dotgg Nov 15, 2026
073989f
fix(mobile): Duo scroll indicator sits past the vertical bar, at the …
juliusmarminge Nov 15, 2026
12c495a
fix(mobile): sending a message no longer shifts the feed before it se…
juliusmarminge Nov 15, 2026
598296e
fix(web): copied code blocks drop the fence's trailing newline (#37284)
juliusmarminge Nov 15, 2026
2579c3c
fix(web): close Usage without reloading (#37272)
dustinwloring1988 Nov 15, 2026
f1919eb
fix(server): Codex prompt suggestions no longer imitate delegated tas…
juliusmarminge Nov 15, 2026
249b92c
fix(mobile): tasks in unconnected linked environments no longer show …
juliusmarminge Nov 15, 2026
16ff4b4
fix(mobile): fully typed /model keeps its suggestion (#37280)
StiensWout Nov 15, 2026
21fe33c
fix(server): schedule_task uses the project's effective default model…
juliusmarminge Nov 15, 2026
64e7e23
fix(mobile): swipe actions no longer clip in short thread rows (#37285)
abdfattahz Nov 15, 2026
03e05f6
fix(server): a background OpenCode subagent's question survives its p…
juliusmarminge Nov 15, 2026
dd7255d
fix(server): PowerShell process scans keep non-ASCII names on Windows…
SouthCarpet Nov 15, 2026
c5e6b24
fix(mobile): iOS multi-item text paste folds into an attachment (#37301)
juliusmarminge Nov 15, 2026
295a0a7
feat(mobile): open iOS images in a native viewer modelled on Messages…
juliusmarminge Nov 15, 2026
1d74a17
fix(mobile): iPhone New chat stays beside the tabs after a Settings p…
cwilkus1-bit Nov 15, 2026
af8faa9
fix(server): dismissing a background OpenCode subagent's question let…
juliusmarminge Nov 15, 2026
26b63a4
fix(mobile): environment filter leaves out switched-off environments …
tomhmoses Nov 15, 2026
51cdf23
fix(server): work a dead provider process was running no longer stays…
juliusmarminge Nov 15, 2026
19b33ec
fix(server): remote tasks report their actual model (#37332)
yazcaleb Nov 15, 2026
f82162f
fix(provider-grok): steer queued messages into a running Grok turn (#…
juliusmarminge Nov 15, 2026
b9bc038
fix(web): terminal decorations stay visible under the block cursor (#…
StiensWout Nov 15, 2026
b732621
fix(clients): command palette skips tasks shown under their parent (#…
Onkarj012 Nov 15, 2026
ac5dd1f
fix(mobile): inline audio keeps playing when its row scrolls out of v…
cmcgrabby-hue Nov 15, 2026
f5d86e3
fix(server): clear title markers stuck on old subagent and fork threa…
ahatzz11 Nov 15, 2026
72ddc3e
fix(server): nested Claude subagent summaries no longer show Claude C…
Jacksondr5 Nov 15, 2026
109e9db
fix(web): file tabs keep their scroll position when you switch back (…
juliusmarminge Nov 15, 2026
69f8f59
fix(server): Windows PowerShell terminal reads native UTF-8 output co…
juliusmarminge Nov 15, 2026
06150a0
fix(web): No project threads in New worktree mode send without a base…
juliusmarminge Nov 15, 2026
3a74577
fix(mobile): Stop stays reachable while a question card is expanded (…
juliusmarminge Nov 15, 2026
623047c
fix(server): an ACP agent's open tool call ends when its process dies…
juliusmarminge Nov 15, 2026
58b6e1c
fix(web): a disabled Merge back button shows why it is disabled (#37395)
Jacksondr5 Nov 15, 2026
e367ef0
fix(server): a delegated child's turn end re-offers only its own pare…
juliusmarminge Nov 15, 2026
eeae88d
fix(server): service protect and status say when the kernel has no me…
juliusmarminge Nov 16, 2026
5374e2d
fix(server): a wake stuck on one thread's parent lock no longer holds…
juliusmarminge Nov 16, 2026
86dbf2a
fix(mobile): first visit to an iOS tab no longer flashes black (#37083)
juliusmarminge Nov 16, 2026
5da89cf
fix(server): one busy thread's lock no longer stalls other threads' q…
juliusmarminge Nov 16, 2026
6b7027b
fix(mobile): a tab's bar buttons no longer fade in on its first visit…
juliusmarminge Nov 16, 2026
0813f49
fix(server): the first file search after a big folder lands no longer…
juliusmarminge Nov 16, 2026
6234afb
fix(mobile): thread context menu offers Mark unread (#37426)
juliusmarminge Nov 16, 2026
94c0784
fix(server): a timed-out branch totals diff is not rerun until HEAD o…
juliusmarminge Nov 16, 2026
ddb7fb3
fix(cli): t3 pair --tailscale names the operator fix when Tailscale d…
juliusmarminge Nov 16, 2026
82ce745
fix(server): fx and Muse refreshes drop models they no longer list (#…
Sharad-Patel1 Nov 16, 2026
e47a96e
fix(pi): image reads show a preview in the work log (#37471)
juliusmarminge Nov 16, 2026
05ccd6b
fix(pi): resume the session file an extension switched the thread to …
juliusmarminge Nov 16, 2026
40dcbc5
fix(web): a stopped run no longer shows the green Done badge in the s…
juliusmarminge Nov 16, 2026
ad1b136
fix(server): a child's question no longer waits behind another coordi…
Sharad-Patel1 Nov 16, 2026
e26bba2
chore(sync): merge 97 upstream commits through 2026-11-15
shuv1337 Nov 16, 2026
6ea92ae
fix(sync): integrate upstream compression test and mobile usage atom …
shuv1337 Nov 16, 2026
1b505e7
fix(sync): give upstream's Tailscale operator test an owned fork home
shuv1337 Nov 16, 2026
1f639fe
test(peer): prove same-host delegated actual model is attempt-scoped
shuv1337 Nov 16, 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
108 changes: 74 additions & 34 deletions apps/desktop/src/app/CodexAuthCallback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,25 @@ import { codexAuthDeliveryUrl, readCodexAuthDelivery } from "@t3tools/shared/cod
import { EnvironmentId, ProviderInstanceId } from "@t3tools/contracts";
import { receiveCodexAuthCallback, cancelCodexAuthCallback } from "./CodexAuthCallback.ts";

// Holds every probe socket until all ports are read, so one call never returns the same port twice.
async function freePorts(count: number) {
const servers = Array.from({ length: count }, () => NodeHttp.createServer());
await Promise.all(
servers.map((server) => new Promise<void>((resolve) => server.listen(0, "127.0.0.1", resolve))),
);
const ports = servers.map((server) => {
const address = server.address();
if (!address || typeof address === "string") throw new Error("address");
return address.port;
});
await Promise.all(
servers.map((server) => new Promise<void>((resolve) => server.close(() => resolve()))),
);
return ports;
}
async function freePort() {
const server = NodeHttp.createServer();
await new Promise<void>((resolve) => server.listen(0, "127.0.0.1", resolve));
const address = server.address();
if (!address || typeof address === "string") throw new Error("address");
await new Promise<void>((resolve) => server.close(() => resolve()));
return address.port;
const [port] = await freePorts(1);
return port!;
}
function request(port: number, state = "a".repeat(43)) {
const url = new URL("https://auth.openai.com/api/accounts/authorize");
Expand All @@ -37,18 +49,27 @@ function callback(authorizationUrl: string) {
}

describe("desktop Codex callback helper", () => {
it("binds before opening sign-in, ignores a foreign response, and returns only the code callback", async () => {
it("binds before opening sign-in, ignores a foreign response, and returns only the code callback", async ({
onTestFinished,
}) => {
const authorizationUrl = request(await freePort());
const expected = callback(authorizationUrl);
const received = await receiveCodexAuthCallback(authorizationUrl, async () => {
const opening = Promise.withResolvers<boolean>();
onTestFinished(() => opening.resolve(true));
const checkResponse = async () => {
const invalid = new URL(expected);
invalid.searchParams.set("state", "foreign");
expect((await fetch(invalid)).status).toBe(400);
const response = await fetch(expected);
expect(response.headers.get("cache-control")).toBe("no-store");
expect(await response.text()).not.toContain("test-code");
return true;
};
let responseChecked!: Promise<void>;
const received = await receiveCodexAuthCallback(authorizationUrl, () => {
responseChecked = checkResponse();
return responseChecked.then(() => opening.promise);
});
await responseChecked;
expect(received).toBe(expected);
});
it("returns the web app to the exact instance and environment without putting the code in its query", async () => {
Expand All @@ -62,38 +83,57 @@ describe("desktop Codex callback helper", () => {
instanceId: ProviderInstanceId.make("work"),
flowId: "flow-one",
};
const openBrowser = async () => {
const response = await fetch(expected, { redirect: "manual" });
expect(response.status).toBe(303);
const delivery = response.headers.get("location")!;
expect(new URL(delivery).searchParams.has("code")).toBe(false);
expect(readCodexAuthDelivery(delivery)?.callbackUrl).toBe(expected);
expect(readCodexAuthDelivery(delivery)?.returnUrl).toBe(input.returnUrl);
return true;
};
let opening!: Promise<boolean>;
await receiveCodexAuthCallback(
authorizationUrl,
async () => {
const response = await fetch(expected, { redirect: "manual" });
expect(response.status).toBe(303);
const delivery = response.headers.get("location")!;
expect(new URL(delivery).searchParams.has("code")).toBe(false);
expect(readCodexAuthDelivery(delivery)?.callbackUrl).toBe(expected);
expect(readCodexAuthDelivery(delivery)?.returnUrl).toBe(input.returnUrl);
return true;
},
() => (opening = openBrowser()),
(url) => codexAuthDeliveryUrl(input, url),
);
await opening;
});
it("cancels and releases its listener so exact-port reauthorization can run again", async () => {
const authorizationUrl = request(await freePort());
await expect(
receiveCodexAuthCallback(authorizationUrl, async () => {
cancelCodexAuthCallback(authorizationUrl);
return true;
}),
).rejects.toThrow("cancelled");
expect(
await receiveCodexAuthCallback(authorizationUrl, async () => {
await fetch(callback(authorizationUrl));
return true;
}),
).toBe(callback(authorizationUrl));
it("cancels and releases its listener so exact-port reauthorization can run again", async ({
onTestFinished,
signal,
}) => {
for (const external of [false, true]) {
const authorizationUrl = request(await freePort());
const abort = new AbortController();
const opening = Promise.withResolvers<boolean>();
onTestFinished(() => opening.resolve(true));
await expect(
receiveCodexAuthCallback(
authorizationUrl,
async () => {
if (external) abort.abort();
else cancelCodexAuthCallback(authorizationUrl);
return opening.promise;
},
undefined,
abort.signal,
),
).rejects.toThrow("cancelled");
if (signal.aborted) return;
expect(
await receiveCodexAuthCallback(authorizationUrl, async () => {
await fetch(callback(authorizationUrl));
return true;
}),
).toBe(callback(authorizationUrl));
}
});
it("allows two accounts to complete independently", async () => {
const a = request(await freePort(), "a".repeat(43));
const b = request(await freePort(), "c".repeat(43));
const [portA, portB] = await freePorts(2);
const a = request(portA!, "a".repeat(43));
const b = request(portB!, "c".repeat(43));
const openedA = Promise.withResolvers<void>();
const openedB = Promise.withResolvers<void>();
const receiveA = receiveCodexAuthCallback(a, async () => {
Expand Down
3 changes: 2 additions & 1 deletion apps/desktop/src/app/DesktopClerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,12 @@ export const make = Effect.gen(function* () {
Effect.gen(function* () {
yield* electronApp.whenReady;
yield* Effect.tryPromise({
try: () =>
try: (signal) =>
receiveCodexAuthCallback(
request.authorizationUrl,
(url) => runPromise(shell.openExternal(url)),
(callbackUrl) => codexAuthDeliveryUrl(request, callbackUrl),
signal,
),
catch: () =>
new CodexAuthCallbackError({
Expand Down
9 changes: 7 additions & 2 deletions apps/desktop/src/ipc/methods/providerAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ export const receiveProviderAuthCallback = DesktopIpc.makeIpcMethod({
const context = yield* Effect.context<ElectronShell.ElectronShell>();
const runPromise = Effect.runPromiseWith(context);
const callbackUrl = yield* Effect.tryPromise({
try: () =>
receiveCodexAuthCallback(authorizationUrl, (url) => runPromise(shell.openExternal(url))),
try: (signal) =>
receiveCodexAuthCallback(
authorizationUrl,
(url) => runPromise(shell.openExternal(url)),
undefined,
signal,
),
catch: () =>
new CodexAuthCallbackError({
detail:
Expand Down
32 changes: 32 additions & 0 deletions apps/desktop/src/window/DesktopWindow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,38 @@ describe("DesktopWindow", () => {
}),
);

it.effect(
"brings the window back after the renderer dies more often than the reload budget",
() =>
Effect.gen(function* () {
const fakeWindow = makeFakeBrowserWindow();
const createCount = yield* Ref.make(0);
const mainWindow = yield* Ref.make<Option.Option<Electron.BrowserWindow>>(Option.none());
const layer = layerTest({ window: fakeWindow.window, createCount, mainWindow });

yield* Effect.gen(function* () {
const desktopWindow = yield* DesktopWindow.DesktopWindow;
yield* desktopWindow.handleBackendReady(new URL("http://127.0.0.1:3773"));

const renderProcessGone = fakeWindow.webContentsListeners.get("render-process-gone");
if (!renderProcessGone) {
return yield* Effect.die("render-process-gone listener was not registered");
}
for (let crash = 1; crash <= 4; crash++) {
const loadsBefore = fakeWindow.loadURL.mock.calls.length;
renderProcessGone({}, { reason: "oom", exitCode: -536870904 });
yield* TestClock.adjust(crash < 4 ? 1_000 : 60_000);
yield* Effect.promise(() => Promise.resolve());
assert.isAbove(
fakeWindow.loadURL.mock.calls.length,
loadsBefore,
`window shows nothing after renderer crash ${crash}`,
);
}
}).pipe(Effect.provide(layer));
}),
);

it.effect("updates title bar overlays only on windows created with one", () =>
Effect.gen(function* () {
const framed = makeFakeBrowserWindow();
Expand Down
25 changes: 19 additions & 6 deletions apps/desktop/src/window/DesktopWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -942,20 +942,33 @@ export const make = Effect.gen(function* () {
rendererRecoveryTimestamps = rendererRecoveryTimestamps.filter(
(timestamp) => now - timestamp < RENDERER_RECOVERY_WINDOW_MS,
);
const shouldRecover =
recoverable &&
!window.isDestroyed() &&
rendererRecoveryTimestamps.length < RENDERER_RECOVERY_MAX_ATTEMPTS;
const shouldRecover = recoverable && !window.isDestroyed();
// Past the budget, wait for the oldest attempt to leave the window instead of
// giving up, so a crash loop backs off but never leaves the window blank.
const oldestAttempt =
rendererRecoveryTimestamps.length >= RENDERER_RECOVERY_MAX_ATTEMPTS
? rendererRecoveryTimestamps[
rendererRecoveryTimestamps.length - RENDERER_RECOVERY_MAX_ATTEMPTS
]
: undefined;
const reloadInMs =
oldestAttempt === undefined
? RENDERER_RECOVERY_RELOAD_DELAY_MS
: Math.max(
RENDERER_RECOVERY_RELOAD_DELAY_MS,
oldestAttempt + RENDERER_RECOVERY_WINDOW_MS - now,
);
yield* logWindowWarning("main window render process gone", {
reason: details.reason,
exitCode: details.exitCode,
recovering: shouldRecover,
...(shouldRecover ? { reloadInMs } : {}),
});
if (!shouldRecover) {
return;
}
rendererRecoveryTimestamps.push(now);
yield* Effect.sleep(RENDERER_RECOVERY_RELOAD_DELAY_MS);
rendererRecoveryTimestamps.push(now + reloadInMs);
yield* Effect.sleep(reloadInMs);
if (!window.isDestroyed()) {
loadApplication();
}
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Loading