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
fix(view): retain remote roadmap blockers and item routing [N26]
Corey Olson2931bbb1d403
diff --git a/src/cockpit.js b/src/cockpit.jsindex 4777599c..b7fed89c 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -1403,10 +1403,13 @@ function boardSummary(board, state) {pending: calls('pending'),drafts: calls('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.- items: state.items.map((item) => ({ id: item.id, title: item.title, status: item.status, stage: item.stage ?? pipelineStage(item), verdict: item.verdict && { decision: item.verdict.decision } })),+ items: state.items.map((item) => ({ id: item.id, title: item.title, status: item.status, stage: item.stage ?? pipelineStage(item),+ lane: item.lane, blockedBy: item.blockedBy, claim: item.claim,+ verdict: item.verdict && { decision: item.verdict.decision, note: item.verdict.note } })),};}@@ -2226,7 +2229,7 @@ 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(item, { holds: root === view.root ? p.holds : named[0].holds, items: root === view.root ? p.items : named[0].items, name: (id) => agentName(id), address: (id) => itemAddress(id, root) }) : null,+ block: item ? roadmapBlock(item, { holds: root === view.root ? p.holds : named[0].laneHolds, items: root === view.root ? p.items : named[0].items, name: (id) => agentName(id), address: (id) => itemAddress(id, root), board: root === view.root ? null : root }) : null,stage: item ? pipelineStage(item) : entry.status,word: entry.status,open: item ? { root, id } : null,diff --git a/src/view/roadmap-block.js b/src/view/roadmap-block.jsindex 1ce0fee9..73b6684e 100644--- a/src/view/roadmap-block.js+++ b/src/view/roadmap-block.js@@ -12,7 +12,7 @@* included; the page passes in the item lookup, agent names and item addresses it already uses.** @param {{id: number, status: string, lane?: string, blockedBy?: number[], claim?: {by?: string|null}|null, builtBy?: string|null, verdict?: {decision?: string, note?: string}|null}|null} item- * @param {{holds?: {hold_lane: string, hold_reason?: string}[], items?: {id: number, title?: string, status: string}[], name?: (id: string) => string, address?: (id: number) => string}} context+ * @param {{holds?: {hold_lane: string, hold_reason?: string}[], items?: {id: number, title?: string, status: string}[], name?: (id: string) => string, address?: (id: number) => string, board?: string|null}} context* @returns {{label: string, dot: string, detail: string}|null} The dot, its accessible label and the unfolded detail.*/export function roadmapBlock(item, context = {}) {@@ -39,6 +39,6 @@ export function roadmapBlock(item, context = {}) {return {label,dot: '<span class="block-dot" role="img" aria-label="' + escape(label) + '" title="' + escape(label) + '"></span>',- detail: '<dl class="kv">' + rows + '</dl><a class="ref" href="' + escape(address(item.id)) + '" data-go="item:' + item.id + '">Open #' + item.id + ' in Items</a>',+ detail: '<dl class="kv">' + rows + '</dl><a class="ref" href="' + escape(address(item.id)) + '" data-go="item:' + item.id + '"' + (context.board ? ' data-board="' + escape(context.board) + '"' : '') + '>Open #' + item.id + ' in Items</a>',};}diff --git a/test/cockpit/roadmap.test.js b/test/cockpit/roadmap.test.jsindex 5c4205b8..f47c9738 100644--- a/test/cockpit/roadmap.test.js+++ b/test/cockpit/roadmap.test.js@@ -854,11 +854,18 @@ test('a blocked roadmap item shows its dot and expands to say why [N26]', { timebuild(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, 'milestone', 'add', 'Next', '--items', '1,2,3,4');+ 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');const view = await startView(box);const profile = mkdtempSync(join(tmpdir(), 'pullboard-blocked-roadmap-chrome-'));let chrome;- /** Read the three rows: their state dot, blocker dot and unfolded reason. */+ /** 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')),@@ -876,6 +883,8 @@ test('a blocked roadmap item shows its dot and expands to say why [N26]', { timeassert.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");@@ -900,6 +909,23 @@ test('a blocked roadmap item shows its dot and expands to say why [N26]', { timeassert.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 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 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);