Closed Bug 1899747 Opened 1 year ago Closed 1 year ago

Add option to extend feature callout page_event_listener to all windows

Categories

(Firefox :: Messaging System, defect, P1)

Desktop
All
defect
Points:
3

Tracking

()

VERIFIED FIXED
134 Branch
Iteration:
134.1 - Oct 28 - Nov 8
Tracking Status
firefox126 --- wontfix
firefox127 --- wontfix
firefox128 --- wontfix
firefox134 --- verified
firefox135 --- verified

People

(Reporter: cmuresan, Assigned: hanna_a)

References

Details

Attachments

(2 files)

Attached video vmplayer_2lCPU6yjs2.mp4

[Affected versions]:

  • Firefox Nightly 128.0a1 - Build ID: 20240529214854
  • Firefox Beta 127.0b8 - Build ID: 20240529091551
  • Firefox Release 126.0.1 - Build ID: 20240526221752

[Affected Platforms]:

  • Windows 10
  • macOS 14
  • Ubuntu 22.04

[Prerequisites]:

  • Have a Firefox build installed and use a new profile.
  • Be enrolled in any branch (except control) of the Pin Email and Calendar experiment (early day / existing) through forced enrollment.
  • Have the browser.newtabpage.activity-stream.asrouter.devtoolsEnabled pref set to true.
  • Unenroll from any experiment or rollout that the profile might be in using the about:studies page.

[Steps to reproduce]:

  1. Open the browser with the profile from prerequisites and open a New Window.
  2. Switch to the previous windows and navigate to the about:asrouter page.
  3. Search for the PIN_EMAIL_AND_CALENDAR_TABS message ID.
  4. Click the Show button.
  5. Switch to the other window and right click the active tab.
  6. Choose the Pin Tab option and observe the message from the other window.

[Expected result]:

  • The message is dismissed.

[Actual result]:

  • The message remains displayed.

[Notes]:

  • The issue is not reproducible when pinning a tab from the same window the message is anchored in, regardless of the tab state (active/inactive).
  • Attached a screen recording of the issue.

Unavoidable, I think.

Flags: needinfo?(halemu)

Hanna: If you can find a solution in the next version, let's try to fix this. If not, we wouldn't delay it by another version since it's such an edge case.

You could possibly extend PageEventManager with the ability to create an EveryWindow callback.

I'll take a look!

Flags: needinfo?(halemu)
Assignee: nobody → halemu
Priority: -- → P1
Iteration: --- → 128.2 - May 27 - Jun 7
Points: --- → 3
Iteration: 128.2 - May 27 - Jun 7 → 129.1 - Jun 10 - Jun 21
Attachment #9406668 - Attachment description: WIP: Bug 1899747 - Add option to extend feature callout page_event_listener to all windows → Bug 1899747 - Add option to extend feature callout page_event_listener to all windows
Attachment #9406668 - Attachment description: Bug 1899747 - Add option to extend feature callout page_event_listener to all windows → WIP: Bug 1899747 - Add option to extend feature callout page_event_listener to all windows
Attachment #9406668 - Attachment description: WIP: Bug 1899747 - Add option to extend feature callout page_event_listener to all windows → Bug 1899747 - Add option to extend feature callout page_event_listener to all windows
Attachment #9406668 - Attachment description: Bug 1899747 - Add option to extend feature callout page_event_listener to all windows → WIP: Bug 1899747 - Add option to extend feature callout page_event_listener to all windows
Attachment #9406668 - Attachment description: WIP: Bug 1899747 - Add option to extend feature callout page_event_listener to all windows → Bug 1899747 - Add option to extend feature callout page_event_listener to all windows
Iteration: 129.1 - Jun 10 - Jun 21 → 129.2 - Jun 24 - Jul 5
Pushed by halemu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3cd5c74698b5 Add option to extend feature callout page_event_listener to all windows r=omc-reviewers,mviar,aminomancer
Iteration: 129.2 - Jun 24 - Jul 5 → 130.1 - Jul 8 - Jul 19

I haven't been able to reproduce this locally, I've tried using the --verify flag as well. Any suggestions or similar backouts/bugs in the past?

Flags: needinfo?(halemu) → needinfo?(chorotan)

Backfills confirmed that this was the culprit.

Flags: needinfo?(chorotan) → needinfo?(aryx.bugmail)

It's a leakcheck failure - this can only run with debug builds. Has a debug build been used locally?

Flags: needinfo?(aryx.bugmail)

@Sebastian Thanks, I was able to reproduce it using a debug build locally, but it's not clear to me what's causing the window leak. Any suggestions?

Flags: needinfo?(aryx.bugmail)

The uninit is an arrow function as callback and uses the uuid - could you check the value if it's the expected one or got garbage collected?

Flags: needinfo?(aryx.bugmail)
Iteration: 130.1 - Jul 8 - Jul 19 → 130.2 - Jul 22 - Aug 2
Priority: P1 → P2
Iteration: 130.2 - Jul 22 - Aug 2 → 131.1 - Aug 5 - Aug 16

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:halemu, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(shughes)
Flags: needinfo?(halemu)
Flags: needinfo?(shughes)
Iteration: 131.1 - Aug 5 - Aug 16 → 131.2 - Aug 19 - Aug 30
Iteration: 131.2 - Aug 19 - Aug 30 → 132.1 - Sep 2 - Sep 13
Flags: needinfo?(halemu)
Iteration: 132.1 - Sep 2 - Sep 13 → 132.2 - Sep 16 - Sep 27
Iteration: 132.2 - Sep 16 - Sep 27 → 133.1 - Sep 30 - Oct 11
Iteration: 133.1 - Sep 30 - Oct 11 → 133.2 - Oct 14 - Oct 25
Iteration: 133.2 - Oct 14 - Oct 25 → 134.1 - Oct 28 - Nov 8

This bug was initially filed to fix a defect in an experiment, repurposing it to add "every_window" option to "page_event_listeners" in Feature callout.

Priority: P2 → P1
Summary: [Experiment] The pin message is not dismissed if a tab from a different window is pinned → Add option to extend feature callout page_event_listener to all windows
Pushed by halemu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2c9b14cb1f3e Add option to extend feature callout page_event_listener to all windows r=omc-reviewers,mviar,aminomancer
Regressions: 1928219
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch

We still reproduce the issue on Firefox Nightly 135.0a1 (Build ID: 20241229214936) and Beta 134.0b10 (Build ID: 20241213091550) on Windows 10 x64 and macOS 12.6.1 using the experiment mentioned in the prerequisites of the bug report.

  • The callout remains displayed after pinning the active tab from a different browser window.

However, since the Feature Callout message can be easily customized, maybe some changes to the message configuration are needed to prevent the issue from reproducing? Could you please confirm if this is the case or if the behavior should have been fixed with the message configuration as it currently is in the experiment recipe?

Flags: needinfo?(halemu)

Hi @carmen, thanks for looking into this. Yes, the issue is reproducible with the experiment recipe as-is because it was launched before this fix was landed in tree. To verify, the page_even_listeners attribute will need to be updated to:

"page_event_listeners": [ { "params": { "type": "TabPinned", "selectors": "#main-window", "options": { "every_window": true } }, "action": { "dismiss": true } } ],

Flags: needinfo?(halemu)

Thank you, Hanna, for the quick response. We cloned the experiment recipe on stage and updated the page_event_listeners attribute as mentioned in the previous comment. This way we are no longer able to reproduce the issue; the callout message is dismissed from the first window after pinning a tab in the second browser window.

Environment:

  • Firefox Nightly 135.0a1 (Build ID: 20241230205200) and RC 134.0 (Build ID: 20241230151726)
  • Windows 10 x64. Ubuntu 20.04 x64. macOS 12.6.1
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: