Menu â–¾ â–´

#254 Exclude compact Messenger popovers from media-viewer chrome handling

closed
nobody
2026-09-06
2026-08-28
Anonymous
No

Originally created by: kristofferR

Problem

Carrier treats any visible labelled role=dialog as a media viewer. Messenger also uses labelled dialogs for compact emoji, sticker, GIF, reaction, people, and other popovers inside its main surface.

When one of those compact dialogs matches, Carrier can restore Facebook's hidden global banner, change the header-height variable, and run media-control offset logic against the wrong surface. This is the same class of failure as a displaced emoji picker or a chat layout that shifts when a popover opens.

Goal

Classify actual full media viewers structurally and leave compact Messenger popovers untouched.

Scope

  • Replace the broad dialog predicate shared by messenger.css and viewer-controls.ts with a media-viewer classifier.
  • Use locale-independent structural signals such as a media element, viewer action group/download control, viewport-scale geometry, overlay ancestry, and relationship to Messenger's main dialog.
  • Explicitly exclude compact nested dialogs and Carrier-owned surfaces.
  • Keep media viewer close, download, share, and top-inset controls visible across window sizes.
  • Remove stale markers and offsets when Messenger replaces or closes a viewer.
  • Add fixture-level tests for the classifier so future selector changes fail visibly.

Manual matrix

  • Emoji picker, sticker picker, GIF picker, reaction picker, people dialog, and thread information.
  • Single image, gallery image, video viewer, and viewer opened from a group chat.
  • Light/dark themes, narrow/default/wide windows, and non-100% zoom.
  • macOS, Windows, and Linux rendering spot checks.

Related to [#117] and [#248].

Related

Tickets: #117
Tickets: #248
Tickets: #264
Tickets: #273
Tickets: #28

Discussion

  • Anonymous

    Anonymous - 2026-09-06

    Originally posted by: kristofferR

    [!NOTE]
    🤖 GPT-6 responding on behalf of Kristoffer

    Implemented and merged in PR [#273].

    Carrier now identifies full media viewers using their geometry, media, and controls instead of treating every labelled dialog as a viewer. CSS and control positioning share the same marker. Compact and nested pickers, the main Messenger surface, and Carrier overlays are excluded; stale markers and offsets clear when viewers hide, change, or disappear. Tall screenshots and wide panoramas remain supported.

    Validation passed: 465 Bun tests, 246 Rust tests, formatting, Clippy, typechecking, rebuilt inject bundles, and Linux/macOS/Windows CI. Browser fixtures cover three window widths, light/dark themes, both zoom paths from 30–200%, extreme image aspect ratios, and viewer lifecycle changes. The CI browser-launch hang was fixed by preferring the runner's configured stable Chrome and bounding subprocess execution.

    Live Messenger and cross-platform WebView checks remain tracked in [#28]. Closing the implementation issue; this is merged to main, not yet included in a new release.

     

    Related

    Tickets: #273
    Tickets: #28

  • Anonymous

    Anonymous - 2026-09-06

    Ticket changed by: kristofferR

    • status: open --> closed
     

Log in to post a comment.