Skip to content

fix: open a visual case's feedback box inline on a phone again - #5669

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5648
Nov 7, 2026
Merged

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

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Since #5496, Add feedback on a visual review case opens no inline comment box on a 390×844 phone, which is what test_visual_review_returns_to_case_feedback_on_phone reports. The case's thread outlet is display: none while its discussion is empty, so seatFab judges the box that lays it out instead: the whole .lf-vr-case (y 159–1153 in the test). The phone's bottom bar (y 786–830) crosses that box. #5496 made seatFab refuse any seat a cover crosses even in part (covered), so the case was refused. Before #5496, seenRect accepted the case's visible top.

A stand-in box only says the editor will land somewhere in it, so seatFab now refuses a stand-in only where a cover crosses it and the user sees none of it. A seat with its own box keeps #5496's rule as written: refused where the chrome covers any of it, accepted where it is only scrolled out of the window. So #5496's intent holds: the diff file's comment box below the window still opens inline, and a seat half under the panel still sends the box home. The only behavior that moves is a boxless outlet whose stand-in is partly seen and partly under a cover. Its box opens inline again, as it did before #5496.

Verification:

  • test_visual_review_returns_to_case_feedback_on_phone fails on main a54c1bcea and passes with this change.
  • fix: seat a diff file's comment box inline when the file's end is below the window #5496's test_a_file_s_comment_opens_inline_where_the_file_ends_below_the_window passes.
  • The composer, comment and feedback tests in test_render_floating_panel.py, widgets/test_diffs.py and test_render_visual_review_journey.py (21 selected) pass. So do pnpm run test:runtime (896) and pnpm run check.

Closes #5648 — automated triage

Since #5496, Add feedback on a visual review case opens no inline box at
390×844. The case's thread outlet is display:none while its discussion is
empty, so `seatFab` judges the box that lays it out: the whole case,
which runs past the phone's bottom bar. #5496 refuses any seat a cover
crosses in part (`covered`), so the case was refused, where `seenRect`
before it accepted the case's visible top.

A stand-in box only says the editor lands somewhere in it, so `seatFab`
now refuses one only where a cover crosses it and the user sees none of
it. A seat with its own box keeps #5496's rule: refused where the chrome
covers any of it, accepted where it is only scrolled out of the window.

test_visual_review_returns_to_case_feedback_on_phone failed before this
change and passes after it; #5496's
test_a_file_s_comment_opens_inline_where_the_file_ends_below_the_window
still passes.

Closes #5648
@leaf-agent
leaf-agent merged commit 5354101 into main Nov 7, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5648 branch November 7, 2026 15:52
max-sixty added a commit that referenced this pull request Nov 22, 2026
…ght, so it stops jumping between seats

With no room kept for the floating panel, a visual review that fills the
window ends its case at the window's foot, under the panel's row. Pressing
c or Add feedback there seated the comment box in the case's discussion:
the empty discussion was display: none, so seatFab judged the whole case,
which the user mostly sees. Seated, the discussion laid out under the row,
the next judgment of the outlet's own box refused it and sent the box home,
the emptied discussion vanished, and the case took the box back. The box
moved between the two about every 70 ms, the page's rendering never
settled, and the comment field left the case under the user's typing.

An empty discussion now lays out with no height, hidden, so its outlet is
judged where the box will stand, and a boxless outlet is judged by the same
rule as one with a box: refused wherever a cover crosses it. This drops
#5669's lenient reading of a boxless outlet, whose only user was this
discussion; the phone case it fixed now passes on the outlet's own box,
which stands below the window there.

Behaviour that changes: in a review that fills the window, the comment box
stands beside the case, over its head, rather than in its discussion. Where
the review flows with the page, as on a phone or in a window narrower than
the review's 58rem, the box still opens in the case's discussion.

Tests: the keyboard-locality and On Me tests find the box on the page
rather than in the case. The reorder, case-goes and phone-resize tests run
in a 700x768 window, where the review flows, so they still hold a box
seated in its case.
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.

test_visual_review_returns_to_case_feedback_on_phone fails on main since #5496 changed where a comment box seats

1 participant