Skip to content

Fix service worker performance and offline mode#137

Merged
jjonescz merged 9 commits intomainfrom
service-worker-perf
Mar 10, 2026
Merged

Fix service worker performance and offline mode#137
jjonescz merged 9 commits intomainfrom
service-worker-perf

Conversation

@jjonescz
Copy link
Copy Markdown
Owner

No description provided.

@jjonescz jjonescz requested a review from Copilot March 10, 2026 19:57
@jjonescz jjonescz added bug Something isn't working enhancement New feature or request labels Mar 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to improve Blazor WebAssembly service worker performance and strengthen offline behavior, with an additional build-time validation that index.html is included in the published service worker asset manifest.

Changes:

  • Optimize service worker asset URL lookups and adjust fetch strategy to prefer network-first.
  • Parallelize “response cleaning” during service worker install.
  • Add a publish-output validation script and wire it into eng/build.sh; tweak index.html generation to ensure it’s included in service-worker-assets.js.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/WebAssembly/wwwroot/service-worker.published.js Switches to a Set for manifest URL checks, parallelizes install-time cache response cleaning, and changes fetch strategy.
eng/check-publish-output.cs New script to validate index.html appears in service-worker-assets.js under the publish output.
eng/build.sh Runs the new publish-output validation after publishing.
eng/IndexHtmlGeneration.targets Changes index.html content inclusion to use a relative path so it can be picked up by static web assets/service worker manifest generation.
.config/dotnet-tools.json Bumps dotnet-serve tool version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jjonescz jjonescz marked this pull request as ready for review March 10, 2026 20:15
@jjonescz jjonescz merged commit 7416b71 into main Mar 10, 2026
3 checks passed
@jjonescz jjonescz deleted the service-worker-perf branch March 10, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants