44px is the hit area, not the paint: 36px pills, a keyboard-aware New run, and a tab bar that slides out while typing¶
Three phone problems came out of one design review, and they were decided together. First, the maintainer's designer review found the pills too large on the phone. Every pill-shaped control painted 44px on touch layouts, because ADR-0005, ADR-0019 and ADR-0075 read the 44px touch-target rule as the size of the control. The app already had two controls that kept the 44px target without the 44px paint. The Chat's send button paints a 36px circle and extends its target to 44px with a transparent ::after at inset: -4px (styles/chatui.css). The toggle switch (button.switch, styles/controls.css) has a 44px-tall hit area around a compact track.
Second, New run ignored the on-screen keyboard. Issue #82 had made the Chat follow the keyboard: lib/visualViewport.ts tracks window.visualViewport, and bindVisualViewport writes --vv-height / --vv-top onto the bounded .chat-page. New run had the opposite shape. Its document scrolled, and its composer dock was position: sticky; bottom: var(--tabbar-space). On iOS, where the layout viewport never shrinks for the keyboard, the dock stayed behind the keyboard and only the focused textarea was scrolled into view. On Android the dock followed the keyboard, but the fixed tab bar rode above the keyboard too and took 49px of what was left.
Third, the tab bar (ADR-0077) knew nothing about the keyboard.
Decisions, pinned:
- 44px is the hit area, not the paint. The 44px floor of ADR-0005, ADR-0019 and ADR-0075 is reinterpreted as the minimum height of the area a finger can hit. A control may paint smaller when a transparent extension makes up the difference. Controls that are not pills keep their 44px paint (buttons, rows, inputs, the tab bar's tabs, the New run send button); this record does not touch them.
- The four pill families paint 36px at every width. These are the repository pills (
.repo-pill), the composer chips shared by the New run and Chat composers (.composer-chip; the More chip is 36×36), the Schedule editor's weekday and flow toggles (.chip-toggle, 36 tall with a minimum width of 36), and the Picker sheet's filter buttons (.picker-filters button). The desktop fine-pointer overrides that compacted them to 40, 40, 36 and 34px are deleted, so each pill has one size everywhere. 36px is the small-control size the app already uses (the Chat's send button,button.small, the attachment chip at desktop width). The repository pill's horizontal padding goes from 0.85rem to 0.7rem to keep its proportions; font size and weight are unchanged. The readiness dot, the caret and the focus ring stay inside the paint. - The extension is for coarse pointers only. Under
@media (pointer: coarse)each pill isposition: relativeand has a transparent::after { inset: -4px 0 }, which gives 36 + 2×4 = 44px. A fine pointer gets no extension, so a mouse 4px outside a pill does not light it. - Scrolling rows make room for the extension without growing. The repository pills row, the composer chips row and the Picker filter row scroll sideways, and their overflow clip would cut the extension at the row's 2px focus-ring padding. Clipped overflow cannot be hit. On coarse pointers each row therefore pads 4px above and below, with a −2px margin, so its layout height (36 + 2 + 2) and every offset derived from it stay the same. The Schedule editor's groups wrap instead of scrolling, so nothing clips there; neighbouring rows' extensions overlap by under 2px.
- New run below 1024px is a bounded page, the Chat's shape. While the page has repositories (
.newrun-docked), its height isvar(--vv-height, 100dvh) - var(--tabbar-space), with100vhand100dvhfallbacks, as inchat.css. It is placed withposition: relative; top: var(--vv-top, 0px).transformis never used, because it would become the containing block of the portaled Picker and the dropdowns' fixed panels. The Issues card region is the page's one scroll container (overflow-y: auto,overscroll-behavior: contain), the composer dock is the last flex item, and the document does not scroll on/newon the phone. The sticky dock, its gradient fade and the.shell:has(.page.newrun-docked)flex chain are removed: nothing scrolls under the dock any more, and a bounded height needs no flex parent. From 1024px nothing changes. The page is the centred 720px column, the document scrolls, and the dock is a plain block. - New run binds the visual viewport with the Chat's primitive.
NewRuncallsbindVisualViewporton its page element inonMount, for the page's whole life. Only the phone's.newrun-dockedrules read the variables, so the error state, the empty state and the desktop column ignore them. Android follows the keyboard through the viewport meta (interactive-widget=resizes-content) and the100dvhfallback, with no script. iOS follows it through--vv-height/--vv-top. WithoutvisualViewport(jsdom, old browsers), or while pinch-zoomed, both variables are unset and the page is 100dvh less the bar, at top 0. - The AFK toast is anchored to the bounded page. Below 1024px the page's toast region is stretched over the page (
inset: 0), and the toast is placed absolutely in it,12.125remabove the page's bottom edge. That offset is the height of a one-line docked composer on a touch phone plus the toast's 1.25rem step. Because the toast is measured from the page's edge, it rides above the keyboard on iOS as well. A fixed toast would sit behind the keyboard at the layout viewport's bottom. No--tabbar-spaceterm is needed, because the page already ends above the bar. - The dock pads for the home indicator only when the shell has no tab bar. While the bar shows, it covers the safe area itself. While the bar is slid out, the keyboard is up and covers the indicator, so padding would only open a gap between the dock and the keyboard. The rule is keyed on
.has-tabbar, not on--tabbar-space, which reads 0px both when there is no bar and when the bar is slid out. - "Keyboard open" is read from the viewport shrink, never from focus.
createKeyboardTracker(pure, DOM-free) and its reactive wrappercreateKeyboardOpeninlib/visualViewport.tstreat the keyboard as open while the visual viewport's height sits more thanKEYBOARD_MIN_SHRINK_PX(120px) below its baseline. The baseline is the largest height seen at the current width, so it is the viewport without a keyboard and with the URL bar collapsed. A change of width (rotation) restarts the baseline at the new reading, so a landscape height is never compared with a portrait one. A null reading (novisualViewport, or pinch-zoom) reads closed and leaves the baseline alone. Focus would get two cases wrong: after Android's back-button dismissal the field keeps focus with no keyboard on screen, and a hardware keyboard types into a focused field with no on-screen keyboard at all. The shrink signal is right in both cases and was already being measured. 120px is above iOS Safari's URL-bar collapse (roughly 60–100px) and iPad's hardware-keyboard shortcut bar (about 55px), and well below the smallest phone keyboard (landscape, about 160–200px with the suggestion strip). - The tab bar slides out on New run only.
tabBarSlidesOut(pathname, keyboardOpen)inlib/tabBar.tsis true only on/newwhile the keyboard reads open.tabBarHiddenis still the one route rule that decides where the bar exists; the new function only moves a bar that does.AppShellkeeps one keyboard reading for its lifetime and sets.tabbar-outon the shell while the bar shows and slides out. Below 1024px,.tabbar-outcollapses--tabbar-spaceto 0px, so New run takes the whole visual viewport above the keyboard. It also moves the bar down out of view withtranslateY(100%), over 200ms ease-out, alongside the keyboard, both ways. Underprefers-reduced-motion: reducethe switch is instant. The bar stays mounted and keeps its state; only the class changes. The transform is safe on the bar because nothing is portaled into it.
Status¶
Accepted 2026-10-10. Resolves issue #97. Decided with the maintainer in a grill session on 2026-10-10.
- ADR-0019: supersedes "the 44px touch-target and 16px-input rules survive untouched" for pill-shaped controls. The 44px touch target is now the hit area, and pills paint 36px. The 16px-input rule stands.
- ADR-0075: supersedes the consequence that "every control is at least 44px tall" (each pill's hit area is, on a coarse pointer, but its paint is 36px), and the first pin's phone layout: the composer is "docked sticky at the bottom edge" on a page whose root is
min-height: 100%. Below 1024px the page is now bounded and the dock is its last flex item. The page's content, its desktop layout and issue #87's pills-in-the-dock stand. - ADR-0077: amends the tab bar's anatomy. The bar slides out while the keyboard is open on New run, and the New run page's docked composer no longer sits at
bottom: var(--tabbar-space, 0px). Instead the bounded page subtracts--tabbar-spacefrom its height. The toast and the repo settings save bar still sit atbottom: var(--tabbar-space, 0px). The route rules andtabBarHiddenstand. - ADR-0005: its "44px touch targets" read the same way, as the hit area. That record carries no note of its own.
- ADR-0072: unchanged. The Chat's bounded page and its visual-viewport binding (issue #82) are the precedent New run now follows; the Chat's keyboard behaviour is untouched.
Amended by issue #99 (2026-10-10): the page's height and top are clamped to the layout viewport, on the Chat and on the phone's New run alike. height is min(var(--vv-height, 100dvh), 100dvh) (New run subtracts --tabbar-space from that), and top is min(var(--vv-top, 0px), calc(100dvh - <that height>)). The unclamped placement gave the document scroll range whenever a reading paired the full height with a stale offset, or a height a fraction above 100dvh: the height and the offset arrive through separate visualViewport events and the binding re-lays out on each, so such readings occur around every keyboard open and close. Safari then hands the visual pan to the document as window.scrollY, and iOS does not always clamp it back, which showed as an outer scroll with blank background below the dock. 100dvh is the layout viewport under both keyboard models, so the clamps are no-ops in every legitimate state. position: relative plus top stands; transform is still not used. A Playwright layout spec (web/e2e/viewportClamp.spec.ts) pins the zero-overflow states.
Not yet verified on devices. The behaviour is covered by unit and component tests (the tracker's baseline, threshold and rotation rules; the shell's slide-out rule; New run binding the viewport). Manual checks on a real iPhone and an Android phone are still pending. In particular, these assumptions are unchecked:
- iOS Safari in standalone (Home Screen) PWA mode fires
visualViewportresize and scroll for the keyboard as in-browser Safari does. The Chat relies on the same events. - The largest-height baseline survives the in-browser iOS URL-bar collapse without reading it as a keyboard.
- The page's height change when the bar slides out is hidden behind the keyboard's own animation, so
--tabbar-spaceneeds no transition of its own.
Considered options¶
- Keep 44px paint and only shrink the type. Rejected: the designer review found the controls themselves too large, and the app already had two working examples of a smaller paint with a 44px target.
- Keep the desktop fine-pointer compact sizes (40 / 40 / 36 / 34). Rejected: with the phone at 36px, four sizes across four families would leave one pill looking different at every width. One size is simpler to keep consistent.
- Extend the hit area for every pointer. Rejected: a mouse 4px outside a pill would hover and click it, and nothing about a mouse needs the extra room.
- A fixed dock repinned by script (keep the document scrolling and move a
position: fixeddock to the keyboard's edge on every viewport event). Rejected as fragile on iOS. The bounded page is the one shape in the app already proven against the iOS keyboard. - Decide "keyboard open" from focus. Rejected for the Android back-button and hardware-keyboard cases above.
- Slide the bar out while typing on every tab-bar page. Rejected: the repo settings save bar sits at
bottom: var(--tabbar-space), so it would jump down under the typist's thumb while they type. The other tab-bar pages (New issue, the Picker's search) keep the bar. A later page that needs the slide-out can jointabBarSlidesOut. - Hide the bar instantly. Rejected: the maintainer chose a slide that runs alongside the keyboard. The instant switch is kept for reduced motion.
Consequences¶
- On a phone the pills, chips, weekday and flow toggles and Picker filters look smaller, and a finger still hits them at 44px. With a mouse their target is exactly what is painted. A new pill-shaped control should follow the same pattern: 36px paint, a coarse-pointer
::after { inset: -4px 0 }, and 4px of block padding (with a −2px margin) on any overflow-clipped row that holds it. - On
/newbelow 1024px the document never scrolls, and long Issues content scrolls inside the card region. When the keyboard opens, the page shrinks to the space above it, with the dock (pills, blockers, field) at the keyboard's edge and the tab bar out of the way. When the keyboard closes, the bar slides back. - Rotating while the keyboard is up starts the new width's baseline at the short height. The keyboard then reads closed until it has been dismissed once, so the bar stays. This known edge errs on the safe side.
- Without
visualViewportthe keyboard never reads open, the bar never moves, and New run is 100dvh less the bar. The jsdom suites run on that path. - The AFK toast offset on New run is a derived number (
12.125rem). A change to the dock's height (the pill size, the field's padding, the bar under the field) must re-derive it. A taller field (more lines, an attachment, blockers) already grows the dock past it. - The keyboard tracker, the route rule and the shell's class are covered by unit tests (
lib/visualViewport.test.ts,lib/tabBar.test.ts) and component tests (components/AppShell.test.tsx,routes/NewRun.test.tsx). The 36px and 44px sizes are CSS and need a visual check: jsdom applies no CSS.