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
feat(view): activity rows say what each shout said [N26]
Corey Olsoneb50bf451204
diff --git a/src/cockpit.js b/src/cockpit.jsindex 047cdfa5..6f4d89a1 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -1128,7 +1128,18 @@ function render() {}if (keep('pb.flow') !== 'hidden') $('flow').innerHTML = flowSvg(p);- $('activity').innerHTML = p.events.length ? byDay(p.events, (e) => e.event_at, (e) => '<div><time>' + clock(e.event_at) + '</time><div class="act"><b>' + esc(e.event_by) + '</b> ' + esc(e.event_kind) + (e.item_id ? ' <button class="ref" data-go="item:' + e.item_id + '" type="button">#' + e.item_id + '</button>' + (titles.has(String(e.item_id)) ? ' <span class="what">' + rich(titles.get(String(e.item_id)), titles) + '</span>' : '') : '') + '</div></div>') : '<div class="empty">No activity yet.</div>';+ // A shout or an answer says what it said: who to whom, then its first line, from the shouts on hand.+ // One older than those still names who it went to.+ const said = new Map(p.shouts.map((x) => [x.shout_id, x]));+ const spoke = (e) => {+ let detail = {};+ try { detail = JSON.parse(e.event_detail || '{}') || {}; } catch { /* an unreadable detail names the sender alone */ }+ const x = said.get(detail.shout) || { shout_to: detail.to, shout_decision: detail.decision, shout_answers: detail.answers };+ const verb = e.event_kind === 'answer' || x.shout_answers ? 'answered' : x.shout_decision ? 'asked' : 'shouted to';+ const line = firstLine(x.shout_text);+ return '<b>' + esc(e.event_by) + '</b> ' + verb + (x.shout_to ? ' <b>' + esc(x.shout_to) + '</b>' : '') + (line ? '<span class="said" title="' + esc(line) + '">' + inline(line, titles) + '</span>' : '');+ };+ $('activity').innerHTML = p.events.length ? byDay(p.events, (e) => e.event_at, (e) => '<div><time>' + clock(e.event_at) + '</time><div class="act">' + (e.event_kind === 'shout' || e.event_kind === 'answer' ? spoke(e) : '<b>' + esc(e.event_by) + '</b> ' + esc(e.event_kind) + (e.item_id ? ' <button class="ref" data-go="item:' + e.item_id + '" type="button">#' + e.item_id + '</button>' + (titles.has(String(e.item_id)) ? ' <span class="what">' + rich(titles.get(String(e.item_id)), titles) + '</span>' : '') : '')) + '</div></div>') : '<div class="empty">No activity yet.</div>';showTab();}diff --git a/src/view.css b/src/view.cssindex 1b3299d1..0adf5e1c 100644--- a/src/view.css+++ b/src/view.css@@ -270,6 +270,8 @@ code.inline { padding: 0 3px; border-radius: 3px; background: color-mix(in srgb,.code.no { color: var(--reject); }.feed .act { display: flex; gap: 0 5px; align-items: baseline; min-width: 0; }.feed .act .what { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; color: var(--ink-muted); }+.feed .act .said { flex: 1 1 0; min-width: 0; margin-left: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); }+.feed .act .said code { white-space: nowrap; }.agent { display: grid; gap: 2px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }.agent:first-child { border-top: 0; }.agent small { color: var(--ink-faint); font: 11.5px var(--mono); overflow-wrap: anywhere; }diff --git a/test/cockpit.test.js b/test/cockpit.test.jsindex 50bed301..649e91bd 100644--- a/test/cockpit.test.js+++ b/test/cockpit.test.js@@ -608,6 +608,63 @@ test('projects group repos with combined needs and activity, while ungrouped and}});+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('the tabs fit one row on a phone [N26]', async () => {const view = await startView(machine());try {