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 lanes panel stays inside its card at every width [N26]
Corey Olsona07ab056f892
diff --git a/src/cockpit.js b/src/cockpit.jsindex 8198798b..2d12d549 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -1761,7 +1761,7 @@ function render() {+ (release ? '<button type="button" data-status="release" title="' + esc('Show this release on the Roadmap: ' + (release.note || release.name)) + '">' + esc(release.name) + ' <b>' + release.done + '/' + release.total + '</b></button>' : '')+ (last ? '<button type="button" class="end" data-status="' + (last.item_id ? 'item:' + last.item_id : 'activity') + '" title="' + esc(last.event_at) + '">' + esc(agentName(last.event_by)) + ' ' + esc(last.event_kind) + (last.item_id ? ' #' + last.item_id : '') + ' · ' + age(last.event_at) + '</button>' : '');const held = new Map(p.holds.map((h) => [h.hold_lane, h]));- $('lanes').innerHTML = working.map((l) => '<div class="lane"><span><b>' + esc(l) + '</b> ' + (held.has(l) ? '<span class="chip no">held by ' + esc(agentName(held.get(l).hold_by)) + '</span> <span class="muted">' + linked(held.get(l).hold_reason, titles) + '</span>' : '<span class="chip ok">open</span>') + '</span>' + (held.has(l) ? '<button class="ghost" data-release="' + esc(l) + '" type="button">Release</button>' : '') + '</div>').join('');+ $('lanes').innerHTML = working.map((l) => '<div class="lane"><span><b>' + esc(l) + '</b> ' + (held.has(l) ? '<span class="chip no" title="held by ' + esc(agentName(held.get(l).hold_by)) + '">held by ' + esc(agentName(held.get(l).hold_by)) + '</span> <span class="muted">' + linked(held.get(l).hold_reason, titles) + '</span>' : '<span class="chip ok">open</span>') + '</span>' + (held.has(l) ? '<button class="ghost" data-release="' + esc(l) + '" type="button">Release</button>' : '') + '</div>').join('');for (const kind of ['spec', 'doctrine']) {const rows = kind === 'spec' ? p.spec : p.practice;diff --git a/src/view.css b/src/view.cssindex 11be2c53..b577760f 100644--- a/src/view.css+++ b/src/view.css@@ -339,7 +339,9 @@ input:disabled { background: var(--surface-2); color: var(--ink-muted); }.stack { display: grid; gap: 14px; }.stack.tight { gap: 12px; }.meta.spaced { margin-top: 6px; }-.detail { position: sticky; top: calc(var(--top) + 16px); max-height: calc(100vh - var(--top) - 32px); overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; }+.detail { position: sticky; top: calc(var(--top) + 16px); max-height: calc(100vh - var(--top) - 32px); overflow-y: auto; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }+/* The side card's one column is the card's width. Left to size itself, it took the widest thing that would not wrap, a lane's+ "held by" chip and its Release button, and every row and the Hold form ran past the card (#456). */@media (max-width: 900px) { .detail { position: static; max-height: none; } #detail { scroll-margin-top: 60px; } }.detail h2 { margin: 0; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }.detail h2 span { color: var(--ink-faint); font: 600 13px var(--mono); margin-right: 6px; }@@ -520,6 +522,9 @@ code.inline.long { white-space: break-spaces; overflow-wrap: anywhere; }.agent-work:hover > span:first-child { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }.lane { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }.lane:first-child { border-top: 0; }+/* A long holder name ends in an ellipsis, the whole name on hover, rather than push Release off the card (#456). */+.lane > span { min-width: 0; }+.lane .chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }.rows-filter { display: flex; padding: 10px 10px 2px; }.rows { padding: 4px 10px 10px; }.section-count { margin-left: 6px; color: var(--ink-faint); font: 500 11.5px var(--mono); }diff --git a/test/cockpit/demo.test.js b/test/cockpit/demo.test.jsindex f1a34312..e9d1cbcb 100644--- a/test/cockpit/demo.test.js+++ b/test/cockpit/demo.test.js@@ -5,7 +5,7 @@ import { request } from 'node:http';import { tmpdir } from 'node:os';import { join } from 'node:path';import { test } from 'node:test';-import { tapTarget, machine, project, startView, boardOf, chromeExecutable, openSnapshotChrome, closeSnapshotChrome, press } from './fixture.js';+import { tapTarget, SPEC, machine, project, startView, boardOf, chromeExecutable, openSnapshotChrome, closeSnapshotChrome, press } from './fixture.js';import { assertFirstStateDelay } from './stable.js';/** Stage real chip clones and retain their node identities to diagnose a redraw between browser evaluations. */@@ -371,3 +371,58 @@ test('the spec chip measurement survives a redraw [N26,C7]', {rmSync(profile, { recursive: true, force: true });}});++test('the lanes panel fits its card at every width [N26]', {+ timeout: 120_000, // budget: hang ceiling for real Chrome startup and eight viewport and scheme layouts of one side card.+}, async () => {+ const executable = chromeExecutable();+ assert.ok(executable, 'Chrome is installed or PULLBOARD_CHROME points to it');+ const box = machine();+ const demo = project(box, 'lanes-panel-fit', SPEC, { lanes: { web: { owns: ['web/'], specs: ['G'] }, review: { owns: ['review/'], specs: [] } } });+ // A holder whose name is longer than the README demo's "coordinator (Demo coordinator)", which already overflowed.+ const model = 'Demo coordinator with a long model name';+ box.run(demo.repo, 'join', 'coordinator', '--model', model);+ box.run(demo.repo, 'hold', 'review', '--reason', 'Waiting for the next demo item.');+ const held = `held by coordinator (${model})`;+ const view = await startView(box);+ const profile = mkdtempSync(join(tmpdir(), 'pullboard-lanes-panel-'));+ let chrome;+ /** The card's content box, its sideways scroll and the page's, the holder chip, and every lane and form box that leaves the content box. */+ const measure = async () => JSON.parse(await chrome.stable(`JSON.stringify((() => {+ const card = document.querySelector('#shouts-pane aside[aria-label="Agents and lanes"]'), s = getComputedStyle(card), r = card.getBoundingClientRect();+ const left = r.left + card.clientLeft + parseFloat(s.paddingLeft), right = r.left + card.clientLeft + card.clientWidth - parseFloat(s.paddingRight);+ const name = (e) => e.id ? '#' + e.id : (e.className && typeof e.className === 'string' ? '.' + e.className.split(' ').join('.') : e.tagName.toLowerCase()) + (e.textContent.trim() ? ' "' + e.textContent.trim().slice(0, 24) + '"' : '');+ const boxes = [...card.querySelectorAll('#lanes .lane, #lanes .lane *, #hold-form, #hold-form *')].filter((e) => e.getClientRects().length).map((e) => [name(e), e.getBoundingClientRect()]);+ const past = boxes.filter(([, b]) => b.left < left - 0.5 || b.right > right + 0.5).map(([n, b]) => [n, Math.round(b.left), Math.round(b.right)]);+ const chip = card.querySelector('#lanes [data-release="review"]')?.closest('.lane')?.querySelector('.chip'), cs = chip && getComputedStyle(chip);+ const form = card.querySelector('#hold-form'), widths = ['#hold-form', '#hold-lane', '#hold-reason', '#hold-form button[type=submit]'].map((q) => Math.round(card.querySelector(q).getBoundingClientRect().width * 10) / 10);+ return { content: [Math.round(left), Math.round(right)], column: s.gridTemplateColumns, card: [card.scrollWidth, card.clientWidth], page: [Math.max(document.documentElement.scrollWidth, document.body.scrollWidth), document.documentElement.clientWidth],+ chip: chip && { text: chip.textContent.trim(), title: chip.title, wraps: cs.whiteSpace === 'normal', ellipsis: cs.textOverflow === 'ellipsis' && cs.overflow === 'hidden', clipped: chip.scrollWidth > chip.clientWidth },+ widths, past };+ })())`));+ try {+ chrome = await openSnapshotChrome(executable, view.link.href, profile);+ await chrome.send('Emulation.setDeviceMetricsOverride', { width: 1440, height: 900, deviceScaleFactor: 1, mobile: false });+ await chrome.waitFor('innerWidth === 1440');+ await press(chrome, "document.querySelector('[data-tab=shouts]')");+ await chrome.waitFor("!!document.querySelector('#shouts-pane:not([hidden]) #lanes [data-release=review]')");+ for (const scheme of ['light', 'dark']) {+ await chrome.send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-color-scheme', value: scheme }] });+ await chrome.waitFor(`document.documentElement.dataset.scheme === '${scheme}'`);+ for (const width of [375, 900, 1280, 1440]) {+ await chrome.send('Emulation.setDeviceMetricsOverride', { width, height: 900, deviceScaleFactor: 1, mobile: false });+ await chrome.waitFor(`innerWidth === ${width}`);+ const at = `${width}/${scheme}`, m = await measure();+ assert.deepEqual(m.past, [], `${at}: every lane and form control stays inside the card's content box ${m.content}: ${JSON.stringify(m)}`);+ assert.ok(m.card[0] <= m.card[1] && m.page[0] <= m.page[1], `${at}: neither the card nor the page scrolls sideways: ${JSON.stringify(m)}`);+ assert.equal(m.chip.text, held, `${at}: the chip names the whole holder`);+ assert.ok(m.chip.wraps || (m.chip.ellipsis && m.chip.title === held), `${at}: a long holder wraps, or ends in an ellipsis with the full name on hover: ${JSON.stringify(m.chip)}`);+ assert.ok(m.widths.every((w) => Math.abs(w - (m.content[1] - m.content[0])) <= 1), `${at}: the hold form, its lane, its reason and its button take the card's width ${m.content[1] - m.content[0]}: ${m.widths}`);+ }+ }+ } finally {+ if (chrome) await closeSnapshotChrome(chrome);+ rmSync(profile, { recursive: true, force: true });+ await view.stop();+ }+});diff --git a/test/cockpit/needs.test.js b/test/cockpit/needs.test.jsindex 3829ba00..e5710bac 100644--- a/test/cockpit/needs.test.js+++ b/test/cockpit/needs.test.js@@ -135,7 +135,7 @@ test("needs-you holds only the person's calls; the rest show on the board with wpage.run("view.agent = 'web-1'; render();");assert.deepEqual(agentEntries(page.show('agents')).find((agent) => agent.id === 'web-1').holds, ['#2 Farewell: sent back', '#1 Greeting: to verify'], 'the agent that built them holds both');page.run('view.agent = null; render();');- assert.match(page.show('lanes'), /<b>web<\/b> <span class="chip no">held by coordinator \(unknown\)<\/span> <span class="muted">G3 is open<\/span>/, 'a held lane names who holds it');+ assert.match(page.show('lanes'), /<b>web<\/b> <span class="chip no" title="held by coordinator \(unknown\)">held by coordinator \(unknown\)<\/span> <span class="muted">G3 is open<\/span>/, 'a held lane names who holds it');// The sidebar counts exactly the person's calls; its line still says what the agents are doing.assert.deepEqual(projectRows(page.show('proj-list')).map((row) => [row.needs, row.line]), [['4', '1 decision · 1 question · 1 draft row · 1 lane held · 1 sent back · 1 to verify']]);