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.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
fix(view): waiting asks fit wider fonts [N26]
Corey Olson3a900c2777aa
diff --git a/src/cockpit.js b/src/cockpit.jsindex 1a776df4..4c8c504e 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -1307,7 +1307,7 @@ function render() {// a number that names no item stays text. A path:lines@commit reference opens that code (B23). It// counts only as a whole word, never as the tail of one, so what it opens is what it says, and the// view refuses what is no path in the repo.- const mark = (x) => (x.shout_decision ? '<span class="mark ask">decision</span> ' : x.shout_answers ? '<span class="mark">answer</span> ' : '');+ const mark = (x) => (x.shout_decision ? '<span class="mark ask" role="group" title="decision" aria-label="decision">decision</span> ' : x.shout_answers ? '<span class="mark" role="group" title="answer" aria-label="answer">answer</span> ' : '');// Evidence a shout carries (B22), as the fields it is: its kind and outcome, the item, who sent it,// and the commit, shortened, with the full SHA on hover.const evidence = (x) => (x.shout_evidence_kind ? '<div class="receipt"><div><span class="badge">' + esc(x.shout_evidence_kind) + '</span> <span class="outcome">' + esc(x.shout_evidence_outcome) + '</span></div>'diff --git a/src/view.css b/src/view.cssindex 2ec8da62..b4fe0bd9 100644--- a/src/view.css+++ b/src/view.css@@ -368,6 +368,11 @@ form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; paddin.shout .to, .shout .item { color: var(--ink-faint); }.shout .item { font: 12px var(--mono); }.shout header time { margin-left: auto; color: var(--ink-faint); font-size: 12px; white-space: nowrap; }+/* A waiting ask keeps its address and age whole; a wider fallback font shortens its kind instead. */+#decisions .shout header { flex-wrap: nowrap; }+#decisions .shout .who, #decisions .shout .to { flex: 0 1 auto; min-width: min-content; white-space: nowrap; }+#decisions .shout header .mark { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+#decisions .shout header time { flex: none; }.shout .text { margin-top: 3px; overflow-wrap: break-word; }.shout.clamp:not(.open) .text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; }.shout .more { display: none; align-items: center; min-height: var(--tap); margin: -8px 0 -10px; padding: 0; border: 0; background: none; color: var(--accent-strong); font-weight: 600; font-size: 13px; cursor: pointer; }diff --git a/test/cockpit.test.js b/test/cockpit.test.jsindex eeb520c4..8a6ed8cb 100644--- a/test/cockpit.test.js+++ b/test/cockpit.test.js@@ -7361,3 +7361,60 @@ test('the project switcher\'s arrow turns with the list [N26]', { timeout: 120_0await view.stop();}});++/** Keep a waiting ask's address and age readable when a fallback font widens its header [N26]. */+test("a waiting ask's who and when stay on one line with wide fonts [N26]", { timeout: 120_000 }, async () => {+ const executable = chromeExecutable();+ assert.ok(executable, 'Chrome is required for the wide-font regression');+ const box = machine();+ const demo = project(box, 'wide-waiting-ask');+ box.run(demo.web, 'shout', 'coordinator', 'Does this waiting ask fit with a wider font?', '--decision');+ const view = await startView(box);+ const profile = mkdtempSync(join(tmpdir(), 'pullboard-wide-ask-chrome-'));+ let chrome;+ try {+ chrome = await openSnapshotChrome(executable, view.link.href, profile);+ await chrome.send('Emulation.setDeviceMetricsOverride', { width: 375, height: 900, deviceScaleFactor: 1, mobile: false });+ await chrome.waitFor("data?.project && innerWidth === 375");+ await press(chrome, "document.querySelector('[data-tab=shouts]')");+ await pressedInto(chrome, "view.tab === 'shouts' && !!document.querySelector('.asks-toggle')");+ await press(chrome, "document.querySelector('.asks-toggle')");+ await pressedInto(chrome, "!!document.querySelector('#decisions .shout:not(:has(.answer)) header')");+ // Change font metrics only: the production layout must fit the same real waiting ask.+ await chrome.evaluate("(() => { const sheet = document.styleSheets[0]; sheet.insertRule('#decisions .shout header { font-family: monospace; letter-spacing: 1px; }', sheet.cssRules.length); })()");+ const result = JSON.parse(await chrome.evaluate(`JSON.stringify((() => {+ const card = document.querySelector('#decisions .shout:not(:has(.answer))'), header = card.querySelector('header');+ const rect = (element) => { const r = element.getBoundingClientRect(); return { left:r.left, right:r.right, top:r.top, bottom:r.bottom, width:r.width, height:r.height }; };+ const who = header.querySelector('.who'), address = who.querySelector('.agent-id') || who, age = header.querySelector('time'), kind = header.querySelector('.mark');+ const range = document.createRange(); range.selectNodeContents(address);+ const recipient = header.querySelector('.to .agent-id') || header.querySelector('.to'), recipientRange = document.createRange(); recipientRange.selectNodeContents(recipient);+ const copy = header.cloneNode(true); copy.style.cssText += ';position:fixed;visibility:hidden;width:max-content'; header.parentElement.append(copy);+ const natural = copy.getBoundingClientRect().width; copy.remove();+ return { header:rect(header), age:rect(age), ageText:age.textContent, ageWidth:age.clientWidth, ageScroll:age.scrollWidth,+ address:rect(address), addressText:address.textContent, addressInk:rect(range), line:parseFloat(getComputedStyle(who).lineHeight),+ recipient:rect(recipient), recipientInk:rect(recipientRange), recipientText:recipient.textContent, spacing:getComputedStyle(header).letterSpacing, natural, kind:{ text:kind.textContent, width:kind.clientWidth, scroll:kind.scrollWidth, overflow:getComputedStyle(kind).textOverflow, title:kind.title, label:kind.getAttribute('aria-label') },+ page:[document.documentElement.clientWidth, document.documentElement.scrollWidth] };+ })())`));+ assert.equal(result.spacing, '1px', 'the positive control widens the actual waiting header');+ assert.ok(result.natural > result.header.width, `the full header cannot fit without shortening text: ${JSON.stringify(result)}`);+ assert.ok(result.header.height <= result.line + 1, `the waiting ask stays on one line with wide fonts: ${JSON.stringify(result)}`);+ assert.equal(result.addressText, 'web-1', 'the sender address remains whole');+ assert.ok(result.addressInk.left >= result.address.left - 1 && result.addressInk.right <= result.address.right + 1, 'the complete address is drawn inside its element');+ assert.match(result.recipientText, /coordinator/u, 'the recipient address remains whole');+ assert.ok(result.recipientInk.left >= result.recipient.left - 1 && result.recipientInk.right <= result.recipient.right + 1 && result.recipient.right <= result.header.right + 1, 'the complete recipient address is drawn inside the header');+ assert.ok(result.age.top >= result.header.top - 1 && result.age.bottom <= result.header.bottom + 1 && result.age.right <= result.header.right + 1, 'the complete age stays on the same line inside the card');+ assert.equal(result.ageWidth, result.ageScroll, 'the age never clips');+ assert.ok(result.ageText.length > 0, 'the age remains visible');+ assert.ok(result.kind.width < result.kind.scroll, `the kind, rather than the address or age, shortens: ${JSON.stringify(result.kind)}`);+ assert.equal(result.kind.overflow, 'ellipsis', 'the shortened kind visibly ends with an ellipsis');+ assert.deepEqual([result.kind.title, result.kind.label], [result.kind.text, result.kind.text], 'the full kind remains in its title and accessible name');+ const accessibility = await chrome.send('Accessibility.getFullAXTree');+ assert.ok(accessibility.nodes.some(node => node.name?.value === result.kind.text && node.role?.value === 'group'), 'Chrome exposes the full shortened kind as an accessible name');+ assert.ok(result.page[1] <= result.page[0], 'the wider font never pushes the page sideways');+ assert.deepEqual(chrome.exceptions, [], 'the waiting ask raises no uncaught exception');+ } finally {+ if (chrome) await closeSnapshotChrome(chrome);+ rmSync(profile, { recursive: true, force: true });+ await view.stop();+ }+});