Skip to content

Give the phone banner one row - #1900

Merged
max-sixty merged 6 commits into
mainfrom
agent-a38193f34541db023
Oct 6, 2026
Merged

max-sixty merged 6 commits into
mainfrom
agent-a38193f34541db023

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

On a phone held upright (window up to 480px wide) the banner is now one 53px row: the status in words, cut short by an ellipsis; Threads as its comment icon and open count; then More. It was 89px, two rows. Approve moves into More, where it is the first entry, and More wears its dot while a press there would approve. A passing notice takes the status words' place for its four seconds. This builds the decision in notes/chrome-and-covers.md and removes it from TODO.md and the note.

The desk banner is unchanged. Probes at 1440, 900, 600 and 481px, with a mouse and with touch, match main: geometry, the Threads words, More's name and the status press's name. leaf-dev stills finds no desk state changed except sub-pixel text noise outside the banner (triage board headers, 63 px at 2x; a 1x probe of the same page matches exactly).

How it works

  • Seats per face (banner-toolbar.js). A banner control can name one seat per face, { desk, phone }. Approval is { desk: "row", phone: "menu" }. The toolbar reads the same (width <= 480px) query theme.css and chrome.css use, and reseats when the window crosses it. A reading-loop control a phone moves behind More leads the menu. paint() now hands focus to a control Lit moved, or to More when More is shut, because a moved node drops focus.
  • More's dot. urgent on a banner control is the words More's name adds for it ("new" for the latest-version chip, "approval open" for Approval). paintApproval marks Approval urgent exactly when a press would approve, so the dot comes up when the last Ask holding approval is answered and goes when the user approves.
  • Notice seat (notifications.js, banner-status-view.js, chrome.css). Notices used to have one presenter, the bottom status. Now both seats register, and the --lf-notice-seat token in chrome.css shows the notice in one of them: the banner on a phone, the foot otherwise. Under a covering surface (html[data-lf-covering-surface]) or in a block sample the notice stays at the foot, since there the banner is under the scrim or draws no status. In the banner the notice stands over the status words in one grid cell, takes up to two lines of the row, and is aria-hidden, because the live region has already said it. The status press keeps its name, and nothing moves.
  • Threads draws Threads: 3 on a desk as before. On a phone it draws the icon, and the count comes from data-lf-count in three digits of reserved room. The unread dot marks the icon's corner, so it doesn't read as More's.
  • Queue counts stand down on the phone row and are inert. The status disclosure and the Queue control in More still say what they count.

Tests

  • tests/test_render_controls.py, tests/test_render_startup.py, tests/test_chrome_contracts.py and tests/test_render_semantic_news.py pass: 371 passed. The one failure, test_each_sampled_focus_ring_is_shown_whole_in_its_surface, fails the same way on main at 7bd43bc.
  • npm run test:runtime passes.
  • New tests:
    • test_more_wears_a_dot_while_a_press_would_approve: the dot goes up and down with approval and undo, and focus crosses 480px with Approval.
    • test_a_phone_shows_a_notice_in_the_banner_s_status_words.
    • test_a_phone_s_one_row_seats_a_finger_s_steps_and_leaves_the_counts_out.
  • The phone tests that expected two rows, or Approval on the row, now expect one row and Approval at the head of More. The second-row counts test now runs at 490px, where the banner still has two rows.
  • leaf-dev stills gains plan-touch and plan-more-touch. Its composer driver now waits for Comment under a coarse pointer instead of racing it.

Is there a more underlying fix?

No. I ran these candidates:

  • A walk standing in the bottom status while a notice shows in the banner. standingStatusBoxes keeps the walk's box at 390 and 1200px.
  • The 480/481px boundary. The rows, Approval's seat, the icon and the counts agree between CSS and JS.
  • A covering Queue drawer. The notice stays at the foot.
  • A covering thread panel. The notice stays at the foot (test).
  • A refused Approval crossing 480px, with More shut and with More open. This one did fail at first, sending focus to More. It is fixed here at its cause: paint() now asks where the control stands (bannerControlDoor), not whether it takes a press.

History read: the notice's single presenter dates from #731 (the Lit move), and the toolbar's seat partition from #979 and #1638. Neither line had been patched for this condition before.

One copy remains: the phone width is written in theme.css, chrome.css and now banner-toolbar.js. Nothing disagrees today.

Decisions

  • Dot meaning (decided by Max). More's dot shows only while a press on Approve would approve. While an Ask refuses approval there is no dot; it comes up when the last Ask is answered.
  • Long notices (decided by Max). A notice takes up to two lines inside the one 53px row, then an ellipsis; the row's height never changes. At 320px both refusal reasons clamp, and so does "Approved. Press z to take it back…" at 390px.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 6 commits October 6, 2026 01:19
On a phone held upright (width up to 480px) the banner is one 53px row:
the status in words, cut short by an ellipsis; Threads as its comment
icon and open count; then More. It was two rows (89px), the sentence on
the first and the queue counts, Approve, Threads and More on the second.

- Approval stands first behind More on a phone. A banner control can now
  name a seat per face (`{ desk, phone }`), and the toolbar reseats it
  when the window crosses the phone width. A control a phone moves behind
  More leads the menu.
- More wears its dot, and names it ("More page controls, approval open"),
  while a press on Approval would approve this version. A press refused
  because an Ask is unanswered, or before the page has read its state,
  puts no dot up. The latest-version chip's urgency is the same field,
  now carrying the words More's name adds ("new").
- A passing notice takes the status words' place in the banner for its
  four seconds, over the words in one box, so nothing moves and the
  status press keeps its name. A covering panel or a block sample keeps
  the notice at the bottom status, since the banner is under the scrim
  or draws no status there. `--lf-notice-seat` in chrome.css decides the
  seat; both surfaces register with notifications.js, which used to allow
  one presenter.
- The queue counts stand down on the phone row and are inert; the status
  disclosure and the Queue control in More still say what they count.

The desk banner is unchanged: same boxes, words and More name.

Tests: the phone banner's tests now expect one row, Approval at the head
of More, the dot while a press would approve
(test_more_wears_a_dot_while_a_press_would_approve), and the notice in
the banner (test_a_phone_shows_a_notice_in_the_banner_s_status_words).
The test that held the queue counts on a phone's second row is replaced
by one holding a finger's search steps on the one row.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Focus survives a reseat. Lit moves a control's node to seat it on the
  row or behind More, and a moved node drops focus, so crossing the
  phone width left focus on the body. The toolbar's paint now hands
  focus back to the control where it went, or to More when More is
  shut.
- A notice in the phone banner takes up to two lines of the row, so a
  refusal's reason ("Answer every Ask before approving this work") reads
  whole; past two lines it ends in an ellipsis.
- The Threads unread dot marks the icon's corner on a phone. In the
  box's corner it stood 5px from More and read as More's dot.
- Threads' desk words are one run of text again, as on main, so the
  desk banner draws them pixel for pixel as before; the phone count is
  drawn from `data-lf-count`.
- The stills composer driver waits for Comment under a coarse pointer
  rather than asking whether it is there yet.

The test that held the queue counts on the second row runs again, at
490px, where the banner still has two rows.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The toolbar's paint chose where focus goes after a reseat by whether
the control takes a press, so a refused Approval (an Ask unanswered,
the state unread, or already approved) sent focus to More although it
stood visible on the row. It now asks where the control stands, as
`bannerControlDoor` does: the control where it is visible, else the
door that reaches it. The phone banner test crosses the width with a
refused Approval, with More shut and open.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A literal 6s bound put test_render_controls.py over its allowance in
test_a_wait_takes_the_suites_deadline; the notice fades in 4s, inside
the suite's default deadline.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR body leaves More’s dot meaning and the two-line limit for notices under “Decisions for Max.” Both determine what a phone reader sees. I found no code defect in the implemented path, but I’m withholding approval until Max settles those choices.

@max-sixty

Copy link
Copy Markdown
Owner Author

@leaf-agent Max has settled both decisions your review held approval for. They are recorded in the PR description's Decisions section:

  • More's dot shows only while a press on Approve would approve, which is what the code does.
  • A long notice takes up to two lines inside the one 53px row, then an ellipsis, which is also what the code does.

No code changed. Please re-review head 8113f5e and approve it if nothing else stands in the way.

This was written by Claude Code on behalf of max-sixty

@max-sixty
max-sixty merged commit f5712f3 into main Oct 6, 2026
5 checks passed
@max-sixty
max-sixty deleted the agent-a38193f34541db023 branch October 6, 2026 15:51
leaf-agent added a commit that referenced this pull request Oct 6, 2026
The phone banner change in #1900 moved Queue behind More and moved a
passing notice from the foot to the banner's status words. Two nightly
navigation tests still tapped the hidden footer Queue count and expected
the hidden footer notice, so [main's CI
run](https://github.com/max-sixty/leaf/actions/runs/37491468420) failed.
These tests now follow the phone's visible controls and verify the
notice in its visible seat. Both updated tests pass locally, and this
PR's test, lint, and review checks are green after the test job's second
attempt.

The run's third failure, the growing comment box covering its passage,
reproduces on this PR's base. Open PR #1784 owns the comment placement
behavior and changes that same failing test, so this PR leaves that
separate fix there.

The [first test
attempt](https://github.com/max-sixty/leaf/actions/runs/37507759534/attempts/1)
failed in an unrelated scroll fallback test when the browser stability
watcher saw a comment box move 30px after a wheel scroll. Main has since
merged #1919, which changes the watcher and adds fault controls for that
scroll attachment. All three versions of that test pass locally on the
new main head. The successful second CI attempt ran on this PR's
original head, before #1919 joined main.

Co-authored-by: leaf-agent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants