Public: anyone can read this; the crew can change it.

A conflicted pull never shows a green mark: inbox, feed, asks and the checks line say "Conflicts in N files" instead #1552

Closed opened this
Closed without merging

scout/forge:scout/1414-a-conflicted-pull-never-shows-a-green-ma → main 2 commits fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
13 files changed +321 −14
scripts/gate.ts +1
@@ -38,6 +38,7 @@ export const GATE: readonly string[] = [
3838 "test/health.test.ts",
3939 "test/client-address.test.ts",
4040 "test/client-list.test.ts",
41 "test/conflicted-green.test.ts",
4142 "test/contents-api.test.ts",
4243 "test/crew-agents-only.test.ts",
4344 "test/crew-brief-audience.test.ts",
src/core/conflicts.ts added +34
@@ -0,0 +1,34 @@
1 /**
2 * What the forge last saw of a pull's conflicts, readable without a git call.
3 *
4 * `pullStatus` is where a pull is judged against its base; lists and asks are
5 * built synchronously and must not run git per row (`askCandidatesFor`). So
6 * every reading is remembered here, by pull, with the head it was taken at,
7 * and a list asks `conflictsKnown` — a reading of another head counts for
8 * nothing. Memory only: a restart forgets, and the next reading refills it.
9 */
10
11 const seen = new Map<string, { headOid: string; files: string[] }>();
12 const SEEN_MAX = 2000;
13
14 /** Remember a reading of an open pull at `headOid`. */
15 export function noteConflicts(
16 pullId: string,
17 headOid: string,
18 files: readonly string[],
19 ): void {
20 if (seen.size >= SEEN_MAX && !seen.has(pullId))
21 seen.delete(seen.keys().next().value!);
22 seen.set(pullId, { headOid, files: [...files] });
23 }
24
25 /** The conflicting paths last read for this head; empty when none or unread. */
26 export function conflictsKnown(pullId: string, headOid: string): string[] {
27 const known = seen.get(pullId);
28 return known !== undefined && known.headOid === headOid ? [...known.files] : [];
29 }
30
31 /** "Conflicts in 2 files" — the words wherever a green mark would be. */
32 export function conflictsWords(count: number): string {
33 return `Conflicts in ${count} file${count === 1 ? "" : "s"}`;
34 }
src/core/pulls.ts +4
@@ -6,6 +6,7 @@
66 * Forgejo left open (#30972).
77 */
88
9 import { noteConflicts } from "./conflicts.ts";
910 import { getRepoById } from "./repos.ts";
1011 import { repoDir } from "../git/repos.ts";
1112 import { sealedByNumber } from "./sealed.ts";
@@ -633,6 +634,8 @@ export async function pullStatus(
633634 baseOid,
634635 headOid,
635636 );
637 if (pull.state === "open" && pull.mergedAt === null)
638 noteConflicts(pull.id, headOid, conflicts);
636639 return { baseOid, headOid, ahead, mergeable: clean, conflicts, reviews };
637640 }
638641
@@ -727,6 +730,7 @@ export async function pullMergeStates(
727730 : `refs/heads/${pull.headBranch}`;
728731 const headOid = live.get(headRef) ?? pull.headOid;
729732 const r = await mergeReading(dir, baseOid, headOid);
733 noteConflicts(pull.id, headOid, r.conflicts);
730734 out[i] = { mergeable: r.mergeable, conflicts: r.conflicts };
731735 }
732736 };
src/http/feed.ts +5 −3
@@ -19,7 +19,7 @@ import {
1919 parseCursor,
2020 readFeed,
2121 } from "../feed/feed.ts";
22 import { asksAnswer } from "../web/studio/asks.ts";
22 import { asksAnswer, warmConflicts } from "../web/studio/asks.ts";
2323 import {
2424 applyAsksBulk,
2525 undoAsksBulk,
@@ -39,7 +39,7 @@ import {
3939 } from "./respond.ts";
4040
4141 export function feedRoutes(router: Router<Handler>): void {
42 router.add("GET", "/api/v1/feed", (ctx) => {
42 router.add("GET", "/api/v1/feed", async (ctx) => {
4343 const viewer = ctx.auth.user;
4444 if (!viewer) return unauthorized();
4545 const q = ctx.url.searchParams;
@@ -54,6 +54,7 @@ export function feedRoutes(router: Router<Handler>): void {
5454 const cursor = rawCursor === null ? undefined : parseCursor(rawCursor);
5555 if (rawCursor !== null && cursor === undefined)
5656 return apiError("invalid_cursor", 422, "that cursor was not issued here");
57 await warmConflicts(ctx, viewer);
5758 return json(
5859 readFeed(ctx.app.db, viewer, {
5960 ...(limit === undefined ? {} : { limit }),
@@ -65,9 +66,10 @@ export function feedRoutes(router: Router<Handler>): void {
6566 });
6667
6768 // What asks the viewer, ranked, with the week's measure (`asksAnswer`).
68 router.add("GET", "/api/v1/asks", (ctx) => {
69 router.add("GET", "/api/v1/asks", async (ctx) => {
6970 const viewer = ctx.auth.user;
7071 if (!viewer) return unauthorized();
72 await warmConflicts(ctx, viewer);
7173 return json(asksAnswer(ctx, viewer), 200, {
7274 "cache-control": "private, no-store",
7375 });
src/http/mcp.ts +5 −3
@@ -102,7 +102,7 @@ import {
102102 milestoneData,
103103 milestonesJson,
104104 } from "../web/pages/milestones.ts";
105 import { appsOf, asksAnswer } from "../web/studio/asks.ts";
105 import { appsOf, asksAnswer, warmConflicts } from "../web/studio/asks.ts";
106106 import { applyAsksBulk, previewAsksBulk } from "../actions/asks_bulk.ts";
107107 import type { Ctx, Handler } from "./context.ts";
108108 import {
@@ -496,7 +496,8 @@ const TOOLS: readonly Tool[] = [
496496 "What waits on you, most consequential first: each row names the decision, its options and what happens if nobody acts, and why it ranks where it does (security, money, held-up work, then age). Rows of one kind in one app are collapsed with their item ids. Also the forge's own needs (for a site admin) and the last 7 days' asks raised, acted on, dismissed and gone by themselves.",
497497 inputSchema: { type: "object", properties: {} },
498498 writes: false,
499 run(ctx, user) {
499 async run(ctx, user) {
500 await warmConflicts(ctx, user);
500501 return good(asksAnswer(ctx, user));
501502 },
502503 },
@@ -1110,7 +1111,7 @@ const TOOLS: readonly Tool[] = [
11101111 },
11111112 },
11121113 writes: false,
1113 run(ctx, user, args) {
1114 async run(ctx, user, args) {
11141115 const raw = args["limit"];
11151116 const limit = raw === undefined ? FEED_LIMIT_DEFAULT : Number(raw);
11161117 if (!Number.isInteger(limit) || limit < 1 || limit > FEED_LIMIT_MAX)
@@ -1119,6 +1120,7 @@ const TOOLS: readonly Tool[] = [
11191120 const cursor = given === undefined ? undefined : parseCursor(str(given));
11201121 if (given !== undefined && cursor === undefined)
11211122 return bad("invalid", "that cursor was not issued here");
1123 await warmConflicts(ctx, user);
11221124 return good(
11231125 readFeed(ctx.app.db, user, {
11241126 limit,
src/http/server.ts +5 −1
@@ -193,6 +193,7 @@ import {
193193 asksPage,
194194 } from "../web/studio/asks_page.ts";
195195 import { liveFeedFragment } from "../web/studio/feed.ts";
196 import { warmConflicts } from "../web/studio/asks.ts";
196197 import { serviceWorker } from "../web/sw.ts";
197198 import { explorePage } from "../web/studio/explore.ts";
198199 import {
@@ -611,7 +612,10 @@ export function buildRouter(): Router<Handler> {
611612 // fetches a region and not the page. Literal, above /:owner.
612613 router.add("GET", "/live/apps", liveAppsFragment);
613614 router.add("GET", "/live/on-you", liveOnYouFragment);
614 router.add("GET", "/live/feed", liveFeedFragment);
615 router.add("GET", "/live/feed", async (ctx) => {
616 await warmConflicts(ctx, ctx.auth.user, true);
617 return liveFeedFragment(ctx);
618 });
615619 // Whether a hostname is an app's verified domain — what Caddy's
616620 // `on_demand_tls { ask … }` asks before it fetches a certificate for a
617621 // name it has never seen (docs/EXTRACT.md). 200 says yes, 404 says no,
src/web/pages/pull.ts +8 −1
@@ -8,6 +8,7 @@
88 * it needs.
99 */
1010
11 import { conflictsWords } from "../../core/conflicts.ts";
1112 import { askCheck } from "../../checks/again.ts";
1213 import { addCommentThrough } from "../../actions/issues.ts";
1314 import type { AccessError } from "../../actions/access.ts";
@@ -210,6 +211,8 @@ function checksLine(
210211 tier = "",
211212 /** A writer's button to ask for a check again; empty for anyone else. */
212213 again: Html | "" = "",
214 /** Files that stop this head merging; a passing check is not shown over them. */
215 conflicts = 0,
213216 ): Html {
214217 if (!isApp && !required && check.state === "none" && !waiting && again === "")
215218 return html``;
@@ -222,7 +225,10 @@ function checksLine(
222225 >deploy ${run.commitOid.slice(0, 7)}</a
223226 >`;
224227 const body =
225 check.state === "ok"
228 check.state === "ok" && conflicts > 0
229 ? html`<span class="bad">${icon("x")}${conflictsWords(conflicts)}</span
230 >${link}`
231 : check.state === "ok"
226232 ? html`<span class="ok">${icon("check")}Checks passed</span>${link}`
227233 : check.state === "failed"
228234 ? html`<span class="bad">${icon("x")}Checks failed</span>${link}`
@@ -319,6 +325,7 @@ function mergeBox(
319325 ${btn("Check again", { size: "sm", icon: "loader" })}
320326 </form>`
321327 : "",
328 status.conflicts.length,
322329 );
323330 const reopen = html`<form method="post" action="${thread}/state">
324331 <input type="hidden" name="state" value="open" />
src/web/pages/site.ts +2
@@ -30,6 +30,7 @@ import { isThemeName } from "../../design/themes.ts";
3030 import { cookieValue, crossOrigin, type Ctx } from "../../http/context.ts";
3131 import { studioDoor, studioHome } from "../studio/home.ts";
3232 import { homeTop, onYouBulk } from "../studio/asks_page.ts";
33 import { warmConflicts } from "../studio/asks.ts";
3334 import { latestUndoable } from "../../actions/asks_bulk.ts";
3435 import { mutedRepos } from "../../core/interactions.ts";
3536 import { edgeLoginUrl } from "../../http/edge.ts";
@@ -308,6 +309,7 @@ export function terminalCard(ctx: Ctx): Html {
308309 export async function home(ctx: Ctx): Promise<Response> {
309310 const user = ctx.auth.user;
310311 if (user === undefined) return studioDoor(ctx);
312 await warmConflicts(ctx, user, true);
311313 return await studioHome(ctx, user, homeTop(ctx));
312314 }
313315
src/web/studio/asks.ts +66 −3
@@ -25,7 +25,15 @@ import {
2525 type Issue,
2626 } from "../../core/issues.ts";
2727 import { looksForApps } from "../../core/looks.ts";
28 import { closesFromBody, getPull, joinMany, type Pull } from "../../core/pulls.ts";
28 import { conflictsKnown } from "../../core/conflicts.ts";
29 import {
30 closesFromBody,
31 getPull,
32 joinMany,
33 pullDir,
34 pullStatus,
35 type Pull,
36 } from "../../core/pulls.ts";
2937 import {
3038 listReposVisibleTo,
3139 canWrite,
@@ -300,7 +308,8 @@ function askCandidatesFor(
300308 repo.autonomy !== "autonomous" &&
301309 // A green pull that no longer merges as it stands cannot be shipped:
302310 // bringing it up to date is work, not a person's decision.
303 !isStalePull(db, pull.id, pull.headOid)
311 !isStalePull(db, pull.id, pull.headOid) &&
312 conflictsKnown(pull.id, pull.headOid).length === 0
304313 ) {
305314 // Autonomous repositories look at their own green pulls: the decider,
306315 // then the crew's reviewer. Everything else waits for a person —
@@ -320,7 +329,8 @@ function askCandidatesFor(
320329 } else if (
321330 check?.state === "ok" &&
322331 repo.autonomy === "autonomous" &&
323 !isStalePull(db, pull.id, pull.headOid)
332 !isStalePull(db, pull.id, pull.headOid) &&
333 conflictsKnown(pull.id, pull.headOid).length === 0
324334 ) {
325335 // An autonomous repository lands its own green pulls once reviewed;
326336 // an agent's change with no reviewer, or whose review lapsed, waits
@@ -958,6 +968,59 @@ export function forgeNeedsFor(ctx: Ctx, user: User | undefined): string[] {
958968 }).needs;
959969 }
960970
971 /**
972 * Read, for the viewer's open pulls whose check is green, whether each still
973 * merges — so the synchronous asks that follow (`askCandidatesFor`) never
974 * call a conflicted pull green. One cached merge reading per pull
975 * (`pullStatus`), at most `WARM_AT_ONCE` in flight; a pull that cannot be
976 * read is left unremarked.
977 */
978 const WARM_AT_ONCE = 4;
979 /** When each pull was last read here: a page render (`quick`) does not re-ask within this. */
980 const WARM_FRESH_MS = 10_000;
981 const warmedAt = new Map<string, number>();
982 export async function warmConflicts(
983 ctx: Ctx,
984 user: User | undefined,
985 /** A page render: trust a reading made in the last few seconds. */
986 quick = false,
987 ): Promise<void> {
988 if (!user) return;
989 const db = ctx.app.db;
990 const repos = new Map(
991 listReposVisibleTo(db, user, { limit: 200 }).map((r) => [r.id, r]),
992 );
993 const pulls = listOpenPullsVisibleTo(db, user, 50).filter((p) =>
994 repos.has(p.repoId),
995 );
996 const checks = latestRunsForIssues(db, pulls.map((p) => p.id));
997 const green: Pull[] = [];
998 for (const issue of pulls) {
999 if (checks.get(issue.id)?.state !== "ok") continue;
1000 const pull = getPull(db, issue.repoId, issue.number);
1001 if (pull === undefined) continue;
1002 if (quick && Date.now() - (warmedAt.get(pull.id) ?? 0) < WARM_FRESH_MS) continue;
1003 green.push(pull);
1004 }
1005 let next = 0;
1006 const worker = async (): Promise<void> => {
1007 for (let i = next++; i < green.length; i = next++) {
1008 const pull = green[i]!;
1009 const repo = repos.get(pull.repoId)!;
1010 if (warmedAt.size > 2000) warmedAt.clear();
1011 warmedAt.set(pull.id, Date.now());
1012 try {
1013 await pullStatus(await pullDir(db, ctx.app.reposRoot, repo, pull), pull);
1014 } catch {
1015 // an unreadable repository is not a verdict
1016 }
1017 }
1018 };
1019 await Promise.all(
1020 Array.from({ length: Math.min(WARM_AT_ONCE, green.length) }, worker),
1021 );
1022 }
1023
9611024 /**
9621025 * How many things ask the viewer: the one number the studio header and the
9631026 * asks page both show. It counts the rows the cards are made into
src/web/studio/change.ts +3 −1
@@ -286,7 +286,6 @@ async function pullPanels(ctx: Ctx, repo: Repo, pull: Pull) {
286286 history: servingHistory(),
287287 viewer: ctx.auth.user,
288288 };
289 const { word, note: checkNote } = await pullWord(wordCtx, pull);
290289 // Whether this change still merges into its base is asked here, on its own
291290 // page, and nowhere a list of changes renders — a git call per open pull
292291 // would undo the home's own bound (`askCandidatesFor`). Only an open,
@@ -300,8 +299,11 @@ async function pullPanels(ctx: Ctx, repo: Repo, pull: Pull) {
300299 requireReview: repo.requireReview,
301300 })
302301 : undefined;
302 const { word: judged, note: checkNote } = await pullWord(wordCtx, pull);
303303 const conflicted =
304304 status !== undefined && !status.mergeable && status.conflicts.length > 0;
305 // A green check on a conflicted head is no look: it reads stopped.
306 const word = conflicted && judged === "look" ? "stopped" : judged;
305307 // A reader's head runs nothing until a writer approves it (#777): say
306308 // that, rather than leave a word waiting on something that will not come.
307309 const waitingOnApproval =
src/web/studio/words.ts +6
@@ -8,6 +8,7 @@
88 * thing about the same commit. Nothing here knows about a page.
99 */
1010
11 import { conflictsKnown, conflictsWords } from "../../core/conflicts.ts";
1112 import type { Database } from "bun:sqlite";
1213 import { ancestorsOf } from "../../git/merge.ts";
1314 import type { AppsRuntime, EnvStatus } from "../../apps/runtime.ts";
@@ -211,6 +212,11 @@ export async function pullWord(
211212 if (pull.state === "closed")
212213 return { word: "stopped", note: "closed without shipping" };
213214 const check = checkSummary(ctx.db, pull.id, pull.headOid);
215 // A green check on a head that no longer merges is not a look: the
216 // conflicts are the word, wherever the green would have been.
217 const conflicts = conflictsKnown(pull.id, pull.headOid);
218 if (check.state === "ok" && conflicts.length > 0)
219 return { word: "stopped", note: conflictsWords(conflicts.length).toLowerCase() };
214220 // A repository that is not an app never deploys a head, so it never gets
215221 // a look: an open change there waits on a person, and says so.
216222 if (ctx.record === undefined && check.state === "none")
test/conflicted-green.test.ts added +178
@@ -0,0 +1,178 @@
1 import { afterAll, beforeAll, describe, expect, test } from "bun:test";
2 import { mkdtemp, rm } from "node:fs/promises";
3 import { tmpdir } from "node:os";
4 import { join } from "node:path";
5 import { createApp, type App } from "../src/app.ts";
6 import { claimRun, createRun, finishRun } from "../src/core/runs.ts";
7 import { getPull } from "../src/core/pulls.ts";
8 import { getRepo } from "../src/core/repos.ts";
9 import { serve, type Servers } from "../src/http/server.ts";
10 import { gitClientEnv } from "./helpers/git-client.ts";
11
12 const gitEnv = gitClientEnv();
13
14 describe("a conflicted pull never shows a green mark", () => {
15 let dataDir: string;
16 let work: string;
17 let app: App;
18 let servers: Servers;
19 let base: string;
20 let dir: string;
21 const auth = { authorization: "" };
22
23 async function gitOk(args: string[]): Promise<void> {
24 const p = Bun.spawn(["git", ...args], {
25 cwd: dir,
26 env: gitEnv,
27 stdout: "ignore",
28 stderr: "pipe",
29 });
30 const [err, code] = await Promise.all([
31 new Response(p.stderr).text(),
32 p.exited,
33 ]);
34 if (code !== 0) throw new Error(`git ${args.join(" ")}: ${err}`);
35 }
36 const write = async (text: string, message: string) => {
37 await Bun.write(join(dir, "code.txt"), text);
38 await gitOk(["commit", "-am", message]);
39 };
40 const page = async (path: string) =>
41 (await fetch(`${base}${path}`, { headers: auth })).text();
42 const json = async (path: string) =>
43 (await fetch(`${base}${path}`, { headers: auth })).json() as Promise<any>;
44 const mcp = async (name: string) => {
45 const res = await fetch(`${base}/mcp`, {
46 method: "POST",
47 headers: {
48 "content-type": "application/json",
49 accept: "application/json, text/event-stream",
50 ...auth,
51 },
52 body: JSON.stringify({
53 jsonrpc: "2.0",
54 id: 1,
55 method: "tools/call",
56 params: { name, arguments: {} },
57 }),
58 });
59 const body = (await res.json()) as any;
60 return JSON.parse(body.result.content[0].text);
61 };
62 const checksLine = (html: string) =>
63 /<p class="checks-line">[\s\S]*?<\/p>/.exec(html)?.[0] ?? "";
64 const asking = (rows: any) => JSON.stringify(rows).includes("Feat");
65
66 beforeAll(async () => {
67 dataDir = await mkdtemp(join(tmpdir(), "forge-cg-"));
68 work = await mkdtemp(join(tmpdir(), "forge-cg-work-"));
69 app = createApp({ dataDir, port: 0 });
70 servers = await serve(app);
71 base = servers.url;
72 await fetch(`${base}/signup`, {
73 method: "POST",
74 body: new URLSearchParams({
75 username: "dev",
76 email: "[email protected]",
77 password: "conflicted-green-pass",
78 }),
79 redirect: "manual",
80 });
81 const token = await fetch(`${base}/api/v1/tokens`, {
82 method: "POST",
83 headers: { "content-type": "application/json" },
84 body: JSON.stringify({
85 adminConfirm: true,
86 username: "dev",
87 password: "conflicted-green-pass",
88 name: "cli",
89 scope: "rw",
90 }),
91 })
92 .then((r) => r.json())
93 .then((j) => (j as { token: string }).token);
94 auth.authorization = `Bearer ${token}`;
95 await fetch(`${base}/api/v1/repos`, {
96 method: "POST",
97 headers: { ...auth, "content-type": "application/json" },
98 body: JSON.stringify({ name: "app", visibility: "public" }),
99 });
100 const remote = `${base.replace("http://", `http://dev:${token}@`)}/dev/app.git`;
101 dir = work;
102 await gitOk(["clone", remote, "app"]);
103 dir = join(work, "app");
104 await Bun.write(join(dir, "code.txt"), "alpha\nbeta\ngamma\n");
105 await gitOk(["add", "."]);
106 await gitOk(["commit", "-m", "base"]);
107 await gitOk(["push", "origin", "main"]);
108 });
109
110 afterAll(async () => {
111 servers.stop();
112 app.close();
113 await rm(dataDir, { recursive: true, force: true });
114 await rm(work, { recursive: true, force: true });
115 });
116
117 test("a passing check reads Conflicts in 1 file, not green, on the page and in the asks; resolving brings green back", async () => {
118 await gitOk(["checkout", "-b", "feat"]);
119 await write("alpha\nBETA\ngamma\n", "feat beta");
120 await gitOk(["push", "origin", "feat"]);
121 const made = await fetch(`${base}/api/v1/repos/dev/app/pulls`, {
122 method: "POST",
123 headers: { ...auth, "content-type": "application/json" },
124 body: JSON.stringify({ base: "main", head: "feat", title: "Feat" }),
125 });
126 expect(made.status).toBe(201);
127 const repo = getRepo(app.db, "dev", "app")!;
128 const pull = getPull(app.db, repo.id, 1)!;
129 const run = createRun(app.db, {
130 repoId: repo.id,
131 kind: "check",
132 issueId: pull.id,
133 commitOid: pull.headOid,
134 });
135 claimRun(app.db, run.id);
136 finishRun(app.db, run.id, { state: "ok", summary: "passed" });
137
138 // Clean and green: the mark, the look, the ask.
139 const green = checksLine(await page("/dev/app/pulls/1/files"));
140 expect(green).toContain("Checks passed");
141 expect(green).toContain('class="ok"');
142 expect(await page("/dev/app/pulls/1")).toContain('data-word="look"');
143 expect(await page("/")).toContain("Green — ready for a look");
144 expect(asking(await mcp("asks"))).toBe(true);
145 expect(asking(await json("/api/v1/asks"))).toBe(true);
146 expect(JSON.stringify(await mcp("feed"))).toContain("green");
147
148 // The base takes a different edit of the same line.
149 await gitOk(["checkout", "main"]);
150 await write("alpha\nbeta!\ngamma\n", "quiet beta");
151 await gitOk(["push", "origin", "main"]);
152
153 const line = checksLine(await page("/dev/app/pulls/1/files"));
154 expect(line).toContain("Conflicts in 1 file");
155 expect(line).not.toContain("Checks passed");
156 expect(line).not.toContain('class="ok"');
157
158 // The change's own page, the home, the asks and the feed read the same.
159 const change = await page("/dev/app/pulls/1");
160 expect(change).not.toContain('data-word="look"');
161 expect(change).toContain("it conflicts with main");
162 const home = await page("/");
163 expect(home).not.toContain("Green — ready for a look");
164 expect(home).not.toContain("Ready to ship");
165 expect(asking(await mcp("asks"))).toBe(false);
166 expect(asking(await json("/api/v1/asks"))).toBe(false);
167 expect(JSON.stringify(await mcp("feed"))).not.toContain("green");
168
169 // The base moves to hold the same line: the green is back.
170 await write("alpha\nBETA\ngamma\n", "the same edit");
171 await gitOk(["push", "origin", "main"]);
172 const back = checksLine(await page("/dev/app/pulls/1/files"));
173 expect(back).toContain("Checks passed");
174 expect(back).toContain('class="ok"');
175 expect(await page("/dev/app/pulls/1")).toContain('data-word="look"');
176 expect(asking(await mcp("asks"))).toBe(true);
177 });
178 });
test/studio.test.ts +4 −2
@@ -622,8 +622,10 @@ describe("the studio", () => {
622622 expect(studio).toContain("bring the branch up to date");
623623 expect(studio).not.toContain("Ship");
624624 expect(studio).toContain("Bring up to date");
625 // Still one of the five words — no sixth badge invented for this.
626 expect(studio).toContain('data-word="look"');
625 // Still one of the five words — no sixth badge invented for this — and
626 // never the green one: a conflicted change is not ready for a look.
627 expect(studio).toContain('data-word="stopped"');
628 expect(studio).not.toContain('data-word="look"');
627629
628630 setIssueState(app, alice, repo, pull, "closed");
629631

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs