Fix page build regression from service worker WASM asset injection - #103
Merged
Conversation
Agent-Logs-Url: https://github.com/scaryrawr/sl/sessions/bc1a3f14-013c-480a-9a0c-5af5d31dc970 Co-authored-by: scaryrawr <661373+scaryrawr@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix and validate website after last commit
Fix page build regression from service worker WASM asset injection
Apr 1, 2026
scaryrawr
marked this pull request as ready for review
April 1, 2026 02:59
There was a problem hiding this comment.
Pull request overview
Fixes a regression in the apps/page build pipeline where apps/page/build.ts injects a WASM asset into the service worker asset cache list, and the generated service worker became syntactically invalid.
Changes:
- Add a trailing comma to the
manifest.jsonentry inASSETS_TO_CACHEso build-time WASM injection preserves valid array syntax. - Add a Bun test that simulates the build-time placeholder replacement and asserts the resulting asset list remains correctly comma-separated.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/page/src/service-worker.ts | Ensures ASSETS_TO_CACHE stays syntactically valid after build-time WASM asset injection. |
| apps/page/src/service-worker-build.test.ts | Adds regression coverage for the placeholder replacement behavior used by apps/page/build.ts. |
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.
The last web change broke the website by producing an invalid generated service worker during the page build. The breakage came from the asset cache list no longer remaining syntactically valid after the build step injected the hashed WASM filename.
Service worker asset list
WASM_PLACEHOLDERinapps/page/src/service-worker.tsASSETS_TO_CACHEarray afterapps/page/build.tsinjects the generated.wasmassetRegression coverage
apps/page/src/service-worker-build.test.tsWhat this affects
Original prompt