Skip to content

Inbox review: on a phone, Comments takes the whole screen - #2702

Merged
backnotprop merged 9 commits into
mainfrom
fix/inbox-comments-phone-sheet
Nov 6, 2026
Merged

backnotprop merged 9 commits into
mainfrom
fix/inbox-comments-phone-sheet

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

On a phone, Comments in the Inbox's review (a pull request and a guided review) now takes the whole screen. It used to be a 300 px panel over a sliver of the page, under the page's bars.

Phone width only

  • The sheet covers the window. Its top is one row: Comments, the count, Close.
  • The page stays mounted under it with visibility: hidden, the way the list stays under an open thread. Close returns to the same scroll, and nothing of the page shows or takes a tap beside the sheet.
  • Focus goes to Close, then back to the Comments button. Escape closes the sheet on a pull request too, as it already did on a guided review.
  • Choosing a comment in a pull request's sheet closes it and shows the comment's lines, as the guided review already did.
  • Close, Edit, Delete, Cancel and Save are 44 px targets.

Unchanged

  • Desktop: 70 pictures at 1600, 1440, 1100 and 800, light and dark, are pixel-identical before and after.
  • packages/ui and packages/review-editor are untouched. The rules are .ib-review rules in the Inbox's phone media query.
  • No new words and no new shortcuts.

Selection bar
There is no sliver left to tap. A bar already on the page goes when Comments opens, and the spec checks that.

Left to other PRs

Conflict with #2639
#2639 conflicts in PullReview.tsx around the sheet's close. Its test "the sheets cover the diff and nothing else, at 390, 800 and 1100" and its comment saying so "on a phone too" contradict this PR at 390, so that test needs its 390 case changed when it merges. Its closeComments needs the flushSync from here, because the button can't take focus while the page is hidden.

Tests
tests/e2e/inbox-review-comments-phone.spec.ts runs against the compiled binary in a scratch world with a scratch HOME. It fails without the fix.

After review

  • A double tap on the sheet's Close stops at the sheet: for 350 ms after it closes, the page's top bar takes no taps (nothing visible changes, Close does not move). A tap after that works as before. Phone only.
  • Escape closes the sheet first while it is open, also when focus has dropped to the page (after Cancel, Delete, or a tap on the title). In the edit box, Escape only cancels the edit.
  • Opening the sheet by any route, a key too, clears the selection bar over the page.
  • Both reviews use the same helper: packages/inbox/components/phoneCommentsSheet.ts.

@backnotprop
backnotprop marked this pull request as ready for review November 5, 2026 20:51
@backnotprop backnotprop added the ci:full Run the heavy CI tier on this PR (added by the merge script) label Nov 6, 2026
@backnotprop
backnotprop merged commit 2fab7d3 into main Nov 6, 2026
91 of 98 checks passed
backnotprop added a commit that referenced this pull request Nov 6, 2026
…ide the sidebar on a PR

#2702's desktop guard took the window's edge and a 300 px sheet; on #2639's PR page the review sits beside the open sidebar, so the docked column needs a wider window, its edge is the review's, and at 800 the folded sheet is the diff's width when that is under 300 px.

Co-Authored-By: Claude <[email protected]>
backnotprop added a commit that referenced this pull request Nov 6, 2026
…s after it closes

Since #2702 a phone's Comments sheet covers the window and hides the bar, so the Files button is not reachable while it is open. The step now checks that Comments closes the Files sheet and that closing Comments brings no Files sheet back.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the heavy CI tier on this PR (added by the merge script)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant