Repository navigation
Fit banner actions inside a 320px viewport - #1338
Merged
Merged
Conversation
max-sixty
added a commit
that referenced
this pull request
Sep 28, 2026
…t, the phone row inset and the overdue reading (#1400) Repairs the nightly failures in [run 36421522559](https://github.com/max-sixty/leaf/actions/runs/36421522559) that #1391 and #1392 left: thirteen failing node ids, one of which needed a product fix to the phone banner's menus. ## The phone banner's menus stand under their door On a phone the banner's action row puts More (and Versions after it) at the row's left inset, and More's menu and the Versions menu open under that door. Both menus clamped their left edge with `left: max(calc(8px + var(--lf-safe-left)), anchor(left))`. The `8px` restated the row's inset (10px then). #1338 cut that inset to 3px to fit three controls in 320px, so the clamp now binds and the menu stands 5px right of the control that opened it, which `test_the_versions_menu_uses_the_banner_panel_and_its_doors_edge` caught. The row's padding owns the inset, and the door already stands inside it, so the clamp can never be tighter than `anchor(left)`. Both menus now take `left: anchor(left)` in one rule; the second copy of the inset is deleted. The far edge is still bounded by the menus' existing `max-width: calc(100vw - 16px)`. Measured with `leaf-dev probe alert-review` (left, right edges in px): | viewport | surface | before (e730341) | after | |---|---|---|---| | 320×844 | More door | 3 – 27 | 3 – 27 | | 320×844 | Versions menu | 8 – 147.4 | 3 – 142.4 | | 320×844 | More menu | 8 – 206.1 | 3 – 183 | | 390×844 | More menu | 8 – 206.1 | 3 – 183 | | 1440×900 | More door | 1247.1 – 1283 | 1247.1 – 1283 | | 1440×900 | Versions menu | 1143.6 – 1283 | 1143.6 – 1283 | | 1440×900 | More menu, right edge | 1283 | 1283 | The More menu's width differs between the arms only because its build-identity row reads `Leaf sha256:…` on the base commit and `Leaf e730341+ · 9m ago` on the working tree; desktop placement is unchanged, since the change sits inside the `width <= 840px` block. ## Tests that read the address the bootstrap now rewrites (#1337) The bootstrap takes the host key `t` out of the address with `history.replaceState`. - `test_a_failed_preview_bootstrap_hears_the_replacement_server` (6 params) and `test_a_failed_bootstrap_hears_a_static_registry_generation` counted reloads with `framenavigated`, which also fires for that in-place rewrite (CI: `assert 2 == 1`; in the static-registry test the stub never answered because `len(navigations) > 1` held from the start). They now count the main frame's document requests (`requested_documents`), so a reload is exactly one more document and the rewrite counts as none. - `test_the_current_page_has_a_menu_local_key` read `pin` off the end of the address, which the rewrite turns into `?pin=`. It now asserts the address is the one it found before the press. - `test_a_draft_explains_its_change_and_restores_history_as_an_edit` opened its second tab at the keyless `page.url` and got a 403. It opens the handover URL `serve` returned. ## Other moved behavior - `test_a_thread_can_be_answered_in_the_margin_without_opening_threads` [1440, 1920]: since #1324 the reply placeholder paints in the standing paint on the next frame. The test read it in a microtask after `focusin`; it now reads it on the animation frame the focus asks for, after the runtime's own focus listener has queued that frame's paint. - `test_a_thread_says_what_the_agent_is_doing_about_it`: since #1331 a turn that ends with updates still the agent's to answer makes them overdue, so the banner says "Nothing is answering them, so nudge it in the terminal." The expectation follows. ## Checks All 13 node ids pass locally, and `leaf-dev flake` ran each changed test (one parameter of each parametrized one) as 18 concurrent copies: 126 of 126 passed. The banner and menu cases in `test_render_controls.py` also pass beside the CSS change, as do 54 phone, banner, menu and version cases across the anchors, aim, navigation, pages, widgets, threads and projection files. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The main nightly run failed two 320px banner checks because the mobile action row needed 332px for its three fixed-width controls, gaps, and side padding. The controls themselves need their reserved widths so count and approval changes do not move the next button. Reducing the row's side insets from 10px to 3px fits those controls within the viewport without changing their widths or order.
Both failing banner cases reproduced on current
mainbefore the change and pass after it (uv run pytest -q -n2with the two targeted test IDs). Other nightly failures are tracked in #1283; this PR addresses the banner overflow.Refs #1283.