Skip to content

fix: keep On me's read card still when a group joins above it - #5533

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5481
Nov 5, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5481

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Three --run-main On me tests have failed on main since #5318 gave every On group a sticky band. Two of them still expected On me as it was before #5318. The third caught a real regression: when a new group joined above the card being read, that card dropped by the new group's height (115px in the test).

The regression. #5318 put each group in its own box and spaced the boxes with margin-block-start: 10px on each group but the first. When a group joins at the top, the group that used to be first picks up that margin. A margin change on an ancestor of the browser's scroll anchor suppresses anchoring, so the 115px the new group added went uncompensated. Only the later 57px, from the asked message filling its outlet, was corrected. The space now hangs below each group but the last (margin-block-end on :not(:last-child) in controls.css), so a group arriving above leaves the anchored group's style as it was. The gap between groups is unchanged: leaf-dev stills for on-me, hub-on-me, page-map and ship-threads reports 0 px changed against main (only computed margins differ). The one visible difference is in lists where something other than a group follows the last group: Threads' "saved threads still to come" note, which shows only briefly, now has 10px of space above it.

Tests updated to #5318's intent:

  • test_on_me_places_an_item_by_its_tab_s_title_or_label: under place grouping a card no longer says its place over its question, because the band says it (Give every On group a sticky band, and fold Done under its own #5318 changed the neighbouring grouping test the same way). The test now reads the bands' names, and these still check how a tab's title or label names the place.
  • test_obligation_cards_keep_identity_and_walk_order_when_the_live_dom_moves: it now unfolds Done before counting five cards. When #sug-refill leaves the page, its item moves into "The whole page" group, and Give every On group a sticky band, and fold Done under its own #5318's description says such a card is "drawn afresh in its new group's box", with holdFocus carrying focus over. The test now checks that card stands under that band and keeps focus, and that every other card keeps its node.

All three failed on 53337b5e9 and pass with this change (uv run pytest --run-main tests/browser/widgets/test_on_panel.py -k ...). The band contract test (test_a_band_names_the_group_passing_under_it) and the grouping tests I selected also pass, with two exceptions. test_an_answer_in_on_me_keeps_its_groups_and_the_m_walk_in_one_order and test_the_chosen_grouping_orders_on_me_and_the_m_walk_alike fail the same way on unmodified main and with this change. They aren't part of #5481 and this PR doesn't touch them.

Closes #5481 — automated triage

#5318 boxed every On group and spaced the boxes with a top margin on each
group but the first. A group joining at the top then gave the old first
group that margin, and a margin change on an ancestor of the browser's
scroll anchor suppresses anchoring, so the card being read dropped by the
new group's height. The space now hangs below each group but the last, so
a group arriving above leaves the anchored group's style unchanged. Spacing
between groups is the same; stills of On me, Page Map and Threads show no
pixel changed.

Two tests still expected On me before #5318 and now follow it:

- The tab-place test reads each group's band for the place's name, since
  under place grouping a card no longer says its place over its question.
- The card-identity test unfolds Done before counting, and lets the card
  whose element leaves the page be redrawn: it moves into the whole page's
  group, which #5318 draws afresh in that group's box. It still checks
  that card keeps focus and every other card keeps its node.

Closes #5481
@leaf-agent
leaf-agent merged commit 479914c into main Nov 5, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5481 branch November 5, 2026 19:49
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.

Three On me tests fail on main since #5318 gave every On group a sticky band

1 participant