@juangadm/pre-post 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +52 -182
  2. package/dist/baseline.d.ts +122 -3
  3. package/dist/baseline.d.ts.map +1 -1
  4. package/dist/baseline.js +491 -46
  5. package/dist/baseline.js.map +1 -1
  6. package/dist/bin/cli.js +41 -17
  7. package/dist/bin/cli.js.map +1 -1
  8. package/dist/browser.d.ts +38 -3
  9. package/dist/browser.d.ts.map +1 -1
  10. package/dist/browser.js +132 -11
  11. package/dist/browser.js.map +1 -1
  12. package/dist/commands/compare.d.ts.map +1 -1
  13. package/dist/commands/compare.js +5 -5
  14. package/dist/commands/compare.js.map +1 -1
  15. package/dist/commands/detect.d.ts +5 -0
  16. package/dist/commands/detect.d.ts.map +1 -1
  17. package/dist/commands/detect.js +3 -0
  18. package/dist/commands/detect.js.map +1 -1
  19. package/dist/commands/doctor.d.ts.map +1 -1
  20. package/dist/commands/doctor.js +9 -3
  21. package/dist/commands/doctor.js.map +1 -1
  22. package/dist/commands/pr.d.ts +13 -1
  23. package/dist/commands/pr.d.ts.map +1 -1
  24. package/dist/commands/pr.js +222 -107
  25. package/dist/commands/pr.js.map +1 -1
  26. package/dist/comparison.d.ts +14 -0
  27. package/dist/comparison.d.ts.map +1 -1
  28. package/dist/comparison.js +48 -25
  29. package/dist/comparison.js.map +1 -1
  30. package/dist/diff-worker.d.ts +1 -0
  31. package/dist/diff-worker.d.ts.map +1 -1
  32. package/dist/diff-worker.js +1 -0
  33. package/dist/diff-worker.js.map +1 -1
  34. package/dist/diff.d.ts +42 -0
  35. package/dist/diff.d.ts.map +1 -1
  36. package/dist/diff.js +142 -24
  37. package/dist/diff.js.map +1 -1
  38. package/dist/doctor.d.ts +4 -1
  39. package/dist/doctor.d.ts.map +1 -1
  40. package/dist/doctor.js +5 -1
  41. package/dist/doctor.js.map +1 -1
  42. package/dist/drift.d.ts +29 -0
  43. package/dist/drift.d.ts.map +1 -0
  44. package/dist/drift.js +106 -0
  45. package/dist/drift.js.map +1 -0
  46. package/dist/errors.d.ts +13 -0
  47. package/dist/errors.d.ts.map +1 -1
  48. package/dist/errors.js +13 -0
  49. package/dist/errors.js.map +1 -1
  50. package/dist/github.d.ts +34 -3
  51. package/dist/github.d.ts.map +1 -1
  52. package/dist/github.js +102 -11
  53. package/dist/github.js.map +1 -1
  54. package/dist/report.d.ts +27 -1
  55. package/dist/report.d.ts.map +1 -1
  56. package/dist/report.js +144 -38
  57. package/dist/report.js.map +1 -1
  58. package/dist/routes/imports.d.ts +21 -1
  59. package/dist/routes/imports.d.ts.map +1 -1
  60. package/dist/routes/imports.js +32 -2
  61. package/dist/routes/imports.js.map +1 -1
  62. package/dist/routes.d.ts +18 -0
  63. package/dist/routes.d.ts.map +1 -1
  64. package/dist/routes.js +110 -29
  65. package/dist/routes.js.map +1 -1
  66. package/dist/run.d.ts +46 -12
  67. package/dist/run.d.ts.map +1 -1
  68. package/dist/run.js +138 -17
  69. package/dist/run.js.map +1 -1
  70. package/dist/sheet.d.ts +24 -0
  71. package/dist/sheet.d.ts.map +1 -0
  72. package/dist/sheet.js +94 -0
  73. package/dist/sheet.js.map +1 -0
  74. package/dist/timings.d.ts +46 -0
  75. package/dist/timings.d.ts.map +1 -0
  76. package/dist/timings.js +108 -0
  77. package/dist/timings.js.map +1 -0
  78. package/dist/types.d.ts +86 -1
  79. package/dist/types.d.ts.map +1 -1
  80. package/dist/types.js +8 -0
  81. package/dist/types.js.map +1 -1
  82. package/package.json +2 -2
  83. package/skill/SKILL.md +34 -10
@@ -4,19 +4,22 @@
4
4
  import fs from 'fs';
5
5
  import os from 'os';
6
6
  import path from 'path';
7
- import { ARTIFACT_KINDS, artifactSuffix } from '../types.js';
7
+ import { ARTIFACT_KINDS, artifactSuffix, isBrokenVerdict } from '../types.js';
8
8
  import { loadConfig, resolveSettings, updateConfig } from '../config.js';
9
9
  import { currentBranch, headSha, repoRoot, resolveOwnerRepo } from '../git.js';
10
- import { detectRoutesForRepo, resolveSample } from '../routes.js';
10
+ import { capNotice, detectRoutesForRepo, resolveSample } from '../routes.js';
11
11
  import { closeBrowser } from '../browser.js';
12
12
  import { parseViewport } from '../viewport.js';
13
13
  import { authHint, detectDevServer, ensureBrowser, NeedsHumanError, probeUrl } from '../doctor.js';
14
- import { cannotPublishHint, checkWriteAccess, findOpenPr, findToken, getPr, GitHub, publishAssets, requireToken, upsertPrDescription, upsertStickyComment } from '../github.js';
15
- import { buildComment, STICKY_MARKER } from '../report.js';
14
+ import { API_BASE, cannotPublishHint, checkWriteAccess, findOpenPr, findOpenPrForCommit, findToken, getPr, GitHub, GitHubError, loginHint, publishAssets, upsertPrDescription, upsertStickyComment } from '../github.js';
15
+ import { buildComment, groupChanges, STICKY_MARKER } from '../report.js';
16
16
  import { resolveAuth } from '../sessions.js';
17
- import { routeSlug, runTasks } from '../run.js';
17
+ import { routeSlug, runTasks, throwIfBlocked } from '../run.js';
18
18
  import { joinUrl } from '../url.js';
19
19
  import { describeComparison, resolveComparison } from '../comparison.js';
20
+ import { Stopwatch } from '../timings.js';
21
+ import { driftNotes } from '../drift.js';
22
+ import { buildSheet } from '../sheet.js';
20
23
  /**
21
24
  * What ends up on the assets branch. The diff overlay is an intermediate used
22
25
  * to locate the changed region; Pre beside Post is the comparison a reviewer
@@ -26,17 +29,31 @@ const PUBLISHED_KINDS = ARTIFACT_KINDS.filter(kind => kind !== 'diff');
26
29
  function headersFor(config, opts) {
27
30
  return resolveAuth({ configHeaders: config.headers, headers: opts.headers, urls: [] })?.headers ?? {};
28
31
  }
32
+ /**
33
+ * The Post URL the caller fixed, if any.
34
+ *
35
+ * `--local` promises Post is built from this checkout. A `.pre-post.json`
36
+ * `after` is usually the author's own localhost, which a CI runner cannot
37
+ * reach, so in local mode only a flag on this very command overrides it.
38
+ */
39
+ export function afterFor(opts, config) {
40
+ return opts.after ?? (opts.local ? undefined : config.after);
41
+ }
29
42
  function runId(now) {
30
43
  return now.toISOString().replace(/[-:]/g, '').replace('T', '-').slice(0, 15);
31
44
  }
32
45
  export async function runPr(opts = {}) {
33
46
  const started = Date.now();
47
+ const timings = new Stopwatch();
34
48
  const log = opts.log ?? (() => undefined);
35
49
  const root = repoRoot(opts.cwd);
36
50
  const config = loadConfig(root);
37
51
  const settings = resolveSettings(config, opts);
38
52
  const ownerRepo = resolveOwnerRepo(root);
39
- const branch = currentBranch(root);
53
+ // A pull_request job checks out a merge commit with no branch, but names the
54
+ // PR's branch in GITHUB_HEAD_REF.
55
+ const branch = currentBranch(root) ?? (process.env.GITHUB_HEAD_REF?.trim() || null);
56
+ const head = headSha(root);
40
57
  /** Tears down anything resolution started (a local dev server). */
41
58
  let cleanupComparison = async () => undefined;
42
59
  // --- GitHub access (checked before any time is spent) -----------------------
@@ -45,25 +62,18 @@ export async function runPr(opts = {}) {
45
62
  // entirely made --dry-run the one mode that could never use a deployment,
46
63
  // so it always demanded a dev server — from the person least likely to have
47
64
  // one. Reads use `gh`; publishing and commenting use `writeGh`.
48
- const found = opts.dryRun ? findToken() : requireToken();
49
- const gh = found ? new GitHub(found.token) : null;
50
- const writeGh = opts.dryRun ? null : gh;
51
- // --- Start the slow, independent things now; they overlap route detection ----
52
- const browserReady = ensureBrowser();
53
- /**
54
- * Everything this run started, in a form every early exit can call.
55
- *
56
- * The browser is launched from here rather than at the capture, so any throw
57
- * before that block owns closing it: the CLI's `process.exit` hides the
58
- * difference, but a caller using `runPr()` as a library catches the error and
59
- * is left with a Chromium nothing references. Awaiting the launch first is
60
- * what makes it work — `closeBrowser()` drops a pending launch and closes
61
- * nothing, and the launch then resolves into an orphan.
62
- */
63
- const stopEverything = async () => {
64
- await browserReady.catch(() => undefined);
65
- await closeBrowser();
66
- await cleanupComparison();
65
+ //
66
+ // A real run without working GitHub access still captures. Refusing up front
67
+ // was right for someone at a laptop, who can log in and re-run; in a hosted
68
+ // agent sandbox nobody is at the machine and the platform's own token is the
69
+ // one refused, so stopping left the user with nothing to look at. The run now
70
+ // captures, publishes nothing, and ends with the one sentence that fixes it.
71
+ const found = findToken();
72
+ let gh = found ? new GitHub(found.token) : null;
73
+ let writeGh = opts.dryRun ? null : gh;
74
+ /** Why nothing will be published, one per way of finding out; the most specific wins. */
75
+ const notPublished = {
76
+ noToken: !opts.dryRun && !found ? `GitHub access is needed to publish screenshots. ${loginHint()}` : undefined,
67
77
  };
68
78
  // Whether the token may write, asked at the same time as the PR lookup so it
69
79
  // costs no wall clock, and answered before anything expensive begins. A token
@@ -74,44 +84,185 @@ export async function runPr(opts = {}) {
74
84
  const writeAccess = writeGh && found
75
85
  ? checkWriteAccess(writeGh, ownerRepo).then(access => ({ access, source: found.source }))
76
86
  : null;
87
+ // Without a branch name (a detached checkout, as a deployment-triggered job
88
+ // has) the PR is found from the commit it is headed by.
77
89
  const lookup = gh
78
- ? opts.pr ? getPr(gh, ownerRepo, opts.pr) : branch ? findOpenPr(gh, ownerRepo, branch) : Promise.resolve(null)
90
+ ? opts.pr ? getPr(gh, ownerRepo, opts.pr)
91
+ : branch ? findOpenPr(gh, ownerRepo, branch)
92
+ : head ? findOpenPrForCommit(gh, ownerRepo, head) : Promise.resolve(null)
79
93
  : Promise.resolve(null);
80
94
  // A dry run used to touch GitHub not at all, and must still work when it
81
95
  // cannot: it is what someone runs before anything is set up. A stale token or
82
96
  // an unreachable API degrades it to "no PR", never ends the run. A real run
83
- // needs the PR to publish against, so there the failure still surfaces.
84
- const prLookup = opts.dryRun
85
- ? lookup.catch(err => { log(`GitHub lookup failed (${err instanceof Error ? err.message : err}); continuing without it.`); return null; })
86
- : lookup;
97
+ // degrades the same way and records why, so it can say so at the end.
98
+ let lookupFailed = false;
99
+ const prLookup = lookup.catch(err => {
100
+ lookupFailed = true;
101
+ const message = err instanceof Error ? err.message : String(err);
102
+ if (opts.dryRun) {
103
+ log(`GitHub lookup failed (${message}); continuing without it.`);
104
+ }
105
+ else {
106
+ // A refused token already carries its fix; an answer from GitHub names
107
+ // itself; anything else never reached GitHub at all.
108
+ notPublished.lookup = err instanceof NeedsHumanError || err instanceof GitHubError
109
+ ? message
110
+ : `GitHub could not be reached (${message}), so nothing was published: check that this environment can reach ${API_BASE}, then re-run.`;
111
+ }
112
+ return null;
113
+ });
114
+ // A deployment-triggered job fires for pushes to main and for branches with
115
+ // no PR, too. Capturing there would add images to the assets branch that no
116
+ // PR will ever show. Asked before detection, which can fetch history and
117
+ // fail on its own, because none of it matters when there is nothing to post
118
+ // to. Only an answer from GitHub counts as "no PR": a lookup that failed
119
+ // says nothing either way, and neither does one never made for want of a
120
+ // token, so those runs carry on and end on the instruction that fixes them.
121
+ if (opts.requirePr && gh && !(await prLookup) && !lookupFailed) {
122
+ log('No open PR for this commit; nothing to do.');
123
+ return {
124
+ repo: ownerRepo, beforeBase: '', afterBase: '', outcomes: [], skippedDynamic: [],
125
+ durationMs: Date.now() - started, markdown: '', outputDir: '',
126
+ delivery: { status: 'no-pr' },
127
+ };
128
+ }
87
129
  // Local detection runs regardless: it is cheap, and it is the fallback when
88
130
  // the PR has no preview deployment.
89
- const explicitAfter = opts.after ?? config.after;
131
+ const explicitAfter = afterFor(opts, config);
90
132
  const devServer = explicitAfter ? Promise.resolve(explicitAfter) : detectDevServer();
133
+ // A skill copy or a pinned range from another release is why an agent
134
+ // follows instructions for a CLI that no longer exists. Say so up front.
135
+ for (const note of driftNotes({ version: opts.version, repoRoot: root }))
136
+ log(`Note: ${note}`);
91
137
  // Detection is synchronous git + fs work, so run it while the PR lookup is in
92
138
  // flight rather than after it.
93
139
  const detection = detectRoutesForRepo({ cwd: root, config, maxRoutes: settings.maxRoutes, framework: opts.framework, diffTarget: opts.base, log });
140
+ timings.add('detect', detection.durationMs);
94
141
  const appPrefix = path.relative(root, detection.appRoot) || undefined;
95
- const head = headSha(root);
96
- const pr = await prLookup;
142
+ // --- Routes --------------------------------------------------------------------
143
+ // Settled before anything slow starts: a branch whose only affected page
144
+ // still needs a sample URL gets that answer in a second, not after a browser
145
+ // and two dev servers have started for nothing.
146
+ const explicitRoutes = Boolean(opts.routes?.length);
147
+ const routes = explicitRoutes ? opts.routes : detection.routes.map(r => r.path);
148
+ const skippedDynamic = explicitRoutes ? [] : detection.skippedDynamic;
149
+ const omitted = !explicitRoutes && detection.omitted.length
150
+ ? { routes: detection.omitted.map(r => r.path), cap: settings.maxRoutes }
151
+ : undefined;
152
+ if (!explicitRoutes) {
153
+ log(`Routes (${detection.framework}, ${detection.durationMs}ms): ${routes.length ? routes.join(', ') : 'none detected'}`);
154
+ for (const r of detection.routes)
155
+ log(` ${r.path.padEnd(28)} ${r.confidence.padEnd(6)} ${r.reason}`);
156
+ if (omitted)
157
+ log(` ${capNotice(omitted.routes, omitted.cap)}`);
158
+ if (!routes.length) {
159
+ log(skippedDynamic.length
160
+ ? `Nothing to capture until ${skippedDynamic.join(', ')} ${skippedDynamic.length === 1 ? 'has' : 'have'} a sample URL.`
161
+ : 'Nothing this branch changed renders on a page; nothing to capture.');
162
+ }
163
+ }
164
+ // --- Start the slow, independent things now; they overlap resolution -------
165
+ // Only after the --require-pr answer and only with a page to capture: a
166
+ // fresh runner would otherwise download and launch Chromium for nothing.
167
+ const browserReady = routes.length ? timings.time('browser', ensureBrowser(), { background: true }) : Promise.resolve();
168
+ /**
169
+ * Everything this run started, in a form every early exit can call.
170
+ *
171
+ * The browser is launched from here rather than at the capture, so any throw
172
+ * before that block owns closing it: the CLI's `process.exit` hides the
173
+ * difference, but a caller using `runPr()` as a library catches the error and
174
+ * is left with a Chromium nothing references. Awaiting the launch first is
175
+ * what makes it work — `closeBrowser()` drops a pending launch and closes
176
+ * nothing, and the launch then resolves into an orphan.
177
+ */
178
+ const stopEverything = async () => {
179
+ // Independent, so side by side: the browser and the servers each take
180
+ // their own time to go, and neither needs the other gone first.
181
+ await Promise.all([
182
+ browserReady.catch(() => undefined).then(() => closeBrowser()),
183
+ cleanupComparison(),
184
+ ]);
185
+ };
186
+ const pr = await timings.time('github', prLookup);
187
+ // Whatever refused the lookup refuses every later read too: resolution would
188
+ // only spend time asking GitHub for deployments it cannot see.
189
+ if (lookupFailed)
190
+ gh = null;
97
191
  // Before the local baseline, which can install and build a whole app, and
98
192
  // long before the captures. An answer that is not about access — a 500, a
99
193
  // dropped connection — is not evidence of anything, so it says so and the run
100
194
  // continues to fail wherever it really fails.
101
195
  const write = await writeAccess;
102
196
  if (write && !write.access.writable) {
103
- if (write.access.reason === 'rejected') {
104
- await stopEverything();
105
- throw new NeedsHumanError(cannotPublishHint(ownerRepo, write.source));
106
- }
107
- log(`Could not check whether the token can publish (${write.access.detail}); continuing.`);
197
+ if (write.access.reason === 'rejected')
198
+ notPublished.write = cannotPublishHint(ownerRepo, write.source);
199
+ else
200
+ log(`Could not check whether the token can publish (${write.access.detail}); continuing.`);
201
+ }
202
+ // The write probe knows which credential was refused, so its sentence is the
203
+ // most precise; a failed lookup is next; a missing token is the fallback.
204
+ const skipReason = notPublished.write ?? notPublished.lookup ?? notPublished.noToken;
205
+ if (skipReason) {
206
+ writeGh = null;
207
+ log('GitHub will not accept this run\'s screenshots; capturing anyway, nothing will be published.');
108
208
  }
209
+ const now = new Date();
210
+ const id = runId(now);
211
+ /** Assemble the result from whatever was captured, write it to the PR, and time it. */
212
+ const finish = async (captured) => {
213
+ const result = {
214
+ repo: ownerRepo,
215
+ prNumber: pr?.number,
216
+ ...captured,
217
+ skippedDynamic,
218
+ omitted,
219
+ durationMs: Date.now() - started,
220
+ markdown: '',
221
+ timings: timings.toJSON(),
222
+ delivery: opts.dryRun ? { status: 'dry-run' } : skipReason ? { status: 'skipped', hint: skipReason } : { status: 'published' },
223
+ };
224
+ result.markdown = buildComment(result, { version: opts.version, headSha: head, now, filesDir: result.outputDir });
225
+ if (writeGh && (opts.comment ?? true))
226
+ await timings.time('describe', async () => {
227
+ if (pr) {
228
+ // The description is what a reviewer reads first, so put the images there
229
+ // and fall back to a comment only when the PR cannot be edited.
230
+ const described = await upsertPrDescription(writeGh, ownerRepo, pr.number, result.markdown, 'pre-post');
231
+ if (described.updated) {
232
+ result.commentUrl = described.html_url;
233
+ result.commentKind = 'description';
234
+ log(`Updated PR description: ${described.html_url}`);
235
+ }
236
+ else {
237
+ const comment = await upsertStickyComment(writeGh, ownerRepo, pr.number, result.markdown, STICKY_MARKER);
238
+ result.commentUrl = comment.html_url;
239
+ result.commentKind = 'comment';
240
+ log(`Cannot edit the PR description; ${comment.created ? 'posted' : 'updated'} a comment instead: ${comment.html_url}`);
241
+ }
242
+ }
243
+ else {
244
+ log(`No open PR for branch "${branch}". Open one and re-run, or paste the markdown below.`);
245
+ }
246
+ });
247
+ // Measured again after the description update, so the summary's total and
248
+ // the Timings line below describe the same span. The markdown above keeps
249
+ // the earlier figure: it had to be written before this step could run.
250
+ result.durationMs = Date.now() - started;
251
+ result.timings = timings.toJSON();
252
+ const [first, ...rest] = timings.summary(result.durationMs);
253
+ log(`Timings: ${first}`);
254
+ for (const line of rest)
255
+ log(line);
256
+ return result;
257
+ };
258
+ if (!routes.length)
259
+ return finish({ outcomes: [], beforeBase: '', afterBase: '', outputDir: '' });
109
260
  // --- What are we comparing? ---------------------------------------------------
110
261
  const headers = headersFor(config, opts);
111
262
  // Resolution can throw (no baseline, an install that failed): the browser was
112
263
  // launched before this and nothing else would close it, so its teardown has
113
264
  // to cover the throw as well as the happy path.
114
- const comparison = await resolveComparison({
265
+ const comparison = await timings.time('resolve', resolveComparison({
115
266
  gh, ownerRepo, pr, repoRoot: root, appPrefix, config,
116
267
  // Detection already established this; the baseline must be built from the
117
268
  // same commit, or Pre and the route list disagree about what changed.
@@ -123,8 +274,8 @@ export async function runPr(opts = {}) {
123
274
  headSha: head ?? undefined,
124
275
  before: opts.before, after: explicitAfter,
125
276
  devServer, probe: url => probeUrl(url, headers),
126
- allowLocalBaseline: opts.localBaseline, log,
127
- }).catch(async (err) => { await stopEverything(); throw err; });
277
+ allowLocalBaseline: opts.localBaseline, localOnly: opts.local, log, timings,
278
+ }), { contains: ['pre', 'post'] }).catch(async (err) => { await stopEverything(); throw err; });
128
279
  cleanupComparison = comparison.stop;
129
280
  for (const line of describeComparison(comparison))
130
281
  log(line);
@@ -134,24 +285,6 @@ export async function runPr(opts = {}) {
134
285
  updateConfig(root, { before });
135
286
  log('Saved production URL to .pre-post.json');
136
287
  }
137
- // --- Routes (sync: git + import graph) ----------------------------------------
138
- const samples = config.samples || {};
139
- let routes;
140
- let skippedDynamic = [];
141
- if (opts.routes?.length) {
142
- routes = opts.routes;
143
- }
144
- else {
145
- routes = detection.routes.map(r => r.path);
146
- skippedDynamic = detection.skippedDynamic;
147
- log(`Routes (${detection.framework}, ${detection.durationMs}ms): ${routes.length ? routes.join(', ') : 'none detected'}`);
148
- for (const r of detection.routes)
149
- log(` ${r.path.padEnd(28)} ${r.confidence.padEnd(6)} ${r.reason}`);
150
- if (routes.length === 0) {
151
- routes = ['/'];
152
- log('No routes detected from the diff; capturing / only.');
153
- }
154
- }
155
288
  // --- Reachability ---------------------------------------------------------------
156
289
  // Resolution already probed whatever it chose; this catches a side that died
157
290
  // in between, and names which one so the message is actionable.
@@ -173,10 +306,9 @@ export async function runPr(opts = {}) {
173
306
  await fail(authHint({ url: after, vercel: afterProbe.vercel }));
174
307
  const auth = resolveAuth({ configHeaders: config.headers, headers: opts.headers, cookies: opts.cookies, cookieUrl: before, urls: [before, after] });
175
308
  // --- Capture -------------------------------------------------------------------
176
- const now = new Date();
177
- const id = runId(now);
178
309
  const outputDir = opts.output || path.join(os.tmpdir(), 'pre-post', ownerRepo.replace('/', '__'), id);
179
310
  const viewports = settings.viewports.map(parseViewport);
311
+ const samples = config.samples || {};
180
312
  const tasks = [];
181
313
  for (const route of routes) {
182
314
  const resolved = resolveSample(route, samples);
@@ -187,25 +319,37 @@ export async function runPr(opts = {}) {
187
319
  log(`Capturing ${tasks.length * 2} screenshots (${routes.length} route(s) × ${viewports.length} viewport(s)) ...`);
188
320
  await browserReady;
189
321
  let run;
322
+ let sheetPath;
190
323
  try {
191
- run = await runTasks(tasks, {
324
+ run = await timings.time('capture', runTasks(tasks, {
192
325
  outputDir, ...settings, wait: opts.wait, auth, log,
193
326
  // So the verdict can name how Pre was chosen, not just where it points.
194
327
  sides: { before: comparison.before, after: comparison.after },
195
- });
328
+ }));
329
+ // Drawn while the browser is still open. A convenience, so a failure to
330
+ // draw it is logged and never costs the run its result.
331
+ if (!run.verdict) {
332
+ sheetPath = await timings.time('sheet', buildSheet(run.outcomes, outputDir))
333
+ .then(p => p ?? undefined)
334
+ .catch(err => { log(`Could not draw the summary sheet (${err instanceof Error ? err.message : err}).`); return undefined; });
335
+ }
196
336
  }
197
337
  finally {
198
- await stopEverything();
338
+ // Timed on its own: stopping the servers and the browser is real wall
339
+ // clock that used to show up under no step at all.
340
+ await timings.time('cleanup', stopEverything());
199
341
  }
200
- const { outcomes } = run;
201
- // The pipeline judges whether it compared the two sites or something standing
202
- // in front of them — a sign-in wall, or a baseline that is a different site
203
- // altogether. Either way there is no honest result to publish, so stop with
204
- // the one thing a human has to do.
205
- if (run.verdict)
206
- throw new NeedsHumanError(run.verdict.hint);
342
+ const { outcomes, verdict } = run;
343
+ // A wall or a wrong baseline means there is no honest result to publish, so
344
+ // stop with the one thing a human has to do. A broken page is not thrown: it
345
+ // is a finding about the code, and the PR says so in one sentence with no
346
+ // images — no picture of an error page is ever published.
347
+ throwIfBlocked(verdict);
207
348
  // --- Publish -------------------------------------------------------------------
208
- const changed = outcomes.filter(o => (o.status === 'changed' || o.status === 'added' || o.status === 'removed') && o.files);
349
+ // A change shown on several routes is published once, for the route that
350
+ // leads its group in the PR; the rest would be images nothing links to.
351
+ const leads = new Set(groupChanges(outcomes).map(g => g.lead));
352
+ const changed = isBrokenVerdict(verdict) ? [] : outcomes.filter(o => (leads.has(o) || o.status === 'added' || o.status === 'removed') && o.files);
209
353
  if (writeGh && changed.length) {
210
354
  const folder = pr ? `pr-${pr.number}/${id}` : `branch/${routeSlug(branch || 'detached')}/${id}`;
211
355
  const keyFor = (o, kind) => `${folder}/${routeSlug(o.route)}-${o.viewport}-${artifactSuffix(kind)}.png`;
@@ -218,7 +362,7 @@ export async function runPr(opts = {}) {
218
362
  }
219
363
  }
220
364
  log(`Publishing ${files.length} image(s) to ${ownerRepo}@${settings.assetsBranch} ...`);
221
- const published = await publishAssets(writeGh, ownerRepo, settings.assetsBranch, files, pr ? `Screenshots for #${pr.number} (${id})` : `Screenshots for ${branch || 'detached'} (${id})`);
365
+ const published = await timings.time('publish', () => publishAssets(writeGh, ownerRepo, settings.assetsBranch, files, pr ? `Screenshots for #${pr.number} (${id})` : `Screenshots for ${branch || 'detached'} (${id})`));
222
366
  for (const o of changed) {
223
367
  const urls = {};
224
368
  for (const kind of PUBLISHED_KINDS)
@@ -227,39 +371,10 @@ export async function runPr(opts = {}) {
227
371
  o.urls = urls;
228
372
  }
229
373
  }
230
- const result = {
231
- repo: ownerRepo,
232
- prNumber: pr?.number,
233
- beforeBase: before,
234
- afterBase: after,
235
- outcomes,
236
- skippedDynamic,
237
- durationMs: Date.now() - started,
238
- markdown: '',
239
- outputDir,
240
- };
241
- result.markdown = buildComment(result, { version: opts.version, headSha: head, now });
242
- if (writeGh && (opts.comment ?? true)) {
243
- if (pr) {
244
- // The description is what a reviewer reads first, so put the images there
245
- // and fall back to a comment only when the PR cannot be edited.
246
- const described = await upsertPrDescription(writeGh, ownerRepo, pr.number, result.markdown, 'pre-post');
247
- if (described.updated) {
248
- result.commentUrl = described.html_url;
249
- result.commentKind = 'description';
250
- log(`Updated PR description: ${described.html_url}`);
251
- }
252
- else {
253
- const comment = await upsertStickyComment(writeGh, ownerRepo, pr.number, result.markdown, STICKY_MARKER);
254
- result.commentUrl = comment.html_url;
255
- result.commentKind = 'comment';
256
- log(`Cannot edit the PR description; ${comment.created ? 'posted' : 'updated'} a comment instead: ${comment.html_url}`);
257
- }
258
- }
259
- else {
260
- log(`No open PR for branch "${branch}". Open one and re-run, or paste the markdown below.`);
261
- }
262
- }
263
- return result;
374
+ return finish({
375
+ outcomes, beforeBase: before, afterBase: after,
376
+ beforeLabel: comparison.before.label, afterLabel: comparison.after.label,
377
+ outputDir, sheetPath, verdict: verdict ?? undefined,
378
+ });
264
379
  }
265
380
  //# sourceMappingURL=pr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pr.js","sourceRoot":"","sources":["../../src/commands/pr.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAgB,cAAc,EAAe,cAAc,EAAyC,MAAM,aAAa,CAAC;AAC/H,OAAO,EAAE,UAAU,EAAE,eAAe,EAAY,YAAY,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,EAAa,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC3L,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAe,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,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CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,oBAAoB,EAAE,CAAC,MAAM,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,mBAAmB,MAAM,IAAI,UAAU,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;QACzN,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,MAAM,IAAI,GAAyB,EAAE,CAAC;YACtC,KAAK,MAAM,IAAI,IAAI,eAAe;gBAAE,IAAI,CAAC,CAAC,KAAM,CAAC,IAAI,CAAC;oBAAE,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;YACzG,CAAC,CAAC,IAAI,GAAG,IAAmB,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;QACZ,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK;QAC9C,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK;QACxE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,IAAI,SAAS;KACpD,CAAC,CAAC;AACL,CAAC"}
@@ -15,6 +15,7 @@ import { GitHub, PullRequestRef } from './github.js';
15
15
  import { serveBaseCommit, serveWorkingTree } from './baseline.js';
16
16
  import { NeedsHumanError, ProbeResult } from './doctor.js';
17
17
  import { PrePostConfig } from './types.js';
18
+ import { Stopwatch } from './timings.js';
18
19
  export type StrategyName = 'explicit' | 'deployed' | 'local';
19
20
  export interface Side {
20
21
  url: string;
@@ -22,6 +23,11 @@ export interface Side {
22
23
  detail: string;
23
24
  /** The probe resolution already took, so callers need not repeat it. */
24
25
  probe?: ProbeResult;
26
+ /**
27
+ * What a reviewer should call this side, when the URL would not tell them:
28
+ * "base `38d9f0b`" rather than the throwaway port it was served on.
29
+ */
30
+ label?: string;
25
31
  }
26
32
  export interface Comparison {
27
33
  strategy: StrategyName;
@@ -61,11 +67,19 @@ export interface ResolveContext {
61
67
  headSha?: string;
62
68
  /** Skip building the base commit locally. */
63
69
  allowLocalBaseline?: boolean;
70
+ /**
71
+ * Build both sides on this machine and never look for deployments. For CI,
72
+ * where a preview is often behind a login the job cannot pass, and where the
73
+ * runner can build the app anyway.
74
+ */
75
+ localOnly?: boolean;
64
76
  /** Injectable for tests; defaults to a real git worktree + dev server. */
65
77
  serveBaseline?: typeof serveBaseCommit;
66
78
  /** Injectable for tests; defaults to booting this checkout's dev server. */
67
79
  servePost?: typeof serveWorkingTree;
68
80
  log: (msg: string) => void;
81
+ /** Where the local servers record how long each of their steps took. */
82
+ timings?: Stopwatch;
69
83
  }
70
84
  /**
71
85
  * Resolve both sides together, cheapest strategy first.
@@ -1 +1 @@
1
- {"version":3,"file":"comparison.d.ts","sourceRoot":"","sources":["../src/comparison.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAiB,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;AAE7D,MAAM,WAAW,IAAI;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,IAAI,CAAC;IACb,KAAK,EAAE,IA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