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 names the item each event moved [N26]

Corey Olson2982c2ca4ad5
diff --git a/src/cockpit.js b/src/cockpit.js
index 337b4e0d..e0788e42 100644
--- a/src/cockpit.js
+++ b/src/cockpit.js
@@ -201,6 +201,8 @@ input, select { border: 1px solid var(--line-strong); background: var(--surface)
.feed .day { margin: 0; padding: 12px 0 4px; font: 600 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
.feed .day:first-child { padding-top: 6px; }
.feed button.ref { border: 0; background: none; padding: 0; color: var(--accent-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
+.feed .act { display: flex; gap: 0 5px; align-items: baseline; min-width: 0; }
+.feed .act .what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); }
.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; }
@@ -631,7 +633,7 @@ function render() {
}
$('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><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>' : '') + '</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"><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">' + esc(titles.get(String(e.item_id))) + '</span>' : '') : '') + '</div></div>') : '<div class="empty">No activity yet.</div>';
showTab();
}
diff --git a/test/cockpit.test.js b/test/cockpit.test.js
index 51bdca07..bc392bde 100644
--- a/test/cockpit.test.js
+++ b/test/cockpit.test.js
@@ -895,3 +895,23 @@ test('spec rows read across a phone [N26]', async () => {
await view.stop();
}
});
+
+test('activity names the item each event moved [N26]', async () => {
+ const box = machine();
+ const alpha = project(box, 'alpha');
+ box.run(alpha.repo, 'add', 'web', 'Greeting <b>bold</b>', '--specs', 'G1', '--criterion', 'greets');
+ box.run(alpha.web, 'claim', '1');
+ const view = await startView(box);
+ try {
+ const page = await openPage(view);
+ const rows = page.show('activity').split('<div><time>').slice(1);
+ const about = rows.filter((row) => row.includes('data-go="item:1"'));
+ assert.equal(about.length, 2, 'the add and the claim');
+ for (const row of about) assert.match(row, /type="button">#1<\/button> <span class="what">Greeting &lt;b&gt;bold&lt;\/b&gt;<\/span><\/div>/, 'the escaped title follows the link');
+ const joins = rows.filter((row) => /<\/b> join<\/div>/.test(row));
+ assert.ok(joins.length > 0 && joins.every((row) => !row.includes('class="what"')), 'an event about no item names none');
+ assert.match(page.html, /\.feed \.act \.what \{ min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;/, 'a long title keeps to one line');
+ } finally {
+ await view.stop();
+ }
+});