@@ -546,10 +546,10 @@ index 00cc1f2..03a69d0 100644
546546 kind: "item",
547547diff --git i/src/ui/lib/sourceSwitch.test.ts w/src/ui/lib/sourceSwitch.test.ts
548548new file mode 100644
549- index 0000000..89daa83
549+ index 0000000..9c31ac4
550550--- /dev/null
551551+++ w/src/ui/lib/sourceSwitch.test.ts
552- @@ -0,0 +1,264 @@
552+ @@ -0,0 +1,282 @@
553553+ import { execFileSync } from "node:child_process";
554554+ import {
555555+ chmodSync,
@@ -751,22 +751,40 @@ index 0000000..89daa83
751751+ repo,
752752+ git(repo, ["rev-parse", "--git-path", "hunk/last-omp-turn.patch"]),
753753+ );
754+ + const codexMarkerPath = join(
755+ + repo,
756+ + git(repo, ["rev-parse", "--git-path", "hunk/last-codex-turn.json"]),
757+ + );
758+ + const codexPatchPath = join(
759+ + repo,
760+ + git(repo, ["rev-parse", "--git-path", "hunk/last-codex-turn.patch"]),
761+ + );
754762+ mkdirSync(dirname(piMarkerPath), { recursive: true });
755763+ writeFileSync(piPatchPath, "diff --git a/file.txt b/file.txt\n");
756764+ writeFileSync(ompPatchPath, "diff --git a/file.txt b/file.txt\n");
765+ + writeFileSync(codexPatchPath, "diff --git a/file.txt b/file.txt\n");
757766+ writeFileSync(piMarkerPath, JSON.stringify({ version: 1, kind: "patch", file: piPatchPath }));
758767+ writeFileSync(
759768+ ompMarkerPath,
760769+ JSON.stringify({ version: 1, kind: "patch", file: ompPatchPath }),
761770+ );
771+ + writeFileSync(
772+ + codexMarkerPath,
773+ + JSON.stringify({ version: 1, kind: "patch", file: codexPatchPath }),
774+ + );
762775+ utimesSync(piMarkerPath, new Date("2026-01-01T00:00:00Z"), new Date("2026-01-01T00:00:00Z"));
763776+ utimesSync(ompMarkerPath, new Date("2026-01-02T00:00:00Z"), new Date("2026-01-02T00:00:00Z"));
777+ + utimesSync(
778+ + codexMarkerPath,
779+ + new Date("2026-01-03T00:00:00Z"),
780+ + new Date("2026-01-03T00:00:00Z"),
781+ + );
764782+
765783+ const result = resolveReviewSourceInput("last-agent-turn", repo, {});
766784+ expect(result).toMatchObject({
767785+ kind: "input",
768- + input: { kind: "patch", file: ompPatchPath },
769- + label: "Last OMP turn",
786+ + input: { kind: "patch", file: codexPatchPath },
787+ + label: "Last Codex turn",
770788+ });
771789+ } finally {
772790+ rmSync(repo, { force: true, recursive: true });
@@ -816,10 +834,10 @@ index 0000000..89daa83
816834+ });
817835diff --git i/src/ui/lib/sourceSwitch.ts w/src/ui/lib/sourceSwitch.ts
818836new file mode 100644
819- index 0000000..0681aa0
837+ index 0000000..e438844
820838--- /dev/null
821839+++ w/src/ui/lib/sourceSwitch.ts
822- @@ -0,0 +1,446 @@
840+ @@ -0,0 +1,447 @@
823841+ import { execFileSync } from "node:child_process";
824842+ import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
825843+ import { basename, dirname, isAbsolute, join, resolve, sep } from "node:path";
@@ -876,6 +894,7 @@ index 0000000..0681aa0
876894+ const AGENT_LAST_TURN_SOURCES: AgentLastTurnSource[] = [
877895+ { label: "Last Pi turn", markerBasename: "last-pi-turn" },
878896+ { label: "Last OMP turn", markerBasename: "last-omp-turn" },
897+ + { label: "Last Codex turn", markerBasename: "last-codex-turn" },
879898+ ];
880899+
881900+ export const REVIEW_SOURCE_ORDER: BuiltInReviewSourceId[] = [
0 commit comments