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 linked references inline [N38,N26]

Corey Olsonf91ea0cddad1
diff --git a/src/cockpit.js b/src/cockpit.js
index 6c1bc004..480d7dda 100644
--- a/src/cockpit.js
+++ b/src/cockpit.js
@@ -1885,6 +1885,7 @@ function placeAtAddress(page = data) {
function tabHref(tab) {
if (snapshot) {
const detail = tab === 'items' && view.itemsView === 'pipeline' ? 'pipeline' : view.addressDetail;
+ if (tab === 'items' && detail === null && !location.hash) return location.pathname + location.search;
return location.pathname + location.search + '#' + tab + (detail === null ? '' : '/' + encodeURIComponent(String(detail)));
}
const repo = data?.projects.find((entry) => entry.root === view.root);
@@ -2488,7 +2489,7 @@ document.addEventListener('click', (event) => {
if (!t) return;
if (t.id === 'proj-switch') { fold(!$('side').classList.contains('open')); return; }
if (t.id === 'console') { t.hidden = true; return; }
- if (t.matches('a[data-go^="item:"]')) {
+ if (t.tagName === 'A' && t.dataset.go?.startsWith('item:')) {
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
event.preventDefault();
}
diff --git a/src/view.css b/src/view.css
index a9098f11..5a811d75 100644
--- a/src/view.css
+++ b/src/view.css
@@ -474,8 +474,7 @@ form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; paddin
.shout code.inline.long { display: inline-block; box-sizing: border-box; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; vertical-align: bottom; }
.feed .day { margin: 0; padding: 12px 0 4px; font: 600 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
.feed .day:first-child { padding-top: 6px; }
-button.ref { width: auto; min-height: 0; border: 0; border-radius: 0; background: none; padding: 0; color: var(--accent-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; display: inline; vertical-align: baseline; line-height: inherit; font: inherit; }
-a.ref[data-go] { color: var(--accent-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
+button.ref, a.ref[data-go] { width: auto; min-height: 0; border: 0; border-radius: 0; background: none; padding: 0; color: var(--accent-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; display: inline; vertical-align: baseline; line-height: inherit; font: inherit; }
/* A code reference (path:lines@sha) is one long token: wider than its line, it breaks anywhere rather than push the page sideways. */
button.ref[data-code] { display: inline-flex; max-width: 100%; vertical-align: bottom; white-space: nowrap; text-align: left; }
button.ref[data-code] .ref-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
diff --git a/test/cockpit/activity.test.js b/test/cockpit/activity.test.js
index 91d28c4e..b00d35ae 100644
--- a/test/cockpit/activity.test.js
+++ b/test/cockpit/activity.test.js
@@ -328,7 +328,7 @@ test('activity rows say what each shout and answer said [N26]', { timeout: 120_0
const rows = JSON.parse(await chrome.stable(`JSON.stringify([...document.querySelectorAll('#activity .act')].map((row) => {
const said = row.querySelector('.said');
const lines = said ? Math.round(said.getBoundingClientRect().height / parseFloat(getComputedStyle(said).lineHeight)) : 0;
- return { text: row.textContent, said: said?.textContent ?? null, tip: said?.title ?? null, lines, refs: said ? said.querySelectorAll('button.ref').length : 0,
+ return { text: row.textContent, said: said?.textContent ?? null, tip: said?.title ?? null, lines, refs: said ? said.querySelectorAll('a.ref[data-go]').length : 0,
code: said ? [...said.querySelectorAll('code')].map((code) => code.textContent) : [], ellipsis: said ? getComputedStyle(said).textOverflow === 'ellipsis' : null,
cut: said ? said.scrollWidth > said.clientWidth : null };
}))`));
diff --git a/test/cockpit/addresses.test.js b/test/cockpit/addresses.test.js
index 56a7b61f..46f9c15f 100644
--- a/test/cockpit/addresses.test.js
+++ b/test/cockpit/addresses.test.js
@@ -105,7 +105,7 @@ async function targetForHref(profile, href) {
assert.fail(`Chrome did not open ${href}; page targets: ${JSON.stringify(targets.map(({ type, url }) => ({ type, url })))}`);
}
-test('item text links every #N [N38,N26]', { timeout: 90_000 }, async () => { // budget: hang ceiling for the real API, Chrome navigation and linked prose checks.
+test('item text links every item reference [N38,N26]', { timeout: 90_000 }, async () => { // budget: hang ceiling for the real API, Chrome navigation and linked prose checks.
const box = machine(), alpha = linkedItems(box, 'item-text-links');
await withBrowser(box, async (chrome, server) => {
await openAddress(chrome, server, '/items/2');
diff --git a/test/cockpit/demo.test.js b/test/cockpit/demo.test.js
index f1a34312..fb421601 100644
--- a/test/cockpit/demo.test.js
+++ b/test/cockpit/demo.test.js
@@ -112,7 +112,7 @@ test('real Chrome keeps the demo board usable at phone and desktop widths [H5,N2
return JSON.parse(await chrome.stable(`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),x:r.x,y:r.y,right:r.right,bottom:r.bottom,width:r.width,height:r.height,inlineReference:e.matches('.feed button.ref, .shout button.ref, .shout .band a, .detail button.ref')||!!e.closest('#chain .meta .gate, #detail .kv dd.waits-on'),statusBar:(!!e.closest('.status')||(!!e.closest('.composer')&&innerWidth>=900))&&!matchMedia('(pointer: coarse)').matches,oneLine:!e.closest('.status')||getComputedStyle(e).whiteSpace==='nowrap'}});
+ 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),x:r.x,y:r.y,right:r.right,bottom:r.bottom,width:r.width,height:r.height,inlineReference:e.matches('.feed button.ref, .feed a.ref[data-go], .shout button.ref, .shout a.ref[data-go], .shout .band a, .detail button.ref, .detail a.ref[data-go]')||!!e.closest('#chain .meta .gate, #detail .kv dd.waits-on'),statusBar:(!!e.closest('.status')||(!!e.closest('.composer')&&innerWidth>=900))&&!matchMedia('(pointer: coarse)').matches,oneLine:!e.closest('.status')||getComputedStyle(e).whiteSpace==='nowrap'}});
const notice=document.querySelector('#console');
const noticeBox=visible(notice)?notice.getBoundingClientRect():null;
const toast=noticeBox?{x:noticeBox.x,y:noticeBox.y,right:noticeBox.right,bottom:noticeBox.bottom,visible:noticeBox.y>=0&&noticeBox.bottom<=innerHeight,
diff --git a/test/cockpit/item-waits.test.js b/test/cockpit/item-waits.test.js
index 825132bf..db422b2a 100644
--- a/test/cockpit/item-waits.test.js
+++ b/test/cockpit/item-waits.test.js
@@ -40,7 +40,7 @@ test('wait references stay on one line and link to every prerequisite at phone a
const lineHeight=e=>parseFloat(getComputedStyle(e).lineHeight);
const neighbors=[...gate.parentElement.children].filter(e=>e!==gate).map(lineHeight).filter(Number.isFinite);
const units=[...gate.querySelectorAll('.wait-unit')];
- return {height:gate.getBoundingClientRect().height,neighborHeight:Math.max(...neighbors),unitWhiteSpaces:units.map(unit=>getComputedStyle(unit).whiteSpace),unitY:units.map(unit=>unit.getBoundingClientRect().y),links:[...gate.querySelectorAll('button.ref')].map(link=>link.dataset.go)};
+ return {height:gate.getBoundingClientRect().height,neighborHeight:Math.max(...neighbors),unitWhiteSpaces:units.map(unit=>getComputedStyle(unit).whiteSpace),unitY:units.map(unit=>unit.getBoundingClientRect().y),links:[...gate.querySelectorAll('a.ref[data-go]')].map(link=>link.dataset.go)};
})())`));
t.diagnostic(`${width}px list wait marker: ${list.height}px tall, neighboring metadata line ${list.neighborHeight}px`);
assert.ok(list.height <= list.neighborHeight + 1, `${width}: list reference matches neighboring metadata height: ${JSON.stringify(list)}`);
@@ -54,7 +54,7 @@ test('wait references stay on one line and link to every prerequisite at phone a
const waits=document.querySelector('#detail .kv dd.waits-on');
const units=[...waits.querySelectorAll('.wait-unit')];
return {height:waits.getBoundingClientRect().height,lineHeight:parseFloat(getComputedStyle(waits).lineHeight),unitWhiteSpaces:units.map(unit=>getComputedStyle(unit).whiteSpace),unitY:units.map(unit=>unit.getBoundingClientRect().y),
- links:[...waits.querySelectorAll('button.ref')].map(link=>link.dataset.go)};
+ links:[...waits.querySelectorAll('a.ref[data-go]')].map(link=>link.dataset.go)};
})())`));
t.diagnostic(`${width}px detail wait marker: ${detail.height}px tall, neighboring metadata line ${detail.lineHeight}px`);
assert.ok(detail.height <= detail.lineHeight + 1, `${width}: detail prerequisite line matches its metadata: ${JSON.stringify(detail)}`);
diff --git a/test/cockpit/items.test.js b/test/cockpit/items.test.js
index 99dfba99..5cdb2d32 100644
--- a/test/cockpit/items.test.js
+++ b/test/cockpit/items.test.js
@@ -95,7 +95,7 @@ test('each row says what it waits on [N26]', async () => {
}]));
assert.deepEqual(rows['1'], { chip: 'free: unclaimed', edge: false, waits: [] }, 'free to claim');
assert.deepEqual(rows['2'], { chip: 'busy: web-1 (Test Model)', edge: false, waits: [] }, 'a claim names its holder');
- assert.deepEqual(rows['3'], { chip: 'gate: gated', edge: true, waits: ['<span class="wait-unit">waits on <button class="ref" data-go="item:2" type="button">#2</button>'] }, 'gated on #2, which is still being built');
+ assert.deepEqual(rows['3'], { chip: 'gate: gated', edge: true, waits: [`<span class="wait-unit">waits on <a class="ref" href="/items/2?k=${view.key}" data-go="item:2">#2</a>`] }, 'gated on #2, which is still being built');
assert.deepEqual(rows['4'], { chip: 'gate: lane held', edge: true, waits: ['lane held: API &lt;freeze&gt; until Friday'] });
assert.deepEqual(rows['5'], { chip: 'warn: to verify', edge: false, waits: [] });
assert.deepEqual(rows['6'], { chip: 'no: sent back', edge: false, waits: [] });
@@ -611,12 +611,12 @@ test('shout ids, search and narrow windows reach the item [N26]', async () => {
await page.type('q', '');
const feed = page.show('feed');
- assert.ok(feed.includes('<button class="ref" data-go="item:1" title="Greeting" type="button">#1</button> is next;'), feed);
- assert.ok(feed.includes('<button class="ref" data-go="item:2" title="Farewell banner" type="button">#2</button> shipped'));
- assert.ok(feed.includes('(#99 is not an item) and it&#39;s done'), 'no link for a missing item, and the apostrophe stays intact');
- const ref = (id, title) => `<button class="ref" data-go="item:${id}" title="${title}" type="button">#${id}</button>`;
+ assert.ok(feed.includes(`<a class="ref" href="/items/1?k=${view.key}" data-go="item:1" title="Greeting">#1</a> is next;`), feed);
+ assert.ok(feed.includes(`<a class="ref" href="/items/2?k=${view.key}" data-go="item:2" title="Farewell banner">#2</a> shipped`));
+ assert.ok(feed.includes(`(<a class="ref" href="/items/99?k=${view.key}" data-go="item:99">#99</a> is not an item) and it&#39;s done`), 'an unknown item still has its address, and the apostrophe stays intact');
+ const ref = (id, title) => `<a class="ref" href="/items/${id}?k=${view.key}" data-go="item:${id}" title="${title}">#${id}</a>`;
assert.ok(feed.includes(`${ref(7, 'Filler 7')}, see${ref(7, 'Filler 7')} and ${ref(7, 'Filler 7')}${ref(8, 'Filler 8')}: it&#39;s 5 o&#39;clock`), 'every #id links, whatever stands next to it');
- assert.equal(feed.match(/class="ref"/g).length, 6);
+ assert.equal(feed.match(/class="ref"/g).length, 7);
await page.click({ go: 'item:2', classes: 'ref' });
assert.equal(page.run('view.tab'), 'items', 'the link opens the Items tab');
assert.match(page.show('detail'), /<h2><span>#2<\/span>Farewell banner<\/h2>/, 'on that item');
@@ -905,9 +905,9 @@ test('in-text item references stay inline and open their target at phone and des
const rendered = JSON.parse(await chrome.stable(`JSON.stringify((() => {
const row = document.querySelector('#chain .row[data-item="2"]');
const plain = document.querySelector('#chain .row[data-item="1"]');
- const titleRef = row?.querySelector('.t button.ref');
+ const titleRef = row?.querySelector('.t a.ref[data-go]');
const need = [...document.querySelectorAll('#needs .row')].find((entry) => entry.textContent.includes('Please choose'));
- const needRef = need?.querySelector('.t button.ref');
+ const needRef = need?.querySelector('.t a.ref[data-go]');
const needAction = need;
const realButton = document.querySelector('#new-item');
/** Measure the element box independently of the inline-link assertion. */
@@ -973,24 +973,24 @@ test('in-text item references stay inline and open their target at phone and des
}
await chrome.click(`document.querySelector('[data-tab="items"]')`);
- await chrome.click(`document.querySelector('#chain .row[data-item="2"] .t button.ref')`);
+ await chrome.click(`document.querySelector('#chain .row[data-item="2"] .t a.ref[data-go]')`);
await chrome.waitFor("document.querySelector('#detail h2')?.textContent.includes('Target item')");
await chooseFilter(chrome, 'state:active');
- await chrome.click(`document.querySelector('#needs .row .t button.ref')`);
+ await chrome.click(`document.querySelector('#needs .row .t a.ref[data-go]')`);
await chrome.waitFor("document.querySelector('[data-tab=items].on') && document.querySelector('#detail h2')?.textContent.includes('Target item')");
await chrome.click(`document.querySelector('[data-tab="activity"]')`);
- await chrome.waitFor("document.querySelector('#activity .what button.ref')");
- await chrome.click(`document.querySelector('#activity .what button.ref')`);
+ await chrome.waitFor("document.querySelector('#activity .what a.ref[data-go]')");
+ await chrome.click(`document.querySelector('#activity .what a.ref[data-go]')`);
await chrome.waitFor("document.querySelector('[data-tab=items].on') && document.querySelector('#detail h2')?.textContent.includes('Target item')");
await chrome.click(`document.querySelector('#chain .row[data-item="2"]')`);
- await chrome.waitFor("document.querySelector('#detail h2')?.textContent.includes('Title links to #1') && document.querySelector('#detail .text button.ref') && document.querySelector('#detail .text.muted button.ref')");
- await chrome.click(`document.querySelector('#detail .text button.ref')`);
+ await chrome.waitFor("document.querySelector('#detail h2')?.textContent.includes('Title links to #1') && document.querySelector('#detail .text a.ref[data-go]') && document.querySelector('#detail .text.muted a.ref[data-go]')");
+ await chrome.click(`document.querySelector('#detail .text a.ref[data-go]')`);
await chrome.waitFor("document.querySelector('#detail h2')?.textContent.includes('Target item')");
await chrome.click(`document.querySelector('#chain .row[data-item="2"]')`);
- await chrome.waitFor("document.querySelector('#detail .text.muted button.ref')");
- await chrome.click(`document.querySelector('#detail .text.muted button.ref')`);
+ await chrome.waitFor("document.querySelector('#detail .text.muted a.ref[data-go]')");
+ await chrome.click(`document.querySelector('#detail .text.muted a.ref[data-go]')`);
await chrome.waitFor("document.querySelector('#detail h2')?.textContent.includes('Target item')");
}
} finally {
diff --git a/test/cockpit/layout.test.js b/test/cockpit/layout.test.js
index b2ef291b..112c34f1 100644
--- a/test/cockpit/layout.test.js
+++ b/test/cockpit/layout.test.js
@@ -211,7 +211,7 @@ test('the status bar holds one line under no pointer [N26]', { timeout: 120_000
const audit = JSON.parse(await chrome.stable(`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 {text:(e.innerText||e.getAttribute('aria-label')||'').trim(),height:r.height,inlineReference:e.matches('.feed button.ref, .shout button.ref, .shout .band a, .detail button.ref')||!!e.closest('#chain .meta .gate, #detail .kv dd.waits-on'),statusBar:!!e.closest('.status')&&!matchMedia('(pointer: coarse)').matches,oneLine:!e.closest('.status')||getComputedStyle(e).whiteSpace==='nowrap'}});
+ const controls=[...new Set(document.querySelectorAll(selector))].filter(visible).map(e=>{const r=e.getBoundingClientRect();return {text:(e.innerText||e.getAttribute('aria-label')||'').trim(),height:r.height,inlineReference:e.matches('.feed button.ref, .feed a.ref[data-go], .shout button.ref, .shout a.ref[data-go], .shout .band a, .detail button.ref, .detail a.ref[data-go]')||!!e.closest('#chain .meta .gate, #detail .kv dd.waits-on'),statusBar:!!e.closest('.status')&&!matchMedia('(pointer: coarse)').matches,oneLine:!e.closest('.status')||getComputedStyle(e).whiteSpace==='nowrap'}});
return {controls,tap:getComputedStyle(document.documentElement).getPropertyValue('--tap').trim(),wrapped:controls.filter(c=>!c.oneLine)};
})())`));
assert.equal(audit.tap, '32px', `with no pointer at 1280 the targets are the compact ones a mouse gets; touch keeps 44px: ${JSON.stringify(audit.controls)}`);
@@ -615,7 +615,7 @@ test('targets are 44px for touch and compact under a mouse [N26]', { timeout: 15
const selector = 'button,a[href],input:not([type=hidden]),select,textarea,[role=button],[data-tab],[data-go],[data-item],[data-state],[data-row],[data-new]';
// A reference inside running text is exempt from 44px, as WCAG 2.5.8 exempts inline targets: only the elements named
// here, and only where text that is not another control's shares their line in the same block.
- const named = (e) => e.matches('.feed button.ref, .shout button.ref, .shout .band a, .detail button.ref, .t button.ref') || !!e.closest('#chain .meta .gate, #detail .kv dd.waits-on');
+ const named = (e) => e.matches('.feed button.ref, .feed a.ref[data-go], .shout button.ref, .shout a.ref[data-go], .shout .band a, .detail button.ref, .detail a.ref[data-go], .t button.ref, .t a.ref[data-go]') || !!e.closest('#chain .meta .gate, #detail .kv dd.waits-on');
const inLine = (e) => {
let block = e.parentElement;
while (block.parentElement && getComputedStyle(block).display.startsWith('inline')) block = block.parentElement;
diff --git a/test/cockpit/references.test.js b/test/cockpit/references.test.js
index 13330ae5..1c6b5098 100644
--- a/test/cockpit/references.test.js
+++ b/test/cockpit/references.test.js
@@ -52,7 +52,7 @@ test("a shout's code reference opens that code as it was at that commit [B23]",
const button = (ref, open, before = '', block = false) => `<button class="ref${block ? ' block' : ''}" data-code="${ref}"${before ? ` data-before="${before}"` : ''} title="${ref}" aria-label="Open code reference ${ref}" type="button" aria-expanded="${open}">${label(ref)}</button>`;
const prior = (text, ref) => text.slice(0, text.indexOf(ref));
const [b1, b2, b3] = [was, now, long].map((ref) => prior(first_, ref));
- assert.ok(page.show('feed').includes(`#1</button> was ${button(was, false, b1)}, is ${button(now, false, b2)}; see ${button(long, false, b3)}.`), 'each reference is a button in the text');
+ assert.ok(page.show('feed').includes(`#1</a> was ${button(was, false, b1)}, is ${button(now, false, b2)}; see ${button(long, false, b3)}.`), 'each reference is a button in the text');
await page.click({ code: was, before: b1 });
await page.click({ code: now, before: b2 });
diff --git a/test/cockpit/shouts.test.js b/test/cockpit/shouts.test.js
index 7ed3ee0c..ee1343f3 100644
--- a/test/cockpit/shouts.test.js
+++ b/test/cockpit/shouts.test.js
@@ -100,7 +100,7 @@ test('a shout shows the evidence it carries [B22]', async () => {
const view = await startView(box);
try {
const feed = (await openPage(view)).show('feed');
- const card = (kind, outcome) => `<div class="receipt"><div><span class="badge">${kind}</span> <span class="outcome">${outcome}</span></div><div class="receipt-foot"><button class="ref" data-go="item:1" title="Greeting" type="button">#1</button> · web-1 (Test Model) · <code class="inline sha" title="${head}">${head.slice(0, 10)}</code></div></div>`;
+ const card = (kind, outcome) => `<div class="receipt"><div><span class="badge">${kind}</span> <span class="outcome">${outcome}</span></div><div class="receipt-foot"><a class="ref" href="/items/1?k=${view.key}" data-go="item:1" title="Greeting">#1</a> · web-1 (Test Model) · <code class="inline sha" title="${head}">${head.slice(0, 10)}</code></div></div>`;
const after = (text) => feed.slice(feed.indexOf(text + '</div>') + text.length + 6).replace(/^<button class="more" data-more type="button">more<\/button>/, '');
assert.ok(after('the page loads in 80ms').startsWith(card('receipt', 'measured &lt;fast&gt;')), `what was measured, for which item, by whom, at which commit: ${after('the page loads in 80ms').slice(0, 400)}`);
assert.ok(after('tried a cache').startsWith(card('attempt', 'failed')), 'and what was tried');
@@ -252,7 +252,7 @@ test('real Chrome styles shout code and item text without growing linked lines [
askHtml: ask.innerHTML, titleHtml: titleNode.innerHTML,
linkedMetrics: lineMetrics('X #1'), plainMetrics: lineMetrics('X'),
wrapLinked: lineMetrics(${JSON.stringify(wrappedLinkedText)}), wrapPlain: lineMetrics('OK'),
- linkedButtons: [...document.querySelectorAll('#feed > .shout')].find((entry) => entry.textContent.includes('A linked line'))?.querySelectorAll('button.ref').length,
+ linkedButtons: [...document.querySelectorAll('#feed > .shout')].find((entry) => entry.textContent.includes('A linked line'))?.querySelectorAll('a.ref[data-go]').length,
previewLinks: shout.querySelectorAll('button[data-code^="SPEC.md:1-2@"]').length,
outsideHtml: outside.innerHTML, askNestedButtons: [...ask.querySelectorAll('button')].filter(link => link.parentElement.closest('button')).length,
criterionHtml: itemDetail.querySelector('.text')?.innerHTML, briefHtml: itemDetail.querySelector('.text.muted')?.innerHTML,
@@ -469,7 +469,7 @@ test('shouts read as cards [N26]', { timeout: 120_000 }, async (t) => {
asks: { friday: card('#decisions', ${ids['Launch on Friday?']}), colour: card('#decisions', ${ids[colour]}) },
answerTarget: !!document.getElementById('shout-${answerId}'),
repeated: [...document.querySelectorAll('[id]')].map((e) => e.id).filter((id, n, all) => all.indexOf(id) !== n),
- chips: { ref: chip('button.ref'), path: chip('code.path'), sha: chip('code.sha'), cmd: chip('code.cmd'), code: chip('code.inline:not(.path):not(.sha):not(.cmd)') },
+ chips: { ref: chip('a.ref[data-go]'), path: chip('code.path'), sha: chip('code.sha'), cmd: chip('code.cmd'), code: chip('code.inline:not(.path):not(.sha):not(.cmd)') },
};
})())`));
diff --git a/test/cockpit/snapshot.test.js b/test/cockpit/snapshot.test.js
index 35acf13f..3a6ecc36 100644
--- a/test/cockpit/snapshot.test.js
+++ b/test/cockpit/snapshot.test.js
@@ -449,7 +449,7 @@ test('an exported roadmap has its own address under a folder, and Back and Forwa
await travel(chrome, 1);
await settled(chrome, `${ready} && ${showing('roadmap', '/demo/#roadmap')} && !!${roadmapRow('#2')}`);
await press(chrome, roadmapRow('#2'));
- await chrome.waitFor(`${showing('items', '/demo/')} && document.querySelector('#detail h2')?.innerText.includes('Open page')`);
+ await chrome.waitFor(`${showing('items', '/demo/#items/2')} && document.querySelector('#detail h2')?.innerText.includes('Open page')`);
await travel(chrome, -1);
await settled(chrome, `${ready} && ${showing('roadmap', '/demo/#roadmap')}`);