Skip to content

Dismiss the service worker toast on Firefox and WebKit - #35936

Merged
t3chguy merged 1 commit into
element-hq:developfrom
Mohsintl:fix-sw-toast
Nov 19, 2026
Merged

t3chguy merged 1 commit into
element-hq:developfrom
Mohsintl:fix-sw-toast

Conversation

@Mohsintl

@Mohsintl Mohsintl commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #35391
Fixes #29876
Fixes #27853
Fixes #28584

What was wrong

Firefox and WebKit block service workers in Playwright tests. Because of this, Element shows a "Failed to load service worker" toast that sits on top of the page.

Some test helpers, like viewRoomByName, close other toasts but don't handle this one. As a result, clicks fail because the toast intercepts pointer events.

How I found it

CI failure log for #35391 shows the same "intercepts pointer events" error

The fix

Added a page fixture with a Playwright addLocatorHandler that automatically clicks OK whenever this toast blocks an action.

This is only enabled for projects that block service workers, so Chrome tests remain unchanged.

Before and after

Issue Browser Before After
#35391 Firefox 0/5 5/5
#35391 WebKit 0/5 5/5
#29876 Firefox 0/5 5/5
#29876 WebKit 3/5 5/5
#27853 Firefox 1/5 5/5
#27853 WebKit 0/5 5/5
#28584 Firefox 0/5 5/5

How to test

cd apps/web && pnpm test:playwright playwright/e2e/read-receipts/read-receipts.spec.ts --project=Firefox --repeat-each=5 -g "Considers room read if there are receipts for main and other thread"

Tests only, T-Task please.

Checklist

  • I have read through review guidelines and CONTRIBUTING.md.
  • I have linked the PR to an issue that describes what needs changing.
  • I have written tests for new code (and old code if feasible).
  • I have ensured new or updated public/exported symbols have accurate TSDoc documentation.
  • I have confirmed linter and other CI checks pass.
  • I have have included screenshots if what the user sees will change
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)
  • I will no longer force push to this branch

AI assistance

  • I used AI tools to help create this PR.

Those projects block service workers, so Element shows a "Failed to load service worker" toast that can cover the element a test clicks next.
@Mohsintl
Mohsintl requested a review from a team as a code owner November 18, 2026 23:07
@github-actions github-actions Bot added the Z-Community-PR Issue is solved by a community member's PR label Nov 18, 2026
@dbkr

dbkr commented Nov 19, 2026

Copy link
Copy Markdown
Member

@t3chguy does this look plausible?

@t3chguy t3chguy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it does. Thanks

@t3chguy
t3chguy enabled auto-merge November 19, 2026 10:53
@t3chguy t3chguy added the T-Task Tasks for the team like planning label Nov 19, 2026
@t3chguy
t3chguy added this pull request to the merge queue Nov 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 19, 2026
@t3chguy
t3chguy added this pull request to the merge queue Nov 19, 2026
Merged via the queue into element-hq:develop with commit 53a2e6b Nov 19, 2026
60 of 63 checks passed

This branch was successfully deployed

3 active deployments
EndToEndTests — 03fc40f4 Deployed Nov 19, 2026 by github-actions[bot]
Netlify — 03fc40f4 Deployed Nov 19, 2026 by github-actions[bot]
SharedComponentStorybook — 03fc40f4 Deployed Nov 19, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

3 participants