Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
feat(view): a held item reads held, with its reason, in every list [N26]
Corey Olson7302df41c1f2
diff --git a/src/cockpit.js b/src/cockpit.jsindex d55b111f..139709ba 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -817,9 +817,9 @@ function milestoneItem(entry, p) {root,titles: new Map((root === view.root ? p.items : root ? named[0].items : []).map((i) => [String(i.id), i.title])),state: read ? stateOf(read) : null,- stale: item ? staleChip(item) : '',+ stale: item ? staleChip(item) : '', held: item ? heldNote(item, source, entry) : null,block: item ? roadmapBlock(detail?.item || item, {- holds: root === view.root ? source.holds : source.laneHolds, items: source.items, agents: source.agents, state: stateOf,+ holds: root === view.root ? source.holds : source.laneHolds, itemHolds: source.itemHolds, items: source.items, agents: source.agents, state: stateOf,address: (id) => itemAddress(id, root), board: root === view.root ? null : root,releases: (p.milestones || []).filter((milestone) => milestone.items.some((ref) => ref.id === entry.id)).map((milestone) => milestone.name),error: expanded ? detail?.error : undefined,@@ -882,18 +882,18 @@ function jumpToRoadmap(key) {* id and title on one line that ends in an ellipsis when cut, and the Items tab's chip. The whole* title is the row's tooltip. Every row expands in place; its compact detail alone links over to Items.*/-function milestoneRow(row, titles) {+function milestoneRow(row, titles, hidden = false) {const title = row.title ? inline(String(row.title).replace(/\\s+/g, ' '), row.titles || titles, 'in-place', row.root) : '<span class="muted">' + esc(row.why) + '</span>';const label = '<span class="id">' + esc(row.label) + '</span>' + title;const text = row.block?.dot ? '<span class="milestone-title">' + label + '</span>' + row.block.dot : label;const key = 'i:' + row.label, open = view.roadmapOpen.get(JSON.stringify([view.root, key])) === true;- const status = (open && row.block?.dot ? '<span class="chip warn roadmap-blocked"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6"><rect x="5" y="10" width="14" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg>blocked</span>' : '') + (row.stage === 'merged' ? '<span class="chip ok roadmap-landed">verified</span>' : row.stage === 'accepted' ? '<span class="chip ok">accepted</span>' : row.state ? chip(row.state) : '<span class="chip">' + esc(row.word) + '</span>');+ const status = (open && row.block?.dot ? '<span class="chip warn roadmap-blocked"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6"><rect x="5" y="10" width="14" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg>blocked</span>' : '') + (row.stage === 'merged' ? '<span class="chip ok roadmap-landed">verified</span>' : row.stage === 'accepted' ? '<span class="chip ok">accepted</span>' : row.held ? heldChip(row.held) : row.state ? chip(row.state) : '<span class="chip">' + esc(row.word) + '</span>');const inner = '<span class="dot' + (row.state ? ' ' + row.state : '') + '"></span><span class="t">' + text + '</span>' + (row.stale || '') + '<span class="roadmap-status">' + status + '</span>';const board = row.open && row.open.root !== view.root ? ' data-board="' + esc(row.open.root) + '"' : '';const toggle = 'class="milestone-item' + (row.block?.dot ? ' blocked' : '') + '" data-roadmap-key="' + esc(key) + '" aria-expanded="' + open + '"' + board + ' title="' + esc(row.title ? row.title + (!row.open && row.why ? ' (' + row.why + ')' : '') : row.why) + '"';const detail = row.block ? row.block.detail : '<p>' + esc(row.why || row.word) + '</p>';// Every row stays on the Roadmap; only its explicit Open in Items link navigates (#605).- return '<li><div ' + toggle + ' role="button" tabindex="0">' + inner + '</div>'+ return '<li' + (hidden ? ' hidden' : '') + '><div ' + toggle + ' role="button" tabindex="0">' + inner + '</div>'+ '<div class="milestone-why"' + (open ? '' : ' hidden') + (row.pending ? ' aria-busy="true"' : '') + '>' + detail + '</div></li>';}@@ -940,7 +940,7 @@ function roadmapCards(p, titles) {const isOpen = (key, first) => view.roadmapOpen.has(JSON.stringify([view.root, key])) ? view.roadmapOpen.get(JSON.stringify([view.root, key])) : first;const caret = '<svg class="caret" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"/></svg>'; // The view's stroke chevron, set inside the title to centre on its first line (#870).const next = coming.find((m) => m.rows.length) || null;- const headerFor = roadmapHeaders(roadmapSummary, { time: when, address: itemAddress, root: view.root });+ const headerFor = roadmapHeaders(roadmapSummary, { time: when, address: itemAddress, root: view.root, held: view.roadmapHeld });const stages = [['open', 'Open'], ['claimed', 'Building'], ['submitted', 'In review'], ['accepted', 'Accepted'], ['merged', 'Landed']];const counts = headerFor(next) ? null : Object.fromEntries(stages.map(([stage]) => [stage, next ? next.rows.filter((row) => row.stage === stage).length : 0]));const shippingCounts = headerFor(next)@@ -959,7 +959,7 @@ function roadmapCards(p, titles) {const body = (read) => {const { milestone, rows, done, total } = read;const progress = headerFor(read) ? '' : '<svg class="milestone-progress" viewBox="0 0 100 1" preserveAspectRatio="none" role="progressbar" aria-label="' + esc(milestone.name) + ': ' + done + ' of ' + total + ' landed" aria-valuemin="0" aria-valuemax="' + total + '" aria-valuenow="' + done + '"><rect width="' + (total ? (100 * done) / total : 0) + '" height="1"/></svg>';- return (rows.length ? progress + '<ul>' + rows.map((row) => milestoneRow(row, titles)).join('') + '</ul>' : '<p class="milestone-empty">No items yet.</p>')+ return (rows.length ? progress + '<ul>' + rows.map((row) => milestoneRow(row, titles, view.roadmapHeld === milestone.name && !row.held)).join('') + '</ul>' : '<p class="milestone-empty">No items yet.</p>')+ (milestone.note ? '<p class="milestone-note">' + rich(milestone.note, titles) + '</p>' : '');};/** Keep folding consistent with the View's other keyboard-accessible disclosure controls. */@@ -1227,7 +1227,7 @@ function render() {// While another project loads, the item picked there waits for its own board.if (data.root === view.root && !view.adding && !(view.tab === 'items' && view.addressDetail !== null && view.addressDetail !== 'pipeline') && !p.items.some((i) => i.id === view.item)) view.item = shown.length ? shown[0].id : null;// An open item's chip, the same in its row and its detail: gated, its lane held, or unclaimed.- const openChip = (i) => i.blockedBy.length || heldLanes.has(i.lane) ? '<span class="chip gate">' + (i.blockedBy.length ? 'gated' : 'lane held') + '</span>' : chip('open');+ const openChip = (i) => (p.itemHolds || []).some((h) => h.item === i.id) ? heldChip(heldNote(i, p)) : i.blockedBy.length || heldLanes.has(i.lane) ? '<span class="chip gate">' + (i.blockedBy.length ? 'gated' : 'lane held') + '</span>' : chip('open');$('chain').innerHTML = shown.length ? shown.map((i) => {const s = stateOf(i);// What an open item waits on, if anything: items not yet verified, or a hold on its lane.diff --git a/src/serve.js b/src/serve.jsindex 8977099d..0c5b87de 100644--- a/src/serve.js+++ b/src/serve.js@@ -361,6 +361,8 @@ export function projectState(root, { seen = null, board: providedBoard = null, ievents: log,agents: store.listAgents(board).map((agent) => ({ ...agent, model: agent.agent_model ?? 'unknown', displayName: displayAgentName(agent, config.agents.names), lastMoveAt: lastMove.get(agent.agent_id) ?? null })),holds: store.laneHolds(board),+ // Each item held on its own, with its reason, so every list can say why it is not moving (#1256).+ itemHolds: all.filter((item) => item.item_hold_reason).map((item) => ({ item: item.item_id, reason: item.item_hold_reason, by: item.item_hold_by, at: item.item_hold_at })),spec: rows(config.spec),practice: doctrine.rows.map(({ id, status: state, tier, text, gate, serves, section, origin, version, reason }) => ({id, status: state, tier, text, gate, serves, section, origin, version, reason,diff --git a/src/view/held-items.js b/src/view/held-items.jsnew file mode 100644index 00000000..a0723eb1--- /dev/null+++ b/src/view/held-items.js@@ -0,0 +1,31 @@+/**+ * Why an item is held, by the rule the Roadmap header counts it held: work not landed, accepted, in review or under a+ * live claim, whose own hold or whose lane's hold stops it. The item's own reason comes first. Null when it is not held,+ * so a list never says held where the header would not count it (#1256).+ *+ * @param {object} item - An item summary from the board state.+ * @param {{itemHolds?: object[], holds?: object[], laneHolds?: object[]}} source - The board the item belongs to.+ * @param {{state?: string}} [entry] - The item's roadmap entry, when it has one.+ * @returns {string|null}+ */+export function heldNote(item, source, entry) {+ if (!item || entry && ['landed', 'accepted'].includes(entry.state)) return null;+ const live = item.status === 'claimed' && Date.parse(item.claim?.until) > Date.now();+ if (!(item.status === 'open' || item.status === 'claimed' && !live)) return null;+ // Another board's summary may name its holds differently, or count them, so only a list is read.+ const own = (Array.isArray(source?.itemHolds) ? source.itemHolds : []).find(hold => hold.item === item.id);+ if (own) return 'held: ' + own.reason;+ const lane = ([source?.holds, source?.laneHolds].find(Array.isArray) || []).find(hold => hold.hold_lane === item.lane);+ return lane ? 'lane ' + item.lane + ' held: ' + lane.hold_reason : null;+}++/**+ * The held chip a list row shows, its reason on hover. A tap opens the row, whose detail says the same reason.+ *+ * @param {string} note - What heldNote returned.+ * @returns {string}+ */+export function heldChip(note) {+ const escape = text => String(text ?? '').replace(/[&<>"']/g, c => ({'&':'&','<':'<','>':'>','"':'"',"'":'''})[c]);+ return '<span class="chip gate held" title="' + escape(note) + '">held</span>';+}diff --git a/src/view/page-script-2.js b/src/view/page-script-2.jsindex 807d37d6..bcd71fff 100644--- a/src/view/page-script-2.js+++ b/src/view/page-script-2.js@@ -1,3 +1,7 @@+import {+ heldChip,+ heldNote,+} from './held-items.js';/*** Part 2 of the hosted page's script, verbatim from src/cockpit.js lines 332-1298 (#745): its* text is what the page served before the split, with the values its ${} expressions read passed in as scope.@@ -319,6 +323,8 @@ const chip = (s) => '<span class="chip ' + STATES[s][1] + '">' + STATES[s][0] +const staleChip = (${staleChip.toString()});// A roadmap item's blocker dot and unfolded reason from src/view/roadmap-block.js (#605), read from the summaries held.const roadmapBlock = (${roadmapBlock.toString()});+// Whether a list row reads held, and its chip, by the Roadmap header's rule, from src/view/held-items.js (#1256).+const heldNote = (${heldNote.toString()}), heldChip = (${heldChip.toString()});const openPageDialog = (${openPageDialog.toString()}), closePageDialog = (${closePageDialog.toString()});/** Parse the bounded reference syntax before requesting additional committed line windows. */function codeReferenceParts(ref) {diff --git a/src/view/page-script-4.js b/src/view/page-script-4.jsindex c49ccae5..6352a889 100644--- a/src/view/page-script-4.js+++ b/src/view/page-script-4.js@@ -794,7 +794,7 @@ document.addEventListener('click', (event) => {// The open-board screens name their state in data-state and handle their own presses (#764).if (event.target.closest('#local-note')) return;if (view.filterOpen && !event.target.closest('.filter-control')) { view.filterOpen = false; render(); }- const t = event.target.closest('[data-filter-toggle],[data-filter-choice],[data-status],[data-roadmap-jump],[data-shout-id],[data-roadmap-key],[data-roadmap-all],[data-root],[data-tab],[data-go],[data-item],[data-items-view],[data-state],[data-rows],[data-row],[data-row-decision],[data-sentinel-decision],[data-section-approve],[data-release],[data-shout],[data-new],[data-code],[data-code-all],[data-code-less],[data-stats-toggle],#proj-switch,#console');+ const t = event.target.closest('[data-filter-toggle],[data-filter-choice],[data-status],[data-roadmap-jump],[data-shout-id],[data-roadmap-key],[data-roadmap-all],[data-roadmap-held],[data-root],[data-tab],[data-go],[data-item],[data-items-view],[data-state],[data-rows],[data-row],[data-row-decision],[data-sentinel-decision],[data-section-approve],[data-release],[data-shout],[data-new],[data-code],[data-code-all],[data-code-less],[data-stats-toggle],#proj-switch,#console');if (!event.target.closest('.side')) fold(false);if (!t) return;if (t.id === 'proj-switch') { fold(!$('side').classList.contains('open')); return; }@@ -836,6 +836,7 @@ document.addEventListener('click', (event) => {return;}if ('roadmapAll' in t.dataset) { view.roadmapOnly = null; render(); return; }+ if ('roadmapHeld' in t.dataset) { view.roadmapHeld = view.roadmapHeld === t.dataset.roadmapHeld ? null : t.dataset.roadmapHeld; render(); return; }if (t.dataset.root) switchTo(t.dataset.root, t.dataset.go || '');else if (t.dataset.tab) { view.unread = null; view.roadmapOnly = null; openTab(t.dataset.tab); render(); }else if (t.dataset.go) go(t.dataset.go, t.dataset.board);diff --git a/src/view/roadmap-block.js b/src/view/roadmap-block.jsindex 3be7c237..20f8d096 100644--- a/src/view/roadmap-block.js+++ b/src/view/roadmap-block.js@@ -9,8 +9,10 @@ export function roadmapBlock(item, context = {}) {const time = context.time || (iso => { const moment = new Date(iso), clock = moment.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' }); return moment.toDateString() === new Date().toDateString() ? clock : moment.toLocaleDateString([], { month: 'short', day: 'numeric' }) + ' ' + clock; });const waits = (item.blockedBy || []).map(id => items.find(other => other.id === id) || {id,status:'unavailable'});const hold = (context.holds || []).find(h => h.hold_lane === item.lane);- const blocked = item.status === 'open' && Boolean(waits.length || hold);- const label = blocked ? 'Blocked: ' + [waits.length ? 'waits on ' + waits.map(w => '#' + w.id + ' (' + w.status + ')').join(', ') : '',hold ? 'lane ' + item.lane + ' held' : ''].filter(Boolean).join('; ') : '';+ // The item's own hold, held apart from its lane's (#1256).+ const own = (Array.isArray(context.itemHolds) ? context.itemHolds : []).find(h => h.item === item.id);+ const blocked = item.status === 'open' && Boolean(waits.length || hold || own);+ const label = blocked ? 'Blocked: ' + [waits.length ? 'waits on ' + waits.map(w => '#' + w.id + ' (' + w.status + ')').join(', ') : '',own ? 'held: ' + own.reason : '',hold ? 'lane ' + item.lane + ' held' : ''].filter(Boolean).join('; ') : '';const paths = {Criterion:'<circle cx="12" cy="12" r="8"/><circle cx="12" cy="12" r="4"/><path d="M12 9v6m-3-3h6"/>',Agents:'<circle cx="9" cy="7" r="3"/><path d="M3 21v-3a6 6 0 0 1 12 0v3m1-17a3 3 0 0 1 0 6m2 4a5 5 0 0 1 3 4v3"/>',@@ -45,6 +47,7 @@ export function roadmapBlock(item, context = {}) {const holder = ['claimed','submitted'].includes(other.status) ? other.claim?.by || (other.status==='claimed'?other.owner:other.reviewer) : null;return ref(other)+(holder?' <b>'+escape(name(holder))+'</b>':'')+(other.since?' <span class="muted">since '+escape(time(other.since))+'</span>':'');});+ if (own) waiting.push('<span class="chip warn">held</span> '+escape(own.reason));if (hold) waiting.push('<span class="chip warn">lane held</span> '+escape(item.lane)+(hold.hold_reason?': '+escape(hold.hold_reason):''));const downstream = items.filter(other => other.status === 'open' && (other.blockedBy || []).includes(item.id));const reject = (item.verdicts || []).findLast(v => v.decision === 'REJECT') || (item.verdict?.decision === 'REJECT' ? item.verdict : null);diff --git a/src/view/roadmap-summary.js b/src/view/roadmap-summary.jsindex c975dd7d..dd883bb9 100644--- a/src/view/roadmap-summary.js+++ b/src/view/roadmap-summary.js@@ -16,7 +16,9 @@ export function roadmapSummary(milestone, context = {}) {const segments = states.map(([key]) => { const x = offset; offset += summary[key]; return '<rect class="roadmap-summary-segment ' + key + '" data-summary-segment="' + key + '" data-count="' + summary[key] + '" x="' + x + '" width="' + summary[key] + '" height="1"/>'; }).join('');// Geometry uses the supplied counts as SVG units; inline CSS is disallowed by the view's policy.const bar = '<svg class="milestone-progress roadmap-summary-bar" viewBox="0 0 ' + (summary.total || 1) + ' 1" preserveAspectRatio="none" role="img" aria-label="' + escape(milestone.name+': '+description) + '" data-total="' + summary.total + '">' + segments + '</svg>';- const legend = '<div class="roadmap-summary-legend">'+states.map(([key,label]) => '<span data-summary-state="'+key+'"><i class="roadmap-summary-swatch '+key+'" aria-hidden="true"></i><b>'+escape(summary[key])+'</b> '+label+'</span>').join('')+'</div>';+ // The held count opens the held items alone, and a second press shows every item again (#1256).+ const heldLink = key => key === 'held' && summary.held > 0;+ const legend = '<div class="roadmap-summary-legend">'+states.map(([key,label]) => (heldLink(key) ? '<button type="button" class="link roadmap-held-link" data-roadmap-held="'+escape(milestone.name)+'" aria-pressed="'+(context.held === milestone.name)+'" data-summary-state="'+key+'">' : '<span data-summary-state="'+key+'">')+'<i class="roadmap-summary-swatch '+key+'" aria-hidden="true"></i><b>'+escape(summary[key])+'</b> '+label+(heldLink(key) ? '</button>' : '</span>')).join('')+'</div>';const target = milestone.target ? '<span class="roadmap-target">Target <time datetime="'+escape(milestone.target)+'">'+escape(context.time ? context.time(milestone.target) : milestone.target)+'</time>'+(milestone.pastTarget?' <span class="chip warn">past target</span>':'')+'</span>' : '';const estimate = summary.estimate, pace = summary.pace;// The time line reads the summary's estimate, window and reason as given (#853): today's pace for the 6 h@@ -41,14 +43,14 @@ export function roadmapSummary(milestone, context = {}) {* the page embeds this source, so it keeps src/cockpit.js inside its line cap; the page hands in what it reads by.** @param {(milestone: object, context: object) => object|null} summarize - roadmapSummary.- * @param {{time: (iso: string) => string, address: (id: number, root: string) => string, root: string}} page+ * @param {{time: (iso: string) => string, address: (id: number, root: string) => string, root: string, held?: string|null}} page* @returns {(read: {milestone: object, rows: object[]}|null) => object|null}*/export function roadmapHeaders(summarize, page) {const made = new Map();return (read) => {if (!read) return null;- if (!made.has(read)) made.set(read, summarize(read.milestone, { time: page.time, lookup: (id) => {+ if (!made.has(read)) made.set(read, summarize(read.milestone, { time: page.time, held: page.held, lookup: (id) => {const label = typeof id === 'number' ? '#' + id : String(id), row = read.rows.find((row) => row.label === label);return row ? { label, title: row.title, id: row.open?.id, address: row.open ? page.address(row.open.id, row.open.root) : null, board: row.open?.root !== page.root ? row.open?.root : null } : null;} }));diff --git a/test/cockpit/roadmap-held.test.js b/test/cockpit/roadmap-held.test.jsnew file mode 100644index 00000000..8e070d52--- /dev/null+++ b/test/cockpit/roadmap-held.test.js@@ -0,0 +1,83 @@+/** @pullboard-test-gui */+/** A held item reads held, with its reason, in the Roadmap and Items lists, matching the header's count [N26]. */+import assert from 'node:assert/strict';+import { mkdtempSync, rmSync } from 'node:fs';+import { tmpdir } from 'node:os';+import { join } from 'node:path';+import { test } from 'node:test';+import { SPEC, machine, project, startView, chromeExecutable, openSnapshotChrome, closeSnapshotChrome, press } from './fixture.js';++test('a held item shows held with its reason in the roadmap list, matching the header count [N26]', { timeout: 90_000 }, async () => {+ const executable = chromeExecutable();+ assert.ok(executable, 'Chrome is required for the held roadmap rows.');+ const box = machine();+ // Two lanes, so one item can be held on its own and another through its lane.+ const alpha = project(box, 'held-rows', SPEC, { lanes: { web: { owns: ['web/'], specs: ['G'] }, docs: { owns: ['docs/'], specs: ['G'] } } });+ box.run(alpha.repo, 'add', 'web', 'Held on its own', '--specs', 'G1', '--criterion', 'renders');+ box.run(alpha.repo, 'add', 'web', 'Free to take', '--specs', 'G1', '--criterion', 'renders');+ box.run(alpha.repo, 'add', 'docs', 'Held with its lane', '--specs', 'G1', '--criterion', 'renders');+ box.run(alpha.repo, 'hold', '1', 'waits on the vendor reply');+ box.run(alpha.repo, 'hold', 'docs', '--reason', 'docs frozen for the release');+ box.run(alpha.repo, 'milestone', 'add', 'Next', '--items', '1,2,3');+ const view = await startView(box);+ const profile = mkdtempSync(join(tmpdir(), 'pullboard-held-rows-chrome-'));+ let chrome;+ /** What a person sees of each Roadmap row and the header's held count. */+ const read = async () => JSON.parse(await chrome.stable(`JSON.stringify((() => {+ const next = document.querySelector('#roadmap-list > [data-key="m:Next"]');+ const rows = [...next.querySelectorAll(':scope > .milestone-body > ul > li')].filter((li) => !li.hidden).map((li) => {+ const chip = li.querySelector('.roadmap-status .chip');+ return { id: li.querySelector('.id').textContent, chip: chip.textContent.trim(), why: chip.getAttribute('title') || '' };+ });+ const count = next.querySelector('[data-summary-state=held]');+ return { rows, held: Number(count.querySelector('b').textContent), link: Boolean(count.closest('button, a')) };+ })())`));+ try {+ chrome = await openSnapshotChrome(executable, view.link.href, profile);+ await chrome.waitFor('data?.project?.milestones?.length === 1');+ await press(chrome, "document.querySelector('[data-tab=roadmap]')");+ await chrome.waitFor("!document.querySelector('[data-pane=roadmap]').hidden && document.querySelector('#roadmap-list > [data-key=\"m:Next\"] .milestone-item')");+ for (const width of [375, 1280]) {+ await chrome.send('Emulation.setDeviceMetricsOverride', { width, height: 900, deviceScaleFactor: 1, mobile: false });+ await chrome.waitFor(`innerWidth === ${width}`);+ const seen = await read();+ const byId = Object.fromEntries(seen.rows.map((row) => [row.id, row]));+ assert.equal(byId['#1'].chip, 'held', `${width}: an item held on its own reads held, not unclaimed`);+ assert.match(byId['#1'].why, /waits on the vendor reply/u, `${width}: hovering the held chip names the item's hold reason`);+ assert.equal(byId['#3'].chip, 'held', `${width}: an item in a held lane reads held`);+ assert.match(byId['#3'].why, /docs frozen for the release/u, `${width}: hovering names the lane's hold reason`);+ assert.equal(byId['#2'].chip, 'unclaimed', `${width}: an item nobody held stays unclaimed`);+ assert.equal(seen.rows.filter((row) => row.chip === 'held').length, seen.held, `${width}: the list's held rows match the header's held count`);+ assert.equal(seen.held, 2, `${width}: the header counts both holds`);+ assert.ok(seen.link, `${width}: the header's held count is a link`);+ // The count opens the held items alone, and shows them all again on a second press.+ await press(chrome, "document.querySelector('#roadmap-list > [data-key=\"m:Next\"] [data-summary-state=held]').closest('button, a')");+ await chrome.waitFor("[...document.querySelectorAll('#roadmap-list > [data-key=\"m:Next\"] > .milestone-body > ul > li')].filter((li) => !li.hidden).length === 2");+ assert.deepEqual((await read()).rows.map((row) => row.id), ['#1', '#3'], `${width}: the held count lists exactly the held items`);+ await press(chrome, "document.querySelector('#roadmap-list > [data-key=\"m:Next\"] [data-summary-state=held]').closest('button, a')");+ await chrome.waitFor("[...document.querySelectorAll('#roadmap-list > [data-key=\"m:Next\"] > .milestone-body > ul > li')].filter((li) => !li.hidden).length === 3");+ // A tap opens the row in place, and its detail says why it is held.+ const row = "document.querySelector('#roadmap-list [data-roadmap-key=\"i:#1\"]')";+ await press(chrome, row);+ await chrome.waitFor(row + ".getAttribute('aria-expanded') === 'true'");+ assert.match(await chrome.stable(row + ".parentElement.querySelector('.milestone-why').textContent"), /held[^]*waits on the vendor reply/u, `${width}: tapping the row shows the hold reason`);+ await press(chrome, row);+ await chrome.waitFor(row + ".getAttribute('aria-expanded') === 'false'");+ }+ // The Items list says the same of the same item.+ await press(chrome, "document.querySelector('[data-tab=items]')");+ await chrome.waitFor("document.querySelector('#chain [data-item=\"1\"]')");+ const items = JSON.parse(await chrome.stable(`JSON.stringify([1, 2].map((id) => {+ const chip = [...document.querySelectorAll('#chain [data-item="' + id + '"] .chip')].at(-1);+ return { chip: chip.textContent.trim(), why: chip.getAttribute('title') || '' };+ }))`));+ assert.equal(items[0].chip, 'held', 'the Items row of a held item reads held');+ assert.match(items[0].why, /waits on the vendor reply/u, 'the Items row names the hold reason on hover');+ assert.equal(items[1].chip, 'unclaimed', 'the Items row of a free item stays unclaimed');+ assert.deepEqual(chrome.exceptions, [], 'the held rows raise no uncaught page exception');+ } finally {+ if (chrome) await closeSnapshotChrome(chrome);+ rmSync(profile, { recursive: true, force: true });+ await view.stop();+ }+});