feat(pip): add debug logging for better PiP flow observability#17043
Open
hristoterezov wants to merge 1 commit intomasterfrom
Open
feat(pip): add debug logging for better PiP flow observability#17043hristoterezov wants to merge 1 commit intomasterfrom
hristoterezov wants to merge 1 commit intomasterfrom
Conversation
Add logger.debug calls throughout the PiP (Picture-in-Picture) feature to make it easier to trace the PiP lifecycle when investigating issues. Covers API event dispatching, action invocations with state snapshots, requestPictureInPicture success/failure paths, and Electron namespace mutations.
damencho
approved these changes
Feb 27, 2026
saghul
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
logger.debugcalls inmodules/API/API.jswhen dispatching_pip-requested,pip-entered, andpip-leftevents to the External APIreact/features/pip/actions.tsforshowPiP,hidePiP,exitPiP,handleWindowBlur, andhandleWindowFocus— each log includes the relevant PiP state snapshotlogger.debug(and a.then()success branch) torequestPictureInPicture()inreact/features/pip/functions.tsto capture both success and failure of the native API callreact/features/pip/subscriber.tswhen the Electron namespace is mutated to expose/removerequestPictureInPictureMotivation
Debugging PiP behaviour in production and staging environments required attaching a debugger or adding temporary print statements. These structured debug logs make the full PiP lifecycle visible through the existing logging infrastructure without changing any functional behaviour.
Test plan
showPiP)