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.

fix(view): a row detail does not repeat who approves rows [N26]

Corey Olson277a00048af4
diff --git a/src/cockpit.js b/src/cockpit.js
index 0078da05..65766605 100644
--- a/src/cockpit.js
+++ b/src/cockpit.js
@@ -2759,12 +2759,13 @@ function render() {
const text = row ? declined ? '<s>' + linked(row.standardText || row.text, titles) + '</s>' : linked(row.text, titles) : '';
const source = kind === 'doctrine' && row ? '<span class="chip" title="' + esc(ruleSourceTitle(row)) + '">' + esc(ruleSource(row)) + '</span>' : '';
const reason = (declined || kind === 'spec' && row?.status === 'wont') && row?.reason ? '<dt>reason</dt><dd>' + linked(row.reason, titles) + '</dd>' : '';
- const home = kind === 'doctrine' && row && row.origin === 'standard' ? 'Standard rules come with Pullboard as defaults to review; override or decline one in DOCTRINE.md.' : 'Rows change in ' + (kind === 'spec' ? 'SPEC.md' : 'DOCTRINE.md') + ', and only you approve them.';
+ // Only a standard rule gets a note; who approves rows is said once elsewhere, not in every detail (#822).
+ const home = kind === 'doctrine' && row && row.origin === 'standard' ? 'Standard rules come with Pullboard as defaults to review; override or decline one in DOCTRINE.md.' : '';
const rowStatus = row?.stage || row?.status;
const rowDecisionActions = !snapshot && (!readOnly || requests) && row && undecided(row) && (kind === 'spec' || row.origin !== 'standard')
? '<div class="spec-decision-actions detail-decision-actions"><button class="approve-row" data-row-decision="approve" data-row-kind="' + kind + '" data-row-id="' + esc(row.id) + '" title="Approve (A, from the list)" type="button">Approve <kbd>A</kbd></button><button class="decline-row" data-row-decision="decline" data-row-kind="' + kind + '" data-row-id="' + esc(row.id) + '" title="Decline (D, from the list)" type="button">Decline <kbd>D</kbd></button></div>'
: '';
- $(kind + '-detail').innerHTML = row ? '<div class="stack tight"><h2><span>' + esc(row.id) + '</span>' + text + '</h2><div class="meta"><span class="chip ' + tone(row.status) + '">' + esc(rowStatus) + '</span>' + (row.tier ? '<span class="chip">' + esc(row.tier) + '</span>' : '') + source + '</div>' + rowDecisionActions + (kind === 'spec' && view.specFeedback?.kind === kind && view.specFeedback.root === view.root && view.specFeedback.from === 'detail' && view.specFeedback.id === row.id ? specFeedback(view.specFeedback) : '') + '<dl class="kv"><dt>section</dt><dd>' + esc(row.section) + '</dd>' + reason + (row.gate ? '<dt>gate</dt><dd>' + esc(row.gate) + '</dd>' : '') + (row.serves && row.serves.length ? '<dt>serves</dt><dd>' + esc(row.serves.join(', ')) + '</dd>' : '') + '</dl><div><h3>Items that cite it</h3>' + (citing.length ? '<div class="links">' + citing.map((i) => '<div class="links-item" data-item="' + i.id + '"><span>#' + i.id + ' ' + rich(i.title, titles) + '</span></div>').join('') + '</div>' : '<div class="muted">None yet.</div>') + '</div><div class="muted">' + home + '</div></div>' : '<div class="empty">' + (view.tab === kind && view.addressDetail !== null ? 'No ' + (kind === 'spec' ? 'Spec' : 'Doctrine') + ' row ' + esc(view.addressDetail) + ' exists here.' : 'Pick a row to see it, and the items that cite it.') + '</div>';
+ $(kind + '-detail').innerHTML = row ? '<div class="stack tight"><h2><span>' + esc(row.id) + '</span>' + text + '</h2><div class="meta"><span class="chip ' + tone(row.status) + '">' + esc(rowStatus) + '</span>' + (row.tier ? '<span class="chip">' + esc(row.tier) + '</span>' : '') + source + '</div>' + rowDecisionActions + (kind === 'spec' && view.specFeedback?.kind === kind && view.specFeedback.root === view.root && view.specFeedback.from === 'detail' && view.specFeedback.id === row.id ? specFeedback(view.specFeedback) : '') + '<dl class="kv"><dt>section</dt><dd>' + esc(row.section) + '</dd>' + reason + (row.gate ? '<dt>gate</dt><dd>' + esc(row.gate) + '</dd>' : '') + (row.serves && row.serves.length ? '<dt>serves</dt><dd>' + esc(row.serves.join(', ')) + '</dd>' : '') + '</dl><div><h3>Items that cite it</h3>' + (citing.length ? '<div class="links">' + citing.map((i) => '<div class="links-item" data-item="' + i.id + '"><span>#' + i.id + ' ' + rich(i.title, titles) + '</span></div>').join('') + '</div>' : '<div class="muted">None yet.</div>') + '</div>' + (home ? '<div class="muted">' + home + '</div>' : '') + '</div>' : '<div class="empty">' + (view.tab === kind && view.addressDetail !== null ? 'No ' + (kind === 'spec' ? 'Spec' : 'Doctrine') + ' row ' + esc(view.addressDetail) + ' exists here.' : 'Pick a row to see it, and the items that cite it.') + '</div>';
}
if (keep('pb.flow') !== 'hidden') $('flow').innerHTML = flowSvg(p);
diff --git a/test/cockpit/doctrine.test.js b/test/cockpit/doctrine.test.js
index a48b4e9c..e6b24b39 100644
--- a/test/cockpit/doctrine.test.js
+++ b/test/cockpit/doctrine.test.js
@@ -81,13 +81,38 @@ test('the doctrine pane names DOCTRINE.md and its rules doctrine [D1,N26]', asyn
assert.doesNotMatch(detail, /PRACTICE\.md/);
await page.click({ row: 'doctrine:R1' });
const localDetail = page.show('doctrine-detail');
- assert.match(localDetail, /Rows change in DOCTRINE\.md/);
+ assert.doesNotMatch(localDetail, /Rows change in/, 'a local row does not repeat who approves rows (#822)');
assert.doesNotMatch(localDetail, /PRACTICE\.md/);
} finally {
await view.stop();
}
});
+test('a row detail does not repeat who approves rows [N26]', async () => {
+ const box = machine();
+ const alpha = project(box, 'row-detail-approval', SPEC, { practice: 'DOCTRINE.md' });
+ writeFileSync(join(alpha.repo, 'DOCTRINE.md'), '# Team\n\n## Team\n- R1 [approved, must] Keep evidence. | gate: review\n');
+ const view = await startView(box);
+ try {
+ const page = await openPage(view);
+ await page.click({ tab: 'spec' });
+ await page.click({ row: 'spec:G1' });
+ const spec = page.show('spec-detail');
+ assert.match(spec, /G1/, 'the spec row detail is open');
+ assert.doesNotMatch(spec, /Rows change in/, 'a spec row does not repeat who approves rows');
+ await page.click({ tab: 'doctrine' });
+ await page.click({ row: 'doctrine:R1' });
+ const local = page.show('doctrine-detail');
+ assert.match(local, /R1/, 'the local doctrine row detail is open');
+ assert.doesNotMatch(local, /Rows change in/, 'a local doctrine row does not repeat who approves rows');
+ await page.click({ row: 'doctrine:PB1' });
+ assert.match(page.show('doctrine-detail'), /Standard rules come with Pullboard as defaults to review; override or decline one in DOCTRINE\.md\./,
+ 'a standard rule keeps its note');
+ } finally {
+ await view.stop();
+ }
+});
+
/** Keep a doctrine row's real item citations when the person leaves and returns to the tab. */
// Hang ceiling: two real Chrome viewport journeys; no speed assertion.
test('the doctrine detail keeps its citing items after a tab round trip [N26,C7]', { timeout: 30_000 }, async (t) => {