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
feat(view): 44px targets for touch, compact under a mouse [N26]
Corey Olson4e9a8e569146
diff --git a/src/view.css b/src/view.cssindex c4d7bb86..139b9a94 100644--- a/src/view.css+++ b/src/view.css@@ -52,7 +52,7 @@ button, input, select, textarea { font: inherit; color: inherit; }:root[data-side="collapsed"] main { grid-area: 2 / 1 / 3 / 3; }:root[data-side="collapsed"] .side-top { margin: 0; padding: 0; gap: 6px; border: 0; }:root[data-side="collapsed"] .brand span { display: none; }- :root[data-side="collapsed"] .brand { justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; }+ :root[data-side="collapsed"] .brand { justify-content: center; width: var(--tap); height: var(--tap); margin: 0; padding: 0; }:root[data-side="collapsed"] .switch-btn { display: flex; max-width: 16rem; }:root[data-side="collapsed"] .side-body { display: none; }:root[data-side="collapsed"] .side.open .side-body { display: grid; position: absolute; top: calc(var(--top) + 4px); left: 8px; width: 300px; max-height: calc(100vh - var(--top) - 16px); overflow-y: auto; padding: 8px 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }@@ -78,7 +78,7 @@ button, input, select, textarea { font: inherit; color: inherit; }.group-need > b { color: var(--ink-muted); }.group-need > code { color: var(--accent-strong); }.group-need > span { overflow-wrap: anywhere; }-.group-need > button { min-height: 44px; border: 0; padding: 0; background: none; cursor: pointer; text-align: right; }+.group-need > button { min-height: var(--tap); border: 0; padding: 0; background: none; cursor: pointer; text-align: right; }.group-need > button em { color: var(--ink-faint); font-size: 12px; font-style: normal; }.repo-label { color: var(--ink-muted); }.products { padding-top: 6px; }@@ -137,7 +137,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: 44px; 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: var(--tap); 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; }@@ -197,11 +197,11 @@ input:disabled { background: var(--surface-2); color: var(--ink-muted); }.needs-you .head i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); display: inline-block; }.needs-you .head.quiet { color: var(--ink-muted); font-weight: 600; }.needs-you .more { padding: 2px 4px; }-.ny { display: grid; grid-template-columns: auto minmax(5em, 1fr) minmax(0, max-content); gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; padding: 6px 4px; border-radius: 8px; width: 100%; min-height: 44px; }+.ny { display: grid; grid-template-columns: auto minmax(5em, 1fr) minmax(0, max-content); gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; padding: 6px 4px; border-radius: 8px; width: 100%; min-height: var(--tap); }.ny:has(.ny-open):hover { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }.ny code { font: 600 12px var(--mono); }.ny .ny-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); }-.ny .ny-open { min-height: 44px; border: 0; padding: 0; background: none; color: var(--warn); cursor: pointer; text-align: right; }+.ny .ny-open { min-height: var(--tap); border: 0; padding: 0; background: none; color: var(--warn); cursor: pointer; text-align: right; }.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 .ny-open { 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); }@@ -315,7 +315,7 @@ input:disabled { background: var(--surface-2); color: var(--ink-muted); }.rowref { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; font-size: 13px; padding: 3px 0; }.rowref code { font-weight: 600; }.links { display: flex; flex-wrap: wrap; gap: 6px; }-.links-item { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; padding: 3px 9px; cursor: pointer; font-size: 12.5px; min-height: 44px; display: flex; align-items: center; }+.links-item { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; padding: 3px 9px; cursor: pointer; font-size: 12.5px; min-height: var(--tap); display: flex; align-items: center; }.panel-form { display: grid; gap: 10px; }.panel-form label, .inline label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-muted); }@@ -334,14 +334,14 @@ form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; paddin.shout-form > .composer { flex: 1 1 100%; min-width: 0; }.composer { display: flex; align-items: flex-end; gap: 6px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }.composer:focus-within { border-color: var(--accent); }-.composer textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 12em; padding: 11px 8px; border: 0; background: none; resize: none; field-sizing: content; line-height: 1.5; }+.composer textarea { flex: 1; min-width: 0; min-height: var(--tap); max-height: 12em; padding: calc((var(--tap) - 21px) / 2) 8px; border: 0; background: none; resize: none; field-sizing: content; line-height: 1.5; }.composer input:focus-visible, .composer textarea:focus-visible { outline: 0; }-.composer .send { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 9px; background: var(--ink); color: var(--surface); cursor: pointer; }+.composer .send { display: grid; place-items: center; flex: none; width: var(--tap); height: var(--tap); border: 0; border-radius: 9px; background: var(--ink); color: var(--surface); cursor: pointer; }.composer .send:hover { background: var(--accent-strong); color: var(--on-accent); }.composer .send svg { width: 18px; height: 18px; }/* The feed's bar: whose shouts these are, and the agents panel shown or hidden. */#feed > .feed-bar { display: flex; border-top: 0; justify-content: space-between; align-items: center; gap: 8px; padding: 0 4px; color: var(--ink-muted); font-size: 13px; }-.link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent-strong); font: inherit; font-weight: 600; cursor: pointer; }+.link { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--accent-strong); font: inherit; font-weight: 600; cursor: pointer; }[data-pane="shouts"].bare { grid-template-columns: minmax(0, 1fr); }[data-pane="shouts"].bare > aside { display: none; }/* The asks as cards in a quiet panel; the amber lives in the heading's dot, not in a box. */@@ -374,7 +374,7 @@ form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; paddin.shout header time { margin-left: auto; color: var(--ink-faint); font-size: 12px; white-space: nowrap; }.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: 44px; margin: -8px 0 -10px; padding: 0; border: 0; background: none; color: var(--accent-strong); font-weight: 600; font-size: 13px; cursor: pointer; }+.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; }.shout.clamp .more { display: inline-flex; }.shout .band { margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 13px; }.shout .band.done { background: var(--surface-2); color: var(--ink-muted); font-weight: 500; }@@ -408,7 +408,7 @@ code.inline.long { white-space: break-spaces; overflow-wrap: anywhere; }.code .more, .code.no { padding: 2px 10px; white-space: normal; color: var(--ink-muted); }.code.no { color: var(--reject); }.code-wrap { min-width: 0; }-.code-control { display: inline-flex; align-items: center; min-height: 44px; border: 0; background: none; padding: 0 12px; color: var(--ink-muted); cursor: pointer; font: 12.5px var(--sans); }+.code-control { display: inline-flex; align-items: center; min-height: var(--tap); border: 0; background: none; padding: 0 12px; color: var(--ink-muted); cursor: pointer; font: 12.5px var(--sans); }.code-control:hover { color: var(--accent-strong); }.code-control:disabled { color: var(--ink-muted); cursor: wait; }.tok-keyword { color: var(--violet); }@@ -417,7 +417,7 @@ code.inline.long { white-space: break-spaces; overflow-wrap: anywhere; }.tok-comment { color: color-mix(in srgb, var(--accent-strong) 55%, var(--ink-faint)); font-style: italic; }/* A code reference on a line of its own: a bordered block, a caret, the path and lines, the short commit muted. */.code-ref { margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }-.code-ref > button.ref.block { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; color: var(--ink); font: 12.5px var(--mono); text-decoration: none; }+.code-ref > button.ref.block { display: flex; align-items: center; width: 100%; min-height: var(--tap); padding: 0 12px; color: var(--ink); font: 12.5px var(--mono); text-decoration: none; }.code-ref > button.ref.block::before { content: ""; flex: none; width: 6px; height: 8px; margin-right: 10px; background: var(--ink-faint); clip-path: polygon(0 0, 100% 50%, 0 100%); transition: transform .12s; }.code-ref.open > button.ref.block::before { transform: rotate(90deg); }.code-ref > button.ref.block:hover { background: var(--surface-2); }@@ -444,7 +444,7 @@ code.inline.long { white-space: break-spaces; overflow-wrap: anywhere; }.spec-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 4px; }.rows h4 { margin: 0; font-size: 12.5px; color: var(--ink-muted); }/* Deciding a row is a quiet word beside it, no box: Approve in the accent, Decline in grey, each lit only on hover. */-.spec-section-approve, .approve-row, .decline-row { min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font-weight: 600; white-space: nowrap; cursor: pointer; }+.spec-section-approve, .approve-row, .decline-row { min-height: var(--tap); padding: 0 10px; border: 0; border-radius: 8px; background: none; font-weight: 600; white-space: nowrap; cursor: pointer; }.spec-section-approve, .approve-row { color: var(--accent-strong); }.decline-row { color: var(--ink-muted); }.spec-section-approve:hover, .approve-row:hover { background: var(--accent-soft); }@@ -456,9 +456,9 @@ code.inline.long { white-space: break-spaces; overflow-wrap: anywhere; }.spec-reason-dialog { width: min(100%, 420px); display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: 0 18px 60px rgb(0 0 0 / 24%); }.spec-reason-dialog h2 { margin: 0; font-size: 17px; }.spec-reason-dialog label { display: grid; gap: 5px; color: var(--ink-muted); font-size: 12px; }-.spec-reason-dialog input { width: 100%; min-height: 44px; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; }+.spec-reason-dialog input { width: 100%; min-height: var(--tap); padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; }.spec-reason-dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; }-.spec-reason-dialog .actions button { min-height: 44px; }+.spec-reason-dialog .actions button { min-height: var(--tap); }.srow { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 10px; padding: 9px 8px; border-top: 1px solid var(--line); align-items: baseline; cursor: pointer; }.srow:hover { background: var(--surface-2); }.srow.on { background: color-mix(in srgb, var(--ink) 7%, transparent); }@@ -508,10 +508,20 @@ code.inline.long { white-space: break-spaces; overflow-wrap: anywhere; }.request-error { color: var(--reject); }.request-next { color: var(--ink-muted); }-/* Every action keeps a usable touch target at either viewport, including inline controls; the one exception is the- * status bar under a mouse, whose parts are as tall as its thin strip. */-button, input, select, textarea, [data-item], [data-row] { min-height: 44px; }-.theme-btn, .flow-hide { width: 44px; height: 44px; }+/* Where a finger taps, under a coarse pointer or in a window under 900px, every action keeps a 44px target, inline+ * references in running text excepted as they always were. Under a mouse on a wide screen there is no blanket minimum:+ * controls size to their words, and those that need room to be clicked take --tap, 32px there. */+:root { --tap: 32px; }+@media (pointer: coarse), (width < 900px) {+ :root { --tap: 44px; }+ button, input, select, textarea, [data-item], [data-row] { min-height: 44px; }+ .theme-btn, .flow-hide { width: 44px; height: 44px; }+}+/* A clickable row is never shorter than the target. */+[data-item], [data-row] { min-height: var(--tap); }+/* The Items toolbar's controls stand at the target, 32px under a mouse. */+.seg button, .toolbar .go, .toolbar select, .toolbar input { min-height: var(--tap); }+.toolbar .go, .toolbar select, .toolbar input { padding-block: 0; }.seg { flex-wrap: wrap; max-width: 100%; }.inline > label { min-width: 0; }@media (width < 480px) {@@ -540,7 +550,7 @@ button, input, select, textarea, [data-item], [data-row] { min-height: 44px; }.agent-doing .chip { flex: none; font-size: 10.5px; padding-block: 0; }.agent-more { flex: none; font: 11px var(--mono); color: var(--ink-faint); }.agent-card .agent-work { padding: 0 8px 0 46px; font-size: 12.5px; }-.fold-line { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 8px; border: 0; border-radius: 10px; background: none; color: var(--ink-muted); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }+.fold-line { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--tap); padding: 0 8px; border: 0; border-radius: 10px; background: none; color: var(--ink-muted); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }.fold-line:hover { background: var(--surface-2); }.fold-more { margin-left: auto; color: var(--accent-strong); font-weight: 600; }/* The fold line reaches 4px from the card edge on every side, its words in line with the card text. */@@ -550,11 +560,11 @@ button, input, select, textarea, [data-item], [data-row] { min-height: 44px; }.agents-quiet { margin: 4px 0 0; padding: 10px 8px 2px; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 12.5px; }.all-agents { margin-top: 2px; font-size: 13px; }.agents-idle { margin-top: 4px; padding-top: 2px; border-top: 1px solid var(--line); }-.idle-summary { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 8px; border: 0; border-radius: 10px; background: none; color: var(--ink-muted); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }+.idle-summary { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--tap); padding: 0 8px; border: 0; border-radius: 10px; background: none; color: var(--ink-muted); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }.idle-summary:hover { background: var(--surface-2); }.idle-more { margin-left: auto; color: var(--accent-strong); font-weight: 600; }.idle-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }-.agent-pill { display: flex; align-items: center; min-width: 0; min-height: 44px; padding: 0 8px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; }+.agent-pill { display: flex; align-items: center; min-width: 0; min-height: var(--tap); padding: 0 8px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; }.agent-pill:hover { background: var(--surface-2); }.agent-pill.on { background: color-mix(in srgb, var(--h) 9%, transparent); }.agent-pill > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink-muted); font-size: 12.5px; }@@ -565,7 +575,7 @@ button, input, select, textarea, [data-item], [data-row] { min-height: 44px; }/* The composer's address, when it is not the coordinator: a chip the person can clear. */.composer .to-chip { display: inline-flex; flex: none; align-items: center; align-self: center; gap: 2px; margin-left: 6px; padding-left: 10px; border-radius: 999px; background: var(--violet-soft); color: var(--violet); font-size: 12.5px; white-space: nowrap; }.composer .to-chip[hidden] { display: none; }-.to-clear { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -10px -2px -10px 0; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; font-size: 16px; cursor: pointer; }+.to-clear { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); margin: -10px -2px -10px 0; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; font-size: 16px; cursor: pointer; }/* Heard: which agents a shout of the person's has reached. */.shout .heard { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--ink-muted); font-size: 12px; }.shout .heard::before { content: "✓"; color: var(--accent-strong); font-weight: 700; }diff --git a/test/cockpit.test.js b/test/cockpit.test.jsindex 42304f29..ede090ab 100644--- a/test/cockpit.test.js+++ b/test/cockpit.test.js@@ -34,6 +34,9 @@ after(() => {for (const dir of scratch) rmSync(dir, { recursive: true, force: true });});+/** The target the view sets (#371): 44px where a finger taps, here a window under 900px; 32px under the tests' mouse. */+const tapTarget = (width) => (width < 900 ? 44 : 32);+const SPEC = `# Demo spec## G · Goals@@ -702,7 +705,7 @@ test('the project list collapses into the tab bar and stays collapsed [N26]', {assert.ok(collapsed.side.height <= collapsed.top.height + 0.5 && collapsed.switcher.shown && Math.abs(collapsed.switcher.top - collapsed.top.top) < collapsed.top.height && collapsed.switcher.right <= collapsed.top.left + 0.5,`the sidebar is one switcher at the left of the tab bar, in its row: ${JSON.stringify(collapsed)}`);assert.ok(!collapsed.list.shown, 'the project list folds away until asked for');- assert.ok(Math.abs(collapsed.logo.width - collapsed.logo.height) < 1 && collapsed.logo.height >= 44, `the logo alone is a square control, so its hover is a square: ${JSON.stringify(collapsed.logo)}`);+ assert.ok(Math.abs(collapsed.logo.width - collapsed.logo.height) < 1 && collapsed.logo.height >= tapTarget(1280), `the logo alone is a square control, so its hover is a square: ${JSON.stringify(collapsed.logo)}`);assert.ok(collapsed.main.left <= 0.5 && collapsed.main.width >= collapsed.width - 0.5 && collapsed.columns >= open.columns + 200 && !collapsed.overflow,`the board takes the whole width: the list and detail gain at least 200px: ${JSON.stringify({ open: open.columns, collapsed: collapsed.columns, main: collapsed.main })}`);assert.ok(collapsed.theme.right >= collapsed.width - 16 && collapsed.live.right <= collapsed.theme.left, 'the light/dark button stays at the right end');@@ -4170,6 +4173,7 @@ test('real Chrome keeps the demo board usable at phone and desktop widths [H5,N2overlaps:controls.filter(c=>c.x<noticeBox.right&&c.right>noticeBox.x&&c.y<noticeBox.bottom&&c.bottom>noticeBox.y).map(c=>c.id||c.text)}:null;return {width:innerWidth,clientWidth:document.documentElement.clientWidth,documentWidth:document.documentElement.scrollWidth,bodyWidth:document.body.scrollWidth,pointer:{fine:matchMedia('(pointer: fine)').matches,coarse:matchMedia('(pointer: coarse)').matches,none:matchMedia('(pointer: none)').matches},+ touch:matchMedia('(pointer: coarse)').matches||innerWidth<900,statusParts:[...document.querySelectorAll('.status [data-status]')].filter(visible).map(part=>({label:part.textContent.replace(/\\s+/g,' ').trim(),height:part.getBoundingClientRect().height})),projectList:visible(document.querySelector('#proj-list')),needs:visible(document.querySelector('#needs')),detail:visible(document.querySelector('#detail')),controls,toast};@@ -4182,8 +4186,9 @@ test('real Chrome keeps the demo board usable at phone and desktop widths [H5,N2const layout = await snapshot();assert.ok(fitsViewport(layout),`${width} ${place}: no horizontal overflow: ${JSON.stringify(layout)}`);- // The status bar is thin unless the pointer is coarse; no pointer reads like a mouse. Its labels stay on one line.- const short = layout.controls.filter((control) => control.height < 44 && !control.inlineReference && !control.statusBar);+ // Where a finger taps (a coarse pointer, or a window under 900px) every action is a 44px target, inline references+ // in running text excepted; under a mouse, or no pointer at all, there is no minimum. Status labels stay on one line.+ const short = layout.touch ? layout.controls.filter((control) => control.height < 44 && !control.inlineReference) : [];assert.deepEqual(layout.controls.filter((control) => !control.oneLine), [], `${width} ${place}: status labels stay on one line`);assert.deepEqual(short, [], `${width} ${place}: visible enabled actions are at least 44px high: ${JSON.stringify(short)}`);if (layout.toast) assert.deepEqual(layout.toast.overlaps, [], `${width} ${place}: the result toast clears every visible control: ${JSON.stringify(layout.toast)}`);@@ -4267,7 +4272,7 @@ test('real Chrome keeps the demo board usable at phone and desktop widths [H5,N2`${width}: waiting ask who/when stays on one line: ${JSON.stringify(asks)}`);assert.ok(asks.waitingText.width >= asks.waitingMain.width - 1,`${width}: waiting ask text spans the card: ${JSON.stringify(asks)}`);- assert.ok(asks.button.top >= asks.answerText.bottom && asks.button.left >= asks.answerText.left - 1 && asks.button.height >= 44,+ assert.ok(asks.button.top >= asks.answerText.bottom && asks.button.left >= asks.answerText.left - 1 && asks.button.height >= tapTarget(width),`${width}: the Answer button sits under the ask it answers: ${JSON.stringify(asks)}`);}}@@ -4391,7 +4396,7 @@ test('Spec and Doctrine line up, open on a row and decide with quiet controls [Nif (width === 1280) assert.ok(Math.abs(spec.list.top - spec.detail.top) < 0.5, `${width}: the list and the detail start on one line: ${JSON.stringify([spec.list, spec.detail])}`);assert.deepEqual([spec.picked, spec.shown], ['spec:G1', 'G1'], `${width}: with nothing picked, the detail opens on the first row shown`);assert.deepEqual([spec.buttons.length, spec.decide.map((b) => b.word)], [0, ['Approve', 'Decline']], `${width}: a row carries no decision; the picked row's detail holds it once`);- assert.ok(spec.decide.every((b) => b.quiet && b.height >= 44), `${width}: quiet words, no box or fill until hovered, each a 44px target: ${JSON.stringify(spec.decide)}`);+ assert.ok(spec.decide.every((b) => b.quiet && b.height >= tapTarget(width)), `${width}: quiet words, no box or fill until hovered, each a target: ${JSON.stringify(spec.decide)}`);assert.ok(spec.section.length >= 3 && spec.section.every(Boolean), `${width}: Approve all and the detail's decision are quiet too`);if (width === 1280) {assert.ok(spec.row.height <= 60 && Math.round(spec.text.height / spec.line) <= 2, `${width}: a one-sentence row takes one or two lines: ${JSON.stringify([spec.row, spec.text, spec.line])}`);@@ -4506,7 +4511,7 @@ test('spec rows read as a list, decided in the panel [N26]', { timeout: 300_000const picked = r.rows.find((row) => row.on);assert.ok(picked && neutral(picked.tint) && picked.edges, `${tab}: the picked row is a quiet neutral tint with no coloured edge: ${JSON.stringify(picked)}`);// On Spec, Approve all stays on the section's header.- if (kind === 'spec') assert.deepEqual(r.section.map((b) => [b.word, b.head, b.height >= 44]), [[`Approve all ${undecidedNow.length} in this section`, true, true]], `${tab}: Approve all stays on the section header`);+ if (kind === 'spec') assert.deepEqual(r.section.map((b) => [b.word, b.head, b.height >= tapTarget(width)]), [[`Approve all ${undecidedNow.length} in this section`, true, true]], `${tab}: Approve all stays on the section header`);else assert.deepEqual(r.section, [], `${tab}: Doctrine rules are decided one at a time`);// With focus in the list the arrows move the pick, A approves and moves on, and D asks why, then records it.@@ -4518,7 +4523,7 @@ test('spec rows read as a list, decided in the panel [N26]', { timeout: 300_000// The picked row's detail holds its decision once, a 44px target each.const held = await read(kind);assert.deepEqual(held.decide.map((b) => b.word), ['Approve', 'Decline'], `${tab}: the picked row's detail holds its decision`);- assert.ok(held.decide.every((b) => b.height >= 44), `${tab}: each a 44px target`);+ assert.ok(held.decide.every((b) => b.height >= tapTarget(width)), `${tab}: each a target, 44px where a finger taps`);await press('ArrowDown', 'ArrowDown', 40);assert.equal(await chrome.evaluate(`view.row['${kind}']`), undecidedNow[undecidedNow.findIndex(([id]) => id === first) + 1][0], `${tab}: down moves the pick`);await press('ArrowUp', 'ArrowUp', 38);@@ -4617,9 +4622,9 @@ test('the status bar holds one line under no pointer [N26]', { timeout: 120_000const 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'}});- return {controls,short:controls.filter(c=>c.height<44&&!c.inlineReference&&!c.statusBar),wrapped:controls.filter(c=>!c.oneLine)};+ return {controls,tap:getComputedStyle(document.documentElement).getPropertyValue('--tap').trim(),wrapped:controls.filter(c=>!c.oneLine)};})())`));- assert.deepEqual(audit.short, [], `the demo's visible controls meet its 44px audit with the status exception determined by DOM and coarse pointer: ${JSON.stringify(audit.controls)}`);+ 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)}`);assert.deepEqual(audit.wrapped, [], `the demo's visible status labels stay on one line at 1280: ${JSON.stringify(audit.controls)}`);assert.deepEqual(layout.parts.filter((part) => part.lineTops.length !== 1), [], `each status part occupies one text line: ${JSON.stringify(layout.parts)}`);} finally {@@ -4736,7 +4741,7 @@ test('real Chrome records Spec row decisions from the row, detail and confirmed})})`));assert.equal(geometry.overflow, false, `${width}: Spec has no horizontal overflow`);- assert.deepEqual(geometry.controls.filter((control) => control.height < 44), [], `${width}: row and section controls meet the 44px target`);+ assert.deepEqual(geometry.controls.filter((control) => control.height < tapTarget(width)), [], `${width}: row and section controls meet the target`);assert.deepEqual(geometry.rows.filter((row) => row.missing), [], `${width}: row status and text are present for every fixture row`);if (width === 1280) assert.deepEqual(geometry.rows.filter((row) => row.intersects), [], '1280: stage chips never cover row text');@@ -4770,7 +4775,7 @@ test('real Chrome records Spec row decisions from the row, detail and confirmedawait click(chrome, '#spec-detail [data-row-decision="decline"]');assert.ok(await chrome.evaluate("!document.querySelector('#spec-decline-dialog').hidden && document.querySelector('#spec-decline-title').textContent === 'Decline G2'"), `${width}: G2 decline opens the reason form`);- assert.ok(await chrome.evaluate("[...document.querySelectorAll('#spec-decline-dialog input,#spec-decline-dialog button')].every(e => e.getBoundingClientRect().height >= 44)"), `${width}: decline reason and controls meet the 44px target`);+ assert.ok(await chrome.evaluate(`[...document.querySelectorAll('#spec-decline-dialog input,#spec-decline-dialog button')].every(e => e.getBoundingClientRect().height >= ${tapTarget(width)})`), `${width}: decline reason and controls meet the 44px target`);await click(chrome, '#spec-decline-cancel');state = await boardOf(view, demo.repo);assert.equal(state.events.filter((event) => event.event_kind === 'row_decision').length, 1, `${width}: cancelling decline records no event`);@@ -5382,7 +5387,7 @@ test('shouts read as cards [N26]', { timeout: 120_000 }, async (t) => {`${at}: each code reference is one piece with its lines and short commit in view: ${JSON.stringify(r.refs)}`);if (width === 375) assert.ok(r.refs[1].cut && r.refs[1].ends === 'ellipsis', `${at}: a path too long for the line is cut short first: ${JSON.stringify(r.refs)}`);// A reference on a line of its own is a block, collapsed: a caret header the width of the text, no coloured edge.- assert.deepEqual(r.block && [r.block.label, r.block.height >= 44, r.block.full, r.block.caret, r.block.edges], [sourceRefs[0].replace(head, head.slice(0, 10)), true, true, 'drawn', true],+ assert.deepEqual(r.block && [r.block.label, r.block.height >= tapTarget(width), r.block.full, r.block.caret, r.block.edges], [sourceRefs[0].replace(head, head.slice(0, 10)), true, true, 'drawn', true],`${at}: a whole-line reference is a collapsed block: ${JSON.stringify(r.block)}`);// Decisions: a band until answered, then who answered and a link to the answer.@@ -5515,7 +5520,7 @@ test('the shout composer, agent filter and agents panel [N26]', { timeout: 120_0// One bar: the message, the send button on the right, in one row; no recipient picker.for (const part of ['message', 'send']) assert.ok(s[part].top >= s.composer.top - 0.5 && s[part].bottom <= s.composer.bottom + 0.5, `${at}: the ${part} sits inside the composer bar: ${JSON.stringify(s)}`);assert.ok(s.pickers === 0 && s.message.right <= s.send.left + 0.5 && s.composer.right - s.send.right < 12, `${at}: the message, then send: ${JSON.stringify(s)}`);- assert.ok(s.send.width >= 44 && s.send.height >= 44, `${at}: the send button is a 44px target`);+ assert.ok(s.send.width >= tapTarget(width) && s.send.height >= tapTarget(width), `${at}: the send button is a target, 44px where a finger taps`);// Only agents at work are listed, the idle ones in their fold, which ends with show all.assert.ok(s.panel && s.listed.includes('web-1') && s.listed.includes('web-3') && !s.listed.includes('web-2'), `${at}: the agents at work, and not the idle one: ${s.listed}`);assert.equal(s.all, `show all ${agents.length}`, `${at}: every agent is one click away`);@@ -5643,11 +5648,11 @@ test('the agents panel is rows for work and pills for idle [N26]', { timeout: 12const [row] = p.rows;assert.match(row.text, /^W1 web-1 (?:now|\d+[mhd]) #1 Header building \+1$/, `${at}: what the row says: ${row.text}`);assert.equal(row.face, row.name, `${at}: the name is in its avatar's colour, as in the feed`);- assert.ok(row.height >= 44, `${at}: the row is a 44px target`);+ assert.ok(row.height >= tapTarget(width), `${at}: the row is a target`);assert.ok(!/strong/.test(row.text) && row.title.includes('web · strong') && row.title.includes(alpha.web), `${at}: lane, route and path are on hover, not in the row: ${row.title}`);// Agents holding nothing are pills in the idle fold; one that has not moved in the last hour waits behind show all.assert.deepEqual([p.idle, p.pills.map((pill) => pill.id)], ['2 idle', ['coordinator', 'web-2']], `${at}: the idle agents are pills`);- assert.ok(p.pills.every((pill) => pill.height >= 44 && pill.title.includes(' · ')), `${at}: each pill a 44px target with its lane on hover`);+ assert.ok(p.pills.every((pill) => pill.height >= tapTarget(width) && pill.title.includes(' · ')), `${at}: each pill a target with its lane on hover`);assert.equal(p.all, `show all ${agents}`, `${at}: every agent one click away`);assert.ok(p.height < 260, `${at}: four agents take little room: ${p.height}px`);}@@ -5659,7 +5664,7 @@ test('the agents panel is rows for work and pills for idle [N26]', { timeout: 12let p = await panel();assert.deepEqual([p.rows[0].on, p.rows[0].work.map(([id]) => id), p.chip, p.to, p.cards], [true, ['1', '2'], 'to web-1×', 'web-1', [['web-1', 'coordinator']]],`the picked row opens to what it holds, the feed shows its shouts and the composer is addressed to it: ${JSON.stringify(p)}`);- assert.ok(p.rows[0].work.every(([, height]) => height >= 44), 'each thing it holds is a 44px target');+ assert.ok(p.rows[0].work.every(([, height]) => height >= tapTarget(1280)), 'each thing it holds is a target');// A pill does the same.await chrome.evaluate(`document.querySelector('#agents .agent-pill[data-agent="web-2"]').click()`);p = await panel();@@ -5726,7 +5731,7 @@ test('the composer goes to the coordinator and says who heard [N26]', { timeout:// A picked agent's chip has an x that is a 44px square target; picking the agent again puts it back.await chrome.evaluate(`document.querySelector('#agents [data-agent="web-1"]').click()`);const picked = await read();- assert.ok(picked.chip === 'to web-1×' && picked.clear[0] >= 44 && picked.clear[1] >= 44, `${at}: the chip's x is 44 by 44: ${JSON.stringify(picked.clear)}`);+ assert.ok(picked.chip === 'to web-1×' && picked.clear[0] >= tapTarget(width) && picked.clear[1] >= tapTarget(width), `${at}: the chip's x is a square target: ${JSON.stringify(picked.clear)}`);await chrome.evaluate(`document.querySelector('#agents [data-agent="web-1"]').click()`);assert.equal((await read()).chip, null, `${at}: picking the agent again returns the composer to the coordinator`);}@@ -5755,7 +5760,8 @@ test('the composer goes to the coordinator and says who heard [N26]', { timeout:await chrome.evaluate(`document.querySelector('#agents [data-agent="web-1"]').click()`);let r = await read();assert.deepEqual([r.chip, r.to, r.placeholder], ['to web-1×', 'web-1', 'Shout to web-1'], 'a picked agent shows as a chip');- assert.ok(r.clear[0] >= 44 && r.clear[1] >= 44, 'whose x is a 44px square target');+ const clearAt = tapTarget(await chrome.evaluate('innerWidth'));+ assert.ok(r.clear[0] >= clearAt && r.clear[1] >= clearAt, 'whose x is a square target');await chrome.evaluate(`document.querySelector('#shout-to-chip [data-to-clear]').click()`);r = await read();assert.deepEqual([r.chip, r.to, r.placeholder], [null, 'coordinator', 'Shout to the coordinator'], 'the x returns it to the coordinator');@@ -5940,8 +5946,8 @@ test('in-text item references stay inline and open their target at phone and des`${width}: the title link has the surrounding line height: ${JSON.stringify(rendered)}`);assert.ok(Math.abs(rendered.needRef.height - rendered.needText.height) < 1,`${width}: the Needs-you link has the surrounding line height: ${JSON.stringify(rendered)}`);- assert.ok(rendered.needAction.height >= 44 && rendered.realButton.height >= 44,- `${width}: real controls keep 44px targets: ${JSON.stringify(rendered)}`);+ assert.ok(rendered.needAction.height >= tapTarget(width) && rendered.realButton.height >= tapTarget(width),+ `${width}: real controls keep their targets: ${JSON.stringify(rendered)}`);for (const section of ['agents', 'spec', 'doctrine']) {if (section === 'agents') {@@ -5974,7 +5980,7 @@ test('in-text item references stay inline and open their target at phone and desassert.ok(metrics.present, `${width}: ${section} citing title renders a compact item reference: ${JSON.stringify(metrics)}`);assert.equal(metrics.border, '0px', `${width}: ${section} reference has no button border`);assert.ok(Math.abs(metrics.refHeight - metrics.lineHeight) < 1, `${width}: ${section} reference keeps the text line height: ${JSON.stringify(metrics)}`);- assert.ok(metrics.containerHeight >= 44, `${width}: ${section} containing item keeps a 44px target`);+ assert.ok(metrics.containerHeight >= tapTarget(width), `${width}: ${section} containing item keeps a target`);assert.equal(metrics.nestedButtons, 0, `${width}: ${section} title has no nested controls`);await chrome.evaluate(`document.querySelector(${JSON.stringify(selector)}).click()`);await chrome.waitFor("document.querySelector('[data-tab=items].on') && document.querySelector('#detail h2')?.textContent.includes('Target item')");@@ -6143,7 +6149,7 @@ test('Roadmap and rule prose references stay inline and open the item on their oassert.equal(metrics.border, '0px', `${width}: ${selector} has no box`);assert.ok(Math.abs(metrics.height - metrics.line) < 1, `${width}: ${selector} keeps the text line height`);assert.equal(metrics.nested, false, `${width}: ${selector} never nests buttons`);- if (metrics.rowHeight !== undefined) assert.ok(metrics.rowHeight >= 44, `${width}: the containing Roadmap control keeps its touch target`);+ if (metrics.rowHeight !== undefined) assert.ok(metrics.rowHeight >= tapTarget(width), `${width}: the containing Roadmap control keeps its target`);await chrome.evaluate(`document.querySelector(${JSON.stringify(selector)}).click()`);await chrome.waitFor("!document.body.classList.contains('switching') && document.querySelector('[data-tab=items].on') && document.querySelector('#detail h2 > span')?.textContent === '#1'");assert.ok((await chrome.evaluate("document.querySelector('#detail h2').textContent")).includes(target), 'the reference opens its target title');@@ -7043,3 +7049,81 @@ test('the project corner and the theme read the same everywhere [N26]', { timeouawait view.stop();}});++test('targets are 44px for touch and compact under a mouse [N26]', { timeout: 150_000 }, async (t) => {+ const executable = chromeExecutable();+ if (!executable) return t.skip('Install Chrome or set PULLBOARD_CHROME for target size checks.');+ const box = machine();+ const lanes = { web: { owns: ['web/'], specs: ['G'] }, api: { owns: ['api/'], specs: ['G'] } };+ const alpha = project(box, 'targets', SPEC, { lanes });+ box.run(alpha.repo, 'add', 'web', 'Greeting', '--specs', 'G1', '--criterion', 'greets');+ box.run(alpha.repo, 'add', 'api', 'Endpoint', '--specs', 'G1', '--criterion', 'answers');+ box.run(alpha.web, 'claim', '1');+ box.run(alpha.web, 'shout', 'coordinator', 'Greeting is under way; see #2 after.');+ const view = await startView(box);+ const profile = mkdtempSync(join(tmpdir(), 'pullboard-targets-chrome-'));+ let chrome;+ /** Every visible enabled action with its height, which references sit in running text, and the named compact ones. */+ const audit = 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' && r.width > 0 && r.height > 0 && !e.closest('[hidden]'); };+ const height = (s) => { const e = document.querySelector(s); return e && visible(e) ? Math.round(e.getBoundingClientRect().height) : null; };+ 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]';+ const controls = [...new Set(document.querySelectorAll(selector))].filter(visible).map((e) => ({ text: (e.innerText || e.getAttribute('aria-label') || e.id || e.className).trim().slice(0, 40), height: e.getBoundingClientRect().height,+ inline: 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') }));+ return {+ page: { width: document.documentElement.clientWidth, scroll: document.documentElement.scrollWidth },+ tap: getComputedStyle(document.documentElement).getPropertyValue('--tap').trim(), coarse: matchMedia('(pointer: coarse)').matches,+ short: controls.filter((c) => c.height < 44 && !c.inline), count: controls.length,+ toolbar: { states: [...document.querySelectorAll('#state-chips button')].filter(visible).map((b) => Math.round(b.getBoundingClientRect().height)), lane: height('#lane-pick'), go: height('#new-item') },+ composer: { text: height('#shout-text'), send: height('#shout-send') }, status: [...document.querySelectorAll('.status [data-status]')].filter(visible).map((b) => Math.round(b.getBoundingClientRect().height)),+ };+ })())`));+ const tab = async (name) => { await chrome.evaluate(`document.querySelector('[data-tab=${name}]').click()`); await chrome.waitFor(`!document.querySelector('[data-pane=${name}]').hidden`); };+ try {+ chrome = await openSnapshotChrome(executable, view.link.href, profile);+ await chrome.waitFor("typeof data === 'object' && data?.project?.items?.length === 2 && data.project.shouts.length >= 1");+ for (const scheme of ['light', 'dark']) {+ for (const width of [1280, 375]) {+ await chrome.send('Emulation.setDeviceMetricsOverride', { width, height: 900, deviceScaleFactor: 1, mobile: false });+ await chrome.send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-color-scheme', value: scheme }] });+ await chrome.waitFor(`innerWidth === ${width} && matchMedia('(prefers-color-scheme: ${scheme})').matches`);+ const at = `${width}px ${scheme}`;+ await tab('items');+ const items = await audit();+ await tab('shouts');+ const shouts = await audit();+ for (const r of [items, shouts]) assert.ok(r.page.scroll <= r.page.width, `${at}: no sideways scroll`);+ if (width === 375) {+ // In a narrow window every action is a 44px target, as a finger needs.+ assert.equal(items.tap, '44px', `${at}: the target is 44px`);+ for (const [name, r] of [['Items', items], ['Shouts', shouts]]) assert.deepEqual(r.short, [], `${at} ${name}: every action at least 44px high: ${JSON.stringify(r.short)}`);+ } else {+ // Under a mouse on a wide screen controls size to their words: the Items toolbar at 32px, the composer one line.+ assert.equal(items.tap, '32px', `${at}: the target is 32px under a mouse`);+ assert.ok(items.toolbar.states.length === 3 && [...items.toolbar.states, items.toolbar.lane, items.toolbar.go].every((h) => Math.abs(h - 32) <= 1), `${at}: the Items toolbar's controls are 32px: ${JSON.stringify(items.toolbar)}`);+ assert.ok(shouts.composer.text <= 34 && Math.abs(shouts.composer.send - 32) <= 1, `${at}: the composer is one line of text: ${JSON.stringify(shouts.composer)}`);+ assert.ok(items.status.length > 0 && items.status.every((h) => h <= 30), `${at}: the status bar keeps its thin strip, no exception needed: ${JSON.stringify(items.status)}`);+ assert.ok(items.short.length > 0, `${at}: there is no blanket 44px minimum under a mouse`);+ }+ }+ }++ // Under touch on the same wide screen, every action is a 44px target again, the status bar's parts included.+ await chrome.send('Emulation.setDeviceMetricsOverride', { width: 1280, height: 900, deviceScaleFactor: 1, mobile: false });+ await chrome.send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-color-scheme', value: 'light' }] });+ await chrome.send('Emulation.setTouchEmulationEnabled', { enabled: true, maxTouchPoints: 5 });+ await chrome.waitFor("innerWidth === 1280 && matchMedia('(pointer: coarse)').matches");+ await tab('items');+ const touchItems = await audit();+ await tab('shouts');+ const touchShouts = await audit();+ assert.equal(touchItems.tap, '44px', 'under touch the target is 44px');+ for (const [name, r] of [['Items', touchItems], ['Shouts', touchShouts]]) assert.deepEqual(r.short, [], `touch ${name}: every action at least 44px high: ${JSON.stringify(r.short)}`);+ assert.ok(touchItems.status.every((h) => h >= 44), `touch: the status bar's parts are 44px: ${JSON.stringify(touchItems.status)}`);+ assert.deepEqual(chrome.exceptions, [], 'the page raises no uncaught exception');+ } finally {+ if (chrome) await closeSnapshotChrome(chrome);+ rmSync(profile, { recursive: true, force: true });+ await view.stop();+ }+});