Skip to content

🐛 Fix for worker in dev mode#5878

Merged
lelemm merged 3 commits intomasterfrom
bugfix/plugin-service-dev-fix
Oct 7, 2025
Merged

🐛 Fix for worker in dev mode#5878
lelemm merged 3 commits intomasterfrom
bugfix/plugin-service-dev-fix

Conversation

@lelemm
Copy link
Copy Markdown
Member

@lelemm lelemm commented Oct 7, 2025

Fix for plugin service worker not being found

@actual-github-bot actual-github-bot Bot changed the title 🐛 Fix for worker in dev mode [WIP] 🐛 Fix for worker in dev mode Oct 7, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Oct 7, 2025

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 21ee068
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget/deploys/68e54f43ec17cf0008e644ae
😎 Deploy Preview https://deploy-preview-5878.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@lelemm lelemm changed the title [WIP] 🐛 Fix for worker in dev mode 🐛 Fix for worker in dev mode Oct 7, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 7, 2025

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
23 11.07 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 7.8 MB 0%
static/js/de.js 145.36 kB 0%
static/js/en-GB.js 6.84 kB 0%
static/js/en.js 131.65 kB 0%
static/js/es.js 76.48 kB 0%
static/js/fr.js 152.9 kB 0%
static/js/it.js 145.17 kB 0%
static/js/nl.js 100.13 kB 0%
static/js/pl.js 86.26 kB 0%
static/js/pt-BR.js 144.8 kB 0%
static/js/sv.js 69.03 kB 0%
static/js/th.js 188.29 kB 0%
static/js/uk.js 189.22 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 12.94 kB 0%
static/js/workbox-window.prod.es5.js 5.64 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 120.48 kB 0%
static/js/ReportRouter.js 970.13 kB 0%
static/js/narrow.js 581.41 kB 0%
static/js/TransactionList.js 14.14 kB 0%
static/js/wide.js 168.58 kB 0%
static/js/usePayeeRuleCounts.js 9.04 kB 0%
static/js/useTransactionBatchActions.js 13.09 kB 0%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 7, 2025

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 4.3 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.BGQmBY5g.js 4.3 MB 0%

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 7, 2025

Walkthrough

  • Updates build-service-worker script behavior:
    • Changes removal step from deleting contents of service-worker to deleting the entire directory.
    • Modifies development symlink creation to use a target path with a trailing slash ("../dist/").
    • In production, adds a mkdir -p to ensure the service-worker directory exists before copying files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly summarizes the main change—addressing the service worker fix in development mode—concise and accurate from the developer’s perspective, though it includes an emoji that doesn’t obscure its meaning.
Description Check ✅ Passed The description directly references the issue being addressed by the pull request (the plugin service worker not being found) and accurately reflects the changes made to resolve that problem.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/plugin-service-dev-fix

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52aeec2 and 26a6870.

📒 Files selected for processing (1)
  • packages/plugins-service/bin/build-service-worker (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Functional
  • GitHub Check: Visual regression
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (ubuntu-22.04)
  • GitHub Check: build (macos-latest)
  • GitHub Check: Functional Desktop App
🔇 Additional comments (3)
packages/plugins-service/bin/build-service-worker (3)

12-12: LGTM! Improved cleanup.

Removing the entire directory instead of just its contents ensures a cleaner state between builds and works correctly with both development (symlink) and production (mkdir + copy) flows.


19-19: Trailing slash appears to fix the dev mode issue.

The addition of the trailing slash to the symlink target explicitly indicates it's a directory and may affect how the symlink is resolved by the application or build tools. This change aligns with the PR's objective to fix the service worker not being found in development mode.

Could you confirm what specific issue this trailing slash resolves? Understanding the root cause would help prevent similar issues in the future.


26-26: LGTM! Necessary for production builds.

This ensures the service-worker directory exists before copying files into it. Since line 12 now removes the entire directory, this mkdir is essential for the production build to succeed.


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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 7, 2025

🤖 Auto-generated Release Notes

Hey @lelemm! I've automatically created a release notes file based on CodeRabbit's analysis:

Category: Bugfix
Summary: Fix service worker issues in development mode by improving directory handling and symlink creation.
File: upcoming-release-notes/5878.md

If you're happy with this release note, you can add it to your pull request. If not, you'll need to add your own before a maintainer can review your change.

@lelemm lelemm merged commit 295839e into master Oct 7, 2025
24 checks passed
@lelemm lelemm deleted the bugfix/plugin-service-dev-fix branch October 7, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants