Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
2fe7feb
fix(server): workflow runs are started and changed only by callers at…
juliusmarminge Nov 24, 2026
84a0c05
fix(server): an image answered to an async question shows as an attac…
mickroplastics Nov 24, 2026
a891304
fix(web): keep Codex Ultra off the effort bar scale (#30810)
NawfalAhmed Nov 24, 2026
de8551b
fix(server): pull_request_review pins the review to the head the agen…
juliusmarminge Nov 24, 2026
60682f7
fix(server): a Claude background sleep timer wakes the agent after a …
josephv123 Nov 24, 2026
9d3195b
fix(web): IME keys no longer cancel or send a diff comment (#42000)
only21mil Nov 24, 2026
110ed77
fix(server): a GitLab review posts no line comments once the head has…
juliusmarminge Nov 24, 2026
6f15610
fix(server): resolve a later local project favicon when an earlier ic…
only21mil Nov 24, 2026
9010d7d
fix(server): session import no longer offers T3 sandbox chats behind …
juliusmarminge Nov 24, 2026
2ced06e
fix(web): model picker search finds a model by its ID (#42041)
juliusmarminge Nov 24, 2026
f15d908
fix(web): Esc in voice alias input cancels it without closing Setting…
only21mil Nov 24, 2026
548a61d
fix(desktop): an update whose downloaded file was deleted downloads a…
juliusmarminge Nov 24, 2026
4cff209
fix(server): preview browser downloads Chrome 158.0.8127.88 with its …
snnbotchway Nov 24, 2026
147384f
fix(server): storage cleanup removes worktrees that take over 30 s to…
juliusmarminge Nov 24, 2026
fc91bfd
fix(cli): keep the triage picker open after an invalid numbered choic…
only21mil Nov 24, 2026
139af50
fix(usage): skip elapsed resets in pooled refill summaries (#42037)
hanmin6 Nov 24, 2026
28d8a63
fix(web): sidebar search times no longer wrap in translated languages…
pepsile Nov 24, 2026
a326dea
fix(ci): a newer push to a PR is no longer cancelled by the older pus…
juliusmarminge Nov 24, 2026
38634aa
fix(cli): find the worktree's project when a Git hook sets GIT_DIR (#…
only21mil Nov 24, 2026
42068f5
fix(shared): a Markdown piece held open for a wrapper is cut before i…
Marve10s Nov 24, 2026
dc32623
fix(web): raw HTML paragraphs and list items keep their lines when li…
Marve10s Nov 24, 2026
4732927
fix(client-runtime): local repository clone folders keep # and ? in t…
only21mil Nov 24, 2026
60c9cb9
fix(server): report CI passing during watch registration (#42049)
dangh Nov 24, 2026
74d73ac
fix(web): a thread link to an unconnected environment shows why inste…
karstennilsen Nov 24, 2026
8fcd0a8
fix(server): hide Android emulator consoles on Windows (#41971)
gsrajeni Nov 24, 2026
26f4c75
fix(web): Esc in provider model filter clears it without closing Sett…
only21mil Nov 24, 2026
fa9f154
fix(web): the Cite button appears when a selection ends on a file chi…
nikalezah Nov 24, 2026
f516cf9
fix(opencode): project skills show in the / menu from the first snaps…
juliusmarminge Nov 24, 2026
b28b13b
fix(cli): keep --track folder labels valid when an emoji crosses the …
only21mil Nov 24, 2026
30bda7e
fix(server): resolve project favicon links with URL fragments (#42082)
geezoria Nov 24, 2026
0a7864c
fix(web): a run finishing in a background window stays unread (#42084)
juliusmarminge Nov 24, 2026
15afd7f
fix(server): treat remote delegated tasks as app-owned on stop and re…
lryoooow Nov 24, 2026
59fe770
fix(web): pull request review drafts survive a reload (#42090)
juliusmarminge Nov 24, 2026
2cc8e73
fix(server): a message steered in after a self-settle request keeps t…
juliusmarminge Nov 24, 2026
7544385
fix(web): Settings text typed before Navigation: Back is saved (#42085)
juliusmarminge Nov 24, 2026
b51399f
fix(web): a held Esc or a search of spaces no longer closes Settings …
only21mil Nov 24, 2026
6f6b978
fix(web): image preview closes with an × again instead of a Back butt…
shivamhwp Nov 24, 2026
b6a04be
fix(antigravity): keep child skills visible under an uppercase SKILL.…
Lucenx9 Nov 24, 2026
d7ae1e1
fix(web): report server rollback after an app update (#33002)
georgenijo Nov 24, 2026
43a0e74
fix(server): t3_thread_launch validates and normalizes modelSelection…
jorotodorovv Nov 24, 2026
f692811
fix(server): handle Windows EPERM contention in serviceSelectionLock …
lryoooow Nov 24, 2026
3b829b6
fix(web): Esc in the text generator model search clears it without cl…
only21mil Nov 24, 2026
849d194
fix(web): Esc clears the Voice model search without closing Settings …
zs-andy Nov 24, 2026
9842ca0
fix(web): an image no longer jumps while its pane is resized (#42120)
Anton-M-R Nov 24, 2026
fc92aef
fix(server): a secret card closes when its request is aborted right a…
SvetlomirB Nov 24, 2026
354d9f1
fix(server): keep discovered workspace folder labels valid when an em…
only21mil Nov 24, 2026
a1ed691
perf(server): terminals running a steady command stop polling the pro…
Yuruzuu Nov 24, 2026
854f02b
fix(server): respect /clear context boundary in fork handoffs, merge-…
lryoooow Nov 24, 2026
00070b8
fix(server): actions given to t3_project_create and t3_project_update…
juliusmarminge Nov 24, 2026
9bce884
fix(desktop): SnapShot shortcut setup says why it couldn't prepare or…
juliusmarminge Nov 24, 2026
4f1dc5d
fix(server): macOS preview stop reads command markers only from a pro…
juliusmarminge Nov 24, 2026
26c21a8
fix(web): ODS previews hide values a merge covers (#42149)
Marve10s Nov 24, 2026
94190c6
fix(server): OpenCode steers keep their $skill mentions (#42141)
MaxFabian25 Nov 24, 2026
0c13b2b
fix(web): Esc in ACP Registry search clears it without closing Add pr…
only21mil Nov 24, 2026
20b97f2
fix(server): preserve emoji in whitespace-heavy thread search snippet…
only21mil Nov 24, 2026
a7a6126
fix(web): a captioned PR video no longer hides the text and video aft…
Marve10s Nov 24, 2026
e5dfa6e
fix(server): listRefs marks the default branch when the primary remot…
juliusmarminge Nov 24, 2026
7c42bb1
fix(web): Open subagent in Background work looks like a button (#38317)
shivamhwp Nov 24, 2026
4c31da1
fix(server): Linux agent CLIs spawned via ProcessLauncher no longer s…
jorotodorovv Nov 24, 2026
13b7893
fix(server): a timed-out provider update no longer force-kills the in…
juliusmarminge Nov 24, 2026
480f9f4
fix(web): shortcut recorder takes Shift+Esc instead of cancelling (#4…
mihaicrisan04 Nov 24, 2026
ae45e00
fix(pi): Pi exiting while its session is idle ends the session as sto…
juliusmarminge Nov 24, 2026
43e0b37
fix(web): PR Summary tab keeps its scroll and comment order when you …
juliusmarminge Nov 24, 2026
53294d5
fix(server): switchRef keeps the real branch name for remotes contain…
AymanKhan9 Nov 24, 2026
e1531b9
fix(web): an unfinished PR inline comment survives a refresh that cha…
AndreiShenets Nov 24, 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
10 changes: 7 additions & 3 deletions .github/workflows/pr-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
permissions:
contents: read

# Run-level, not job-level: runs join the group when their event arrives, so a newer push
# always supersedes an older one. A job-level group is joined when the job starts, which
# let an older run's slower job cancel the newer head's job and label from a stale diff.
concurrency:
group: pr-size-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
prepare-config:
name: Prepare PR size config
Expand Down Expand Up @@ -120,9 +127,6 @@ jobs:
contents: read
issues: read
pull-requests: write
concurrency:
group: pr-size-${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
# This pull_request_target job may fetch untrusted PR commits only as passive
# git data. Do not add dependency installs, build/test scripts, or cache
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/pr-vouch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ on:
permissions:
contents: read

# Per-PR events supersede each other at the run level, in arrival order (a job-level group
# is joined when the job starts, so an older run's slower job could cancel the newer one).
# Other comments and pushes get a unique group so they never cancel a PR's run.
concurrency:
group: >-
${{ (github.event_name == 'pull_request_target' ||
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '/recheck-vouch')))
&& format('pr-vouch-run-{0}', github.event.pull_request.number || github.event.issue.number)
|| format('pr-vouch-run-{0}', github.run_id) }}
cancel-in-progress: true

jobs:
collect-targets:
name: Collect PR targets
Expand Down Expand Up @@ -74,9 +85,6 @@ jobs:
permissions:
contents: read
pull-requests: write
concurrency:
group: pr-vouch-${{ matrix.target.number }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand Down
12 changes: 12 additions & 0 deletions apps/desktop/src/snapShot/DesktopSnapShot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2201,3 +2201,15 @@ it.effect.each([false, true])(
);
},
);

it.each([
["preview-config", "Alt+Super+C is already used by Hyprland. Choose another shortcut."],
["apply-config", "Your config changed since this preview. Review changes again before saving."],
] as const)("tells the renderer why %s failed", (action, reason) => {
const error = new DesktopSnapShot.DesktopSnapShotSetupError({
action,
reason: "setup-failed",
cause: new Error(reason),
});
assert.include(error.message, reason);
});
11 changes: 8 additions & 3 deletions apps/desktop/src/snapShot/DesktopSnapShot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,14 @@ export class DesktopSnapShotSetupError extends Schema.TaggedError<DesktopSnapSho
if (this.action === "preview-config" || this.action === "apply-config") {
if (this.reason === "unsupported-session")
return "Config setup requires a Niri or Hyprland session.";
return this.action === "preview-config"
? "Couldn't prepare your capture shortcut changes."
: "Couldn't save your capture shortcut.";
const summary =
this.action === "preview-config"
? "Couldn't prepare your capture shortcut changes."
: "Couldn't save your capture shortcut.";
// Only the message crosses IPC, and the config steps throw the reason the user needs.
return this.cause instanceof Error && this.cause.message
? `${summary} ${this.cause.message}`
: summary;
}
const kde = this.action === "install-kde-helper" || this.action === "remove-kde-helper";
const hyprland =
Expand Down
33 changes: 33 additions & 0 deletions apps/desktop/src/updates/DesktopUpdates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,39 @@ describe("DesktopUpdates", () => {
).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
});

it.effect("downloads again when the downloaded update file was deleted before install", () => {
const downloadedFile = "/cache/pending/T3-Code-1.2.4-arm64.zip";
let installedFileExists: boolean | undefined;
const harness = makeHarness({
checkForUpdates: Effect.sync(() => harness.emit("update-available", { version: "1.2.4" })),
downloadUpdate: Effect.sync(() => {
harness.deletedFiles.delete(downloadedFile);
harness.emit("update-downloaded", { version: "1.2.4", downloadedFile });
}),
quitAndInstall: Effect.sync(() => {
installedFileExists = !harness.deletedFiles.has(downloadedFile);
}),
});

return Effect.scoped(
Effect.gen(function* () {
const updates = yield* DesktopUpdates.DesktopUpdates;
yield* updates.configure;
yield* updates.check("poll");
yield* updates.download;
yield* flushCallbacks;
assert.equal(harness.downloadCount(), 1);

harness.deletedFiles.add(downloadedFile);
const result = yield* updates.installPrepared("1.2.4");
assert.isTrue(result.accepted);
assert.equal(harness.downloadCount(), 2);
assert.equal(harness.quitAndInstalls(), 1);
assert.isTrue(installedFileExists);
}),
).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
});

it.effect("restores download state and permits retry after interruption", () =>
Effect.gen(function* () {
const actionStarted = yield* Deferred.make<void>();
Expand Down
48 changes: 43 additions & 5 deletions apps/desktop/src/updates/DesktopUpdates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import {
reduceDesktopUpdateStateOnCheckStart,
reduceDesktopUpdateStateOnDownloadComplete,
reduceDesktopUpdateStateOnDownloadFailure,
reduceDesktopUpdateStateOnDownloadLost,
reduceDesktopUpdateStateOnDownloadProgress,
reduceDesktopUpdateStateOnDownloadStart,
reduceDesktopUpdateStateOnInstallFailure,
Expand Down Expand Up @@ -80,6 +81,7 @@ const UpdateInfo = Schema.Struct({
releaseNotes: Schema.optional(Schema.Unknown),
releaseName: Schema.optional(Schema.NullOr(Schema.String)),
releaseDate: Schema.optional(Schema.String),
downloadedFile: Schema.optional(Schema.String),
});

const DownloadProgressInfo = Schema.Struct({
Expand Down Expand Up @@ -403,6 +405,7 @@ export const make = Effect.gen(function* () {
const updaterConfiguredRef = yield* Ref.make(false);
const lastLoggedDownloadMilestoneRef = yield* Ref.make(-1);
const notAppliedVersionRef = yield* Ref.make(Option.none<string>());
const downloadedFileRef = yield* Ref.make(Option.none<string>());
// The release a track switch's database check cleared. A build crosses to another track only
// through such a switch, and never below that release: version order alone cannot tell whether
// a Stable knows a Nightly's migrations.
Expand Down Expand Up @@ -995,6 +998,19 @@ export const make = Effect.gen(function* () {
}),
).pipe(Effect.withSpan("desktop.updates.installDownloadedUpdate"));

const downloadedFileMissing = Ref.get(downloadedFileRef).pipe(
Effect.flatMap(
Option.match({
onNone: () => Effect.succeed(false),
onSome: (path) =>
fileSystem.exists(path).pipe(
Effect.map((exists) => !exists),
Effect.orElseSucceed(() => false),
),
}),
),
);

const installWithExpectedVersion = Effect.fn("desktop.updates.install")(function* (
expectedVersion?: string,
) {
Expand All @@ -1007,11 +1023,32 @@ export const make = Effect.gen(function* () {
};
}
let installVersion = expectedVersion;
// A download can be hours old: a release published since replaces it before restarting.
const retained = yield* Ref.get(updateStateRef);
if (
retained.downloadedVersion !== null &&
(expectedVersion === undefined || retained.downloadedVersion === expectedVersion) &&
const retainedVersion = retained.downloadedVersion;
const retainsExpectedDownload =
retainedVersion !== null &&
(expectedVersion === undefined || retainedVersion === expectedVersion);
// A cache cleaner can delete the archive; Squirrel.Mac would then fail every install attempt.
if (retainsExpectedDownload && (yield* downloadedFileMissing)) {
yield* logUpdaterWarning("the downloaded update file is gone; downloading it again", {
version: retainedVersion,
});
yield* updateState(reduceDesktopUpdateStateOnDownloadLost);
const download = yield* downloadAvailableUpdate(true);
if (!download.completed) {
return {
accepted: download.accepted,
completed: false,
failed: download.accepted,
state: yield* Ref.get(updateStateRef),
};
}
if (expectedVersion !== undefined) {
installVersion = (yield* Ref.get(updateStateRef)).downloadedVersion ?? expectedVersion;
}
} else if (
// A download can be hours old: a release published since replaces it before restarting.
retainsExpectedDownload &&
(yield* checkForUpdates(
"install",
"acquire",
Expand All @@ -1023,7 +1060,7 @@ export const make = Effect.gen(function* () {
// electron-updater compares a stale feed with the running build, not the retained download.
if (
refreshed.availableVersion === null ||
compareSemverVersions(refreshed.availableVersion, retained.downloadedVersion) <= 0
compareSemverVersions(refreshed.availableVersion, retainedVersion) <= 0
) {
yield* setState(retained);
} else {
Expand Down Expand Up @@ -1244,6 +1281,7 @@ export const make = Effect.gen(function* () {
}
return;
}
yield* Ref.set(downloadedFileRef, Option.fromNullishOr(info.downloadedFile));
yield* setState(reduceDesktopUpdateStateOnDownloadComplete(state, info.version));
yield* logUpdaterInfo("update downloaded", { version: info.version });
}),
Expand Down
16 changes: 16 additions & 0 deletions apps/desktop/src/updates/updateMachine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,22 @@ export function reduceDesktopUpdateStateOnDownloadComplete(
};
}

export function reduceDesktopUpdateStateOnDownloadLost(
state: DesktopUpdateState,
): DesktopUpdateState {
if (state.downloadedVersion === null) return state;
return {
...withoutTrackMismatch(state),
status: "available",
availableVersion: state.downloadedVersion,
downloadedVersion: null,
downloadPercent: null,
message: null,
errorContext: null,
canRetry: false,
};
}

export function reduceDesktopUpdateStateOnInstallFailure(
state: DesktopUpdateState,
message: string,
Expand Down
4 changes: 4 additions & 0 deletions apps/desktop/src/updates/updatesTestHarness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export function makeHarness(options: UpdatesHarnessOptions = {}) {
const updateRestartMarkers = new Set<string>();
const updateMarkerContents = new Map<string, string>();
const installRecords = new Map<string, string>();
const deletedFiles = new Set<string>();
let previousInstallRecord = options.installRecord;
const isInstallRecord = (path: string) =>
path.endsWith(DesktopUpdates.DESKTOP_UPDATE_INSTALL_RECORD_FILE);
Expand All @@ -266,6 +267,7 @@ export function makeHarness(options: UpdatesHarnessOptions = {}) {
}),
);
},
exists: (path) => Effect.succeed(!deletedFiles.has(path)),
makeDirectory: () => Effect.void,
writeFileString: (path, data) =>
Effect.sync(() => {
Expand Down Expand Up @@ -320,6 +322,8 @@ export function makeHarness(options: UpdatesHarnessOptions = {}) {
updateInProgressMarker: () =>
[...updateMarkerContents].find(([path]) => path.endsWith("/desktop-update-in-progress"))?.[1],
installRecords,
/** Paths removed behind the app's back, as by a cache cleaner. */
deletedFiles,
previousInstallRecord: () => previousInstallRecord,
downloadCount: () => downloadCount,
feedUrls: (): ElectronUpdater.ElectronUpdaterFeedUrl[] => feedUrls,
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/features/usage/UsageLimitsPooled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function PoolWindowCard({
const inlineLabels = wide && segmentWidth >= 96;
const inlineReset = wide && segmentWidth >= 150;
const inlineName = wide && segmentWidth >= 220;
const nextRefill = pool.resets.find((reset) => reset.restoresPercent > 0);
const nextRefill = pool.resets.find((reset) => reset.at > now && reset.restoresPercent > 0);
const openAccount = (account: LimitAccount) =>
navigation.navigate("SettingsUsageAccount", {
accountKey: account.key,
Expand Down
15 changes: 15 additions & 0 deletions apps/server/src/cli/project.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ it.effect(
const homeShared = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-v2-project-home-"));
NodeFS.mkdirSync(NodePath.join(workspaceRoot, "api", ".git"), { recursive: true });
NodeFS.mkdirSync(NodePath.join(workspaceRoot, "notes"));
// Names are cut to 128 UTF-16 units, never between the halves of an emoji.
const named = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-v2-project-names-"));
const straddling = NodePath.join(named, `${"a".repeat(127)}🚀`);
const fitting = NodePath.join(named, `${"b".repeat(126)}🚀`);
const padded = NodePath.join(named, `${" ".repeat(127)}🚀`);
for (const folder of [straddling, fitting, padded]) NodeFS.mkdirSync(folder);
yield* runCli([
"project",
"add",
Expand All @@ -151,13 +157,22 @@ it.effect(
`${shared}${NodePath.sep}`,
"--track",
`~/${NodePath.basename(homeShared)}`,
"--track",
straddling,
"--track",
fitting,
"--track",
padded,
"--base-dir",
baseDir,
]).pipe(Effect.provideService(HostProcess.HomeDirectory, NodeOS.tmpdir()));
assert.deepEqual((yield* readProjects(baseDir)).projects[0]?.trackedFolders, [
{ path: NodePath.join(workspaceRoot, "api"), name: "api", discovered: true },
{ path: shared, name: NodePath.basename(shared) },
{ path: homeShared, name: NodePath.basename(homeShared) },
{ path: straddling, name: "a".repeat(127) },
{ path: fitting, name: `${"b".repeat(126)}🚀` },
{ path: padded, name: "🚀" },
]);
}).pipe(Effect.provide(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))),
);
Expand Down
4 changes: 3 additions & 1 deletion apps/server/src/cli/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ProjectId,
} from "@t3tools/contracts";
import { expandHomePath } from "@t3tools/provider-core/server/pathExpansion";
import { splitsSurrogatePair } from "@t3tools/shared/assistantCitations";
import * as HostProcess from "@t3tools/shared/HostProcess";
import * as Console from "effect/Console";
import * as SecureRandom from "effect/crypto/SecureRandom";
Expand Down Expand Up @@ -401,9 +402,10 @@ const projectAddCommand = Command.make("add", {
const named = flags.track
.map((folder) => {
const resolved = path.resolve(expandHomePath(folder, home));
const name = (path.basename(resolved) || resolved).trimStart();
return {
path: resolved,
name: (path.basename(resolved) || resolved).slice(0, 128).trim(),
name: name.slice(0, splitsSurrogatePair(name, 128) ? 127 : 128).trim(),
};
})
.filter(
Expand Down
5 changes: 5 additions & 0 deletions apps/server/src/cli/thread.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,5 +767,10 @@ it.live("resolves a path inside a git worktree of the project's repository to th
assert.strictEqual(ambiguous._tag, "ThreadUsageError");
assert.include(ambiguous.message, "sample (project-sample)");
assert.include(ambiguous.message, "feature (project-feature)");

// An inherited relative GIT_DIR resolves against Git's cwd, where no repository is.
vi.stubEnv("GIT_DIR", ".git");
yield* Effect.addFinalizer(() => Effect.sync(() => vi.unstubAllEnvs()));
assert.deepStrictEqual(yield* resolveFrom([sample], path.join(worktree, "pkg")), sample);
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
);
9 changes: 8 additions & 1 deletion apps/server/src/cli/thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { mcpToolSession, type McpToolSession } from "../mcp/AcpMcpStdioBridge.ts
import { expandHomePath } from "../os-jank.ts";
import * as ProcessRunner from "../processRunner.ts";
import { readLiveServerRuntimeState } from "../serverRuntimeState.ts";
import { unsetInheritedRepositoryEnv } from "../vcs/VcsProcess.ts";
import { projectLocationFlags, resolveCliAuthConfig } from "./config.ts";

/**
Expand Down Expand Up @@ -327,9 +328,15 @@ const listAllProjects = Effect.fn("cli.thread.listAllProjects")(function* (tools
/** The checkouts of the git repository at `directory`, or none outside a repository. */
const listGitCheckouts = Effect.fn("cli.thread.listGitCheckouts")(function* (directory: string) {
const processRunner = yield* ProcessRunner.ProcessRunner;
const env = unsetInheritedRepositoryEnv(process.env, yield* HostProcess.Platform);
const list = (args: ReadonlyArray<string>) =>
processRunner
.run({ command: "git", args: ["worktree", "list", "--porcelain", ...args], cwd: directory })
.run({
command: "git",
args: ["worktree", "list", "--porcelain", ...args],
cwd: directory,
env,
})
.pipe(
Effect.option,
Effect.map((result) =>
Expand Down
13 changes: 13 additions & 0 deletions apps/server/src/cli/triage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { expect, vi } from "vite-plus/test";

import { cli } from "../binCli.ts";
import { buildTriageLaunchPrompt } from "../triage/triagePrompt.ts";
import { matchAgentAnswer } from "./triage.ts";

const cliPath = NodeURL.fileURLToPath(new URL("../bin.ts", import.meta.url));

Expand Down Expand Up @@ -108,6 +109,18 @@ it.live.each([
}),
);

it.each([
{ answer: "2", picked: "codex" },
{ answer: " 1 ", picked: "claude" },
{ answer: "CLAUDE", picked: "claude" },
{ answer: "1.5", picked: undefined },
{ answer: "1x", picked: undefined },
{ answer: "2codex", picked: undefined },
{ answer: "3", picked: undefined },
])("the agent picker reads $answer as $picked", ({ answer, picked }) => {
expect(matchAgentAnswer([{ id: "claude" }, { id: "codex" }], answer)?.id).toBe(picked);
});

it.live(
"requires an explicit choice when Codex and Antigravity are installed without a terminal",
() =>
Expand Down
Loading
Loading