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): the release chevron lines up with its title [N26]
Corey Olson63b6cca1a7b1
diff --git a/src/cockpit.js b/src/cockpit.jsindex 8b67d54e..6e6e339b 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -2356,7 +2356,7 @@ function roadmapCards(p, titles) {const coming = read.filter((m) => !m.shipped && m.rows.length).concat(read.filter((m) => !m.shipped && !m.rows.length)), shipped = read.filter((m) => m.shipped).reverse();/** Preserve each board's disclosure choices independently. */const isOpen = (key, first) => view.roadmapOpen.has(JSON.stringify([view.root, key])) ? view.roadmapOpen.get(JSON.stringify([view.root, key])) : first;- const caret = '<span class="caret" aria-hidden="true"></span>';+ const caret = '<svg class="caret" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"/></svg>'; // The view's stroke chevron, set inside the title to centre on its first line (#870).const next = coming.find((m) => m.rows.length) || null;const headerFor = roadmapHeaders(roadmapSummary, { time: when, address: itemAddress, root: view.root });const stages = [['open', 'Open'], ['claimed', 'Building'], ['submitted', 'In review'], ['accepted', 'Accepted'], ['merged', 'Landed']];@@ -2380,7 +2380,7 @@ function roadmapCards(p, titles) {/** Keep folding consistent with the View's other keyboard-accessible disclosure controls. */const wrap = (tag, classes, key, first, heading, contents, afterHead = '') => {const open = isOpen(key, first);- return '<' + tag + ' class="' + classes + '" data-key="' + esc(key) + '"><div class="milestone-head" data-roadmap-key="' + esc(key) + '" role="button" tabindex="0" aria-expanded="' + open + '">' + caret + heading + '</div>' + afterHead + '<div class="milestone-body"' + (open ? '' : ' hidden') + '>' + contents + '</div></' + tag + '>';+ return '<' + tag + ' class="' + classes + '" data-key="' + esc(key) + '"><div class="milestone-head" data-roadmap-key="' + esc(key) + '" role="button" tabindex="0" aria-expanded="' + open + '">' + heading.replace('<h2>', '<h2>' + caret) + '</div>' + afterHead + '<div class="milestone-body"' + (open ? '' : ' hidden') + '>' + contents + '</div></' + tag + '>';};/** Open every upcoming milestone by default; the person's current-page fold remains in the view map. */const card = (m) => {diff --git a/src/view.css b/src/view.cssindex f22bfdcb..4655886b 100644--- a/src/view.css+++ b/src/view.css@@ -258,8 +258,9 @@ a.ghost { color: var(--ink); }.milestone-head { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; border-radius: 8px; }.milestone-head .milestone-count { margin-left: auto; }/* A small triangle that turns down when its part is open. */-.roadmap-layout .caret { flex: none; width: 7px; height: 9px; background: var(--ink-faint); clip-path: polygon(0 0, 100% 50%, 0 100%); transition: transform .15s; }-.milestone-head[aria-expanded="true"] > .caret { transform: rotate(90deg); }+.roadmap-layout .caret { display: inline-block; flex: none; width: 16px; height: 16px; margin: calc((1lh - 16px) / 2) 8px 0 0; vertical-align: top; color: var(--ink-muted); transition: transform .15s, color .15s; }+.milestone-head:hover .caret { color: var(--ink); }+.milestone-head[aria-expanded="true"] .caret { transform: rotate(90deg); }.shipped { padding: 4px 16px; }.shipped > .milestone-head h2 { margin: 0; font-size: 15px; color: var(--ink-muted); }.shipped-one { border-top: 1px solid var(--line); }diff --git a/test/cockpit/roadmap.test.js b/test/cockpit/roadmap.test.jsindex 1954e5f7..ab478b30 100644--- a/test/cockpit/roadmap.test.js+++ b/test/cockpit/roadmap.test.js@@ -1159,3 +1159,56 @@ test('a release jump on a phone leaves its heading below the top bar [N26]', { tawait view.stop();}});++test('the release chevron lines up with its title [N26]', { timeout: 90_000 }, async () => {+ const executable = chromeExecutable();+ assert.ok(executable, 'Chrome is required for the release chevron check.');+ const box = machine();+ const alpha = project(box, 'release-chevron');+ for (const title of ['Shipped work', 'Open work', 'More open work']) box.run(alpha.repo, 'add', 'web', title, '--specs', 'G1', '--criterion', 'renders');+ build(box, alpha, 1, 'shipped.html');+ accept(box, alpha, 1);+ box.run(alpha.repo, 'milestone', 'add', 'Old release', '--items', '1');+ box.run(alpha.repo, 'milestone', 'add', 'Next release with a longer name', '--items', '2,3');+ box.run(alpha.repo, 'milestone', 'ship', 'Old release', '--next', 'Next release with a longer name');+ box.run(alpha.repo, 'milestone', 'add', 'Later', '--note', 'Nothing filed yet.');+ const view = await startView(box);+ const profile = mkdtempSync(join(tmpdir(), 'pullboard-release-chevron-chrome-'));+ let chrome;+ /** Each visible release head: its chevron's centre against the centre of its title's first line of text. */+ const offsets = async () => JSON.parse(await chrome.stable(`JSON.stringify([...document.querySelectorAll('#roadmap-list .milestone-head')].filter((head) => head.getClientRects().length).map((head) => {+ const caret = head.querySelector('h2 > .caret'), title = head.querySelector('h2');+ const walker = document.createTreeWalker(title, NodeFilter.SHOW_TEXT, { acceptNode: (node) => node.textContent.trim() ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP });+ const text = walker.nextNode(), range = document.createRange();+ range.selectNodeContents(text);+ const line = range.getClientRects()[0], mark = caret?.getBoundingClientRect();+ return { key: head.dataset.roadmapKey, open: head.getAttribute('aria-expanded'), svg: caret?.tagName.toLowerCase() || null, size: mark ? [Math.round(mark.width), Math.round(mark.height)] : null,+ offset: mark ? Math.round(((mark.top + mark.height / 2) - (line.top + line.height / 2)) * 10) / 10 : null };+ }))`));+ try {+ chrome = await openSnapshotChrome(executable, view.link.href, profile);+ await chrome.waitFor('data?.project?.milestones?.length === 3');+ await press(chrome, "document.querySelector('[data-tab=roadmap]')");+ await chrome.waitFor("!document.querySelector('[data-pane=roadmap]').hidden && document.querySelector('[data-key=\"shipped\"] > .milestone-head')");+ for (const width of [1280, 375]) {+ await chrome.send('Emulation.setDeviceMetricsOverride', { width, height: 900, deviceScaleFactor: 1, mobile: false });+ for (const pass of ['as opened', 'toggled']) {+ const heads = await offsets();+ assert.ok(heads.length >= 3, `${width} ${pass}: every release head is read: ${JSON.stringify(heads)}`);+ for (const head of heads) {+ assert.equal(head.svg, 'svg', `${width} ${pass} ${head.key}: the disclosure is the view's stroke chevron`);+ assert.ok(head.size[0] >= 15 && head.size[0] <= 17, `${width} ${pass} ${head.key}: the chevron is about 16px: ${head.size}`);+ assert.ok(Math.abs(head.offset) <= 2, `${width} ${pass} ${head.key} (${head.open}): the chevron centres on the title's first line: ${head.offset}px`);+ }+ // Flip every head, inner ones first so a folding Shipped never hides one still to press; each is measured both ways.+ for (const key of heads.map((head) => head.key).reverse()) await press(chrome, `document.querySelector('[data-key=${JSON.stringify(key)}] > .milestone-head')`);+ await chrome.waitFor(`[...document.querySelectorAll('#roadmap-list .milestone-head')].filter((head) => head.getClientRects().length).length >= 3`);+ }+ }+ assert.deepEqual(chrome.exceptions, [], 'the roadmap raises no uncaught page exception');+ } finally {+ if (chrome) await closeSnapshotChrome(chrome);+ rmSync(profile, { recursive: true, force: true });+ await view.stop();+ }+});