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): keep waiting asks in first grid column [N26]

Corey Olson938d8cee8a67
diff --git a/src/view.css b/src/view.css
index 0238d83c..432f6153 100644
--- a/src/view.css
+++ b/src/view.css
@@ -136,7 +136,7 @@ input:disabled { background: var(--surface-2); color: var(--ink-muted); }
.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; } }
.ask { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 6px 4px; }
-.ask p { margin: 0; overflow-wrap: anywhere; }
+.ask > p { grid-column: 1; margin: 0; overflow-wrap: anywhere; }
.ask small { color: var(--ink-muted); }
.ask button { grid-row: 1 / span 2; grid-column: 2; }
.answering { flex: 1 1 100%; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; margin: 0; font-size: 13px; color: var(--ink-muted); }
diff --git a/test/cockpit.test.js b/test/cockpit.test.js
index fe3aa57f..7628dd9a 100644
--- a/test/cockpit.test.js
+++ b/test/cockpit.test.js
@@ -2551,6 +2551,7 @@ test('real Chrome keeps the demo board usable at phone and desktop widths [N26,N
const other = project(box, 'other-demo');
box.run(demo.repo, 'add', 'web', 'Starter item', '--specs', 'G1', '--criterion', 'visible in the detail pane');
box.run(demo.repo, 'shout', 'person', 'Should the phone demo ship?', '--decision');
+ box.run(demo.web, 'shout', 'coordinator', 'Should this waiting ask span the full row?', '--decision');
const view = await startView(box);
const profile = mkdtempSync(join(tmpdir(), 'pullboard-phone-'));
let chrome;
@@ -2636,6 +2637,32 @@ test('real Chrome keeps the demo board usable at phone and desktop widths [N26,N
for (const tab of ['shouts', 'spec', 'doctrine', 'activity']) {
await click(`[data-tab="${tab}"]`);
await checkLayout(width, `${tab} tab`);
+ if (tab === 'shouts') {
+ const asks = JSON.parse(await chrome.evaluate(`JSON.stringify((() => {
+ const waiting = document.querySelector('#decisions .ask.other');
+ const waitingMeta = waiting?.querySelector('p:first-child');
+ const waitingText = waiting?.querySelector('p:nth-child(2)');
+ const answer = document.querySelector('#decisions .ask:not(.other)');
+ const answerMeta = answer?.querySelector('p:first-child');
+ const button = answer?.querySelector('button');
+ const rect = e => { const r=e.getBoundingClientRect(); return {left:r.left,right:r.right,width:r.width,height:r.height}; };
+ return {
+ waitingIsNeedsYou: document.querySelector('#decisions').classList.contains('needs-you'),
+ waitingHasNoButton: !!waiting && !waiting.querySelector('button'),
+ waitingMeta: waitingMeta && rect(waitingMeta),
+ waitingMetaLine: waitingMeta && parseFloat(getComputedStyle(waitingMeta).lineHeight),
+ waitingAsk: waiting && rect(waiting), waitingText: waitingText && rect(waitingText),
+ answerMeta: answerMeta && rect(answerMeta), button: button && rect(button),
+ };
+ })())`));
+ assert.ok(asks.waitingIsNeedsYou && asks.waitingHasNoButton, `${width}: the waiting ask is shown in the Needs-you card without an answer button`);
+ assert.ok(asks.waitingMeta.width > 0 && asks.waitingMeta.height <= asks.waitingMetaLine + 1,
+ `${width}: waiting ask who/when stays on one line: ${JSON.stringify(asks)}`);
+ assert.ok(asks.waitingText.width >= asks.waitingAsk.width - 24,
+ `${width}: waiting ask text spans the row: ${JSON.stringify(asks)}`);
+ assert.ok(asks.button.left > asks.answerMeta.right,
+ `${width}: an answer button keeps its own grid column: ${JSON.stringify(asks)}`);
+ }
}
await click('[data-tab="items"]');