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): retain inline refs in layout checks [N26]
Corey Olson3776b0e8b0a2
diff --git a/test/cockpit.test.js b/test/cockpit.test.jsindex 8fa69ade..9bce5935 100644--- a/test/cockpit.test.js+++ b/test/cockpit.test.js@@ -1438,8 +1438,8 @@ test('a decision waits in needs-you until the view answers it [B21, B26, N27]',box.run(alpha.repo, 'pass', '1', 'over to you');await page.run('refresh()');const passed = `Passed up from web-1: ${question}\nCoordinator note: over to you`;- assert.match(page.show('needs'), new RegExp(`^<div class="head"><i></i>Needs you</div><button class="ny" data-go="decide:42" type="button"><code>coordinator</code><span>${passed}</span><em>decide, <time data-ago="[^"]+">now</time> →</em></button>`), 'first in Needs-you: who passed it, what, and since when');- assert.match(page.show('decisions'), new RegExp(`^<div class="head"><i></i>Decision needed</div><div class="ask"><p><small><b>coordinator</b> asks, <time data-ago="[^"]+">now</time></small></p><p>${passed}</p><button class="ghost" data-go="decide:42" type="button">Answer</button></div>$`), 'and above the shouts, with an Answer button');+ assert.match(page.show('needs'), new RegExp(`^<div class="head"><i></i>Needs you</div><button class="ny" data-go="decide:42" type="button"><code>coordinator</code><span>${passed.replace('\n', '<br>')}</span><em>decide, <time data-ago="[^"]+">now</time> →</em></button>`), 'first in Needs-you: who passed it, what, and since when');+ assert.match(page.show('decisions'), new RegExp(`^<div class="head"><i></i>Decision needed</div><div class="ask"><p><small><b>coordinator</b> asks, <time data-ago="[^"]+">now</time></small></p><p>${passed.replace('\n', '<br>')}</p><button class="ghost" data-go="decide:42" type="button">Answer</button></div>$`), 'and above the shouts, with an Answer button');const form = () => ({answering: !page.element('answering').hidden,@@ -2595,7 +2595,7 @@ test('real Chrome keeps the demo board usable at phone and desktop widths [N26,Nconst snapshot = async () => JSON.parse(await chrome.evaluate(`JSON.stringify((() => {const visible=e=>{const s=getComputedStyle(e),r=e.getBoundingClientRect();return !e.disabled&&s.display!=='none'&&s.visibility!=='hidden'&&Number(s.opacity)!==0&&r.width>0&&r.height>0&&!e.closest('[hidden]')};const selector='button,a[href],input:not([type=hidden]),select,textarea,[role=button],[data-root],[data-tab],[data-go],[data-item],[data-state],[data-rows],[data-row],[data-release],[data-shout],[data-new],[data-code]';- const controls=[...new Set(document.querySelectorAll(selector))].filter(visible).map(e=>{const r=e.getBoundingClientRect();return {tag:e.tagName,id:e.id||'',text:(e.innerText||e.getAttribute('aria-label')||'').trim().slice(0,60),width:r.width,height:r.height}});+ const controls=[...new Set(document.querySelectorAll(selector))].filter(visible).map(e=>{const r=e.getBoundingClientRect();return {tag:e.tagName,id:e.id||'',text:(e.innerText||e.getAttribute('aria-label')||'').trim().slice(0,60),width:r.width,height:r.height,inlineReference:e.matches('.feed button.ref, .ask button.ref, .detail button.ref')}});return {width:innerWidth,clientWidth:document.documentElement.clientWidth,documentWidth:document.documentElement.scrollWidth,bodyWidth:document.body.scrollWidth,projectList:visible(document.querySelector('#proj-list')),needs:visible(document.querySelector('#needs')),detail:visible(document.querySelector('#detail')),controls};@@ -2607,7 +2607,7 @@ test('real Chrome keeps the demo board usable at phone and desktop widths [N26,Nconst layout = await snapshot();assert.ok(fitsViewport(layout),`${width} ${place}: no horizontal overflow: ${JSON.stringify(layout)}`);- const short = layout.controls.filter((control) => control.height < 44);+ const short = layout.controls.filter((control) => control.height < 44 && !control.inlineReference);assert.deepEqual(short, [], `${width} ${place}: visible enabled actions are at least 44px high: ${JSON.stringify(short)}`);};@@ -2811,7 +2811,7 @@ test('real Chrome styles shout code and item text without growing linked lines [box.run(alpha.repo, 'add', 'web', title, '--specs', 'G1', '--criterion', 'Criterion `value` stays safe', '--brief', 'Run $ pullboard claim 1\nKeep `<safe>` literal.');box.run(alpha.web, 'claim', '1');const sourceHead = box.git(alpha.repo, 'rev-parse', 'HEAD');- const sample = 'Inline `code <b>safe</b>`; pullboard shout --decision; --flag; src/cockpit.js; 0123456789abcdef0123456789abcdef01234567.\nPreview SPEC.md:1-2@' + sourceHead + '. Invalid !SPEC.md:1-2@' + sourceHead + '.\n```js\n<script>alert(1)</script>\n```\n$ pullboard claim 1\n<script>alert(1)</script>';+ const sample = 'Inline `code <b>safe</b>`; pullboard shout --decision; --flag; src/cockpit.js; 0123456789abcdef0123456789abcdef01234567.\nPreview SPEC.md:1-2@' + sourceHead + '. Invalid prefix:SPEC.md:1-2@' + sourceHead + '.\n```js\n<script>alert(1)</script>\n```\n$ pullboard claim 1\n<script>alert(1)</script>';box.run(alpha.repo, 'shout', 'person', sample, '--decision');box.run(alpha.web, 'shout', 'coordinator', 'A linked line #1');box.run(alpha.web, 'shout', 'coordinator', 'A plain line here');@@ -2866,7 +2866,7 @@ test('real Chrome styles shout code and item text without growing linked lines [assert.equal(rendered.shoutScripts, 0, 'a shout cannot create a script element');assert.match(rendered.outsideHtml, /<script>alert\(2\)<\/script> outside code/, 'script text outside code is escaped too');assert.equal(rendered.previewLinks, 1, 'only a path:lines@SHA reference with the original whole-word boundaries becomes an actionable preview');- assert.match(rendered.shoutHtml, /Invalid !<code class="inline">SPEC\.md:1-2@/, 'a path:lines@SHA suffix after punctuation stays plain inline code');+ assert.match(rendered.shoutHtml, /Invalid prefix:<code class="inline">SPEC\.md:1-2@/, 'a path:lines@SHA suffix after a colon stays plain inline code');await chrome.evaluate(`document.querySelector('#feed button[data-code^="SPEC.md:1-2@"]').click()`);await chrome.waitFor(`document.querySelector('#feed button[data-code^="SPEC.md:1-2@"]').getAttribute('aria-expanded') === 'true'`);await chrome.waitFor(`document.querySelector('#feed button[data-code^="SPEC.md:1-2@"] + .code')?.textContent.includes('Demo spec')`);