claude-dev-env 8.122.0 → 8.124.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 (43) hide show
  1. package/bin/ever-registered-hooks.mjs +2 -0
  2. package/bin/ever-registered-hooks.test.mjs +5 -0
  3. package/docs/templates/artifact-page/README.md +14 -1
  4. package/docs/templates/artifact-page/review-rounds.md +1 -1
  5. package/docs/templates/artifact-page/template.html +26 -18
  6. package/docs/templates/html-plan/README.md +4 -0
  7. package/hooks/blocking/artifact_current_page_fixtures/piled_review_page.html +399 -0
  8. package/hooks/blocking/artifact_current_page_fixtures/rebuilt_review_page.html +403 -0
  9. package/hooks/blocking/artifact_current_page_gate.py +418 -0
  10. package/hooks/blocking/artifact_repeated_item_render.cjs +112 -0
  11. package/hooks/blocking/closing_question_round_gate.py +387 -0
  12. package/hooks/blocking/closing_question_round_lines.py +109 -0
  13. package/hooks/blocking/closing_question_round_open_items.py +348 -0
  14. package/hooks/blocking/closing_question_round_transcript.py +344 -0
  15. package/hooks/blocking/open_tasks_stop_gate.py +12 -1
  16. package/hooks/blocking/open_tasks_transcript.py +30 -0
  17. package/hooks/blocking/open_tasks_transcript_records.py +57 -1
  18. package/hooks/blocking/test_artifact_current_page_gate.py +415 -0
  19. package/hooks/blocking/test_closing_question_round_gate.py +983 -0
  20. package/hooks/blocking/test_closing_question_round_gate_declaration.py +307 -0
  21. package/hooks/blocking/test_closing_question_round_gate_work.py +349 -0
  22. package/hooks/blocking/test_closing_question_round_lines.py +70 -0
  23. package/hooks/blocking/test_closing_question_round_open_items.py +238 -0
  24. package/hooks/blocking/test_closing_question_round_transcript.py +236 -0
  25. package/hooks/blocking/test_open_tasks_stop_gate.py +64 -0
  26. package/hooks/blocking/test_open_tasks_transcript.py +34 -0
  27. package/hooks/blocking/test_open_tasks_transcript_records.py +34 -0
  28. package/hooks/features/conduct-gates.md +6 -0
  29. package/hooks/hooks.json +15 -0
  30. package/hooks/hooks_constants/artifact_current_page_gate_constants.py +91 -0
  31. package/hooks/hooks_constants/artifact_dark_mode_gate_constants.py +3 -3
  32. package/hooks/hooks_constants/closing_question_round_gate_constants.py +167 -0
  33. package/hooks/hooks_constants/open_tasks_stop_gate_constants.py +8 -0
  34. package/hooks/hooks_constants/test_artifact_current_page_gate_constants.py +53 -0
  35. package/hooks/hooks_constants/test_artifact_dark_mode_gate_constants.py +6 -0
  36. package/hooks/hooks_constants/test_closing_question_round_gate_constants.py +92 -0
  37. package/hooks/session/artifact_link_record.py +109 -0
  38. package/hooks/session/test_artifact_link_record.py +101 -0
  39. package/hooks/test_context_budget_hooks.py +2 -0
  40. package/package.json +1 -1
  41. package/scripts/policy_lint/adapter_configuration.py +6 -0
  42. package/scripts/policy_lint/config/constants.py +1 -0
  43. package/scripts/tests/test_adapter_configuration.py +8 -0
@@ -9,6 +9,7 @@ export const EVER_REGISTERED_HOOK_RELATIVE_PATHS = new Set([
9
9
  'advisory/refactor-guard.py',
10
10
  'advisory/refactor_guard.py',
11
11
  'blocking/agent-execution-intent-gate.py',
12
+ 'blocking/artifact_current_page_gate.py',
12
13
  'blocking/artifact_dark_mode_gate.py',
13
14
  'blocking/auto_mode_refusal_stop_gate.py',
14
15
  'blocking/artifact_look_gate.py',
@@ -147,6 +148,7 @@ export const EVER_REGISTERED_HOOK_RELATIVE_PATHS = new Set([
147
148
  'routing/subagent_model_routing.mjs',
148
149
  'routing/thread_spawn_pace_hook.py',
149
150
  'session/advisor_rules_prompt.py',
151
+ 'session/artifact_link_record.py',
150
152
  'session/artifact_template_pointer.py',
151
153
  'session/background_silence_prompt.py',
152
154
  'session/bulk-edit-reminder.py',
@@ -24,6 +24,11 @@ test('EVER_REGISTERED_HOOK_RELATIVE_PATHS keeps the question brief gate', () =>
24
24
  assert.ok(EVER_REGISTERED_HOOK_RELATIVE_PATHS.has('blocking/question_brief_gate.py'));
25
25
  });
26
26
 
27
+ test('EVER_REGISTERED_HOOK_RELATIVE_PATHS keeps the artifact current page gate and its link record', () => {
28
+ assert.ok(EVER_REGISTERED_HOOK_RELATIVE_PATHS.has('blocking/artifact_current_page_gate.py'));
29
+ assert.ok(EVER_REGISTERED_HOOK_RELATIVE_PATHS.has('session/artifact_link_record.py'));
30
+ });
31
+
27
32
  test('EVER_REGISTERED_HOOK_RELATIVE_PATHS keeps the retired merge-over-review card gate', () => {
28
33
  assert.equal(
29
34
  EVER_REGISTERED_HOOK_RELATIVE_PATHS.has('blocking/merge_over_review_offer_gate.py'),
@@ -24,6 +24,7 @@ Render the page and look at the screenshot before you publish. Headless Chromium
24
24
  |---|---|
25
25
  | One file | The page, its styles, its script and its data live in one HTML file. It opens with no build step and no companion files. |
26
26
  | Data block | The sample data sits in `<script type="application/json" id="tracker-data">`. Swap that block for new data. Escape every `</` inside it as `<\/`. |
27
+ | One entry per item | `items` is an object keyed by item id, so each item has one entry. When two entries share a key, the page keeps the last one and drops the first with no error, so update an item's one entry in place. Each card carries its key as `data-item`. An item's status, warnings and links all sit on its one entry. |
27
28
  | Board first | A board of colored lanes shows where every item stands. Each lane chip jumps to its card. |
28
29
  | Picture cards | Each item is a card with a status band, a four-step progress track, a next-step line, a folded summary, links and a copy button. |
29
30
  | Filters | Two tabs, a project filter row and a search box narrow the list. The tab and the filter persist per viewer through `localStorage`, wrapped in `try`. |
@@ -49,4 +50,16 @@ Ask an agent: "convert <artifact link> to our format."
49
50
  2. Map each part to its piece in `template.html`: status groups to board lanes, records to picture cards, filters to tabs and chips, and the data to the JSON data block.
50
51
  3. Apply the house rules above and the template's color tokens.
51
52
  4. Check that text is 16px or larger, text contrast is 7:1 or better, and the page has no horizontal scroll at 390px, in light and dark.
52
- 5. Publish to the same link as a new version, so the reviewer keeps one URL.
53
+ 5. Publish as [Republish a page](#republish-a-page) says.
54
+
55
+ ## Republish a page
56
+
57
+ A page a person reads more than once shows one current state at one link. This holds for every page built from any template here, and for a page built by hand.
58
+
59
+ - **Rebuild on each publish.** Make the page again from the current state on each publish. A new result takes the place of the entry it updates. A section added for one round of feedback, such as a second list of the same screens under a warnings heading, leaves the reader with two entries and no way to tell which is current.
60
+ - **Each item once.** One entry per item, with its status and every warning that names it on that entry. To show several draws of one screen, give each draw its own image and its own entry. Show a baseline once, at the head of the row of its variants. Give a thumbnail's full view a closed `<details>` or `<dialog>`, or zoom the one image with CSS.
61
+ - **Replaced content leaves the page.** Remove a count, a note or a section that a newer result replaced. The page holds no history of what it said before.
62
+ - **State what it shows and when.** A line at the top names the run or source the page shows and the time it was updated.
63
+ - **One link.** Pass the page's link as `url` on every publish after the first. Write the link into the page as `<meta name="artifact-link" content="<link>">`, so it travels with a copy of the file. `session/artifact_link_record.py` also writes it to `<page file>.artifact-link.json` beside the page after each publish.
64
+
65
+ `blocking/artifact_current_page_gate.py` renders each page publish and refuses one that draws an image twice, draws two elements with one `data-item` key, or passes no `url` for a page with a recorded link. The refusal names the item or the link. An image up to 64 pixels on a side is an icon and may repeat. The gate cannot see a repeated item that has no image and no `data-item` key, so give each card of a hand-built page a `data-item` key.
@@ -1,6 +1,6 @@
1
1
  # Marking what changed between review rounds
2
2
 
3
- A page that a reviewer reads more than once shows what changed since their last look. The template marks only the parts that changed: each one gets a thin bar on its left edge and a small "Changed" label at its start. The card around them stays as it is, and its board chip gets a dot in the same color. There is no diff and no list of changes.
3
+ A page that a reviewer reads more than once shows what changed since their last look. The template marks only the parts that changed: each one gets a thin bar on its left edge and a small "Changed" label at its start. The card around them stays as it is, and its board chip gets a dot in the same color. There is no diff and no list of changes. A mark shows where the page changed; the page itself still holds only the current state, with each item once, as [Republish a page](README.md#republish-a-page) says.
4
4
 
5
5
  ## Data
6
6
 
@@ -149,8 +149,8 @@ details.what[open] summary::before { content: "▾" }
149
149
  "icon": "✨"
150
150
  }
151
151
  ],
152
- "items": [
153
- {
152
+ "items": {
153
+ "pick-a-release-date": {
154
154
  "title": "Pick a release date",
155
155
  "owner": "web",
156
156
  "status": "open",
@@ -158,7 +158,9 @@ details.what[open] summary::before { content: "▾" }
158
158
  "card": true,
159
159
  "next": "choose between the two dates in the linked plan.",
160
160
  "changed_round": 3,
161
- "changed_parts": ["next"],
161
+ "changed_parts": [
162
+ "next"
163
+ ],
162
164
  "summary": [
163
165
  "One release date everyone plans around",
164
166
  "The launch checklist dated backward from it",
@@ -173,14 +175,16 @@ details.what[open] summary::before { content: "▾" }
173
175
  ],
174
176
  "starter": "Pick a release date. Read the release plan, list both dates with what each one moves, and ask for the choice."
175
177
  },
176
- {
178
+ "flaky-login-test": {
177
179
  "title": "Flaky login test",
178
180
  "owner": "web",
179
181
  "status": "blocked",
180
182
  "card": true,
181
183
  "next": "wait for the staging database to come back online.",
182
184
  "changed_round": 2,
183
- "changed_parts": ["next"],
185
+ "changed_parts": [
186
+ "next"
187
+ ],
184
188
  "summary": [
185
189
  "The login test passes ten runs in a row",
186
190
  "The root cause written in the pull request"
@@ -194,14 +198,16 @@ details.what[open] summary::before { content: "▾" }
194
198
  ],
195
199
  "starter": "Fix the flaky login test. Reproduce it, find the cause, and open a draft pull request with the proof."
196
200
  },
197
- {
201
+ "faster-search-page": {
198
202
  "title": "Faster search page",
199
203
  "owner": "platform",
200
204
  "status": "doing",
201
205
  "card": true,
202
206
  "next": "finish the index change and rerun the timing check.",
203
207
  "changed_round": 3,
204
- "changed_parts": ["summary"],
208
+ "changed_parts": [
209
+ "summary"
210
+ ],
205
211
  "summary": [
206
212
  "Search answers in under one second",
207
213
  "A timing check that guards it",
@@ -216,7 +222,7 @@ details.what[open] summary::before { content: "▾" }
216
222
  ],
217
223
  "starter": "Make the search page faster. Measure first, change the index, and prove the new time."
218
224
  },
219
- {
225
+ "setup-guide-refresh": {
220
226
  "title": "Setup guide refresh",
221
227
  "owner": "docs",
222
228
  "status": "open",
@@ -229,7 +235,7 @@ details.what[open] summary::before { content: "▾" }
229
235
  "added": "2026-01-15T16:45:00Z",
230
236
  "starter": "Refresh the setup guide. Run each step on a clean machine and fix every step that fails."
231
237
  },
232
- {
238
+ "status-page": {
233
239
  "title": "Status page",
234
240
  "owner": "new-project",
235
241
  "status": "open",
@@ -250,7 +256,7 @@ details.what[open] summary::before { content: "▾" }
250
256
  ],
251
257
  "starter": "Set up the Status Page project from its brief, then build the first health check."
252
258
  },
253
- {
259
+ "dark-mode-colors": {
254
260
  "title": "Dark mode colors",
255
261
  "owner": "web",
256
262
  "status": "done",
@@ -269,7 +275,7 @@ details.what[open] summary::before { content: "▾" }
269
275
  }
270
276
  ]
271
277
  },
272
- {
278
+ "changelog-automation": {
273
279
  "title": "Changelog automation",
274
280
  "owner": "platform",
275
281
  "status": "done",
@@ -288,7 +294,7 @@ details.what[open] summary::before { content: "▾" }
288
294
  }
289
295
  ]
290
296
  }
291
- ]
297
+ }
292
298
  }
293
299
  </script>
294
300
  <script>
@@ -306,6 +312,7 @@ const state = { tab: "open", owner: "all", query: "" };
306
312
  try { const saved = JSON.parse(localStorage.getItem("work-tracker-view") || "{}"); if (saved.tab) state.tab = saved.tab; if (saved.owner) state.owner = saved.owner; } catch (e) {}
307
313
  const REVIEW_ROUND = Number(TRACKER.round) || 0;
308
314
  const CHANGE_BASELINE = changeBaseline();
315
+ const ITEMS = Object.entries(TRACKER.items).map(([key, it]) => ({ key, ...it }));
309
316
  const ownerByKey = Object.fromEntries(TRACKER.owners.map(o => [o.key, o]));
310
317
  const isDone = it => it.status === "done";
311
318
  function stageOf(it) {
@@ -315,7 +322,7 @@ function stageOf(it) {
315
322
  if (it.status === "doing") return "doing";
316
323
  return "ready";
317
324
  }
318
- const slug = it => "item-" + it.title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
325
+ const slug = it => "item-" + it.key;
319
326
  const fmt = iso => { if (!iso) return ""; try { return new Date(iso).toLocaleString(undefined, { month: "long", day: "numeric", hour: "numeric", minute: "2-digit" }); } catch (e) { return iso; } };
320
327
  const el = (tag, cls, text) => { const n = document.createElement(tag); if (cls) n.className = cls; if (text != null) n.textContent = text; return n; };
321
328
  function changeBaseline() {
@@ -387,7 +394,7 @@ function renderBoard(items) {
387
394
  }
388
395
  function renderFilters() {
389
396
  const f = document.getElementById("filters"); f.textContent = "";
390
- const pool = TRACKER.items.filter(i => (state.tab === "done") === isDone(i));
397
+ const pool = ITEMS.filter(i => (state.tab === "done") === isDone(i));
391
398
  const opts = [{ key: "all", name: "All projects" }].concat(TRACKER.owners.filter(o => pool.some(i => i.owner === o.key)));
392
399
  if (!opts.some(o => o.key === state.owner)) state.owner = "all";
393
400
  for (const o of opts) {
@@ -437,6 +444,7 @@ function itemCard(it) {
437
444
  const key = stageOf(it), s = STAGE_BY_KEY[key], owner = ownerByKey[it.owner] || { name: it.owner };
438
445
  const card = el("article", "card " + key);
439
446
  card.id = slug(it);
447
+ card.dataset.item = it.key;
440
448
  const band = el("div", "band " + key);
441
449
  band.append(el("span", null, s.icon), el("span", null, s.label));
442
450
  const proj = el("span", "proj");
@@ -482,16 +490,16 @@ function itemCard(it) {
482
490
  }
483
491
  function render() {
484
492
  document.querySelectorAll(".tab").forEach(t => t.setAttribute("aria-pressed", String(t.dataset.tab === state.tab)));
485
- const open = TRACKER.items.filter(i => !isDone(i));
493
+ const open = ITEMS.filter(i => !isDone(i));
486
494
  document.getElementById("stamp").textContent = "Updated " + fmt(TRACKER.updated);
487
495
  document.getElementById("n-open").textContent = open.length;
488
- document.getElementById("n-done").textContent = TRACKER.items.length - open.length;
496
+ document.getElementById("n-done").textContent = ITEMS.length - open.length;
489
497
  renderFilters();
490
- const items = TRACKER.items.filter(inView);
498
+ const items = ITEMS.filter(inView);
491
499
  renderBoard(items);
492
500
  const list = document.getElementById("list"); list.textContent = "";
493
501
  if (!items.length) {
494
- list.append(el("div", "empty", TRACKER.items.length ? (state.tab === "done" ? "No finished items match." : "No open items match.") : "Nothing tracked yet. Add an item to the data block and it shows up here."));
502
+ list.append(el("div", "empty", ITEMS.length ? (state.tab === "done" ? "No finished items match." : "No open items match.") : "Nothing tracked yet. Add an item to the data block and it shows up here."));
495
503
  return;
496
504
  }
497
505
  const order = state.tab === "done" ? ["done"] : ["you", "blocked", "doing", "ready"];
@@ -31,6 +31,10 @@ Codex reads the same `SKILL.md` from the clone in step 2.
31
31
 
32
32
  Paste it into a `<style>` block after the plugin stylesheet, or link it beside the page.
33
33
 
34
+ ## Republish a page
35
+
36
+ A page a person reads more than once follows [Republish a page](../artifact-page/README.md#republish-a-page): rebuild it from the current state, show each item once, and publish to the same link. The publish gate refuses a repeated image or a second link.
37
+
34
38
  ## Check before publishing
35
39
 
36
40
  Render the page at 390px in light and dark. Every text node is 16px or larger and holds 7:1 contrast against its painted background. The page has no console errors and no horizontal scroll.
@@ -0,0 +1,399 @@
1
+ <title>Sample Theme</title>
2
+ <style>
3
+ :root {
4
+ --bg: #f3f6f2; --surface: #ffffff; --fg: #17241b; --muted: #4c5c51; --line: #d5dfd6;
5
+ --done: #14603a; --done-soft: #dff2e6; --wait: #6f4100; --wait-soft: #fbf0dc;
6
+ --yours: #1f3f9c; --yours-soft: #e4ebfb;
7
+ --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
8
+ }
9
+ @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
10
+ --bg: #101612; --surface: #18211b; --fg: #e5ece6; --muted: #a9b8ad; --line: #2a372e;
11
+ --done: #74d6a2; --done-soft: #16301f; --wait: #f0b860; --wait-soft: #33280f;
12
+ --yours: #a9bfff; --yours-soft: #1c2742; color-scheme: dark } }
13
+ :root[data-theme="dark"] {
14
+ --bg: #101612; --surface: #18211b; --fg: #e5ece6; --muted: #a9b8ad; --line: #2a372e;
15
+ --done: #74d6a2; --done-soft: #16301f; --wait: #f0b860; --wait-soft: #33280f;
16
+ --yours: #a9bfff; --yours-soft: #1c2742; color-scheme: dark }
17
+ * { box-sizing: border-box }
18
+ body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 17px; line-height: 1.45;
19
+ padding-block: 24px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }
20
+ .wrap { max-width: 980px; margin: 0 auto; display: grid; gap: 20px }
21
+ h1 { font-size: 28px; font-weight: 800; margin: 0; text-wrap: balance }
22
+ h2 { font-size: 21px; font-weight: 800; margin: 0; text-wrap: balance }
23
+ p { margin: 0 }
24
+ .stamp { font-size: 16px; font-weight: 700; color: var(--muted) }
25
+ .steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0 }
26
+ .steps li { font-size: 16px; font-weight: 700; padding: 6px 12px; border-radius: 999px }
27
+ .steps .done { background: var(--done-soft); color: var(--done) }
28
+ .steps .wait { background: var(--wait-soft); color: var(--wait) }
29
+ .steps .yours { background: var(--yours-soft); color: var(--yours) }
30
+ .group { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 12px; min-width: 0 }
31
+ .group.pending { border-color: var(--wait) }
32
+ .note { font-size: 16px; font-weight: 700; color: var(--muted) }
33
+ .group.pending .note { color: var(--wait) }
34
+ .screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px }
35
+ figure { margin: 0; display: grid; gap: 6px }
36
+ figure img { width: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; border: 2px solid var(--line); background: var(--line) }
37
+ figcaption { font-size: 16px; font-weight: 700; display: grid; gap: 4px }
38
+ .shot { position: relative }
39
+ .shot img { display: block }
40
+ .flag { position: absolute; top: 8px; left: 8px; background: var(--wait-soft); color: var(--wait); border: 2px solid var(--wait);
41
+ border-radius: 999px; padding: 2px 10px; font-size: 16px; font-weight: 800 }
42
+ figure.warned img { border-color: var(--wait) }
43
+ .why { font-size: 16px; font-weight: 700; color: var(--wait) }
44
+ .group.warning { border-color: var(--wait) }
45
+ .group.warning h2::before { content: "Warning: "; color: var(--wait) }
46
+ .quote { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; color: var(--muted);
47
+ overflow-wrap: anywhere; background: var(--bg); border: 2px solid var(--line); border-radius: 8px; padding: 8px 10px }
48
+ .left { display: grid; gap: 8px }
49
+ .left ul { margin: 0; padding-left: 20px; display: grid; gap: 6px }
50
+ .foot { font-size: 16px; color: var(--muted) }
51
+ </style>
52
+
53
+ <div class="wrap">
54
+ <header class="left">
55
+ <h1>Sample Theme, first prototype run</h1>
56
+ <p class="stamp">Built on a scratch copy. 2026-01-15</p>
57
+ </header>
58
+
59
+ <ul class="steps" id="steps"></ul>
60
+
61
+ <div id="groups" class="wrap" style="gap:20px"></div>
62
+
63
+ <header class="left">
64
+ <h2>Warnings from the run</h2>
65
+ <p class="note">Each warning the run logged is below with the screen that shows the part. A screen with a warning carries a Warning mark everywhere on this page.</p>
66
+ </header>
67
+ <div id="warnings" class="wrap" style="gap:20px"></div>
68
+
69
+ <section class="group left">
70
+ <h2>Warnings with no screen</h2>
71
+ <ul id="unseen"></ul>
72
+ </section>
73
+
74
+ <section class="group left">
75
+ <h2>What is not finished</h2>
76
+ <ul id="open"></ul>
77
+ </section>
78
+
79
+ <p class="foot" id="foot"></p>
80
+ </div>
81
+
82
+ <script type="application/json" id="data">
83
+ {
84
+ "folder": "screens/sample-theme/",
85
+ "steps": [
86
+ [
87
+ "done",
88
+ "Step 1"
89
+ ],
90
+ [
91
+ "done",
92
+ "Step 2"
93
+ ],
94
+ [
95
+ "done",
96
+ "Step 3"
97
+ ],
98
+ [
99
+ "done",
100
+ "Step 4"
101
+ ],
102
+ [
103
+ "wait",
104
+ "Step 5"
105
+ ],
106
+ [
107
+ "wait",
108
+ "Step 6"
109
+ ],
110
+ [
111
+ "yours",
112
+ "Step 7"
113
+ ]
114
+ ],
115
+ "groups": [
116
+ {
117
+ "title": "Group 1",
118
+ "note": "Note for group 1.",
119
+ "screens": [
120
+ [
121
+ "screen-01",
122
+ "Screen 01"
123
+ ],
124
+ [
125
+ "screen-02",
126
+ "Screen 02"
127
+ ],
128
+ [
129
+ "screen-03",
130
+ "Screen 03"
131
+ ],
132
+ [
133
+ "screen-04",
134
+ "Screen 04"
135
+ ]
136
+ ]
137
+ },
138
+ {
139
+ "title": "Group 2",
140
+ "note": "Note for group 2.",
141
+ "screens": [
142
+ [
143
+ "screen-05",
144
+ "Screen 05"
145
+ ],
146
+ [
147
+ "screen-06",
148
+ "Screen 06"
149
+ ],
150
+ [
151
+ "screen-07",
152
+ "Screen 07"
153
+ ],
154
+ [
155
+ "screen-08",
156
+ "Screen 08"
157
+ ],
158
+ [
159
+ "screen-09",
160
+ "Screen 09"
161
+ ]
162
+ ]
163
+ },
164
+ {
165
+ "title": "Group 3",
166
+ "pending": true,
167
+ "note": "Note for group 3.",
168
+ "screens": [
169
+ [
170
+ "screen-10",
171
+ "Screen 10"
172
+ ],
173
+ [
174
+ "screen-11",
175
+ "Screen 11"
176
+ ],
177
+ [
178
+ "screen-12",
179
+ "Screen 12"
180
+ ],
181
+ [
182
+ "screen-13",
183
+ "Screen 13"
184
+ ]
185
+ ]
186
+ },
187
+ {
188
+ "title": "Group 4",
189
+ "pending": true,
190
+ "note": "Note for group 4.",
191
+ "screens": [
192
+ [
193
+ "screen-14",
194
+ "Screen 14"
195
+ ],
196
+ [
197
+ "screen-15",
198
+ "Screen 15"
199
+ ],
200
+ [
201
+ "screen-16",
202
+ "Screen 16"
203
+ ]
204
+ ]
205
+ }
206
+ ],
207
+ "warnings": [
208
+ {
209
+ "title": "Warning 1",
210
+ "short": "Warning 1",
211
+ "plain": "What warning 1 means.",
212
+ "quote": "log line 1",
213
+ "screens": [
214
+ [
215
+ "screen-17",
216
+ "Screen 17"
217
+ ]
218
+ ]
219
+ },
220
+ {
221
+ "title": "Warning 2",
222
+ "short": "Warning 2",
223
+ "plain": "What warning 2 means.",
224
+ "quote": "log line 2",
225
+ "screens": [
226
+ [
227
+ "screen-06",
228
+ "Screen 06"
229
+ ],
230
+ [
231
+ "screen-18",
232
+ "Screen 18"
233
+ ]
234
+ ]
235
+ },
236
+ {
237
+ "title": "Warning 3",
238
+ "short": "Warning 3",
239
+ "plain": "What warning 3 means.",
240
+ "quote": "log line 3",
241
+ "screens": [
242
+ [
243
+ "screen-01",
244
+ "Screen 01"
245
+ ]
246
+ ]
247
+ },
248
+ {
249
+ "title": "Warning 4",
250
+ "short": "Warning 4",
251
+ "plain": "What warning 4 means.",
252
+ "quote": "log line 4",
253
+ "screens": [
254
+ [
255
+ "screen-02",
256
+ "Screen 02"
257
+ ],
258
+ [
259
+ "screen-05",
260
+ "Screen 05"
261
+ ],
262
+ [
263
+ "screen-19",
264
+ "Screen 19"
265
+ ],
266
+ [
267
+ "screen-12",
268
+ "Screen 12"
269
+ ],
270
+ [
271
+ "screen-13",
272
+ "Screen 13"
273
+ ]
274
+ ]
275
+ },
276
+ {
277
+ "title": "Warning 5",
278
+ "short": "Warning 5",
279
+ "plain": "What warning 5 means.",
280
+ "quote": "log line 5",
281
+ "screens": [
282
+ [
283
+ "screen-03",
284
+ "Screen 03"
285
+ ],
286
+ [
287
+ "screen-04",
288
+ "Screen 04"
289
+ ]
290
+ ]
291
+ },
292
+ {
293
+ "title": "Warning 6",
294
+ "short": "Warning 6",
295
+ "plain": "What warning 6 means.",
296
+ "quote": "log line 6",
297
+ "screens": [
298
+ [
299
+ "screen-20",
300
+ "Screen 20"
301
+ ]
302
+ ]
303
+ },
304
+ {
305
+ "title": "Warning 7",
306
+ "short": "Warning 7",
307
+ "plain": "What warning 7 means.",
308
+ "quote": "log line 7",
309
+ "screens": [
310
+ [
311
+ "screen-11",
312
+ "Screen 11"
313
+ ]
314
+ ]
315
+ },
316
+ {
317
+ "title": "Warning 8",
318
+ "short": "Warning 8",
319
+ "plain": "What warning 8 means.",
320
+ "quote": "log line 8",
321
+ "screens": [
322
+ [
323
+ "screen-14",
324
+ "Screen 14"
325
+ ]
326
+ ]
327
+ },
328
+ {
329
+ "title": "Warning 9",
330
+ "short": "Warning 9",
331
+ "plain": "What warning 9 means.",
332
+ "quote": "log line 9",
333
+ "screens": [
334
+ [
335
+ "screen-10",
336
+ "Screen 10"
337
+ ],
338
+ [
339
+ "screen-12",
340
+ "Screen 12"
341
+ ],
342
+ [
343
+ "screen-13",
344
+ "Screen 13"
345
+ ]
346
+ ]
347
+ }
348
+ ],
349
+ "unseen": [
350
+ "Warning with no screen 1.",
351
+ "Warning with no screen 2.",
352
+ "Warning with no screen 3.",
353
+ "Warning with no screen 4."
354
+ ],
355
+ "open": [
356
+ "Open point 1.",
357
+ "Open point 2.",
358
+ "Open point 3.",
359
+ "Open point 4.",
360
+ "Open point 5.",
361
+ "Open point 6."
362
+ ],
363
+ "foot": "Every screen is a capture from sample run 3."
364
+ }
365
+ </script>
366
+ <script>
367
+ const data = JSON.parse(document.getElementById("data").textContent);
368
+ document.getElementById("steps").innerHTML = data.steps.map(([state, label]) => `<li class="${state}">${label}</li>`).join("");
369
+ const warningsByScreen = {};
370
+ data.warnings.forEach(warning => warning.screens.forEach(([file]) => {
371
+ (warningsByScreen[file] = warningsByScreen[file] || []).push(warning.short);
372
+ }));
373
+ const screenFigure = ([file, label]) => {
374
+ const reasons = warningsByScreen[file] || [];
375
+ return `
376
+ <figure class="${reasons.length ? "warned" : ""}">
377
+ <div class="shot"><img src="${data.folder}${file}.png" alt="${label} screen" loading="lazy">${reasons.length ? `<span class="flag">Warning</span>` : ""}</div>
378
+ <figcaption>${label}${reasons.map(reason => `<span class="why">Warning: ${reason}</span>`).join("")}</figcaption>
379
+ </figure>`;
380
+ };
381
+ document.getElementById("groups").innerHTML = data.groups.map(group => `
382
+ <section class="group${group.pending ? " pending" : ""}">
383
+ <h2>${group.title}</h2>
384
+ ${group.note ? `<p class="note">${group.note}</p>` : ""}
385
+ <div class="screens">${group.screens.map(screenFigure).join("")}
386
+ </div>
387
+ </section>`).join("");
388
+ document.getElementById("warnings").innerHTML = data.warnings.map(warning => `
389
+ <section class="group warning">
390
+ <h2>${warning.title}</h2>
391
+ <p class="note">${warning.plain}</p>
392
+ <p class="quote">${warning.quote}</p>
393
+ <div class="screens">${warning.screens.map(screenFigure).join("")}
394
+ </div>
395
+ </section>`).join("");
396
+ document.getElementById("unseen").innerHTML = data.unseen.map(line => `<li>${line}</li>`).join("");
397
+ document.getElementById("open").innerHTML = data.open.map(line => `<li>${line}</li>`).join("");
398
+ document.getElementById("foot").textContent = data.foot;
399
+ </script>