Skip to content

fix: change bg effects implementation [WPB-24370]#21220

Merged
EnricoSchw merged 37 commits into
devfrom
fix/change-bg-effects-implementation
May 19, 2026
Merged

fix: change bg effects implementation [WPB-24370]#21220
EnricoSchw merged 37 commits into
devfrom
fix/change-bg-effects-implementation

Conversation

@EnricoSchw
Copy link
Copy Markdown
Contributor

@EnricoSchw EnricoSchw commented May 4, 2026

StoryWPB-24370 [Web] In Firefox BackgroundEffects worker pipeline fails due to OffscreenCanvas and captureStream incompatibility

Summery

With the current implementation, we've reached our limits. The implementation was so complex that we could only consider large parts of it as a black box. Unfortunately, it wasn't stable enough for that, so we decided to simplify it significantly.

  • This enabled us to create a version that works across all browsers.
  • We have greatly simplified the complexity of the source code in this version.
  • The new version uses among other things WritableStream, resulting in a significant performance improvement. This prevents the executing task from blocking:

Before:

Bildschirmfoto 2026-05-04 um 14 48 30

After:

Bildschirmfoto 2026-05-04 um 16 42 32

@EnricoSchw EnricoSchw changed the title fix/change bg effects implementation [WPB-24370] fix: change bg effects implementation [WPB-24370] May 4, 2026
@EnricoSchw
Copy link
Copy Markdown
Contributor Author

@zskhan @screendriver

Please pay special attention to the new dependency. It has some advantages but comes with a few significant behavioral changes.

https://www.npmjs.com/package/worker-timers

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

🔗 Download Full Report Artifact

🧪 Playwright Test Summary

  • Passed: 15
  • Failed: 0
  • Skipped: 0
  • 🔁 Flaky: 0
  • 📊 Total: 15
  • Total Runtime: 120.9s (~ 2 min 1 sec)

…mprove nullable type handling in `BackgroundEffectsHandler`
@EnricoSchw EnricoSchw enabled auto-merge May 5, 2026 06:54
Copy link
Copy Markdown
Member

@screendriver screendriver left a comment

Choose a reason for hiding this comment

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

This refactor changes core pipeline behavior significantly. I'd feel safer if we add targeted tests for restart serialization + background-switch ordering (stale bitmap prevention), since those are the highest-risk race paths.

Comment thread apps/webapp/src/script/repositories/media/backgroundEffects/pipe/segmenter.ts Outdated
Comment thread apps/webapp/src/script/repositories/media/backgroundEffects/pipe/segmenter.ts Outdated
Comment thread apps/webapp/src/script/repositories/media/backgroundEffects/pipe/segmenter.ts Outdated
Comment thread apps/webapp/src/script/repositories/media/backgroundEffects/pipe/renderer.ts Outdated
Comment thread apps/webapp/src/script/repositories/media/backgroundEffects/pipe/segmenter.ts Outdated
EnricoSchw added 16 commits May 13, 2026 15:23
@EnricoSchw
Copy link
Copy Markdown
Contributor Author

@screendriver Could you please review and approve this for us?

@EnricoSchw EnricoSchw requested a review from screendriver May 18, 2026 16:23
@sonarqubecloud
Copy link
Copy Markdown

@EnricoSchw EnricoSchw added this pull request to the merge queue May 19, 2026
Merged via the queue into dev with commit 50ddfd2 May 19, 2026
33 checks passed
@EnricoSchw EnricoSchw deleted the fix/change-bg-effects-implementation branch May 19, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants