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
test(roadmap): require all rows to expand in place [N26]
Corey Olsone0623c011647
diff --cc src/cockpit.jsindex 1e122be8,266d9a06..e9b44c53--- a/src/cockpit.js+++ b/src/cockpit.js@@@ -1402,9 -1399,8 +1402,9 @@@ function boardSummary(board, state)open: count((item) => item.status === 'open'),verified: count((item) => item.status === 'verified'),pending: calls('pending'),- drafts: calls('draft'),+ drafts: calls('draft') + calls('rigor-draft'),holds: calls('hold'),+ laneHolds: state.holds,decisions: calls('decision'),// What each item's state reads from, so another repo's roadmap can show it as this board's// Items tab does, sent back included, and open it here.diff --cc test/cockpit/roadmap.test.jsindex 9a083474,0062c382..13e6427a--- a/test/cockpit/roadmap.test.js+++ b/test/cockpit/roadmap.test.js@@@ -840,103 -840,3 +840,129 @@@ test('the roadmap panel counts the nexawait view.stop();}});++test('a blocked roadmap item shows its dot and expands to say why [N26]', { timeout: 90_000 }, async (t) => {+ const executable = chromeExecutable();+ assert.ok(executable, 'Chrome is required for the roadmap blocker check.');+ const box = machine();+ const alpha = project(box, 'blocked-roadmap');+ box.run(alpha.repo, 'add', 'web', 'Base work', '--specs', 'G1', '--criterion', 'renders');+ box.run(alpha.repo, 'add', 'web', 'Waits on base', '--specs', 'G1', '--criterion', 'renders', '--after', '1');+ box.run(alpha.repo, 'add', 'web', 'Free work', '--specs', 'G1', '--criterion', 'renders');+ // A sent-back item that waits on #1: built once by web-1, whose claim ended with the reject (#605 review).+ box.run(alpha.repo, 'add', 'web', 'Sent back once', '--specs', 'G1', '--criterion', 'renders');+ build(box, alpha, 4, 'sent-back.html');+ sendBack(box, alpha, 4, 'the heading is missing');+ box.run(alpha.repo, 'edit', '4', '--after', '1', '--reason', 'it waits on the base work');++ box.run(alpha.repo, 'add', 'web', 'Verified work', '--specs', 'G1', '--criterion', 'renders');++ build(box, alpha, 5, 'verified.html'); accept(box, alpha, 5);++ box.run(alpha.repo, 'add', 'web', 'Building work', '--specs', 'G1', '--criterion', 'renders');++ box.run(alpha.web, 'claim', '6');+ const other = project(box, 'blocked-roadmap-other');+ box.run(other.repo, 'add', 'web', 'Remote base', '--specs', 'G1', '--criterion', 'renders');+ box.run(other.repo, 'add', 'web', 'Remote sent-back work', '--specs', 'G1', '--criterion', 'renders');+ build(box, other, 2, 'remote-sent-back.html');+ sendBack(box, other, 2, 'Remote latest finding\nMore detail stays in Items');+ box.run(other.repo, 'edit', '2', '--after', '1', '--reason', 'it waits on the 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,blocked-roadmap-other#2');++ box.run(alpha.repo, 'milestone', 'add', 'Next', '--items', '1,2,3,4,5,6,blocked-roadmap-other#2');+ const view = await startView(box);+ const profile = mkdtempSync(join(tmpdir(), 'pullboard-blocked-roadmap-chrome-'));+ let chrome;+ /** Read the rows: their state dot, blocker dot and unfolded reason. */+ const read = async () => JSON.parse(await chrome.stable(`JSON.stringify([...document.querySelectorAll('#roadmap-list > [data-key="m:Next"] .milestone-body > ul > li')].map((li) => ({+ id: li.querySelector('.milestone-item .id').textContent,+ dot: Boolean(li.querySelector('.milestone-item > .dot')),+ blocker: li.querySelector('.block-dot')?.getAttribute('aria-label') || null,+ why: li.querySelector('.milestone-why')?.hidden === false ? li.querySelector('.milestone-why').textContent : null,+ })))`));+ 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\"]')");+ const folded = await read();+ const byId = Object.fromEntries(folded.map((row) => [row.id, row]));+ assert.equal(byId['#2'].blocker, 'Blocked: waits on #1 (open)', 'the gated item has a blocker dot naming what it waits on');+ assert.equal(byId['#3'].dot, true, 'an unblocked item keeps its state dot');+ assert.equal(byId['#3'].blocker, null, 'an unblocked item has no blocker dot');+ assert.equal(byId['#1'].blocker, null, 'the item others wait on is not itself blocked');+ assert.equal(byId['blocked-roadmap-other#2'].blocker, 'Blocked: waits on #1 (open); lane web held',+ 'a remote row uses its own dependency and lane-hold summaries');+ assert.ok(folded.every((row) => row.why === null), 'every row starts folded');+ // From here on, record every request the page makes: unfolding must not fetch an item's detail.+ await chrome.stable("window.__requests = []; window.__fetch = window.__fetch || window.fetch; window.fetch = (url, options) => { window.__requests.push(String(url)); return window.__fetch(url, options); }; true");++ const roadmapAddress = await chrome.stable('location.href');++ for (const [id, state] of [[5, 'verified'], [6, 'claimed']]) {++ const row = "[...document.querySelectorAll('#roadmap .milestone-item')].find((entry) => entry.querySelector('.id').textContent === '#" + id + "')";++ assert.equal(await chrome.stable(row + ".getAttribute('aria-expanded')"), 'false', 'every status starts as an in-place disclosure');++ await press(chrome, row);++ await chrome.waitFor(row + ".getAttribute('aria-expanded') === 'true'");++ assert.equal(await chrome.stable('location.href'), roadmapAddress, 'click keeps the Roadmap address');++ assert.equal(await chrome.stable("view.tab"), 'roadmap');++ assert.match(await chrome.stable(row + ".parentElement.querySelector('.milestone-why').textContent"), new RegExp('state.*' + state));++ if (state === 'claimed') assert.match(await chrome.stable(row + ".parentElement.querySelector('.milestone-why').textContent"), /held by/u);++ await press(chrome, row);++ await chrome.waitFor(row + ".getAttribute('aria-expanded') === 'false'");++ await chrome.stable(row + '.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 + ".getAttribute('aria-expanded') === 'true'");++ assert.equal(await chrome.stable('location.href'), roadmapAddress, 'Enter keeps the Roadmap address');++ assert.equal(await chrome.stable("view.tab"), 'roadmap');++ await press(chrome, row);++ await chrome.waitFor(row + ".getAttribute('aria-expanded') === 'false'");++ }++ assert.deepEqual(JSON.parse(await chrome.stable('JSON.stringify(window.__requests)')).filter(url => /\/items\/\d/.test(url)), [], 'verified and building expansion needs no item detail request');+ await press(chrome, "[...document.querySelectorAll('#roadmap .milestone-item.blocked')].find((row) => row.querySelector('.id').textContent === '#2')");+ await chrome.waitFor("document.querySelector('#roadmap .milestone-why:not([hidden])')");+ const open = Object.fromEntries((await read()).map((row) => [row.id, row]));+ assert.match(open['#2'].why, /waits on#1 open/, 'the unfolded row names the item it waits on and that item\'s state');+ assert.match(open['#2'].why, /state.*open, nobody holds it/, 'the unfolded row says its own state and who holds it');+ assert.equal(open['#3'].why, null, 'unblocked rows stay as they were');+ const requests = JSON.parse(await chrome.stable('JSON.stringify(window.__requests)'));+ assert.deepEqual(requests.filter((url) => /\/items\/\d/.test(url)), [], 'unfolding reads the summaries already held and makes no detail request');+ await press(chrome, "document.querySelector('#roadmap .milestone-why:not([hidden]) a.ref')");+ await chrome.waitFor("!document.querySelector('[data-pane=items]').hidden && document.querySelector('#detail h2')?.textContent.includes('Waits on base')");+ await press(chrome, "document.querySelector('[data-tab=roadmap]')");+ await chrome.waitFor("!document.querySelector('[data-pane=roadmap]').hidden");+ await press(chrome, "[...document.querySelectorAll('#roadmap .milestone-item.blocked')].find((row) => row.querySelector('.id').textContent === '#2')");+ await chrome.waitFor("!document.querySelector('#roadmap .milestone-why:not([hidden])')");+ // The sent-back item: nobody holds it now, though web-1 built it; its latest send-back note shows.+ await press(chrome, "[...document.querySelectorAll('#roadmap .milestone-item.blocked')].find((row) => row.querySelector('.id').textContent === '#4')");+ await chrome.waitFor("document.querySelector('#roadmap .milestone-why:not([hidden])')");+ const sent = Object.fromEntries((await read()).map((row) => [row.id, row]));+ assert.match(sent['#4'].why, /state.*open, nobody holds it/, `a sent-back item names no holder: ${sent['#4'].why}`);+ assert.doesNotMatch(sent['#4'].why, /held by/, 'its past builder is never shown as holding it');+ assert.match(sent['#4'].why, /the heading is missing/, 'its latest send-back note shows');+ await press(chrome, "[...document.querySelectorAll('#roadmap .milestone-item.blocked')].find((row) => row.querySelector('.id').textContent === '#4')");+ await chrome.waitFor("!document.querySelector('#roadmap .milestone-why:not([hidden])')");+ await chrome.stable('window.__requests = []; true');+ await chrome.send('Emulation.setDeviceMetricsOverride', { width: 375, height: 900, deviceScaleFactor: 1, mobile: false });+ await press(chrome, "[...document.querySelectorAll('#roadmap .milestone-item.blocked')].find((row) => row.querySelector('.id').textContent === 'blocked-roadmap-other#2')");+ await chrome.waitFor("document.querySelector('#roadmap .milestone-why:not([hidden])')");+ const marker = JSON.parse(await chrome.stable(`JSON.stringify((() => {+ const row = [...document.querySelectorAll('#roadmap .milestone-item.blocked')].find((entry) => entry.querySelector('.id').textContent === 'blocked-roadmap-other#2');+ const text = row.querySelector('.t').getBoundingClientRect(), dot = row.querySelector('.block-dot').getBoundingClientRect();+ return { visible: dot.width > 0 && dot.left >= text.left && dot.right <= text.right };+ })())`));+ assert.equal(marker.visible, true, 'the remote blocker dot stays visible when its long title is clipped on a phone');+ const remote = Object.fromEntries((await read()).map((row) => [row.id, row]))['blocked-roadmap-other#2'];+ assert.match(remote.why, /state.*open, nobody holds it/, 'the remote item has no current holder');+ assert.match(remote.why, /waits on#1 open/, 'the remote dependency has its own state');+ assert.match(remote.why, /lane heldweb: Review the remote dependency/, 'the remote lane hold keeps its reason');+ assert.match(remote.why, /sent backRemote latest finding/, 'the remote send-back note keeps its first line');+ assert.doesNotMatch(remote.why, /More detail stays in Items/, 'the expansion stays compact');+ const remoteRequests = JSON.parse(await chrome.stable('JSON.stringify(window.__requests)'));+ assert.deepEqual(remoteRequests.filter((url) => /\/items\/\d/.test(url)), [], 'remote expansion also needs no detail request');+ await press(chrome, "document.querySelector('#roadmap .milestone-why:not([hidden]) a.ref')");+ await chrome.waitFor("!document.querySelector('[data-pane=items]').hidden && document.querySelector('#detail h2')?.textContent.includes('Remote sent-back work')");+ assert.equal(await chrome.stable("document.querySelector('#proj-name').textContent"), 'blocked-roadmap-other',+ 'the link opens the remote item, even though the local board has the same item id');+ assert.deepEqual(chrome.exceptions, [], 'the blocked roadmap raises no uncaught page exception');+ } finally {+ if (chrome) await closeSnapshotChrome(chrome);+ rmSync(profile, { recursive: true, force: true });+ await view.stop();+ }+});