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/60
Corey Olsonf1011f356c67
diff --cc test/cockpit.test.jsindex 649e91bd,8c51ccfd..7366e8a6--- a/test/cockpit.test.js+++ b/test/cockpit.test.js@@@ -608,63 -608,78 +608,135 @@@ test('projects group repos with combine}});+test('activity rows say what each shout and answer said [N26]', { timeout: 120_000 }, async (t) => {+ const executable = chromeExecutable();+ if (!executable) return t.skip('Install Chrome or set PULLBOARD_CHROME for activity checks.');++ const box = machine();+ const demo = project(box, 'said');+ box.run(demo.repo, 'add', 'web', 'Greet the visitor', '--specs', 'G1', '--criterion', 'greets');+ box.run(demo.repo, 'shout', 'web', 'The oldest note, from before the forty shouts the view loads');+ for (let n = 1; n <= 40; n++) box.run(demo.repo, 'shout', 'web', `Filler ${n}`);+ const long = 'Please take #1 next, run `pullboard next` in your worktree, and keep going until the greeting reads right on every width the view supports';+ box.run(demo.repo, 'shout', 'web', `${long}\nA second line the row leaves out.`);+ box.run(demo.web, 'shout', 'coordinator', 'Ship the greeting today?', '--decision');+ const view = await startView(box);+ const profile = mkdtempSync(join(tmpdir(), 'pullboard-said-chrome-'));+ let chrome;+ try {+ const headers = { 'x-pullboard-key': view.key };+ const [board] = (await (await fetch(`${view.base}/api/v1/boards`, { headers })).json()).boards;+ const state = (await (await fetch(`${view.base}/api/v1/boards/${encodeURIComponent(board.id)}/state`, { headers })).json()).state;+ const ask = state.asked.find((row) => row.shout_text === 'Ship the greeting today?');+ box.run(demo.repo, 'answer', String(ask.shout_id), 'Yes, ship it once the phone width reads right too');+ const asker = ask.shout_from;++ chrome = await openSnapshotChrome(executable, view.link.href, profile);+ await chrome.waitFor('!!document.querySelector(\'[data-tab="activity"]\')');+ await chrome.evaluate('document.querySelector(\'[data-tab="activity"]\').click()');+ await chrome.waitFor(`[...document.querySelectorAll('#activity .act')].some((row) => row.textContent.startsWith('coordinator answered'))`);+ for (const width of [375, 1280]) {+ await chrome.send('Emulation.setDeviceMetricsOverride', { width, height: 900, deviceScaleFactor: 1, mobile: false });+ await chrome.waitFor(`innerWidth === ${width}`);+ const rows = JSON.parse(await chrome.evaluate(`JSON.stringify([...document.querySelectorAll('#activity .act')].map((row) => {+ const said = row.querySelector('.said');+ const lines = said ? Math.round(said.getBoundingClientRect().height / parseFloat(getComputedStyle(said).lineHeight)) : 0;+ return { text: row.textContent, said: said?.textContent ?? null, tip: said?.title ?? null, lines, refs: said ? said.querySelectorAll('button.ref').length : 0,+ code: said ? [...said.querySelectorAll('code')].map((code) => code.textContent) : [], ellipsis: said ? getComputedStyle(said).textOverflow === 'ellipsis' : null,+ cut: said ? said.scrollWidth > said.clientWidth : null };+ }))`));+ const find = (start) => rows.find((row) => row.text.startsWith(start) && (row.said ?? '').length > 0);+ const told = find('coordinator shouted to web' + 'Please take');+ assert.ok(told, `${width}: a shout reads sender, shouted to, recipient, then what it said: ${JSON.stringify(rows.slice(0, 4))}`);+ assert.deepEqual([told.said, told.tip], [long.replaceAll("`", ""), long], `${width}: its first line, as written in the tooltip and rendered in the row, never its second`);+ assert.ok(told.lines === 1 && told.ellipsis, `${width}: on one line, set to end in an ellipsis: ${JSON.stringify(told)}`);+ if (width === 375) assert.ok(told.cut, `${width}: cut on a phone, so the ellipsis shows`);+ assert.deepEqual([told.refs, told.code], [1, ['pullboard next']], `${width}: keeping the item link and the inline code`);+ assert.ok(find(`${asker} asked coordinator` + 'Ship the greeting today?'), `${width}: a decision reads asked`);+ assert.ok(find(`coordinator answered ${asker}` + 'Yes, ship it once'), `${width}: an answer reads who answered whom, then the answer`);+ const oldest = rows.filter((row) => row.text.startsWith('coordinator shouted to web')).at(-1);+ assert.deepEqual([oldest.text, oldest.said], ['coordinator shouted to web', null], `${width}: a shout older than the forty on hand still names who it went to`);+ assert.ok(rows.some((row) => row.text === 'coordinator add #1 Greet the visitor'), `${width}: other rows read as before`);+ }+ } 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 {