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
chore(merge): align model names with main [O8,N26]
Corey Olsona018b7baba9a
diff --cc src/cockpit.jsindex 93a0661d,f3973f94..3a7d09b7--- a/src/cockpit.js+++ b/src/cockpit.js@@@ -1188,19 -1180,21 +1185,21 @@@ function render()// questions in the spec, held lanes, then draft rows. Work waiting for a verdict or sent back shows// on the board with who holds it; it is the agents' to move.const needs = [- ...p.decisions.map((d) => ['decide:' + d.shout_id, d.shout_from, d.shout_text, 'decide', d.shout_at]),+ ...p.decisions.map((d) => ['decide:' + d.shout_id, agentName(d.shout_from, p), d.shout_text, 'decide', d.shout_at]),...p.spec.filter((r) => r.status === 'pending' && !r.decision).map((r) => ['spec:' + r.id, r.id, r.text, 'answer in SPEC.md']),- ...p.holds.map((h) => ['tab:shouts', h.hold_lane, h.hold_reason, 'lane held by ' + h.hold_by, h.hold_at]),+ ...p.holds.map((h) => ['tab:shouts', h.hold_lane, h.hold_reason, 'lane held by ' + agentName(h.hold_by), h.hold_at]),];const drafts = p.spec.filter((r) => r.status === 'draft' && !r.decision).length;- $('needs').hidden = !needs.length && !drafts;- /** Render the same Needs-you entry as linked text and an action, or plain read-only text. */- const needRow = ([target, ref, text, what, at]) => {- const status = '<em>' + esc(what) + (at ? ', ' + age(at) : '') + ' →</em>';- const action = readOnly ? status : '<button class="ny-open" data-go="' + esc(target) + '" type="button">' + status + '</button>';- return '<div class="ny"><code>' + esc(ref) + '</code><span class="ny-text">' + rich(text, titles, !readOnly) + '</span>' + action + '</div>';- };- $('needs').innerHTML = '<div class="head"><i></i>Needs you</div>' + needs.slice(0, 6).map(needRow).join('') + (needs.length > 6 ? '<div class="muted more">and ' + (needs.length - 6) + ' more</div>' : '') + (drafts ? needRow(['tab:spec', String(drafts), 'draft spec rows to approve or drop', 'review']) : '');+ // Each of the person's calls is a row at the head of Active, shaped like an item: what it is first, then NEEDS YOU and+ // its kind where an item has its lane, and what to do at the right. Every call is a row; the draft rows are one row+ // with their count. Read-only, a row is its words, opening nothing.+ $('needs').hidden = (!needs.length && !drafts) || view.state !== 'active' || Boolean(view.lane);+ const needRow = ([target, ref, text, what, at], kind, action) => '<li class="row ask"' + (readOnly ? '' : ' data-go="' + esc(target) + '"') + '><span class="dot ask"></span><div><div class="t">' + (ref ? '<span>' + esc(ref) + '</span>' : '') + rich(text, titles, !readOnly) + '</div>'+ + (at ? '<span class="row-age">' + age(at) + '</span>' : '') + '<div class="meta"><span class="why"><b>NEEDS YOU</b> ' + esc(kind) + '</span></div></div><span class="chip warn">' + esc(action) + '</span></li>';+ const needKind = (entry) => entry[3] === 'decide' ? needRow([entry[0], '', entry[2], entry[3], entry[4]], 'a decision, asked by ' + entry[1], 'decide')+ : entry[0].startsWith('spec:') ? needRow(entry, 'an open question in SPEC.md', 'answer') : needRow(entry, entry[3], 'release');+ $('needs').innerHTML = needs.map(needKind).join('')+ + (drafts ? needRow(['tab:spec', String(drafts), 'draft spec rows to approve or drop'], 'Spec rows waiting on you', 'review') : '');const lanes = p.lanes;const working = lanes.filter((l) => l !== 'coordinator');@@@ -1334,9 -1328,8 +1333,8 @@@// Opened from the status bar's unread, the feed is exactly those shouts, the ones after the mark the person had.const unread = view.unread?.root === view.root ? view.unread : null;const heard = unread ? p.shouts.filter((x) => x.shout_id > unread.after) : view.agent ? p.shouts.filter((x) => x.shout_from === view.agent || x.shout_to === view.agent) : p.shouts;- const bar = '<div class="feed-bar">' + (unread ? '<span><b>' + heard.length + '</b> unread <button class="link" data-unread type="button">show all</button></span>'- : view.agent ? '<span>Shouts with <b>' + esc(agentName(view.agent)) + '</b> <button class="link" data-agent="" type="button">show all</button></span>' : '<span></span>')- + '<button class="link" data-agents-toggle type="button">' + (view.agentsHidden ? 'Show agents' : 'Hide agents') + '</button></div>';+ const bar = !unread && !view.agent ? '' : '<div class="feed-bar">' + (unread ? '<span><b>' + heard.length + '</b> unread <button class="link" data-unread type="button">show all</button></span>'- : '<span>Shouts with <b>' + esc(view.agent) + '</b> <button class="link" data-agent="" type="button">show all</button></span>') + '</div>';++ : '<span>Shouts with <b>' + esc(agentName(view.agent)) + '</b> <button class="link" data-agent="" type="button">show all</button></span>') + '</div>';$('shouts-pane').classList.toggle('bare', view.agentsHidden);// Who has heard a shout of the person's: the agents it reached whose inbox has read past it. Each agent's read// cursor is already on the board, so this is presentation only; reading is all it says, not acting on it.@@@ -1360,12 -1353,14 +1358,14 @@@foldShouts();// Each ask waits here until it is answered (B21); the answer itself is typed in the form below. The// person answers the ones passed up to them; the rest wait on whoever holds them (B26).- $('decisions').hidden = !p.decisions.length && !p.asked.length;+ $('decisions').hidden = !p.decisions.length && !(p.asked.length && view.open.waiting);+ // The asks waiting on others are a toggle at the end of the composer's line, beside Show agents while the panel is hidden.- $('asks-slot').innerHTML = (p.asked.length ? '<button class="asks-toggle" data-fold="waiting" type="button" aria-expanded="' + Boolean(view.open.waiting) + '" title="' + esc('Asks between agents, waiting on others: ' + p.asked.map((d) => d.shout_from + ' asks ' + d.shout_to).join(', ')) + '">' + p.asked.length + (p.asked.length === 1 ? ' ask' : ' asks') + ' waiting <span aria-hidden="true">' + (view.open.waiting ? '▴' : '▾') + '</span></button>' : '')++ $('asks-slot').innerHTML = (p.asked.length ? '<button class="asks-toggle" data-fold="waiting" type="button" aria-expanded="' + Boolean(view.open.waiting) + '" title="' + esc('Asks between agents, waiting on others: ' + p.asked.map((d) => agentName(d.shout_from) + ' asks ' + agentName(d.shout_to)).join(', ')) + '">' + p.asked.length + (p.asked.length === 1 ? ' ask' : ' asks') + ' waiting <span aria-hidden="true">' + (view.open.waiting ? '▴' : '▾') + '</span></button>' : '')+ + (view.agentsHidden ? '<button class="asks-toggle" data-agents-toggle type="button">Show agents</button>' : '');// The asks as the feed's cards, folded to three lines: the person's to answer, then those waiting on others.$('decisions').innerHTML = (p.decisions.length ? '<div class="head"><i></i>Decision needed</div>' + p.decisions.map((d) => card(d, '<button class="ghost answer" data-go="decide:' + d.shout_id + '" type="button">Answer</button>', false)).join('') : '')- // Asks waiting on someone else are not the person's to answer, so they fold to one line that opens on demand.- + (p.asked.length ? foldLine('waiting', p.asked.length + (p.asked.length === 1 ? ' ask' : ' asks') + ' waiting on others', p.asked.map((d) => agentName(d.shout_from) + ' asks ' + agentName(d.shout_to)).join(', '))- + (view.open.waiting ? p.asked.map((d) => card(d, '', false)).join('') : '') : '');+ // Asks waiting on someone else are not the person's to answer: they show only once the composer's toggle opens them.+ + (p.asked.length && view.open.waiting ? p.asked.map((d) => card(d, '', false)).join('') : '');foldShouts();// Each agent with what it holds: its claim, then its work sent back, then its work waiting for a// verdict. The worktree path is there on hover; what the person reads is who is doing what.@@@ -1388,8 -1383,8 +1388,8 @@@const row = (a) => {const mine = holding(a), first = mine[0];return '<div class="agent-card' + marks(a) + '"><button class="agent-row" data-agent="' + esc(a.agent_id) + '" title="' + esc(tip(a)) + '" type="button">' + face(a)- + '<span class="agent-who"><b>' + esc(agentName(a.agent_id)) + '</b>' + (a.lastMoveAt ? '<time data-ago="' + esc(a.lastMoveAt) + '">' + ago(a.lastMoveAt) + '</time>' : '') + '</span>'- + '<span class="agent-doing"><span class="agent-what"><i>#' + first.id + '</i> ' + esc(first.title) + '</span>' + state(a, first) + (mine.length > 1 ? '<span class="agent-more">+' + (mine.length - 1) + '</span>' : '') + '</span></button>'- + '<span class="agent-who"><b>' + esc(a.agent_id) + '</b>' + state(a, first) + (mine.length > 1 ? '<span class="agent-more">+' + (mine.length - 1) + '</span>' : '') + (a.lastMoveAt ? '<time data-ago="' + esc(a.lastMoveAt) + '">' + ago(a.lastMoveAt) + '</time>' : '') + '</span>'++ + '<span class="agent-who"><b>' + esc(agentName(a.agent_id)) + '</b>' + state(a, first) + (mine.length > 1 ? '<span class="agent-more">+' + (mine.length - 1) + '</span>' : '') + (a.lastMoveAt ? '<time data-ago="' + esc(a.lastMoveAt) + '">' + ago(a.lastMoveAt) + '</time>' : '') + '</span>'+ + '<span class="agent-doing"><span class="agent-what"><i>#' + first.id + '</i> ' + esc(first.title) + '</span></span></button>'+ (view.agent === a.agent_id ? mine.map((i) => '<div class="agent-work" data-item="' + i.id + '" data-go="item:' + i.id + '"><span>#' + i.id + ' ' + rich(i.title, titles) + '</span>' + state(a, i) + '</div>').join('') : '') + '</div>';};// The panel is for who is doing what: agents holding nothing fold to one line that opens to each of them, and staysdiff --cc test/cockpit.test.jsindex a7c69a83,7aa4872f..e93c44eb--- a/test/cockpit.test.js+++ b/test/cockpit.test.js@@@ -7155,137 -7166,136 +7166,271 @@@ test('targets are 44px for touch and co}});+ test('needs you and the asks sit in their lists [N26]', { timeout: 180_000 }, async (t) => {+ const executable = chromeExecutable();+ if (!executable) return t.skip('Install Chrome or set PULLBOARD_CHROME for Needs you and Shouts checks.');+ const box = machine();+ const spec = `${SPEC}- G3 [pending] Should the greeting name the visitor? | gate: review\n- G4 [draft, must] The footer links home. | gate: web test\n- G5 [draft, aim] The header stays put. | gate: web test\n`;+ const alpha = project(box, 'asks', spec);+ box.run(alpha.repo, 'add', 'web', 'Greeting', '--specs', 'G1', '--criterion', 'greets');+ box.run(alpha.repo, 'add', 'web', 'Farewell', '--specs', 'G2', '--criterion', 'says goodbye');+ box.run(alpha.web, 'claim', '1');+ const second = join(box.dir, 'asks-web-2');+ box.git(alpha.repo, 'worktree', 'add', '-q', second, '-b', 'web/asks2');+ box.run(second, 'join', 'web');+ // The person's calls: a decision passed up to them, the spec's open question, a held lane and two draft rows. And an+ // agent's ask that waits on its coordinator, not on the person.+ box.run(alpha.web, 'shout', 'coordinator', 'Which colour for the button?', '--decision');+ box.run(alpha.repo, 'pass', '1', 'over to you');+ box.run(second, 'shout', 'coordinator', 'Ship the footer first?', '--decision');+ box.run(alpha.repo, 'hold', 'web', '--reason', 'Freeze for the demo');+ const view = await startView(box);+ const profile = mkdtempSync(join(tmpdir(), 'pullboard-asks-chrome-'));+ let chrome;+ /** Items' head and Shouts' card as they read. */+ const read = async () => JSON.parse(await chrome.evaluate(`JSON.stringify((() => {+ const box = (e) => { if (!e) return null; const r = e.getBoundingClientRect(); return { left: r.left, right: r.right, top: r.top, bottom: r.bottom, width: r.width, height: r.height }; };+ const shown = (e) => !!e && !e.closest('[hidden]') && e.getBoundingClientRect().height > 0;+ const probe = document.createElement('i'); probe.style.color = 'var(--warn)'; document.body.append(probe); const warn = getComputedStyle(probe).color; probe.remove();+ const needs = document.querySelector('#needs');+ const card = document.querySelector('.shouts-card'), decisions = document.querySelector('#decisions');+ return {+ page: { width: document.documentElement.clientWidth, scroll: document.documentElement.scrollWidth, body: document.body.scrollWidth },+ needsShown: shown(needs), inList: needs.parentElement === document.querySelector('#chain').parentElement, separateCard: !!document.querySelector('section.needs-you#needs'),+ needs: [...needs.querySelectorAll(':scope > .row')].map((row) => ({ go: row.dataset.go ?? null, words: row.querySelector('.t').textContent, ref: row.querySelector('.t > span')?.textContent ?? null,+ kind: row.querySelector('.meta .why').textContent, label: getComputedStyle(row.querySelector('.meta .why b')).color === warn && getComputedStyle(row.querySelector('.meta .why')).color === warn, chip: row.querySelector(':scope > .chip').textContent, age: !!row.querySelector('.row-age') })),+ card: card ? [...card.children].map((e) => e.id || e.className) : null,+ composer: box(document.querySelector('.shout-form .composer')), asks: box(document.querySelector('.asks-toggle[data-fold="waiting"]')),+ asksOpen: document.querySelector('.asks-toggle[data-fold="waiting"]')?.getAttribute('aria-expanded') ?? null, showAgents: box(document.querySelector('.asks-slot [data-agents-toggle]')),+ decisions: shown(decisions) ? [...decisions.querySelectorAll('.shout .text')].map((text) => text.textContent) : [], groupTint: getComputedStyle(decisions).backgroundColor, cardTint: card ? getComputedStyle(card).backgroundColor : null,+ firstRule: decisions.querySelector('.shout') ? getComputedStyle(decisions.querySelector('.shout')).borderTopWidth : null,+ feedBar: !!document.querySelector('#feed .feed-bar'), panelShown: shown(document.querySelector('#agents')), hide: !!document.querySelector('.panel-head [data-agents-toggle]'),+ agents: [...document.querySelectorAll('#agents .agent-card')].filter(shown).map((row) => ({ who: [...row.querySelector('.agent-who').children].map((part) => part.textContent.trim()).join(' '), what: row.querySelector('.agent-doing').textContent.trim(), chipInDoing: !!row.querySelector('.agent-doing .chip'), whatWidth: box(row.querySelector('.agent-what')).width, doingWidth: box(row.querySelector('.agent-doing')).width })),+ okNote: (() => { const c = document.querySelector('#console'); return !!c && !c.hidden && getComputedStyle(c).display !== 'none' && c.classList.contains('ok'); })(),+ };+ })())`));+ const click = (selector) => chrome.evaluate(`document.querySelector(${JSON.stringify(selector)}).click()`);+ try {+ chrome = await openSnapshotChrome(executable, view.link.href, profile);+ await chrome.waitFor("typeof data === 'object' && data?.project?.decisions?.length === 1 && data.project.asked.length === 1 && data.project.holds.length === 1");+ for (const scheme of ['light', 'dark']) {+ for (const width of [1280, 375]) {+ await chrome.send('Emulation.setDeviceMetricsOverride', { width, height: 900, deviceScaleFactor: 1, mobile: false });+ await chrome.send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-color-scheme', value: scheme }] });+ await chrome.waitFor(`innerWidth === ${width} && matchMedia('(prefers-color-scheme: ${scheme})').matches`);+ const at = `${width}px ${scheme}`;+ await click('[data-tab=items]');+ await click('[data-state=active]');+ let r = await read();+ assert.ok(r.page.scroll <= r.page.width && r.page.body <= r.page.width, `${at}: no sideways scroll on Items`);+ // Needs you heads the list: each call a row shaped like an item, NEEDS YOU and its kind (for a decision, who+ // asked) in the warning colour below.+ assert.deepEqual([r.needsShown, r.inList, r.separateCard], [true, true, false], `${at}: Needs you is the head of the Items list, not a card of its own`);+ assert.deepEqual(r.needs.map(({ go, ref, words, kind, chip }) => [go.split(':')[0], ref, words.includes('Which colour for the button?') ? 'Which colour…' : words, kind, chip]), [+ ['decide', null, 'Which colour…', 'NEEDS YOU a decision, asked by coordinator', 'decide'],+ ['spec', 'G3', 'G3Should the greeting name the visitor?', 'NEEDS YOU an open question in SPEC.md', 'answer'],+ ['tab', 'web', 'webFreeze for the demo', 'NEEDS YOU lane held by coordinator', 'release'],+ ['tab', '2', '2draft spec rows to approve or drop', 'NEEDS YOU Spec rows waiting on you', 'review'],+ ], `${at}: the person's calls, each a row, the drafts one row with their count`);+ assert.ok(r.needs.every((need) => need.label), `${at}: NEEDS YOU and its kind in the warning colour`);+ assert.deepEqual(r.needs.map((need) => need.age), [true, false, true, false], `${at}: a call that has an age shows it at the right`);++ await click('[data-tab=shouts]');+ await chrome.waitFor("!document.querySelector('[data-pane=shouts]').hidden && !!document.querySelector('#feed .shout')");+ r = await read();+ assert.ok(r.page.scroll <= r.page.width && r.page.body <= r.page.width, `${at}: no sideways scroll on Shouts`);+ // One card: the composer's line, the asks, the feed.+ assert.deepEqual(r.card, ['shout-form', 'decisions', 'feed'], `${at}: Shouts is one card`);+ if (width === 1280) assert.ok(Math.abs((r.composer.top + r.composer.height / 2) - (r.asks.top + r.asks.height / 2)) <= 4 && r.asks.left >= r.composer.right, `${at}: the asks waiting sit at the end of the composer's line: ${JSON.stringify([r.composer, r.asks])}`);+ assert.deepEqual([r.asksOpen, r.decisions.length, /Which colour for the button\?/.test(r.decisions[0] ?? '')], ['false', 1, true], `${at}: the asks waiting on others stay folded; the person's own decision shows`);+ assert.equal(r.feedBar, false, `${at}: no bar above the feed while it shows every shout`);+ assert.ok(r.hide && r.panelShown, `${at}: the agents panel carries its own hide`);+ // An agent's row: its name and state in words, then what it holds at the full width.+ const holder = r.agents.find((agent) => agent.who.startsWith('web-1'));+ assert.ok(holder && /^web-1 building (?:now|\d+[mhd])$/.test(holder.who) && holder.what === '#1 Greeting' && !holder.chipInDoing, `${at}: web-1's row reads as an item's: ${JSON.stringify(holder)}`);+ }+ }++ // Opened, the asks waiting on others are a group set apart from the feed, with no rule above the first.+ await chrome.send('Emulation.setDeviceMetricsOverride', { width: 1280, height: 900, deviceScaleFactor: 1, mobile: false });+ await chrome.send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-color-scheme', value: 'light' }] });+ await chrome.waitFor('innerWidth === 1280');+ await click('.asks-toggle[data-fold="waiting"]');+ let r = await read();+ assert.deepEqual([r.asksOpen, r.decisions.length, r.decisions[1]], ['true', 2, 'Ship the footer first?'], 'the toggle opens the ask waiting on others');+ assert.ok(r.groupTint !== r.cardTint && r.firstRule === '0px', `a tinted group with no rule above its first card: ${JSON.stringify([r.groupTint, r.cardTint, r.firstRule])}`);+ // Hidden, the agents come back from the composer's line, after the asks.+ await click('.panel-head [data-agents-toggle]');+ r = await read();+ assert.ok(!r.panelShown && r.showAgents && r.showAgents.left >= r.asks.right, `hidden, Show agents sits on the composer's line after the asks: ${JSON.stringify([r.asks, r.showAgents])}`);+ await click('.asks-slot [data-agents-toggle]');+ assert.ok((await read()).panelShown, 'and brings the panel back');+ // A sent shout shows as its card; no note pushes into the composer's line.+ await chrome.evaluate("document.querySelector('#shout-text').focus()");+ await chrome.send('Input.insertText', { text: 'Footer after the greeting.' });+ await click('#shout-send');+ await chrome.waitFor("[...document.querySelectorAll('#feed .shout .text')].some((text) => text.textContent === 'Footer after the greeting.')", 15_000);+ r = await read();+ assert.equal(r.okNote, false, 'a sent shout is its card, with no note beside the composer');+ // However many calls there are, each is a row: six more decisions make ten rows, none folded into a count.+ for (const n of [1, 2, 3, 4, 5, 6]) box.run(alpha.repo, 'shout', 'person', `Ship part ${n} today?`, '--decision');+ await click('[data-tab=items]');+ await chrome.waitFor("document.querySelectorAll('#needs > .row').length >= 10", 15_000);+ r = await read();+ assert.deepEqual([r.needs.length, r.needs.filter((need) => /^Ship part [1-6] today\?$/.test(need.words)).length, r.needs.every((need) => need.label)], [10, 6, true],+ `ten calls, ten rows, each with its kind in the warning colour: ${JSON.stringify(r.needs)}`);+ assert.equal(await chrome.evaluate("document.querySelector('#needs').textContent.includes('more need you')"), false, 'no call is folded into a count');+ // Narrowed to the unread shouts from the status bar, the feed carries its bar with show all; show all clears it.+ box.run(alpha.web, 'shout', 'coordinator', 'Greeting is half done.');+ await chrome.waitFor("!document.querySelector('#status-unread')?.hidden", 15_000);+ await click('#status-unread');+ await chrome.waitFor("view.tab === 'shouts' && !!document.querySelector('#feed .feed-bar')");+ assert.match(await chrome.evaluate("document.querySelector('#feed .feed-bar').textContent"), /^\d+ unread\s*show all$/, 'narrowed to the unread shouts, the feed carries its bar with show all');+ await click('#feed [data-unread]');+ assert.equal((await read()).feedBar, false, 'show all brings back every shout and clears the bar');+ // Under Verified, or a lane, the list is narrowed and Needs you steps aside.+ await click('[data-state=verified]');+ assert.equal((await read()).needsShown, false, 'under Verified, Needs you steps aside');+ await click('[data-state=active]');+ assert.deepEqual(chrome.exceptions, [], 'the page raises no uncaught exception');+ } finally {+ if (chrome) await closeSnapshotChrome(chrome);+ rmSync(profile, { recursive: true, force: true });+ await view.stop();+ }+ });+++test('agent model display names follow the API on phone and desktop [O8,N26]', { timeout: 150_000 }, async (t) => {+ const executable = chromeExecutable();+ assert.ok(executable, 'Chrome is required for model-name viewport proof');+ const box = machine();+ const alpha = project(box, 'model-names');+ box.run(alpha.web, 'join', 'web', '--model', 'GPT-6');+ const board = openBoard(join(alpha.repo, '.git', 'pullboard', 'board.sqlite'));+ try { register(board, { lane: 'coordinator', path: alpha.repo, model: 'Claude' }); }+ finally { closeBoard(board); }+ for (const title of ['Known holder', 'Reviewed model', 'Unknown holder']) {+ box.run(alpha.repo, 'add', 'web', title, '--specs', 'G1', '--criterion', 'visible');+ }+ build(box, alpha, 2, 'reviewed.txt');+ accept(box, alpha, 2);+ box.run(alpha.web, 'claim', '1');+ const unknown = join(box.dir, 'unknown-web');+ box.git(alpha.repo, 'worktree', 'add', '-q', unknown, '-b', 'web/unknown');+ // An existing stored registration may have no model even though new CLI joins require one.+ const legacyBoard = openBoard(join(alpha.repo, '.git', 'pullboard', 'board.sqlite'));+ try { register(legacyBoard, { lane: 'web', path: unknown }); }+ finally { closeBoard(legacyBoard); }+ box.run(unknown, 'claim', '3');+ box.run(alpha.web, 'shout', 'web-2', 'Known sender and unknown recipient');+ box.run(unknown, 'shout', 'all', 'Unknown sender and a lane-free recipient');+ box.run(alpha.repo, 'shout', 'person', 'A model decision', '--decision');+ box.run(alpha.repo, 'hold', 'web', '--reason', 'Wait for the model decision');+ box.run(alpha.repo, 'milestone', 'add', 'Model release', '--items', '1,2,3');+ const view = await startView(box);+ const profile = mkdtempSync(join(tmpdir(), 'pullboard-model-names-chrome-'));+ let chrome;+ /** Read rendered text from the real browser without changing its API data. */+ const text = (selector) => chrome.evaluate(`document.querySelector(${JSON.stringify(selector)})?.textContent || ''`);+ /** Press a real control and wait until its requested pane is drawn. */+ const tab = async (name) => {+ await press(chrome, `document.querySelector('[data-tab="${name}"]')`);+ await settled(chrome, `view.tab === ${JSON.stringify(name)}`);+ };+ try {+ chrome = await openSnapshotChrome(executable, view.link.href, profile);+ await settled(chrome, "data?.project?.agents?.length === 3 && !!document.querySelector('#chain [data-item=\"1\"]')");+ for (const style of ['suffix', 'prefix']) {+ if (style === 'prefix') {+ const configFile = join(alpha.repo, 'pullboard.json');+ const config = JSON.parse(readFileSync(configFile, 'utf8'));+ config.agents = { ...(config.agents || {}), names: 'prefix' };+ writeFileSync(configFile, JSON.stringify(config, null, 2));+ box.git(alpha.repo, 'add', 'pullboard.json');+ box.git(alpha.repo, 'commit', '-q', '-m', 'chore: use prefix names');+ await chrome.evaluate('refresh()');+ }+ const expected = style === 'suffix'+ ? { builder: 'web-1 (GPT-6)', reviewer: 'coordinator (Claude)', unknown: 'web-2 (unknown)' }+ : { builder: 'gpt-6-web-1', reviewer: 'claude-coordinator', unknown: 'unknown-web-2' };+ const apiNames = JSON.parse(await chrome.evaluate('JSON.stringify(Object.fromEntries(data.project.agents.map(a => [a.agent_id, a.displayName])))'));+ assert.deepEqual(apiNames, { coordinator: expected.reviewer, 'web-1': expected.builder, 'web-2': expected.unknown }, `${style}: authoritative API names`);+ for (const width of [375, 1280]) {+ await chrome.send('Emulation.setDeviceMetricsOverride', { width, height: 900, deviceScaleFactor: 1, mobile: false });+ await settled(chrome, `innerWidth === ${width}`);+ const at = `${style} ${width}`;+ await tab('items');+ await press(chrome, 'document.querySelector("[data-state=active]")');+ await settled(chrome, '!!document.querySelector("#chain [data-item=\\"1\\"]")');+ assert.equal(await text('#chain [data-item="1"] .chip'), expected.builder, `${at}: item row holder`);+ assert.equal(await text('#chain [data-item="3"] .chip'), expected.unknown, `${at}: unknown model row`);+ await press(chrome, 'document.querySelector("#chain [data-item=\\"1\\"]")');+ await settled(chrome, 'view.item === 1');+ assert.ok((await text('#detail')).includes(expected.builder), `${at}: held item detail`);++ assert.equal(await text('#needs .row[data-go^="decide:"] .meta'), 'NEEDS YOU a decision, asked by ' + expected.reviewer, `${at}: Needs-you decision author`);++ assert.ok((await text('#needs .row[data-go="tab:shouts"] .meta')).includes('lane held by ' + expected.reviewer), `${at}: Needs-you lane holder`);+ await press(chrome, 'document.querySelector("[data-state=verified]")');+ await settled(chrome, '!!document.querySelector("#chain [data-item=\\"2\\"]")');+ await press(chrome, 'document.querySelector("#chain [data-item=\\"2\\"]")');+ await settled(chrome, 'view.item === 2');+ const detail = await text('#detail');+ assert.ok(detail.includes(expected.builder) && detail.includes(expected.reviewer), `${at}: builder and verifier detail`);+ assert.ok((await text('#detail .verdict .by')).startsWith(expected.reviewer), `${at}: verdict identity`);- assert.equal(await text('#needs .ny code'), expected.reviewer, `${at}: Needs-you decision author`);- assert.ok((await text('#needs .ny:last-child em')).includes('lane held by ' + expected.reviewer), `${at}: Needs-you lane holder`);+ await tab('shouts');+ for (const [id, label] of [['web-1', expected.builder], ['web-2', expected.unknown]]) {+ assert.equal(await text(`#agents [data-agent="${id}"] .agent-who b`), label, `${at}: agent panel ${id}`);+ }+ if (!await chrome.evaluate('Boolean(view.open.idle)')) await press(chrome, 'document.querySelector("[data-fold=idle]")');+ assert.equal((await text('#agents [data-agent="coordinator"]')).trim(), expected.reviewer, `${at}: idle agent model`);+ const feed = await text('#feed');+ assert.ok(feed.includes(expected.builder) && feed.includes(expected.unknown) && feed.includes(expected.reviewer), `${at}: shout sender and recipient names`);+ assert.ok(feed.includes('→ all') && feed.includes('→ person'), `${at}: person and broadcast recipients keep their names`);+ await press(chrome, 'document.querySelector("#agents [data-agent=\\"web-1\\"]")');+ await settled(chrome, 'view.agent === "web-1"');+ assert.equal(await chrome.evaluate('view.agent'), 'web-1', `${at}: filtering retains the raw API id`);+ await press(chrome, 'document.querySelector("[data-agent=\\"\\"]")');+ await tab('activity');+ const activity = await text('#activity');+ assert.ok(activity.includes(expected.builder) && activity.includes(expected.unknown) && activity.includes(expected.reviewer), `${at}: activity identities`);+ await tab('roadmap');+ assert.doesNotMatch(await text('#roadmap'), /web-[12]|coordinator/, `${at}: roadmap rows name no agents`);+ await press(chrome, 'document.querySelector("#roadmap [data-go=\\"item:1\\"]")');+ await settled(chrome, 'view.tab === "items" && view.item === 1');+ assert.ok((await text('#detail')).includes(expected.builder), `${at}: roadmap item opens with the API identity`);+ assert.ok(await chrome.evaluate('document.documentElement.scrollWidth <= innerWidth'), `${at}: no sideways overflow`);+ }+ }+ assert.deepEqual(chrome.exceptions, [], 'all model-name views run without browser exceptions');+ } finally {+ if (chrome) await closeSnapshotChrome(chrome);+ rmSync(profile, { recursive: true, force: true });+ await view.stop();+ }+});++test('staged and exported boards carry API model display names [O8,N26,A10]', async () => {+ const box = machine();+ const alpha = project(box, 'model-export', SPEC, { agents: { names: 'prefix' } });+ box.run(alpha.web, 'join', 'web', '--model', 'GPT-6');+ const source = openBoard(join(alpha.repo, '.git', 'pullboard', 'board.sqlite'));+ const staged = openBoard(join(box.dir, 'staged-models.sqlite'));+ try {+ const before = exportBoard(source);+ importBoard(staged, before);+ const ordinary = projectState(alpha.repo);+ const borrowed = projectState(alpha.repo, { board: staged });+ assert.equal(ordinary.agents.find(a => a.agent_id === 'web-1').displayName, 'gpt-6-web-1', 'ordinary projector respects configured API name');+ assert.equal(borrowed.agents.find(a => a.agent_id === 'web-1').displayName, 'gpt-6-web-1', 'staged projector carries the same name');+ const directory = join(box.dir, 'exported-models');+ await exportView(alpha.repo, directory);+ const boardIds = readdirSync(join(directory, 'api', 'v1', 'boards'));+ assert.equal(boardIds.length, 1, 'the export contains the real fixture board');+ const snapshot = JSON.parse(readFileSync(join(directory, 'api', 'v1', 'boards', boardIds[0], 'state.json'), 'utf8'));+ assert.equal(snapshot.state.agents.find(a => a.agent_id === 'web-1').displayName, 'gpt-6-web-1', 'snapshot API retains the configured model name');+ assert.deepEqual(exportBoard(source), before, 'presentation does not change the real source board');+ assert.equal(staged.db.prepare('SELECT 1 AS open').get().open, 1, 'the borrowed file-backed board stays open');+ } finally {+ closeBoard(staged);+ closeBoard(source);+ }+});