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
chore(view): integrate the accepted roadmap details [N26]
Corey Olsonfc24eccc1946
diff --cc src/cockpit.jsindex 4bd8f831,094f987f..ffb3c2ad--- a/src/cockpit.js+++ b/src/cockpit.js@@@ -21,7 -21,7 +21,8 @@@ importhostedState,} from './view/hosted.js';import { staleChip } from './view/stale.js';+import { roadmapSummary } from './view/roadmap-summary.js';+ import { roadmapBlock } from './view/roadmap-block.js';import { applyStateDelta } from './api-http.js';/** The CLI's default phrases, ordered by depth for the existing prose inventory guard. */@@@ -2251,7 -2259,13 +2261,13 @@@ function milestoneItem(entry, p)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) : '',+ block: item ? roadmapBlock(detail?.item || item, {+ holds: root === view.root ? source.holds : source.laneHolds, items: source.items, name: (id) => agentName(id, source), time: when, 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),+ loading: detail?.loading, error: detail?.error,+ }) : null,- stage: item ? pipelineStage(item) : entry.status,+ stage: entry.state === 'landed' ? 'merged' : entry.state === 'accepted' ? 'accepted' : item ? pipelineStage(item) : entry.status,word: entry.status,open: item ? { root, id } : null,// Why an item does not open, short enough to read beside its id on a phone.@@@ -2299,20 -2313,24 +2315,24 @@@ function jumpToRoadmap(key)/*** One item's row on the Roadmap, laid out as the Items list lays one out: the dot of its state, its* 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. An item that opens is a button; one that cannot says why instead.+ * title is the row's tooltip. Every row expands in place; its compact detail alone links over to Items.*/function milestoneRow(row, titles) {- const title = row.title ? inline(String(row.title).replace(/\\s+/g, ' '), row.titles || titles, true, row.root) : '<span class="muted">' + esc(row.why) + '</span>';- const inner = '<span class="dot' + (row.state ? ' ' + row.state : '') + '"></span><span class="t"><span class="id">' + esc(row.label) + '</span>' + title + '</span>' + (row.stale || '') + (['merged', 'accepted'].includes(row.stage) ? '<span class="chip ok">' + (row.stage === 'merged' ? 'landed' : 'accepted') + '</span>' : row.state ? chip(row.state) : '<span class="chip">' + esc(row.word) + '</span>');- if (!row.open) return '<li><div class="milestone-item" title="' + esc(row.title ? row.title + ' (' + row.why + ')' : row.why) + '">' + inner + '</div></li>';- const attributes = 'class="milestone-item" data-go="item:' + row.open.id + '"' + (row.open.root === view.root ? '' : ' data-board="' + esc(row.open.root) + '"') + ' title="' + esc(row.title) + '"';- // A title with its own links needs a separate containing control, never a nested button.- return title.includes('class="ref"')- ? '<li><div ' + attributes + ' role="button" tabindex="0">' + inner + '</div></li>'- : '<li><button ' + attributes + ' type="button">' + inner + '</button></li>';+ 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>' : '') + (open && row.stage === 'merged' ? '<span class="chip ok roadmap-landed"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6"><path d="m5 12 4 4L19 6"/></svg>landed</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"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6"><path d="m5 12 4 4L19 6"/></svg>landed</span>' : row.stage === 'accepted' ? '<span class="chip ok">accepted</span>' : 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>'+ + '<div class="milestone-why"' + (open ? '' : ' hidden') + '>' + detail + '</div></li>';}-/** Read the work still to ship before verified items, excluding withdrawn work from every count. */+/** Read supplied landed counts and explicit shipments; keep old exports readable and omit withdrawn rows. */function readMilestone(milestone, p) {const visible = milestone.items.map((entry) => milestoneItem(entry, p)).filter((row) => row.state !== 'withdrawn');const verified = visible.filter((row) => row.state === 'verified');diff --cc src/view.cssindex 82228943,8f00a4d0..597caf08--- a/src/view.css+++ b/src/view.css@@@ -908,27 -915,28 +915,53 @@@ code.inline.long { white-space: break-s.star-dismiss:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }@media (pointer: coarse) { .star-dismiss { width: 44px; height: 44px; } }+.milestone-targetline { margin: 0 14px 10px; color: var(--ink-muted); font-size: 13px; }+.roadmap-shipped-commit { flex: none; color: var(--ink-muted); font: 11px var(--mono); }++/* Approved milestone summary: all quantities are supplied by the roadmap API [N26]. */+.roadmap-has-summary > .milestone-head { align-items: flex-start; }+.roadmap-has-summary > .milestone-head h2 { flex: 1; min-width: 0; font-size: 18px; line-height: 1.35; }+.roadmap-left { flex: none; display: grid; gap: 4px; margin-left: auto; text-align: right; white-space: nowrap; }+.roadmap-left > b { font-size: 22px; font-weight: 600; line-height: 1.1; }+.roadmap-left > span { color: var(--ink-muted); font: 12px var(--mono); }+.roadmap-summary { margin: 0 14px 14px; min-width: 0; }+.roadmap-summary-bar { display: block; height: 10px; margin: 10px 0; border-radius: 5px; }+.roadmap-summary-swatch { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }+.roadmap-summary .landed { background: var(--accent); fill: var(--accent); }+.roadmap-summary .landing { background: var(--accent-strong); fill: var(--accent-strong); }+.roadmap-summary .review { background: var(--violet); fill: var(--violet); }+.roadmap-summary .building { background: var(--blue); fill: var(--blue); }+.roadmap-summary .waiting { background: var(--ink-faint); fill: var(--ink-faint); }+.roadmap-summary .held { background: var(--warn); fill: var(--warn); }+.roadmap-summary-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-muted); font-size: 13px; }+.roadmap-summary-legend b { font-weight: 600; color: var(--ink); }+.roadmap-summary-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 13px; }+.roadmap-summary-needs { margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 13px; overflow-wrap: anywhere; }+.roadmap-summary-needs a { color: inherit; }+.shipped-one > .milestone-head h2 { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+++ /* Roadmap title references keep their colour and tooltip while the whole row expands in place. */+ .milestone-item span.ref { color: var(--accent-strong); display: inline-block; line-height: inherit; font: inherit; }++ /* The approved dense Roadmap detail uses the view's own light/dark tokens [N26]. */+ .milestone-item[role="button"] { cursor: pointer; }+ .milestone-item[role="button"]:hover { background: var(--surface-2); }+ .roadmap-status { display: inline-flex; align-items: center; gap: 6px; }+ .roadmap-blocked svg, .roadmap-landed svg, .roadmap-items svg { width: 12px; height: 12px; flex: none; }+ .roadmap-detail { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 5px 12px; margin: 10px 0 0; font-size: 12.5px; line-height: 1.55; }+ .roadmap-detail dt { display: flex; align-self: start; align-items: flex-start; gap: 6px; color: var(--ink-muted); white-space: nowrap; }+ .roadmap-detail dt svg { flex: none; width: 14px; height: 14px; margin-top: 3px; color: var(--ink-faint); }+ .roadmap-detail dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }+ .roadmap-detail b { font-weight: 600; }+ .roadmap-detail .roadmap-criterion { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+ .roadmap-ref { display: inline; padding: 1px 5px; border-radius: 4px; font-size: 11px; white-space: nowrap; }+ .roadmap-return { padding: 5px 7px; border-radius: 5px; background: var(--reject-soft); color: var(--reject); }+ .roadmap-event { display: inline; white-space: nowrap; }+ .roadmap-step { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--ink-faint); }+ .roadmap-step.busy { background: var(--blue); }+ .roadmap-step.warn { background: var(--warn); }+ .roadmap-step.ok { background: var(--accent); }+ .roadmap-step.no { background: var(--reject); }+ .roadmap-step.free { background: var(--violet); }+ .roadmap-arrow { color: var(--ink-faint); }+ .roadmap-items { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12.5px; }diff --cc test/cockpit/roadmap.test.jsindex a1a55ff1,6c57da4e..5cbdd8c5--- a/test/cockpit/roadmap.test.js+++ b/test/cockpit/roadmap.test.js@@@ -841,62 -869,123 +869,184 @@@ test('the roadmap panel counts the nex}});++test('the roadmap shows landed, accepted and past target [N26]', { timeout: 90_000 }, async () => {+ const executable = chromeExecutable(); assert.ok(executable, 'Chrome is required for the roadmap header check.');+ const box=machine(), alpha=project(box,'roadmap-truth',SPEC,{lanes:{web:{owns:['web/'],specs:['G']},ops:{owns:['ops/'],specs:['G']}}});+ const names=['Landed A','Accepted A','Waiting A','Shipped B','Landed C','Accepted C','In review C','Building C','Approve the release','Held C'];+ names.forEach((name,index)=>box.run(alpha.repo,'add',index===9?'ops':'web',name,'--specs','G1','--criterion','The page renders.'));+ /** Land through real Git and the ordinary board receipt; acceptance alone stays unlanded. */+ function land(id) {+ box.git(alpha.repo,'merge','--no-ff','--no-edit',alpha.itemBranches.get(`${alpha.baseBranch}:${id}`));+ box.run(alpha.repo,'merged',String(id),box.git(alpha.repo,'rev-parse','HEAD'));+ }+ for(const id of [1,2,4,5,6]) {build(box,alpha,id,`item-${id}.txt`);accept(box,alpha,id);if([1,4,5].includes(id))land(id);}+ build(box,alpha,7,'item-7.txt');box.run(alpha.web,'claim','8');box.run(alpha.repo,'hold','ops','--reason','Waiting for the person');+ box.run(alpha.repo,'shout','person','#9 Approve the release','--decision');+ box.run(alpha.repo,'milestone','add','Past target','--items','1,2,3');+ box.run(alpha.repo,'milestone','edit','Past target','--target',new Date(Date.now()-86_400_000).toISOString());+ box.run(alpha.repo,'milestone','add','Shipped release','--items','4');+ box.run(alpha.repo,'milestone','add','State summary','--items','5,6,7,8,9,10');+ box.run(alpha.repo,'milestone','ship','Shipped release','--next','State summary');+ box.run(alpha.repo,'milestone','add','Empty shipped');+ box.run(alpha.repo,'milestone','ship','Empty shipped','--next','State summary');+ const shipped=box.git(alpha.repo,'rev-parse','HEAD');+ const view=await startView(box),profile=mkdtempSync(join(tmpdir(),'pullboard-roadmap-truth-'));let chrome;+ const milestone=name=>`document.querySelector('[data-key="m:${name}"]')`;+ try {+ chrome=await openSnapshotChrome(executable,view.link.href,profile);await chrome.waitFor('data?.project?.milestones?.length===4');+ // Temporary #820 contract fixture for the permitted parallel build. Its shape is provisional until the backend lands; this is not real CLI summary proof.+ await chrome.stable(`(()=>{const m=data.project.milestones.find(m=>m.name==='State summary');m.summary={total:6,left:5,landed:1,landing:1,review:1,building:1,waiting:1,held:1,needsYou:[9],pace:{last6h:3,last2h:3},estimate:{low:3.5,high:10}};return true})()`);+ await press(chrome,"document.querySelector('[data-tab=roadmap]')");+ await chrome.waitFor(`${milestone('Past target')}?.querySelector('.milestone-head')`);+ const truth=await chrome.stable(`${milestone('Past target')}.textContent`);+ assert.match(truth,/1\/3 landed/u,'acceptance does not count as landed');assert.match(truth,/past target/u);+ const states=JSON.parse(await chrome.stable(`JSON.stringify([...${milestone('Past target')}.querySelectorAll('.milestone-item')].map(row=>[row.querySelector('.id').textContent,row.querySelector('.chip').textContent]))`));+ assert.deepEqual(Object.fromEntries(states),{'#1':'landed','#2':'accepted','#3':'unclaimed'});+ await press(chrome,"document.querySelector('[data-key=shipped] > .milestone-head')");+ await chrome.waitFor(`${milestone('Shipped release')}?.querySelector('.milestone-head')`);+ assert.match(await chrome.stable(`${milestone('Shipped release')}.textContent`),new RegExp(shipped.slice(0,12)),'the shipped release names its actual commit');+ assert.equal(await chrome.stable(`${milestone('Empty shipped')}.closest('.shipped')!==null`),true,'an empty shipped milestone appears only under Shipped');+ assert.equal(await chrome.stable("document.querySelectorAll('[data-key=\"m:Empty shipped\"]').length"),1,'an empty shipment is not repeated among upcoming releases');+ for(const width of [375,1280]) {+ await chrome.send('Emulation.setDeviceMetricsOverride',{width,height:950,deviceScaleFactor:1,mobile:false});+ for(const scheme of ['light','dark']) {+ await chrome.send('Emulation.setEmulatedMedia',{features:[{name:'prefers-color-scheme',value:scheme}]});+ const read=JSON.parse(await chrome.stable(`JSON.stringify((()=>{const m=${milestone('State summary')},bar=m.querySelector('.roadmap-summary-bar');return {text:m.textContent,legend:[...m.querySelectorAll('[data-summary-state]')].map(x=>[x.dataset.summaryState,x.querySelector('b').textContent]),segments:[...m.querySelectorAll('[data-summary-segment]')].map(x=>[x.dataset.summarySegment,Number(x.dataset.count),x.getBoundingClientRect().width]),bar:bar?.getBoundingClientRect().width,width:document.documentElement.scrollWidth,viewport:innerWidth};})())`));+ assert.match(read.text,/5 left.*1 of 6 landed/u);assert.match(read.text,/About 3\.5 to 10 h/u);assert.match(read.text,/3 landed in the last 6 h, 3 in the last 2 h/u);assert.match(read.text,/Needs you:.*#9 Approve the release/u);+ assert.deepEqual(read.legend,[['landed','1'],['landing','1'],['review','1'],['building','1'],['waiting','1'],['held','1']]);+ assert.equal(read.segments.reduce((sum,row)=>sum+row[1],0),6,'the six supplied states sum to total');+ assert.ok(read.segments.every(row=>row[2]>0&&Math.abs(row[2]-read.bar/6)<1),`${width}/${scheme}: every supplied state occupies its share`);+ assert.ok(read.width<=read.viewport,`${width}/${scheme}: the header stays inside the viewport`);+ }+ }+ // The API owns counts: changing held item summaries cannot change the supplied milestone summary.+ await chrome.stable("window.__originalItems=data.project.items;window.__originalRoadmapItems=data.project.milestones.find(m=>m.name==='State summary').items;data.project.items=data.project.items.map(item=>({...item,status:'open',stage:'open',merged:null,claim:null}));data.project.milestones.find(m=>m.name==='State summary').items=window.__originalRoadmapItems.map(item=>({...item,status:'open',state:'open'}));render();true");+ assert.equal(await chrome.stable(`${milestone('State summary')}.querySelector('[data-summary-state=building] b').textContent`),'1');+ await chrome.stable("data.project.items=window.__originalItems;const m=data.project.milestones.find(m=>m.name==='State summary');m.items=window.__originalRoadmapItems;m.summary.estimate=null;m.summary.needsYou=[];render();true");+ assert.equal(await chrome.stable(`${milestone('State summary')}.querySelectorAll('.roadmap-estimate,.roadmap-pace,.roadmap-summary-needs').length`),0,'absent JSON omits forecast and person line');+ assert.deepEqual(chrome.exceptions,[]);+ } finally {if(chrome)await closeSnapshotChrome(chrome);rmSync(profile,{recursive:true,force:true});await view.stop();}++++});+++ test('a blocked roadmap item shows its dot and expands to say why [N26]', { timeout: 90_000 }, async () => {+ const executable = chromeExecutable();+ assert.ok(executable, 'Chrome is required for the roadmap blocker check.');+ const box = machine(), alpha = project(box, 'blocked-roadmap');+ box.run(alpha.repo, 'add', 'web', 'Base work', '--specs', 'G1', '--criterion', 'Base is ready.');+ box.run(alpha.repo, 'add', 'web', 'Waits on base', '--specs', 'G1', '--criterion', 'Use #1 and #3 <em>literally</em>. More detail stays in Items.', '--after', '1');+ box.run(alpha.repo, 'add', 'web', 'Free work', '--specs', 'G1', '--criterion', 'Ready.');+ box.run(alpha.repo, 'add', 'web', 'Sent back once', '--specs', 'G1', '--criterion', 'Ready.');+ build(box, alpha, 4, 'sent-back.html'); sendBack(box, alpha, 4, 'The heading is missing.');+ box.run(alpha.repo, 'edit', '4', '--after', '1', '--reason', 'Waits on the base.');+ box.run(alpha.repo, 'add', 'web', 'Landed work', '--specs', 'G1', '--criterion', 'The page renders.');+ build(box, alpha, 5, 'landed.html'); accept(box, alpha, 5);+ box.git(alpha.repo, 'merge', '--no-ff', '--no-edit', alpha.itemBranches.get(`${alpha.baseBranch}:5`));+ box.run(alpha.repo, 'merged', '5', box.git(alpha.repo, 'rev-parse', 'HEAD'));+ box.run(alpha.repo, 'add', 'web', 'Building work', '--specs', 'G1', '--criterion', 'The corrected page renders.');+ build(box, alpha, 6, 'building.html'); sendBack(box, alpha, 6, 'See #1 and #3 before accepting.\nMore detail stays in Items.');+ box.run(alpha.web, 'claim', '6');+ const second = join(box.dir, 'second-builder');+ box.git(alpha.repo, 'worktree', 'add', '-q', second, '-b', 'web/second');+ box.run(second, 'join', 'web'); box.run(second, 'claim', '1');+ const other = project(box, 'blocked-roadmap-other');+ box.run(other.repo, 'add', 'web', 'Remote base', '--specs', 'G1', '--criterion', 'Ready.');+ box.run(other.repo, 'add', 'web', 'Remote sent-back work', '--specs', 'G1', '--criterion', 'Remote renders.');+ build(box, other, 2, 'remote.html'); sendBack(box, other, 2, 'Remote latest finding\nMore detail stays in Items');+ box.run(other.repo, 'edit', '2', '--after', '1', '--reason', 'Waits on remote base.');+ box.run(other.repo, 'hold', 'web', '--reason', 'Review the remote dependency');+ box.run(alpha.repo, 'milestone', 'add', 'Next', '--items', '1,2,3,4,5,6,blocked-roadmap-other#2');+ const view = await startView(box), profile = mkdtempSync(join(tmpdir(), 'pullboard-blocked-roadmap-chrome-'));+ let chrome;+ const row = id => `[...document.querySelectorAll('#roadmap .milestone-item')].find(x=>x.querySelector('.id')?.textContent===${JSON.stringify(id)})`;+ /** Read the visible detail only, after its optional first detail request settles. */+ async function opened(id) {+ await press(chrome, row(id));+ await chrome.waitFor(`${row(id)}?.getAttribute('aria-expanded')==='true' && !${row(id)}.parentElement.querySelector('.roadmap-loading')`);+ return await chrome.stable(`${row(id)}.parentElement.querySelector('.milestone-why').textContent`);+ }+ /** Count item reads, excluding ordinary board polling. */+ async function reads() { return JSON.parse(await chrome.stable('JSON.stringify(window.__requests)')).filter(url => /\/items\/\d/.test(url)); }+ 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(`${row('#2')}?.querySelector('.block-dot')`);+ assert.match(await chrome.stable(`${row('#2')}.querySelector('.block-dot').getAttribute('aria-label')`), /#1 \(claimed\)/u);+ assert.equal(await chrome.stable(`Boolean(${row('#3')}.querySelector('.block-dot'))`), false);+ await chrome.stable("window.__requests=[];window.__fetch=window.fetch;window.fetch=(url,options)=>{window.__requests.push(String(url));return window.__fetch(url,options);};true");+ const address = await chrome.stable('location.href');+ const blocked = await opened('#2');+ assert.match(blocked, /CriterionUse #1 and #3 <em>literally<\/em>\./u, 'the approved dense detail leads with the criterion');+ assert.doesNotMatch(blocked, /More detail stays in Items/u, 'only the first criterion sentence is shown');+ assert.deepEqual(JSON.parse(await chrome.stable(`JSON.stringify([...${row('#2')}.parentElement.querySelectorAll('.roadmap-criterion .roadmap-ref')].map(chip=>chip.textContent))`)), [], 'references inside Criterion stay plain text');+ assert.equal(await chrome.stable(`${row('#2')}.parentElement.querySelectorAll('.roadmap-criterion em').length`),0,'criterion markup stays escaped');+ assert.match(blocked, /Waits on#1 building.*web-2.*since/u, 'dependency includes state, holder and local time');+ assert.match(blocked, /History.*added/u); assert.match(blocked, /Release.*Next.*G1/u);+ assert.equal((await reads()).length, 1, 'the first opened summary reads its detail once');+ for (const id of ['#2', '#6', '#5']) {+ if (id !== '#2') await opened(id);+ const text = await chrome.stable(`${row(id)}.parentElement.querySelector('.milestone-why').textContent`);+ if (id === '#6') {+ assert.match(text, /Agents.*web-1.*building/u); assert.match(text, /Sent back.*coordinator.*See #1 and #3 before accepting/u);+ assert.match(text, /History.*claimed.*submitted.*sent back.*claimed again/u);+ }+ if (id === '#5') { assert.match(text, /Agents.*web-1.*built.*coordinator.*verified/u); assert.match(text, /History.*accepted.*landed/u); }+ const before = await reads();+ await press(chrome, row(id));+ await chrome.stable(`${row(id)}.focus();true`);+ await chrome.send('Input.dispatchKeyEvent', { type:'keyDown', key:'Enter', code:'Enter', windowsVirtualKeyCode:13 });+ await chrome.send('Input.dispatchKeyEvent', { type:'keyUp', key:'Enter', code:'Enter', windowsVirtualKeyCode:13 });+ await chrome.waitFor(`${row(id)}.getAttribute('aria-expanded')==='true'`);+ assert.deepEqual(await reads(), before, 'reopening keeps the shared item-detail cache');+ assert.equal(await chrome.stable('location.href'), address); assert.equal(await chrome.stable('view.tab'), 'roadmap');+ await press(chrome, row(id));+ }+ const base = await opened('#1');+ assert.match(base, /Blocks.*#2 unclaimed/u, 'the dense row names its open dependants');+ assert.match(base, /Blocks.*#4 sent back/u, 'a sent-back dependant keeps its status');+ assert.equal(await chrome.stable(`${row('#1')}.parentElement.querySelectorAll('.milestone-why a').length`), 1, 'references are chips; only the explicit Items link navigates');+ await press(chrome, row('#1'));+ for (const scheme of ['light', 'dark']) {+ await chrome.send('Emulation.setEmulatedMedia', { features:[{name:'prefers-color-scheme',value:scheme}] });+ await opened('#6');+ const style = JSON.parse(await chrome.stable(`JSON.stringify((()=>{const panel=${row('#6')}.parentElement.querySelector('.milestone-why');const label=panel.querySelector('dt'),value=label.nextElementSibling;return {icons:panel.querySelectorAll('dt svg').length, labels:panel.querySelectorAll('dt').length,top:getComputedStyle(label).alignSelf,chip:getComputedStyle(panel.querySelector('.roadmap-step.no')).backgroundColor,danger:getComputedStyle(panel.querySelector('.roadmap-return')).backgroundColor,labelTop:label.getBoundingClientRect().top,valueTop:value.getBoundingClientRect().top};})())`));+ assert.equal(style.icons, style.labels, `${scheme}: every label has an inline icon`);+ assert.equal(style.top, 'start', `${scheme}: labels stay at the first value line`);+ assert.ok(Math.abs(style.labelTop-style.valueTop)<2, `${scheme}: wrapped values keep their top-aligned label`);+ assert.notEqual(style.danger, 'rgba(0, 0, 0, 0)', `${scheme}: send-back reason is tinted`);+ const colors = JSON.parse(await chrome.stable(`JSON.stringify((()=>{const panel=${row('#6')}.parentElement.querySelector('.milestone-why');const probe=document.createElement('span');panel.append(probe);probe.style.color='var(--reject)';const danger=getComputedStyle(probe).color;probe.style.color='var(--accent)';const success=getComputedStyle(probe).color;probe.remove();return {danger,success,reject:getComputedStyle(panel.querySelector('.roadmap-step.no')).backgroundColor,reason:getComputedStyle(panel.querySelector('.roadmap-return')).color};})())`));+ assert.equal(colors.reject, colors.danger, `${scheme}: send-back history uses the danger token`);+ assert.equal(colors.reason, colors.danger, `${scheme}: the callout uses the danger token`);+ await press(chrome, row('#6'));+ await opened('#5');+ const landed = JSON.parse(await chrome.stable(`JSON.stringify((()=>{const r=${row('#5')},panel=r.parentElement.querySelector('.milestone-why');return {color:getComputedStyle(panel.querySelector('.roadmap-event:last-child .roadmap-step')).backgroundColor,chip:r.querySelector('.roadmap-landed')?.textContent,icon:!!r.querySelector('.roadmap-landed svg')};})())`));+ assert.equal(landed.color, colors.success, `${scheme}: landing history uses the success token`);+ assert.equal(landed.chip, 'landed'); assert.equal(landed.icon, true);+ await press(chrome, row('#5'));+ }+ for (const width of [375,1280]) for (const scheme of ['light','dark']) {+ await chrome.send('Emulation.setDeviceMetricsOverride',{width,height:900,deviceScaleFactor:1,mobile:false});+ await chrome.send('Emulation.setEmulatedMedia',{features:[{name:'prefers-color-scheme',value:scheme}]});+ for (const [id,field] of [['#2','.roadmap-criterion'],['#6','.roadmap-return']]) {+ await opened(id);+ const prose=JSON.parse(await chrome.stable(`JSON.stringify((()=>{const panel=${row(id)}.parentElement.querySelector('.milestone-why'),value=panel.querySelector(${JSON.stringify(field)});return {text:value.textContent,chips:value.querySelectorAll('.roadmap-ref').length,links:panel.querySelectorAll('a').length};})())`));+ assert.match(prose.text,/#1 and #3/u,`${width}/${scheme}: ${field} keeps its literal references`);+ assert.equal(prose.chips,0,'the clarified bar keeps prose references plain');assert.equal(prose.links,1,'only Open in Items is a link');+ assert.equal(await chrome.stable('location.href'),address);assert.equal(await chrome.stable('view.tab'),'roadmap');+ await press(chrome,row(id));+ }+ }+ await chrome.send('Emulation.setDeviceMetricsOverride', {width:375,height:900,deviceScaleFactor:1,mobile:false});+ const remote = await opened('blocked-roadmap-other#2');+ assert.match(remote, /Waits on#1 unclaimed/u); assert.match(remote, /Review the remote dependency/u);+ assert.match(remote, /Sent back.*Remote latest finding/u); assert.doesNotMatch(remote, /More detail stays in Items/u);+ const metrics = JSON.parse(await chrome.stable(`JSON.stringify((()=>{const r=${row('blocked-roadmap-other#2')},d=r.querySelector('.block-dot').getBoundingClientRect(),t=r.querySelector('.t').getBoundingClientRect();return {visible:d.width>0&&d.left>=t.left&&d.right<=t.right,width:document.documentElement.scrollWidth,viewport:innerWidth};})())`));+ assert.ok(metrics.visible, 'the remote blocker mark stays visible on a phone'); assert.ok(metrics.width<=metrics.viewport);+ await press(chrome, `${row('blocked-roadmap-other#2')}.parentElement.querySelector('.milestone-why a[data-go]')`);+ await chrome.waitFor("view.tab==='items' && document.querySelector('#detail h2')?.textContent.includes('Remote sent-back work')");+ assert.equal(await chrome.stable("document.querySelector('#proj-name').textContent"), 'blocked-roadmap-other');+ assert.deepEqual(chrome.exceptions, []);+ } finally { if(chrome) await closeSnapshotChrome(chrome); rmSync(profile,{recursive:true,force:true}); await view.stop(); }});