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): give roadmap items 44px hit areas [N26]

Corey Olsondd0f07dde1e1
diff --git a/src/view.css b/src/view.css
index 534caebc..bc4383df 100644
--- a/src/view.css
+++ b/src/view.css
@@ -155,7 +155,7 @@ main { padding: 16px 18px 56px; }
.milestone-progress { display: block; width: 100%; height: 7px; margin: 10px 0 6px; overflow: hidden; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.milestone-progress rect { fill: var(--accent); }
.milestone ul { display: grid; gap: 2px; margin: 0 -9px; padding: 0; list-style: none; }
-.milestone-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: var(--tap); padding: 0 9px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; }
+.milestone-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 0 9px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; }
.milestone-item[data-go] { cursor: pointer; }
.milestone-item[data-go]:hover { background: var(--surface-2); }
.milestone-item .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
diff --git a/test/cockpit/roadmap.test.js b/test/cockpit/roadmap.test.js
index ea54e4e8..08829ab1 100644
--- a/test/cockpit/roadmap.test.js
+++ b/test/cockpit/roadmap.test.js
@@ -293,6 +293,21 @@ test('the roadmap leads with the next release and folds shipped ones [N26]', { t
})())`));
/** Activate a disclosure or item through the shared native pointer helper. */
const click = (selector) => press(chrome, `document.querySelector(${JSON.stringify(selector)})`);
+ /** Measure every visible item target and hit-test the edges of its required 44px area. */
+ const checkItemTargets = async (at, expected) => {
+ const targets = JSON.parse(await chrome.stable(`JSON.stringify([...document.querySelectorAll('#roadmap .milestone-item[data-go]')].filter((row) => row.getClientRects().length).map((row) => row.dataset.go))`));
+ assert.deepEqual(targets.slice().sort(), expected.slice().sort(), at + ': all expected visible item targets are measured');
+ for (const go of targets) {
+ const selector = `#roadmap .milestone-item[data-go="${go}"]`;
+ await chrome.stable(`document.querySelector(${JSON.stringify(selector)}).scrollIntoView({ block: 'center', inline: 'nearest' })`);
+ const hit = JSON.parse(await chrome.stable(`JSON.stringify((() => {
+ const row = document.querySelector(${JSON.stringify(selector)}), r = row.getBoundingClientRect();
+ return { height: r.height, hits: [-21, 21].map((offset) => document.elementFromPoint(r.left + r.width / 2, r.top + r.height / 2 + offset)?.closest('.milestone-item')?.dataset.go ?? null) };
+ })())`));
+ assert.ok(hit.height >= 44, at + ': ' + go + ' has a 44px item target: ' + JSON.stringify(hit));
+ assert.deepEqual(hit.hits, [go, go], at + ': ' + go + ' owns both edges of its 44px hit area');
+ }
+ };
try {
chrome = await openSnapshotChrome(executable, view.link.href, profile);
await chrome.waitFor("typeof data === 'object' && data?.project?.milestones?.length === 5");
@@ -316,6 +331,7 @@ test('the roadmap leads with the next release and folds shipped ones [N26]', { t
['shipped', false, 'Shipped | 2 releases'],
], `${at}: the next release first and open, then the queued one, then Shipped, folded`);
assert.deepEqual(r.parts[0].rows, ['#3', '#4'], `${at}: the next release shows its items`);
+ await checkItemTargets(at, ['item:3', 'item:4']);
assert.ok(r.parts.every((part) => part.height >= 44), `${at}: each part opens from a 44px target`);
await click('#roadmap > [data-key="shipped"] > .milestone-head');
const expanded = await read();
@@ -328,6 +344,13 @@ test('the roadmap leads with the next release and folds shipped ones [N26]', { t
assert.ok(expanded.page.scroll <= expanded.page.width && expanded.page.body <= expanded.page.width, at + ': expanded history has no sideways scroll');
await click('#roadmap .shipped-one[data-key="m:0.2"] > .milestone-head');
assert.deepEqual((await read()).parts.find((part) => part.key === 'shipped').shipped[0].rows, ['#2', '#6'], at + ': verified and withdrawn items remain readable');
+ await checkItemTargets(at + ' with Shipped open', ['item:3', 'item:4', 'item:2', 'item:6']);
+ await click('#roadmap .shipped-one[data-key="m:0.1"] > .milestone-head');
+ await checkItemTargets(at + ' with both shipped releases open', ['item:3', 'item:4', 'item:2', 'item:6', 'item:1']);
+ await click('#roadmap .shipped-one[data-key="m:0.1"] > .milestone-head');
+ await click('#roadmap > [data-key="m:0.4"] > .milestone-head');
+ await checkItemTargets(at + ' with the queued release open', ['item:3', 'item:4', 'item:5', 'item:2', 'item:6']);
+ await click('#roadmap > [data-key="m:0.4"] > .milestone-head');
await proofShot(chrome, 'releases', width);
await click('#roadmap .shipped-one[data-key="m:0.2"] > .milestone-head');
await click('#roadmap > [data-key="shipped"] > .milestone-head');