Skip to content

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.

feat(view): activity shows board news as a message [N26]

Corey Olson232e6d364c53
diff --git a/src/cockpit.js b/src/cockpit.js
index ae3e7f0c..025755b7 100644
--- a/src/cockpit.js
+++ b/src/cockpit.js
@@ -1482,7 +1482,7 @@ function render() {
const line = firstLine(x.shout_text);
return '<b>' + esc(agentName(e.event_by)) + '</b> ' + verb + (x.shout_to ? ' <b>' + esc(agentName(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(agentName(e.event_by)) + '</b> ' + esc(e.event_kind) + (e.item_id ? ' <a class="ref" href="' + esc(itemAddress(e.item_id)) + '" data-go="item:' + e.item_id + '">#' + e.item_id + '</a>' + (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>';
+ $('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 === 'shout_news' || e.event_kind === 'answer' ? spoke(e) : '<b>' + esc(agentName(e.event_by)) + '</b> ' + esc(e.event_kind) + (e.item_id ? ' <a class="ref" href="' + esc(itemAddress(e.item_id)) + '" data-go="item:' + e.item_id + '">#' + e.item_id + '</a>' + (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();
revealPlace();
updateRoadmapPanel();
diff --git a/test/cockpit/activity.test.js b/test/cockpit/activity.test.js
index 6f017f9e..2a2a18a5 100644
--- a/test/cockpit/activity.test.js
+++ b/test/cockpit/activity.test.js
@@ -421,6 +421,7 @@ test('activity rows say what each shout and answer said [N26]', { timeout: 120_0
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.repo, 'shout', 'all', 'The private news release is ready.', '--news');
box.run(demo.web, 'shout', 'coordinator', 'Ship the greeting today?', '--decision');
const view = await startView(box);
const profile = mkdtempSync(join(tmpdir(), 'pullboard-said-chrome-'));
@@ -468,6 +469,7 @@ test('activity rows say what each shout and answer said [N26]', { timeout: 120_0
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('coordinator (unknown) shouted to all' + 'The private news release is ready.'), `${width}: typed news retains its actual text in activity`);
assert.ok(find(`${asker} (Test Model) asked coordinator (unknown)` + 'Ship the greeting today?'), `${width}: a decision reads asked`);
assert.ok(find(`coordinator (unknown) answered ${asker} (Test Model)` + 'Yes, ship it once'), `${width}: an answer reads who answered whom, then the answer`);
const oldest = rows.filter((row) => row.text.startsWith('coordinator (unknown) shouted to web')).at(-1);