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): group milestone rows by shipping stage [N26]
Corey Olsone2c3d6b84cff
diff --git a/src/cockpit.js b/src/cockpit.jsindex d97c6042..b2a1aa42 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -903,7 +903,9 @@ function milestoneRow(row, titles, hidden = false) {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');- const rows = visible.filter((row) => row.state !== 'verified').concat(verified);+ /** Group work in the legend's shipping order; stable sorting preserves milestone order within each group. */+ const rank = (row) => row.stage === 'merged' ? 5 : row.stage === 'accepted' ? 0 : row.stage === 'submitted' ? 1 : row.held ? 4 : row.stage === 'claimed' ? 2 : row.state === 'verified' ? 5 : 3;+ const rows = [...visible].sort((a, b) => rank(a) - rank(b));// Current API milestones own their landed count and explicit shipment. Old exports retain their old count./** Reject malformed snapshot counts before they reach numeric HTML attributes. */const numeric = value => Number.isInteger(value) && value >= 0 ? value : null;diff --git a/test/cockpit/roadmap.test.js b/test/cockpit/roadmap.test.jsindex b2873093..82238902 100644--- a/test/cockpit/roadmap.test.js+++ b/test/cockpit/roadmap.test.js@@ -182,11 +182,11 @@ test('the roadmap reads every item as the Items tab does, opens each one, anothebox.run(alpha.repo, 'milestone', 'add', 'Later', '--note', 'Ideas not filed yet.');// What the person reads on each row: the Items tab's word for the item's state, and its colour's class.const words = [- { id: '#3', label: 'sent back', tone: 'no' },+ { id: '#2', label: 'accepted', tone: 'ok' },{ id: '#4', label: 'to verify', tone: 'warn' },+ { id: '#3', label: 'sent back', tone: 'no' },{ id: 'beacon#1', label: 'sent back', tone: 'no' },{ id: '#1', label: 'verified', tone: 'ok' },- { id: '#2', label: 'accepted', tone: 'ok' },{ id: '#5', label: 'building', tone: 'busy' },{ id: '#6', label: 'unclaimed', tone: 'free' },];@@ -225,7 +225,7 @@ test('the roadmap reads every item as the Items tab does, opens each one, anotheconst rows = seen.cards.flatMap((card) => card.rows);assert.deepEqual(rows.map(({ id, label, tone }) => ({ id, label, tone })), words, `${width}: each roadmap chip distinguishes landed and accepted with the Items tab's colour`);assert.ok(rows.every((row) => row.seen), `${width}: every chip is on screen`);- assert.deepEqual(rows.map((row) => row.title), [titles[2], titles[3], 'Billing webhook retries', titles[0], titles[1], titles[4], titles[5]], `${width}: unfinished work precedes verified items in each milestone`);+ assert.deepEqual(rows.map((row) => row.title), [titles[1], titles[3], titles[2], 'Billing webhook retries', titles[0], titles[4], titles[5]], `${width}: shipping groups lead landed items and preserve milestone order within each group`);assert.deepEqual(rows.map((row) => row.tip), rows.map((row) => row.title), `${width}: each row's tooltip is its whole title`);assert.ok(rows.every((row) => row.lines === 1 && row.ellipsis), `${width}: every title holds one line, set to end in an ellipsis: ${JSON.stringify(rows)}`);assert.ok(rows.find((row) => row.id === '#6').cut, `${width}: the long title is cut, so its ellipsis shows`);