Repository navigation
fix: rest the comment box only in the rail's margin, not over the column - #5662
Merged
Merged
Conversation
#5428 stands the empty comment box beside the target `c` would open it on, and its placement header says the box stands only in "the margin its rail stands in". The code withheld it only above or below the target and beside a target the rail doesn't stand by (#5512), so a box seated left of its target, or right of a target that ends short of the column's edge, stood on the page's own words and controls. Beside an On me stop inside a tab panel it covered the panel's "Second" tab; beside an inline suggestion it covered a draft's Edit control; beside a widget whose value shortened, the solve slid it across the column with no input. The box now rests only on the rail's side and only where its target reaches the column's edge (`railEdge` in margin-layout.js, which `marginSpot` reads too). Elsewhere it waits for `c`, as #5428 already has it do with no room beside the target; `c` still opens the box there. Tests that fail on main and pass with this: - test_a_tally_counts_its_regions_obligations_and_walks_them - test_g_hints_press_each_visible_page_map_margin_entry - test_widget_controller_owns_presentation_across_values_and_lifetimes [light], [shadow-host], [shadow-child] - test_page_owned_registry_and_widget_use_the_captured_public_api - test_an_expanded_diff_file_can_retry_its_failed_chunk_in_place - test_a_reaction_returns_focus_to_the_visual_target[keyboard], [aim] - test_a_declared_visual_part_can_raise_the_same_bar_from_the_keyboard - test_an_aim_at_a_seam_promises_the_element_its_press_takes Refs #5641
leaf-agent
force-pushed
the
fix/issue-5641-rest-side
branch
from
November 7, 2026 12:43
e6ed784 to
5069e01
Compare
This was referenced Nov 7, 2026
This was referenced Nov 7, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 7, 2026
`test_design_mode_reads_each_shape_of_control_into_the_anchor_its_routes_carry` has failed on main since #5506. Its "a control's name is its own" subtest asserts that a field's design label carries no neighbouring control's words. The `spoken` section had no heading, so the label's `section:` context came from `main`'s leading `<h1>Settings</h1>`, the climb #5506 deliberately stopped. Since then the unnamed section is named by its own words, `Find settings ×`, and the close button's `×` reaches the field's label through the section's name, not the field's. The test this case came from (`test_design_spoken_context_does_not_borrow_a_neighbours_face`, added in b91b966) gave the section its own `<h2>`. #5409 dropped it when it merged the case into `CONTROL_SHAPES`, and the subtest kept passing only because of the #5228 bug that #5506 fixed. This restores a heading on the section, so the assertion is again about the control's own label, and #5506's naming stays as it is. No product behavior changes, and `CONTROL_SHAPES` has no other reader. **Verification.** The test fails on main `bdc4c03b0` with the issue's message and passes with this change (35 subtests). The issue's second test, `test_render_gate.py::test_scrollbar_clearance_reads_generic_content_and_open_shadow_words`, already passes on `bdc4c03b0` with no change here. That fits #5662, which stopped the resting comment box from standing beside a target that ends short of the column's edge, so the box's `aria-label` no longer collides with the `First choice` role query. `test_an_expanded_diff_file_can_retry_its_failed_chunk_in_place` stays with #5641. Closes #5645 — automated triage Co-authored-by: leaf-agent <[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 resting comment box from #5428 could stand over the page's own words and controls, which its placement header rules out: the box "stands only in the room beside what it is about, the margin its rail stands in". The code withheld it only above or below its target and beside a target the rail doesn't stand by (#5512). A box seated on the target's left, or right of a target that ends short of the column's edge, still stood over the column.
It now rests only on the rail's side, and only where its target reaches the column's edge.
railEdge()inmargin-layout.jsgives that edge, andmarginSpotnow reads it too. Anywhere else the box waits forc, as #5428 already has it do where there's no room beside the target.cstill opens the box in every case.What changes on screen. Focus on a target that ends short of the column's right edge no longer shows the empty box. That covers an inline link or suggestion, a diagram part, a widget's control, and a question inside a tab panel. Beside a paragraph, a question or another block that reaches the edge, the box still rests in the margin.
tests/browser/navigation/test_commenting.py, which holds #5428's behaviours, passes unchanged.In the first, the box covers the "Second" tab the user presses next. In the second, it covers the draft's Edit control.
Tests from #5641 that fail on main
ec2799b1dand pass on this branch (--run-main, run singly):test_a_tally_counts_its_regions_obligations_and_walks_them: the box intercepted the tab click.test_g_hints_press_each_visible_page_map_margin_entry: the box intercepted the draft's Edit.test_widget_controller_owns_presentation_across_values_and_lifetimes[light],[shadow-host],[shadow-child]andtest_page_owned_registry_and_widget_use_the_captured_public_api: when the widget's value got shorter, a new placement moved the box 29 px with no input. It no longer rests beside that widget.test_an_expanded_diff_file_can_retry_its_failed_chunk_in_placetest_a_reaction_returns_focus_to_the_visual_target[keyboard],[aim],test_a_declared_visual_part_can_raise_the_same_bar_from_the_keyboard,test_an_aim_at_a_seam_promises_the_element_its_press_takesandtest_a_picture_in_a_control_stays_the_controls_and_any_other_takes_a_comment: test: let the comment box rest beside a target after a reaction, Escape or press #5661 loosened these to accept a resting bar. The box no longer rests beside a diagram part, an aimed item or a button icon, so the second commit restores their original assertion that the bar is hidden, and they pass with it.Other checks
test_commenting.pyandtest_panes.py(-k "rest or box or waits or c_ or press"): 27 passed.pnpm run test:runtime(896 pass),pnpm run check, andpre-commit run --fileson both files: pass.Refs #5641 — automated triage