getsentry / getsentry/sentry-javascript

Capture Document Picture-in-Picture windows in Replay

オープン
#23,825 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
Browser Replays
主要言語
TypeScript
スター
8.7k
フォーク
1.8k
平均マージ
1日 17時間
マージ済み PR(30日)
523

説明

We have a use case where a modal is shown in Document Picture-in-Picture mode. That opens a separate window where the modal UI is rendered. With Sentry we can capture network requests, logs, errors, and related telemetry from that PiP window, but Session Replay does not capture the PiP window itself, so the modal UI is missing from the replay.

### Current behavior
- Replay/rrweb attaches to the opener document.
- A Document PiP window is a separate same-origin `Window`/`document` created via `documentPictureInPicture.requestWindow()` ([MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document_Picture-in-Picture_API)).
- The SDK does not hook `documentPictureInPicture` / `requestWindow`, and only one `replayIntegration()` instance is supported per page.
- Manual `start()` / `stop()` / `flush()` and canvas `snapshot()` / `addWindow` do not record PiP DOM into Session Replay playback.
- Related multi-document work is iframe-scoped only (e.g. `_experiments.recordCrossOriginIframes`, #7279, #14008, #14809, #16173, discussion #11858).

### Gap
- Product UI hosted in Document PiP is missing from replays, even when other Sentry signals from that window are present.
- Native `` PiP is browser chrome (not app DOM) and is a different surface; media is also typically blocked by default privacy settings.

### Impact
- Debugging and support workflows break when the relevant UI only exists in the PiP window.
- Customers cannot recover that visual context with current Replay APIs or config.

Requested by **david.quintas**.

--

[View Junior Session](https://junior-prod.sentry.dev/conversations/slack%3AC0B7D5XDYCD%3A1788257480.804779) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0B7D5XDYCD%3A1788257480.804779/?project=4510944073809921)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start at replayIntegration and the rrweb document attachment described in the issue, then trace how documentPictureInPicture.requestWindow() creates the separate same-origin document. Compare this with the existing iframe-scoped multi-document work and the single-instance constraint. Done means the PiP modal DOM appears in Session Replay playback without relying on manual start, stop, flush, snapshot, or addWindow calls.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
frontend, observability
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
説明が足りない
初心者へのやさしさ
32/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。