Skip to content

Add scope to service worker configuration#925

Merged
chrisvire merged 1 commit into
mainfrom
fix/service-worker
Jan 13, 2026
Merged

Add scope to service worker configuration#925
chrisvire merged 1 commit into
mainfrom
fix/service-worker

Conversation

@FyreByrd
Copy link
Copy Markdown
Collaborator

@FyreByrd FyreByrd commented Jan 12, 2026

Summary by CodeRabbit

  • Chores
    • Service worker configuration has been added, enabling offline support and improved app resilience.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 12, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

A new service worker configuration is added to svelte.config.js under the kit section, with an options object specifying a scope set to BUILD_BASE_PATH. The existing router type configuration remains unchanged. This is a configuration-only modification with no behavioral changes to routing or adapters.

Changes

Cohort / File(s) Summary
Service Worker Configuration
svelte.config.js
Added serviceWorker object under kit with options.scope set to BUILD_BASE_PATH. Existing router.type: 'hash' configuration preserved.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰✨ A service worker hops into place,
With scope set just right, at the perfect base,
Configuration whispers, so gentle and light,
The bunny config commits with delight! 🌟

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e563385 and 09d27d5.

📒 Files selected for processing (1)
  • svelte.config.js

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chrisvire
Copy link
Copy Markdown
Member

chrisvire commented Jan 12, 2026

I have:

  1. downloaded the three projects
  2. open in SAB 13.3.2
  3. updated the Repository to use URL=https://github.com/sillsdev/appbuilder-pwa, Branch=fix/service-worker
  4. run 'Build PWA'
  5. archive, upload, and extract to bible.thehubbards.org

Here are the URLs

https://bible.thehubbards.org/data/kyu/sab/kyu/
https://bible.thehubbards.org/data/kyu/sab/kyuRoman/
https://bible.thehubbards.org/data/kyu/sab/kyuBurmese/
https://bible.thehubbards.org/data/kyu/sab/kyu.html (simple index file).

You can test with these PWAs.

@chrisvire
Copy link
Copy Markdown
Member

FYI, verified that the version at main still fails when publishing to my server:

https://bible.thehubbards.org/main/kyu/sab/kyu.html

Copy link
Copy Markdown
Member

@chrisvire chrisvire left a comment

Choose a reason for hiding this comment

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

This seems to fix this problem

@chrisvire chrisvire marked this pull request as ready for review January 13, 2026 15:06
@chrisvire chrisvire merged commit 6c91cca into main Jan 13, 2026
3 of 4 checks passed
@FyreByrd FyreByrd deleted the fix/service-worker branch January 13, 2026 18:55
@chrisvire chrisvire linked an issue Jan 13, 2026 that may be closed by this pull request
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.

Caching is not working on subsequent loads (sometimes)

2 participants