Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
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
83f35da
fix(desktop): an update download fetches the newest release, not the …
juliusmarminge Nov 16, 2026
a7d17cd
fix(server): session scan keeps recent Claude sessions in a large hom…
matthewcosier Nov 16, 2026
399ea10
fix(web): Update everything no longer offers a Nightly build to a Sta…
juliusmarminge Nov 16, 2026
39e269a
fix(server): checkpoint capture no longer rehashes unchanged untracke…
juliusmarminge Nov 16, 2026
45dedf2
fix(web): an open delegated task selects its parent's sidebar row (#3…
juliusmarminge Nov 16, 2026
558790a
fix(web): stashed prompt previews show thread mentions by name, not a…
tiliakoos Nov 16, 2026
c1b23e9
fix(mobile): Show feedback when a response fork fails (#37390)
mwolson Nov 16, 2026
57ec00d
fix(web): source control settings notice a CLI login made outside the…
juliusmarminge Nov 16, 2026
3cf00c3
fix(web): composer drafts keep underscores in non-Latin names (#37495)
tiliakoos Nov 16, 2026
f083f26
fix(provider-core): generated thread titles keep the closing quote of…
tiliakoos Nov 16, 2026
1b84e72
fix(web): Cmd+Enter on an edited queued message steers it into the ru…
smirea Nov 16, 2026
e8bfaba
fix(server): preserve whitespace in ACP history replay (#37505)
StiensWout Nov 16, 2026
7f1fa0d
fix(acp): keep providers available after naming custom models (#37516)
StiensWout Nov 16, 2026
f8c8f30
fix(mobile): switching threads no longer flashes the feed header or m…
juliusmarminge Nov 16, 2026
e5b6c96
fix(pi): restore selected model after native extension switches (#37512)
StiensWout Nov 16, 2026
506a043
fix(web): keep Pi and ACP model selections during catalog gaps (#37528)
StiensWout Nov 16, 2026
16695c8
feat(mobile): move Language into General settings (#37553)
juliusmarminge Nov 16, 2026
35a1728
fix(pi): report failed manual compaction as a failed turn (#37526)
StiensWout Nov 16, 2026
47f90ee
fix(server): end pending ACP tools when their prompt fails (#37537)
StiensWout Nov 16, 2026
b9f24b6
fix(opencode): Zen-only Console workspaces no longer show "No limits …
tris203 Nov 16, 2026
b0a46d2
fix(acp): preserve literal monitor-event text in imported history (#3…
StiensWout Nov 16, 2026
837a684
fix(acp-registry): recover configured agents without a registry cache…
StiensWout Nov 16, 2026
d68a2fa
fix(server): a Kimi turn that fails after a tool call now shows as fa…
juliusmarminge Nov 16, 2026
b3eeeaa
fix(mobile): composer animates between compact and multiline (#37562)
juliusmarminge Nov 16, 2026
d6e574f
fix(mobile): a settled thread's gap closes right away on every thread…
juliusmarminge Nov 16, 2026
f6ef6c1
fix(mobile): a tab's first visit appears whole, without a tab bar bou…
juliusmarminge Nov 16, 2026
183029d
fix(ci): build iOS previews on Blacksmith with one mobile comment (#3…
juliusmarminge Nov 16, 2026
d6672df
test(acp-registry): Kimi outcome test waits for each poll before adva…
juliusmarminge Nov 16, 2026
56f4146
fix(web): sending a new thread's first message no longer scrolls the …
mohit-dayma Nov 16, 2026
cef0f5d
fix(ci): preserve mobile preview state after publication fails (#37577)
juliusmarminge Nov 16, 2026
4da2bc5
perf(server): CLI startup no longer takes the write lock when the sch…
01-1 Nov 16, 2026
e00614e
fix(server): a hung branch name no longer holds a new thread in setup…
tobiasosDev Nov 16, 2026
5dd8cde
fix(server): idle ACP child output no longer leaks into root history …
juliusmarminge Nov 16, 2026
dfeaf7b
fix(web): Tab from a citation comment reaches Save, not Cancel (#37579)
juliusmarminge Nov 16, 2026
50b885e
fix(web): switching a draft's machine uses that machine's default mod…
RadekManak Nov 16, 2026
760f9cb
fix(provider-core): thread title instructions override the generic ti…
01-1 Nov 16, 2026
629d508
fix(server): a Claude session gone on resume starts fresh instead of …
juliusmarminge Nov 16, 2026
1f698f0
fix: PR diffs fold Viewed files the way GitHub does, on web and mobil…
arifali123 Nov 16, 2026
d427894
fix(server): GitLab reads with no project on the host name the host, …
juliusmarminge Nov 16, 2026
b5554ac
fix(server): T3 Connect error 1016 tells you to link again instead of…
YasserDRIF Nov 16, 2026
cd42e1a
fix(web): the PR author filter says "1 merge loaded", not "1 merges l…
preetsuthar17 Nov 16, 2026
222288b
fix(pi): health checks no longer run Pi extensions in the server's fo…
juliusmarminge Nov 16, 2026
ab8ff33
fix(mobile): Duo scroll views recheck their bleed after a fold (#37571)
juliusmarminge Nov 16, 2026
59df51f
perf(mobile): switching back to a thread lays its feed out once (#37578)
juliusmarminge Nov 16, 2026
1c7d945
fix(web): typing in a file after a find match stays in the file (#37674)
juliusmarminge Nov 16, 2026
023620d
fix(server): Codex health checks no longer kill ssh mid SSH-agent req…
juliusmarminge Nov 16, 2026
5a20d59
fix(shell): Windows PATH probe reads User and Machine registry (#37632)
dieterstemmet Nov 16, 2026
83e3c4f
fix(web): published themes keep their CSS when a saved theme shares t…
elias1218 Nov 16, 2026
1ae5590
fix(web): find in thread no longer announces streamed count refreshes…
juliusmarminge Nov 16, 2026
12b9845
fix(ssh): verify runtime archives in homes containing newlines (#37150)
Lucenx9 Nov 16, 2026
bcb0604
fix(web): model picker options no longer jump a pixel on hover (#37661)
Yash-Singh1 Nov 16, 2026
fecd713
fix(mobile): long threads no longer jump to the bottom after they app…
juliusmarminge Nov 16, 2026
6f5838f
fix(client-runtime): a relative "Add project starts in" opens the pic…
juliusmarminge Nov 16, 2026
83c520c
fix(web): clicks beside an open file's find bar reach the code again …
juliusmarminge Nov 16, 2026
c8c51af
fix(server): recover gateway cooldown after last error (#37692)
MaxFabian25 Nov 16, 2026
4860a73
fix(mobile): sent videos no longer flash black and queued attachments…
juliusmarminge Nov 16, 2026
eee0069
chore(coil): merge upstream/main 4860a73069 (93 commits)
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
32 changes: 32 additions & 0 deletions .github/scripts/mobile-ios-preview-record.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const { readFileSync } = require("node:fs");

function readClient(value, now = Date.now()) {
try {
const record = JSON.parse(value);
return typeof record?.link === "string" && Date.parse(record.expiresAt) > now
? record.link
: "";
} catch {
return "";
}
}

function createRecord(link, profile) {
const expiration = /<key>ExpirationDate<\/key>\s*<date>([^<]+)<\/date>/.exec(profile)?.[1];
if (!expiration || !Number.isFinite(Date.parse(expiration))) {
throw new Error("The provisioning profile has no valid ExpirationDate.");
}
return JSON.stringify({ link, expiresAt: new Date(expiration).toISOString() });
}

if (require.main === module) {
if (process.argv[2] === "read") {
process.stdout.write(readClient(readFileSync(0, "utf8")));
} else if (process.argv[2] === "create") {
process.stdout.write(createRecord(process.argv[3], readFileSync(process.argv[4], "utf8")));
} else {
throw new Error("Expected read or create.");
}
}

module.exports = { createRecord, readClient };
17 changes: 17 additions & 0 deletions .github/scripts/mobile-ios-preview-record.test.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const assert = require("node:assert/strict");
const test = require("node:test");
const { createRecord, readClient } = require("./mobile-ios-preview-record.cjs");

test("only clients with an unexpired provisioning profile are reused", () => {
const link = "https://expo.dev/accounts/pingdotgg/projects/t3-code/builds/client";
const profile =
"<plist><dict><key>ExpirationDate</key><date>2027-01-01T00:00:00Z</date></dict></plist>";
const record = createRecord(link, profile);
assert.equal(readClient(record, Date.parse("2026-12-31T00:00:00Z")), link);
assert.equal(readClient(record, Date.parse("2027-01-01T00:00:00Z")), "");
assert.equal(readClient(record, Date.parse("2027-01-02T00:00:00Z")), "");
for (const invalid of [link, "{}", "null", JSON.stringify({ link, expiresAt: "invalid" })]) {
assert.equal(readClient(invalid, 0), "");
}
assert.throws(() => createRecord(link, "<plist></plist>"), /ExpirationDate/);
});
123 changes: 77 additions & 46 deletions .github/scripts/mobile-preview-comment.cjs
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
// The Android half of the mobile preview comment. The android job writes the fingerprint and
// the update; the android-build job adds the client's install link a few minutes later. Each
// run merges what it knows into the state kept in the comment's first line.
const MARKER = "mobile-preview-android";
const PROJECT_ID = "d763fcb8-d37c-41ea-a773-b54a0ab4a454";
const APP_SCHEME = "t3-code";

function readState(body) {
const match = new RegExp(`^<!-- ${MARKER} (\\{.*\\}) -->`).exec(body ?? "");
const match = /^<!-- mobile-preview(?:-(android|ios))? (\{.*\}) -->/.exec(body ?? "");
if (!match) return null;
try {
const state = JSON.parse(match[1]);
const parsed = JSON.parse(match[2]);
const state = match[1] ? { [match[1]]: parsed } : parsed;
const text = (value) => (typeof value === "string" ? value : "");
return {
fingerprint: text(state.fingerprint),
client: text(state.client),
group: text(state.group),
};
return Object.fromEntries(
["android", "ios"]
.filter((platform) => state?.[platform])
.map((platform) => [
platform,
{
fingerprint: text(state[platform].fingerprint),
client: text(state[platform].client),
group: text(state[platform].group),
},
]),
);
} catch {
return null;
}
Expand All @@ -27,6 +31,7 @@ function readState(body) {
* the comment now shows.
*/
function mergeState(previous, next) {
if (!next.client && !next.group) return previous;
const buildOnly = Boolean(next.client) && !next.group;
if (
buildOnly &&
Expand All @@ -46,22 +51,23 @@ function mergeState(previous, next) {
}

function render(state, runUrl) {
const qr = `https://qr.expo.dev/eas-update?appScheme=${APP_SCHEME}&projectId=${PROJECT_ID}&groupId=${state.group}`;
const platforms = ["android", "ios"];
const cells = (value) => platforms.map((platform) => value(state[platform]));
const rows = [
`<!-- ${MARKER} ${JSON.stringify(state)} -->`,
"🤖 Android preview",
`<!-- mobile-preview ${JSON.stringify(state)} -->`,
"🚀 Mobile preview",
"",
"&nbsp; | 🤖 Android",
"--- | ---",
`Fingerprint | ${state.fingerprint || "n/a"}`,
`Dev client | ${state.client ? `[Install](${state.client})` : `Building on Blacksmith ([run](${runUrl})); this comment gets the install link when it finishes`}`,
"&nbsp; | 🤖 Android | 🍎 iOS",
"--- | --- | ---",
`Fingerprint | ${cells((entry) => entry?.fingerprint || "n/a").join(" | ")}`,
`Dev client | ${cells((entry) => (entry?.client ? `[Install](${entry.client})` : entry?.fingerprint ? `Client unavailable ([build run](${runUrl}))` : "n/a")).join(" | ")}`,
`Update Details | ${cells((entry) => (entry?.group ? `[Update Permalink](https://expo.dev/projects/${PROJECT_ID}/updates/${entry.group})` : "n/a")).join(" | ")}`,
`Update QR | ${cells((entry) => {
if (!entry?.group) return "n/a";
const qr = `https://qr.expo.dev/eas-update?appScheme=${APP_SCHEME}&projectId=${PROJECT_ID}&groupId=${entry.group}`;
return `<a href="${qr}"><img src="${qr}" width="250px" height="250px" /></a>`;
}).join(" | ")}`,
];
if (state.group) {
rows.push(
`Update Details | [Update Permalink](https://expo.dev/projects/${PROJECT_ID}/updates/${state.group})`,
`Update QR | <a href="${qr}"><img src="${qr}" width="250px" height="250px" /></a>`,
);
}
return rows.join("\n");
}

Expand All @@ -80,39 +86,64 @@ async function github(path, init = {}) {
`GitHub ${init.method ?? "GET"} ${path}: ${response.status} ${await response.text()}`,
);
}
return response.json();
return response.status === 204 ? null : response.json();
}

async function main() {
const repository = process.env.GITHUB_REPOSITORY;
const pr = process.env.PR;
if (!repository || !pr || !process.env.GH_TOKEN) {
async function main({ env = process.env, request = github } = {}) {
const repository = env.GITHUB_REPOSITORY;
const pr = env.PR;
if (!repository || !pr || !env.GH_TOKEN) {
throw new Error("GITHUB_REPOSITORY, PR and GH_TOKEN are required.");
}
const runUrl = `${process.env.GITHUB_SERVER_URL}/${repository}/actions/runs/${process.env.GITHUB_RUN_ID}`;
let existing = null;
for (let page = 1; existing === null; page++) {
const comments = await github(
if (!env.ANDROID_FINGERPRINT && !env.IOS_FINGERPRINT) return;
if (env.PR_HEAD_SHA) {
const pull = await request(`/repos/${repository}/pulls/${pr}`);
if (pull.head.sha !== env.PR_HEAD_SHA) return;
}
const runUrl = `${env.GITHUB_SERVER_URL}/${repository}/actions/runs/${env.GITHUB_RUN_ID}`;
const previews = [];
for (let page = 1; ; page++) {
const comments = await request(
`/repos/${repository}/issues/${pr}/comments?per_page=100&page=${page}`,
);
// Only this workflow's own comment: anyone can post the marker, and nobody else's is editable.
existing =
comments.find(
previews.push(
...comments.filter(
(comment) =>
comment.user?.login === "github-actions[bot]" && readState(comment.body) !== null,
) ?? null;
comment.user?.login === "github-actions[bot]" &&
(readState(comment.body) !== null ||
comment.body?.startsWith(
`<!-- continuous-deploy-fingerprint-projectId:${PROJECT_ID} -->`,
)),
),
);
if (comments.length < 100) break;
}
const state = mergeState(readState(existing?.body), {
fingerprint: process.env.FINGERPRINT ?? "",
client: process.env.CLIENT ?? "",
group: process.env.GROUP ?? "",
});
const existing =
previews.find((comment) => comment.body.startsWith("<!-- mobile-preview ")) ?? previews[0];
const state = Object.assign(
{},
...previews.map((comment) => readState(comment.body)),
readState(existing?.body),
);
for (const platform of ["android", "ios"]) {
const prefix = platform.toUpperCase();
const next = {
fingerprint: env[`${prefix}_FINGERPRINT`] ?? "",
client: env[`${prefix}_CLIENT`] ?? "",
group: env[`${prefix}_GROUP`] ?? "",
};
if (next.fingerprint) state[platform] = mergeState(state[platform], next);
}
const body = JSON.stringify({ body: render(state, runUrl) });
if (existing) {
await github(`/repos/${repository}/issues/comments/${existing.id}`, { method: "PATCH", body });
await request(`/repos/${repository}/issues/comments/${existing.id}`, { method: "PATCH", body });
} else {
await github(`/repos/${repository}/issues/${pr}/comments`, { method: "POST", body });
await request(`/repos/${repository}/issues/${pr}/comments`, { method: "POST", body });
}
for (const comment of previews) {
if (comment.id !== existing.id) {
await request(`/repos/${repository}/issues/comments/${comment.id}`, { method: "DELETE" });
}
}
}

Expand All @@ -123,4 +154,4 @@ if (require.main === module) {
});
}

module.exports = { mergeState, readState, render };
module.exports = { main, mergeState, readState, render };
117 changes: 100 additions & 17 deletions .github/scripts/mobile-preview-comment.test.cjs
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
const assert = require("node:assert/strict");
const test = require("node:test");

const { mergeState, readState, render } = require("./mobile-preview-comment.cjs");
const { main, mergeState, readState, render } = require("./mobile-preview-comment.cjs");

const fingerprint = "c31608b37a8a2dca35ccee39cfd2ec7305042629";
const run = "https://github.com/pingdotgg/t3code/actions/runs/1";

test("the comment round-trips its state", () => {
const state = { fingerprint, client: "", group: "8e413a0a" };
const state = {
android: { fingerprint, client: "", group: "8e413a0a" },
ios: { fingerprint: "ios-fingerprint", client: "https://expo.dev/ios", group: "ios-group" },
};
const body = render(state, run);
assert.deepEqual(readState(body), state);
assert.match(
body,
/Building on Blacksmith \(\[run\]\(https:\/\/github\.com\/pingdotgg\/t3code\/actions\/runs\/1\)\)/,
);
assert.match(
body,
/qr\.expo\.dev\/eas-update\?appScheme=t3-code&projectId=[0-9a-f-]+&groupId=8e413a0a/,
);
assert.match(body, /Client unavailable/);
assert.match(body, /groupId=8e413a0a/);
assert.match(body, /groupId=ios-group/);
assert.match(body, /\[Install\]\(https:\/\/expo.dev\/ios\)/);
assert.equal(readState("🚀 Expo continuous deployment is ready!"), null);
});

test("the build job adds the install link without losing the update", () => {
const first = mergeState(null, { fingerprint, client: "", group: "8e413a0a" });
const built = mergeState(first, { fingerprint, client: "https://expo.dev/a/b", group: "" });
assert.deepEqual(built, { fingerprint, client: "https://expo.dev/a/b", group: "8e413a0a" });
assert.match(render(built, run), /Dev client \| \[Install\]\(https:\/\/expo\.dev\/a\/b\)/);
assert.match(
render({ android: built }, run),
/Dev client \| \[Install\]\(https:\/\/expo\.dev\/a\/b\)/,
);
});

test("a new fingerprint drops the old client; the same one keeps it", () => {
test("only a successful publication changes the fingerprint and client", () => {
const built = { fingerprint, client: "https://expo.dev/a/b", group: "old" };
assert.equal(mergeState(null, { fingerprint, client: "", group: "" }), null);
assert.deepEqual(
mergeState(built, { fingerprint: "f".repeat(40), client: "", group: "" }),
built,
);
assert.deepEqual(mergeState(built, { fingerprint, client: "", group: "new" }), {
fingerprint,
client: "https://expo.dev/a/b",
Expand All @@ -53,10 +60,86 @@ test("a build that finishes after the PR moved to another fingerprint changes no
test("state from the comment is always three strings", () => {
assert.deepEqual(
readState('<!-- mobile-preview-android {"fingerprint":5,"client":null} -->\nx'),
{
fingerprint: "",
client: "",
group: "",
},
{ android: { fingerprint: "", client: "", group: "" } },
);
});

test("publishing consolidates platform comments and preserves unrelated comments", async () => {
const android = { fingerprint, client: "https://expo.dev/android", group: "android-group" };
const ios = {
fingerprint: "ios-fingerprint",
client: "https://expo.dev/ios",
group: "ios-group",
};
const comments = new Map([
[
1,
{
id: 1,
user: { login: "github-actions[bot]" },
body: `<!-- mobile-preview-android ${JSON.stringify(android)} -->`,
},
],
[
2,
{
id: 2,
user: { login: "github-actions[bot]" },
body: `<!-- mobile-preview-ios ${JSON.stringify(ios)} -->`,
},
],
[
4,
{
id: 4,
user: { login: "github-actions[bot]" },
body: "<!-- continuous-deploy-fingerprint-projectId:d763fcb8-d37c-41ea-a773-b54a0ab4a454 -->\nOld Expo preview",
},
],
[
3,
{
id: 3,
user: { login: "contributor" },
body: `<!-- mobile-preview-ios ${JSON.stringify(ios)} -->`,
},
],
]);
await main({
env: {
GITHUB_REPOSITORY: "pingdotgg/t3code",
PR: "1",
GH_TOKEN: "test",
ANDROID_FINGERPRINT: fingerprint,
ANDROID_GROUP: "new-group",
},
request: async (path, init = {}) => {
if (!init.method) return [...comments.values()];
const id = Number(path.split("/").at(-1));
if (init.method === "DELETE") comments.delete(id);
else if (init.method === "PATCH") comments.get(id).body = JSON.parse(init.body).body;
else assert.fail("an existing preview should be reused");
},
});
assert.equal(comments.size, 2);
assert.deepEqual(readState(comments.get(1).body), {
android: { ...android, group: "new-group" },
ios,
});
assert.equal(comments.has(2), false);
assert.equal(comments.has(4), false);
assert.equal(comments.get(3).user.login, "contributor");
await main({
env: {
GITHUB_REPOSITORY: "pingdotgg/t3code",
PR: "1",
GH_TOKEN: "test",
ANDROID_FINGERPRINT: fingerprint,
PR_HEAD_SHA: "old-head",
},
request: async (path) => {
assert.equal(path, "/repos/pingdotgg/t3code/pulls/1");
return { head: { sha: "new-head" } };
},
});
});
Loading
Loading