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.

chore(merge): integrate accepted read-only needs you [N26,N27,B26]

Corey Olson1b0af8376f46
diff --cc src/cockpit.js
index 6d006180,8903f524..e4c836ee
--- a/src/cockpit.js
+++ b/src/cockpit.js
@@@ -871,13 -884,7 +884,13 @@@ function render()
];
const drafts = p.spec.filter((r) => r.status === 'draft').length;
$('needs').hidden = !needs.length && !drafts;
- /** Render one Needs-you entry as a link for an active page or text for a read-only page. */
- $('needs').innerHTML = '<div class="head"><i></i>Needs you</div>' + needs.slice(0, 6).map(([target, ref, text, what, at]) => '<div class="ny"><code>' + esc(ref) + '</code><span class="ny-text">' + rich(text, titles) + '</span><button class="ny-open" data-go="' + esc(target) + '" type="button"><em>' + esc(what) + (at ? ', ' + age(at) : '') + ' →</em></button></div>').join('') + (needs.length > 6 ? '<div class="muted more">and ' + (needs.length - 6) + ' more</div>' : '') + (drafts ? '<div class="ny"><code>' + drafts + '</code><span class="ny-text">draft spec rows to approve or drop</span><button class="ny-open" data-go="tab:spec" type="button"><em>review →</em></button></div>' : '');
++ /** 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 tag = readOnly ? 'div' : 'button';
- const action = readOnly ? '' : ' data-go="' + esc(target) + '" type="button"';
- return '<' + tag + ' class="ny"' + action + '><code>' + esc(ref) + '</code><span>' + rich(text, titles, false) + '</span><em>' + esc(what) + (at ? ', ' + age(at) : '') + ' →</em></' + tag + '>';
++ 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']) : '');
const lanes = p.lanes;
const working = lanes.filter((l) => l !== 'coordinator');
diff --cc src/view.css
index ff3b2d01,6b9df189..3d5e06a1
--- a/src/view.css
+++ b/src/view.css
@@@ -145,13 -146,13 +146,13 @@@ input:disabled { background: var(--surf
.needs-you .head.quiet { color: var(--ink-muted); font-weight: 600; }
.needs-you .ask + .head.quiet { margin-top: 12px; }
.needs-you .more { padding: 2px 4px; }
- .ny { display: grid; grid-template-columns: auto minmax(5em, 1fr) minmax(0, max-content); gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; padding: 6px 4px; border-radius: 8px; min-height: 44px; width: 100%; }
- button.ny { cursor: pointer; }
- button.ny:hover { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
+ .ny { display: grid; grid-template-columns: auto minmax(5em, 1fr) minmax(0, max-content); gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; padding: 6px 4px; border-radius: 8px; width: 100%; min-height: 44px; }
-.ny:hover { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
++.ny:has(.ny-open):hover { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.ny code { font: 600 12px var(--mono); }
- .ny span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); }
+ .ny .ny-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); }
+ .ny .ny-open { min-height: 44px; border: 0; padding: 0; background: none; color: var(--warn); cursor: pointer; text-align: right; }
.ny em { font-style: normal; color: var(--warn); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
- @media (width < 480px) { .ny { grid-template-columns: auto minmax(0, 1fr); row-gap: 1px; } .ny em { grid-column: 2; } }
+ @media (width < 480px) { .ny { grid-template-columns: auto minmax(0, 1fr); row-gap: 1px; } .ny .ny-open { grid-column: 2; } }
.ask { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 6px 4px; }
.ask > p { grid-column: 1; margin: 0; overflow-wrap: anywhere; }
.ask small { color: var(--ink-muted); }
diff --cc test/cockpit.test.js
index 80931e19,45b62e34..03286cce
--- a/test/cockpit.test.js
+++ b/test/cockpit.test.js
@@@ -1528,7 -1554,7 +1554,7 @@@ test("needs-you holds only the person'
['tab', '1', 'draft spec rows to approve or drop'],
], "the person's calls, and only those: the decision asked of them, the spec's question, the held lane, the draft row");
assert.doesNotMatch(needs, /Which colour|Greeting|Farewell/, "an agent's ask, work waiting for a verdict and work sent back are not the person's");
- assert.match(needs, /<code>web<\/code><span>G3 is open<\/span><em>lane held by coordinator, <time data-ago="[^"]+">(?:now|\d+[mhd])<\/time> →<\/em>/, 'a held lane says who set it and shows the API-provided hold age');
- assert.match(needs, /<code>web<\/code><span class="ny-text">G3 is open<\/span><button class="ny-open" data-go="tab:shouts" type="button"><em>lane held by coordinator →<\/em><\/button>/, 'a held lane says who set it');
++ assert.match(needs, /<code>web<\/code><span class="ny-text">G3 is open<\/span><button class="ny-open" data-go="tab:shouts" type="button"><em>lane held by coordinator, <time data-ago="[^"]+">(?:now|\d+[mhd])<\/time> →<\/em><\/button>/, 'a held lane says who set it and shows the API-provided hold age');
// Each of the rest is on the board, with who holds it.
assert.match(page.show('decisions'), /<div class="head quiet">Waiting on others<\/div><div class="ask other"><p><small><b>web-1<\/b> asks <b>coordinator<\/b>, /, "the agent's ask waits on its coordinator");