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(roadmap): preserve snapshot details before Items [N26,N38]
Corey Olson70df35b7835f
diff --git a/src/cockpit.js b/src/cockpit.jsindex 98c62890..b22580f3 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -2314,7 +2314,7 @@ function milestoneRow(row, titles) {const inner = '<span class="dot' + (row.state ? ' ' + row.state : '') + '"></span><span class="t">' + text + '</span>' + (row.stale || '') + (row.state ? chip(row.state) : '<span class="chip">' + esc(row.word) + '</span>');const key = 'i:' + row.label, open = view.roadmapOpen.get(JSON.stringify([view.root, key])) === true;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.why) + '"';+ 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>'diff --git a/test/cockpit/snapshot.test.js b/test/cockpit/snapshot.test.jsindex e40fa159..4299bed9 100644--- a/test/cockpit/snapshot.test.js+++ b/test/cockpit/snapshot.test.js@@ -630,12 +630,19 @@ test('an exported roadmap has its own address under a folder, and Back and Forwaconst seen = await readRoadmap(chrome);assert.deepEqual(seen.cards[0].rows.map(({ id, label, tone, button }) => ({ id, label, tone, button })), [{ id: '#2', label: 'unclaimed', tone: 'free', button: true },- { id: 'beacon#1', label: 'unclaimed', tone: 'free', button: false },+ { id: 'beacon#1', label: 'unclaimed', tone: 'free', button: true },{ id: '#1', label: 'verified', tone: 'ok', button: true },- ], "the snapshot's rows read as its Items tab does; another repo's item, not in the snapshot, opens nothing");+ ], "the snapshot's rows expand in place; another repo's unavailable item has no Items link");assert.equal(seen.cards[0].rows.find((row) => row.id === 'beacon#1').tip, 'Billing webhook retries (not in this snapshot)', 'and says why');assert.deepEqual([seen.cards[1].name, seen.cards[1].empty], ['Later', 'No items yet.']);+ await press(chrome, roadmapRow('beacon#1'));+ await chrome.waitFor(roadmapRow('beacon#1') + ".getAttribute('aria-expanded') === 'true'");+ assert.equal(await chrome.stable('location.pathname + location.hash'), '/demo/#roadmap');+ assert.match(await chrome.stable(roadmapRow('beacon#1') + ".parentElement.querySelector('.milestone-why').textContent"), /not in this snapshot/u);+ assert.equal(await chrome.stable(roadmapRow('beacon#1') + ".parentElement.querySelectorAll('.milestone-why a[data-go]').length"), 0, 'unavailable items expand to why, without a false navigation target');+ await press(chrome, roadmapRow('beacon#1'));+// The address survives a reload on a static host, and Back and Forward show the tab it names,// whether the browser keeps the page for an entry or loads it again.await chrome.send('Page.reload');@@ -645,6 +652,9 @@ test('an exported roadmap has its own address under a folder, and Back and Forwaawait travel(chrome, 1);await settled(chrome, `${ready} && ${showing('roadmap', '/demo/#roadmap')} && !!${roadmapRow('#2')}`);await press(chrome, roadmapRow('#2'));+ await chrome.waitFor(roadmapRow('#2') + ".getAttribute('aria-expanded') === 'true'");+ assert.equal(await chrome.stable('location.pathname + location.hash'), '/demo/#roadmap', 'a snapshot row click stays on Roadmap');+ await press(chrome, roadmapRow('#2') + ".parentElement.querySelector('.milestone-why a[data-go]')");await chrome.waitFor(`${showing('items', '/demo/#items/2')} && document.querySelector('#detail h2')?.innerText.includes('Open page')`);await travel(chrome, -1);await settled(chrome, `${ready} && ${showing('roadmap', '/demo/#roadmap')}`);