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
Merge remote-tracking branch 'origin/main' into view/61
Corey Olson3df8d59aa461
diff --cc test/cockpit.test.jsindex 52e4cb9a,8c51ccfd..6898bb18--- a/test/cockpit.test.js+++ b/test/cockpit.test.js@@@ -608,70 -608,78 +608,142 @@@ test('projects group repos with combine}});+test('Spec and Doctrine line up, open on a row and decide with quiet controls [N26, B26]', { timeout: 120_000 }, async (t) => {+ const executable = chromeExecutable();+ if (!executable) return t.skip('Install Chrome or set PULLBOARD_CHROME for Spec layout checks.');++ const spec = '# Demo spec\n\n## G · Goals\n- G1 [draft, must] One short line. | gate: web test\n- G2 [draft, must] A second draft row. | gate: web test\n- G3 [approved, must] An approved row. | gate: web test\n';+ const box = machine();+ project(box, 'spec-layout', spec);+ const view = await startView(box);+ const profile = mkdtempSync(join(tmpdir(), 'pullboard-spec-layout-chrome-'));+ let chrome;+ /** Where the list and detail cards start, what is picked, and how a row's decision sits beside its text. */+ const read = async (kind) => JSON.parse(await chrome.evaluate(`JSON.stringify((() => {+ const pane = document.querySelector('[data-pane="${kind}"]');+ const box = (e) => { const r = e.getBoundingClientRect(); return { top: r.top, bottom: r.bottom, left: r.left, right: r.right, height: r.height }; };+ const row = document.querySelector('#${kind}-list .srow[data-row="${kind}:G1"]');+ const text = row?.querySelector(':scope > span:nth-child(3)');+ const buttons = row ? [...row.querySelectorAll('[data-row-decision]')] : [];+ const quiet = (e) => { const s = getComputedStyle(e); return s.borderTopWidth === '0px' && s.backgroundColor === 'rgba(0, 0, 0, 0)'; };+ const line = text ? parseFloat(getComputedStyle(text).lineHeight) : 0;+ return { list: box(pane.querySelector('.rows-card')), detail: box(pane.querySelector('.detail')), picked: document.querySelector('#${kind}-list .srow.on')?.dataset.row ?? null,+ shown: document.querySelector('#${kind}-detail h2 span')?.textContent ?? null, first: document.querySelector('#${kind}-list .srow')?.dataset.row ?? null,+ row: row && box(row), text: text && box(text), line, buttons: buttons.map((e) => ({ ...box(e), quiet: quiet(e), word: e.textContent })),+ section: [...document.querySelectorAll('#${kind}-list [data-section-approve], #${kind}-detail [data-row-decision]')].map((e) => quiet(e)),+ overflow: document.documentElement.scrollWidth > document.documentElement.clientWidth };+ })())`));+ try {+ chrome = await openSnapshotChrome(executable, view.link.href, profile);+ await chrome.waitFor("typeof data === 'object' && !!data && !!data.project");+ for (const width of [1280, 375]) {+ await chrome.send('Emulation.setDeviceMetricsOverride', { width, height: 900, deviceScaleFactor: 1, mobile: false });+ await chrome.evaluate("document.querySelector('[data-tab=spec]').click(); document.querySelector('#spec-chips [data-rows=\"spec:decide\"]').click(); view.row.spec = null; render();");+ await chrome.waitFor(`innerWidth === ${width} && !!document.querySelector('#spec-list [data-row="spec:G1"]')`);+ const spec = await read('spec');+ if (width === 1280) assert.ok(Math.abs(spec.list.top - spec.detail.top) < 0.5, `${width}: the list and the detail start on one line: ${JSON.stringify([spec.list, spec.detail])}`);+ assert.deepEqual([spec.picked, spec.shown], ['spec:G1', 'G1'], `${width}: with nothing picked, the detail opens on the first row shown`);+ assert.deepEqual(spec.buttons.map((b) => b.word), ['Approve', 'Decline'], `${width}: an undecided row offers its decision`);+ assert.ok(spec.buttons.every((b) => b.quiet && b.height >= 44), `${width}: quiet words, no box or fill until hovered, each a 44px target: ${JSON.stringify(spec.buttons)}`);+ assert.ok(spec.section.length >= 3 && spec.section.every(Boolean), `${width}: Approve all and the detail's decision are quiet too`);+ if (width === 1280) {+ assert.ok(spec.buttons.every((b) => b.left >= spec.text.right && Math.abs((b.top + b.bottom) / 2 - (spec.text.top + spec.line / 2)) < spec.line), `${width}: the decision sits beside the text, on its first line: ${JSON.stringify(spec)}`);+ assert.ok(spec.row.height <= 60, `${width}: so a one-line undecided row is at most 60px tall: ${spec.row.height}`);+ } else {+ assert.ok(spec.buttons.every((b) => b.top >= spec.text.bottom - 12), `${width}: on a phone the decision sits under the text: ${JSON.stringify(spec)}`);+ }+ assert.ok(!spec.overflow, `${width}: nothing runs off the screen`);+ // A filter that hides the pick moves it to the new first row; one that keeps it keeps it.+ await chrome.evaluate("document.querySelector('#spec-list [data-row=\"spec:G2\"]').click()");+ await chrome.evaluate("document.querySelector('#spec-chips [data-rows=\"spec:all\"]').click()");+ assert.equal((await read('spec')).picked, 'spec:G2', `${width}: a filter that still shows the pick keeps it`);+ await chrome.evaluate("document.querySelector('#spec-chips [data-rows=\"spec:approved\"]').click()");+ const moved = await read('spec');+ assert.deepEqual([moved.picked, moved.shown], ['spec:G3', 'G3'], `${width}: a filter that hides the pick moves it to the first row shown`);+ await chrome.evaluate("document.querySelector('[data-tab=doctrine]').click(); view.row.doctrine = null; render();");+ const doctrine = await read('doctrine');+ if (width === 1280) assert.ok(Math.abs(doctrine.list.top - doctrine.detail.top) < 0.5, `${width}: Doctrine's cards start on one line too`);+ assert.ok(doctrine.picked && doctrine.picked === doctrine.first && doctrine.shown === doctrine.first.split(':')[1], `${width}: and Doctrine opens on its first row: ${JSON.stringify([doctrine.picked, doctrine.shown])}`);+ }+ } finally {+ if (chrome) await closeSnapshotChrome(chrome);+ rmSync(profile, { recursive: true, force: true });+ await view.stop();+ }+});++ test('a project with one repo shows once in the project list [N33, N26]', async () => {+ const box = machine();+ const solo = project(box, 'solo', SPEC, { name: 'Solo board', project: 'Solo' });+ box.run(solo.repo, 'shout', 'person', 'Ship it today?', '--decision');+ // The relay lists every board this way: its project is its own repository's name.+ const mirrored = project(box, 'mirrored', SPEC, { name: 'acme/site', project: 'acme/site' });+ project(box, 'core', SPEC, { name: 'Core API', project: 'Atlas' });+ project(box, 'web', SPEC, { name: 'Web UI', project: 'Atlas' });+ const view = await startView(box);+ try {+ const page = await openPage(view);+ const side = page.show('proj-list');+ const once = (name) => side.split('<span class="pname">' + name + '</span>').length - 1;+ assert.doesNotMatch(side, /data-root="group:Solo"|data-root="group:acme\/site"/, 'a project with one repo has no group heading');+ assert.deepEqual([once('Solo board'), once('acme/site'), once('Solo')], [1, 1, 0], 'each one-repo project shows as its repo, once');+ assert.ok(side.includes(`data-root="${solo.repo}"`) && side.includes(`data-root="${mirrored.repo}"`), 'as a repo button of its own');+ assert.equal((side.match(/title="needs you">1<\/b>/g) || []).length, 1, "the lone repo's decision is counted once, not again on a heading");+ assert.match(side, /data-root="group:Atlas"/, 'two repos sharing a project still group');+ assert.deepEqual([once('Core API'), once('Web UI'), once('Atlas')], [1, 1, 1], 'under one heading');+ await page.click({ root: solo.repo });+ assert.deepEqual([page.element('group-view').hidden, page.element('tabs').hidden], [true, false], 'the lone repo opens on its own board');+ } finally {+ await view.stop();+ }+ });++ test('the view never scrolls sideways at 320px [N26]', { timeout: 120_000 }, async (t) => {+ const executable = chromeExecutable();+ if (!executable) return t.skip('Install Chrome or set PULLBOARD_CHROME for the 320px check.');++ const box = machine();+ const demo = project(box, 'narrow');+ box.run(demo.repo, 'add', 'web', 'A title long enough to need every bit of a narrow phone row, and then some more words', '--specs', 'G1', '--criterion', 'fits');+ box.run(demo.repo, 'add', 'web', 'Built, then sent back', '--specs', 'G1', '--criterion', 'back');+ build(box, demo, 2, 'two.txt');+ sendBack(box, demo, 2, 'It misses the edge the criterion names, a reason long enough to wrap on a phone.');+ const sha = box.git(demo.repo, 'rev-parse', 'HEAD').trim();+ box.run(demo.repo, 'shout', 'web', `Run \`pullboard next --verify\` and read SPEC.md:1-2@${sha} before you take #1.`);+ const view = await startView(box);+ const profile = mkdtempSync(join(tmpdir(), 'pullboard-sideways-chrome-'));+ let chrome;+ try {+ chrome = await openSnapshotChrome(executable, view.link.href, profile);+ await chrome.waitFor('document.querySelectorAll("#chain .row").length === 2');+ // This machine's fonts first, then a wide one (Verdana here, DejaVu Sans on Linux) at 320 and at 305,+ // the room a 320px screen leaves beside a classic 15px scrollbar: Linux CI measured 324px of tabs there.+ for (const [width, font] of [[320, ''], [320, 'Verdana, "DejaVu Sans", sans-serif'], [305, 'Verdana, "DejaVu Sans", sans-serif']]) {+ await chrome.send('Emulation.setDeviceMetricsOverride', { width, height: 800, deviceScaleFactor: 1, mobile: false });+ await chrome.evaluate(`document.documentElement.style.setProperty('--sans', ${JSON.stringify(font || 'system-ui, sans-serif')})`);+ await chrome.waitFor(`innerWidth === ${width}`);+ for (const tab of ['items', 'shouts', 'spec', 'doctrine', 'activity', 'roadmap']) {+ await chrome.evaluate(`document.querySelector('[data-tab="${tab}"]').click()`);+ await chrome.waitFor(`!document.querySelector('[data-pane="${tab}"]').hidden`);+ const seen = JSON.parse(await chrome.evaluate(`JSON.stringify((() => {+ const edge = document.documentElement.clientWidth;+ // Name each element that runs past the edge with nothing above it to clip or scroll it.+ const clipped = (e) => { for (let p = e.parentElement; p && p !== document.body; p = p.parentElement) if (!['visible', ''].includes(getComputedStyle(p).overflowX)) return true; return false; };+ const name = (e) => e.tagName.toLowerCase() + (e.id ? '#' + e.id : '') + (typeof e.className === 'string' && e.className ? '.' + e.className.trim().split(/\\s+/).join('.') : '');+ const past = [...document.querySelectorAll('body *')].filter((e) => { const r = e.getBoundingClientRect(); return r.width > 0 && r.right > edge + 0.5 && !clipped(e); })+ .map((e) => name(e) + ' right ' + Math.round(e.getBoundingClientRect().right) + ': ' + (e.textContent || '').trim().slice(0, 40));+ return { scrollWidth: document.documentElement.scrollWidth, clientWidth: edge, past: past.slice(0, 8), more: Math.max(0, past.length - 8) };+ })())`));+ assert.ok(seen.scrollWidth <= seen.clientWidth, `${width}${font ? ' in a wide font' : ''}, ${tab}: the page scrolls sideways, ${seen.scrollWidth} wide in ${seen.clientWidth}; past the edge: ${seen.past.join(' | ')}${seen.more ? ` (+${seen.more} more)` : ''}`);+ }+ }+ } finally {+ if (chrome) await closeSnapshotChrome(chrome);+ rmSync(profile, { recursive: true, force: true });+ await view.stop();+ }+ });+test('the tabs fit one row on a phone [N26]', async () => {const view = await startView(machine());try {