Skip to content

Open the comment box where a panel beside the page leaves it in sight - #1927

Merged
max-sixty merged 7 commits into
mainfrom
panel-dominates-comment-seat
Oct 6, 2026
Merged

max-sixty merged 7 commits into
mainfrom
panel-dominates-comment-seat

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

With Threads open beside annotation-workspace, c on a selection used to open the comment box in the annotation rail under the panel, so the user typed into a box they could barely see. Now the box opens in the panel's foot, and returns to the rail when the panel closes. This is the part of Max's rule from the #1897 audit ("the panels should dominate whatever focus changes we have, focus should not be able to affect panels") that the repo already settles.

How

  • geometry.js gains underOccluder(where): whether any standing panel or drawer hides it, which is the measure travel already uses.
  • seatFab (composing/surface.js) refuses a seat a panel stands over, so the box stays at its home. Without the overlay, that home is the Threads panel's foot; with it, the box floats beside the selection. The check reads the seat, not the editor moved into it, because an outlet that hasn't rendered the editor yet measures it as zero width. A boxless outlet is judged by the element that lays out its contents.
  • Whenever a surface opens, closes or arrives, or its edge or the window moves, the page is presented again while a comment box stands (reachChanged → invalidateDom, at most once a frame), so the box moves to whichever seat it can now use. Dragging the Threads edge over an inline diff comment on pr-walkthrough now moves the box clear of the panel with its words.

Left for Max: Tab under a panel beside the page

Tab still walks onto the rail's controls under Threads at 1440×900, and onto an Ask's option marks under the Queue panel at 1200px. I first made everything a panel covers by more than half its width inert. That kept Tab off it, but an independent review found two problems:

  • The visible part of a partly covered element went dead to clicks, text selection and find. On corpus at 1100px with Threads open, 145 such elements still showed beside the panel.
  • Focus still reached chrome margin markers, sample frames, children overflowing their parent, and content revealed by an attribute.

I withdrew it. TODO.md records the decision this needs:

  • A. Lay the page out in the width the panel leaves beside it. Nothing live stands under a panel, and the whole class of cases goes. It costs a reflow when a panel opens or closes, and it reverses "auxiliary surfaces never change the page's geometry" in skills/leaf/assets/AGENTS.md.
  • B. Leaf owns Tab beside a panel, skipping the stops hides says it covers. The overlay stays, but Leaf takes over sequential order from the browser, including stops inside shadow trees.

Tests

test_a_comment_box_opens_where_a_panel_beside_the_page_leaves_it_in_sight is new. It covers the rail under Threads, the box's return when the panel closes, and a slow edge drag. It fails on main, and it fails when the seat check or the re-seat is removed, or when the re-seat runs only on open and close.

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

@max-sixty
max-sixty merged commit eee77d3 into main Oct 6, 2026
4 checks passed
@max-sixty
max-sixty deleted the panel-dominates-comment-seat branch October 6, 2026 19:08
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