Registry Mirror
Skip to content

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

Bug

In the Inbox, with a markdown attachment open beside a thread (the owner's DESIGN.md), scrolling put the document over the floating Select / Pinpoint / Markup toolstrip: table rows, and in fact the whole document card, painted on top of it.

Root cause

ui's Viewer wraps every document in a relative z-50 layer (Viewer.tsx, the outer wrapper). In the Inbox's attachment pane, neither .ib-docscroll (absolute, no z-index) nor .ib-docarea (relative, no z-index) creates a stacking context. On a phone .ib-docarea is isolated, but the strip sits inside it too. So the Viewer's z-50 layer competed directly with the pane's own chrome in .ib-view's stacking context, and won against:

  • the toolstrip, .ib-toolstrip (z 3)
  • the error line, .ib-view-error (z 5)
  • the stepping bar's file list, .ib-steplist, inside .ib-vfoot (z 6). It opens upward over the document and was drawn under it as well.

This happened at every width (beside the thread, full screen, 1000 px, phone) and in both the Grid and Clean looks.

Plan review and annotate are not affected. There the strip rides StickyHeaderLane, which sits at z-60 above the Viewer's z-50, inside the plan area's own stacking context. The new spec checks this too.

Fix (Inbox CSS only, no change to @plannotator/ui)

  • .ib-docscroll, .ib-codeview { isolation: isolate; }: every z-index inside the open file stays inside the file. The pane's chrome now paints above the document.
  • .ib-docscroll:has([data-popout]) { z-index: 7; }: the table popout is portaled into the Viewer's own article, so it lives inside the scroller. While it is open, the scroller rises above the chrome, so the popout still covers the toolstrip and the bar the way a dialog should.

Proof

New spec tests/e2e/toolstrip-stacking.spec.ts, added to the Inbox e2e config, runs in Chromium on the compiled binary:

  • Inbox: an attached DESIGN.md with a table, a code block, a GitHub alert, a Mermaid diagram and a question card.
    • Layouts: beside the thread at 1440 and 1280, full screen at 1440, narrow at 1000, and a Pixel 7. Each in Grid and Clean.
    • Each block is scrolled under the strip, and document.elementFromPoint at 10 points across the strip must land on the strip. The table must actually cross the strip, so the check is never vacuous.
    • The stepping list must stay above the document.
    • The table popout must still cover the strip.
  • Annotate: the same document at 1440, 1024 and 820. The same checks run against the sticky lane, and the table popout must still cover it.

Results:

  • Before the fix, every Inbox layout failed: the document covered the strip and the step list. Annotate already passed.
  • After the fix, everything passes.
  • inbox-attachments, inbox-attachments-kinds, inbox-attachment-stepping (32 tests) and inbox-mobile (34 tests) pass on the freshly compiled binary. bun run typecheck passes. bun test packages/inbox tests/never-touch-the-real-inbox.test.ts passes.

ui's Viewer wraps every document in a relative z-50 layer. In the Inbox's
attachment pane neither .ib-docscroll nor .ib-docarea made a stacking
context, so that layer escaped into .ib-view and painted the document (the
card, table rows, code, callouts, diagrams) over the floating toolstrip
(z 3), the error line (z 5) and the stepping bar's file list (z 6), at every
width and on a phone. Isolate the file layers (.ib-docscroll, .ib-codeview)
and raise the scroller above the chrome only while a dialog the Viewer
portals into its own article (the table popout) is open.

Plan review / annotate were not affected: StickyHeaderLane sits at z-60
above the Viewer's layer. The new toolstrip-stacking.spec.ts proves both
surfaces with elementFromPoint in Chromium.
# Conflicts:
#	tests/e2e/playwright.config.ts
@backnotprop
backnotprop merged commit c2b2c52 into main Oct 12, 2026
29 checks passed
@backnotprop
backnotprop deleted the fix/toolstrip-above-content branch October 12, 2026 19:51
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.

1 participant