oficina / docs Public

fix/phone-pickers

Prompts

Human

Fix a bug Fable found while reviewing docs #91. On phones the Docs toolbar pickers are unusable: Style, Font and Size all open to a list about 10 px tall at 390 px wide. This happens on main. **Root cause, from Fable's analysis.** The bug is in rastrillo's `ui` select.js, in `place()`. - `place()` clamps the list to any ancestor whose computed `overflow-y` is auto, scroll, hidden or clip. - Docs' phone rule sets `overflow-x: auto` on `[docs-toolbar]`, so its `overflow-y` computes to `auto`. - "Room below" therefore comes out as 122 − 120 − 4 < 0, and the list gets `maxBlockSize: 0px`. - The list is fixed or anchored, so the toolbar doesn't actually clip it. select.js just can't tell. There are two possible fixes: 1. In Docs, use rastrillo's `rst:select-viewport` (`told`) escape hatch. 2. Fix rastrillo's `place()` so it ignores ancestors that can't clip a fixed or anchored list. That means ancestors that don't establish its containing block. It may also mean treating overflow on one axis correctly. Prefer option 2 if it's sound, because every app using `ui` pickers inside a horizontally scrolling bar has the same bug. If you change rastrillo, do it on its own branch with a discussion. Then use that branch in Docs, pinned to the branch commit, and say so. Also fix two related P2s from the same review: - At 320 px the font list ends 6 px past the viewport. Use `position-try-fallbacks: flip-inline` or a `max-inline-size` cap. - In Firefox without anchor positioning, the widened desktop list (up to 157 px) may add horizontal overflow to a wrapped 320 px bar. Check it with Playwright Firefox if it launches. And one note from the same review: comments and the test claim the font Twin "stays for DOCX export and paste". Nothing reads `Twin` any more, apart from a test at `export_test.go:810`. Either drop the field or correct the wording. DOCX goes through `docx.name`. **Repos:** - /Users/paulcampbell/amadan.net/oficina/docs (hub oficina/docs), now at main ce485a5. - /Users/paulcampbell/amadan.net/rastrillo/rastrillo (hub rastrillo/rastrillo). Read its AGENTS.md: it uses an ordinary merge, no squash, and needs `make mirror-check`. **Tests, written to fail first:** - At 320, 390 and 1280 px, every toolbar picker opens to show at least its first 5 options, stays inside the viewport, and can be scrolled. - Use Docs' browser rig through the production stack, in Chromium and WebKit. **Rules:** - Work in worktrees cut from a fresh origin/main. Use branch `fix/phone-pickers` in docs and `fix/select-place-clip` in rastrillo. - Use GOTOOLCHAIN=go1.26.5. In docs, run `TMPDIR=/tmp .amadan/ci.d/10-gate` with OrbStack. Run the browser tests with `RASTRILLO_CHROME` set to Playwright's chromium and `-timeout 40m`. The machine is loaded, so re-run any timing failure on its own. - End commit messages with `Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>`. - Push as the agent account: `export AMADAN_HOME=$HOME/.amadan-claude-agent`, binary /Users/paulcampbell/.local/bin/amadan. - Open discussions and wait for hub CI. - Do NOT merge or deploy. **Report** the branches, head SHAs, discussions and CI status.