Skip to content
Myr

Merge build/1109 into main

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by oscabriel · committed by oscabriel · parents 0ac60f3, 674e39b · Browse files · 2 files+60 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+60 added−4 removed

  • tests:+46 added−1 removed
  • other:+14 added−3 removed

2 files+60 added−4 removed

modified:apps/web/src/features/answer/answer-page.tsx+14 added-3 removed
2 unmodified lines
3 * was judged (head, base, merged tree, patch id, check version, when), the4 * gate's stages in a strip with the outcome under it (a refusal reads as5 * `git push` printed it), each lane's result and time, the held-back checks6 * as one line per area, and, once it landed, the landing's credit trailers7 * and its commit.7 * and its commit. The base and the landing link their commit pages; the8 * head and the merged tree stay plain, since they live in the claim's fork,9 * which the code browser never reads (ADR 0019).10 *11 * Held-back checks show only what `HeldBackResult` carries: an area, how12 * many passed of how many, and the suite's root. A lane's log is13 * never shown here; a refusal that needs it names it, with the command
26 unmodified lines
40 TableRow,41} from "../../components/ui/table.tsx";42import { askPath } from "../ask/ask-page.tsx";43import { CODE, Field, Fields, LINK, Region } from "../ask/fields.tsx";44import { commitHref } from "../code/paths.ts";45import { CommandLine } from "../shared/command.tsx";46import { CreditTrailers } from "../shared/credits.tsx";47import { EmptyState } from "../shared/empty.tsx";48import { OutcomeView, StageStrip } from "../shared/outcome.tsx";
150 unmodified lines
199 <Field label="Head">200 <Sha sha={verdict.head} />201 </Field>202 <Field label="Base">203 <a className={LINK} href={commitHref(verdict.project, verdict.base)}>200 <Sha sha={verdict.base} />204 <Sha sha={verdict.base} />205 </a>206 </Field>207 <Field label="Merged tree">208 <Sha sha={verdict.tree} />209 </Field>
32 unmodified lines
242 {...(landing.heldBackTrailer === undefined243 ? {}244 : { heldBack: landing.heldBackTrailer })}245 />246 <a247 className={`${LINK} self-start text-sm font-medium`}248 href={commitHref(landing.project, landing.sha)}249 >250 The landing commit251 </a>252 <div className="flex min-w-0 flex-col gap-1.5">253 <span className="text-muted-foreground text-xs font-medium">243 The landing commit, in a clone of {landing.project}254 In a clone of {landing.project}255 </span>256 <CommandLine command={`git show ${landing.sha}`} />257 </div>258 </Region>
4 unmodified lines
modified:apps/web/test/answer.test.tsx+46 added-1 removed
1 unmodified line
2 * The answer page: the latest verdict on an ask's answer, stage by stage.3 * The gate's stages in a strip, each lane's result and time, held-back4 * checks only as one line per area (its counts and suite root, nothing5 * more), the outcome, and a refusal as `git push` printed it. A landed6 * answer shows its landing's credit trailers and the commit.6 * answer shows its landing's credit trailers and the commit. The base and7 * the landing link their commit pages; the head and the merged tree, which8 * live in the claim's fork, do not.9 */10import { describe, expect, it } from "@effect/vitest";11import { Brand } from "@repo/brand";12import { Client, Contracts } from "@repo/protocol/contracts";
61 unmodified lines
7475 return lane === undefined || result === undefined ? [] : [[lane, result]];76 });7778/** Each link to a commit page, in page order, as `[href, text]`. */79const commitLinksOf = (markup: string) =>80 [81 ...markup.matchAll(82 /<a\b[^>]*href="(?<href>[^"]*\/commit\/[^"]*)"[^>]*>(?<inner>.*?)<\/a>/gu83 ),84 ].flatMap(({ groups }) =>85 groups?.href === undefined || groups.inner === undefined86 ? []87 : [[groups.href, plainText(groups.inner).trim()]]88 );8990describe(AnswerView, () => {91 const page = <AnswerView now={now} verdict={refused} />;9293 it("shows the stages the answer passed, the one that refused it, and the ones it never reached", () => {
72 unmodified lines
166 expect(text).toContain(`Held-back: export 7/7 @ ${suite}`);167 expect(text).toContain("Assisted-by: claude-code:opus-5 (verified)");168 expect(text).toContain(`git show ${landedSha}`);169 });170171 it("links a landed answer's landing and its base to their commit pages, and keeps the git show command", () => {172 const landed = verdictOf(Outcome.cases.Landed.make({ sha: landedSha }));173174 const markup = markupOf(175 <AnswerView landing={landing} now={now} verdict={landed} />176 );177178 expect(commitLinksOf(markup)).toStrictEqual([179 [`/${project}/commit/${landed.base}`, landed.base.slice(0, 7)],180 [`/${project}/commit/${landedSha}`, "The landing commit"],181 ]);182 expect(markup).toContain(`git show ${landedSha}`);183 });184185 it("links neither the head nor the merged tree: they live in the claim's fork", () => {186 const landed = verdictOf(Outcome.cases.Landed.make({ sha: landedSha }));187188 const markup = markupOf(189 <AnswerView landing={landing} now={now} verdict={landed} />190 );191192 expect(markup).not.toContain(`/commit/${landed.head}`);193 expect(markup).not.toContain(`/commit/${landed.tree}`);194 });195196 it("links the base and no landing when the answer has not landed", () => {197 expect(commitLinksOf(markupOf(page))).toStrictEqual([198 [`/${project}/commit/${refused.base}`, refused.base.slice(0, 7)],199 ]);200 });201});202203describe(LaneTable, () => {204 it("gives each lane's command and how long it ran", () => {
176 unmodified lines