[PR #5784] [MERGED] Frontend plugins Support [2/10]: Plugin service worker #6115

Closed
opened 2026-02-28 21:24:09 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/5784
Author: @lelemm
Created: 9/23/2025
Status: Merged
Merged: 10/7/2025
Merged by: @lelemm

Base: masterHead: feat/plugins/plugin-sw


📝 Commits (3)

📊 Changes

21 files changed (+429 additions, -10 deletions)

View changed files

📝 .gitignore (+2 -0)
📝 bin/package-browser (+1 -0)
📝 bin/package-electron (+1 -0)
📝 eslint.config.mjs (+2 -0)
📝 package.json (+4 -2)
📝 packages/desktop-client/.gitignore (+3 -0)
📝 packages/desktop-client/bin/build-browser (+1 -0)
📝 packages/desktop-client/bin/watch-browser (+1 -0)
packages/desktop-client/tsconfig.service-worker.json (+18 -0)
📝 packages/desktop-client/vite.config.mts (+33 -1)
packages/plugins-service/bin/build-service-worker (+28 -0)
packages/plugins-service/package.json (+22 -0)
packages/plugins-service/src/plugin-service-worker.ts (+159 -0)
packages/plugins-service/tsconfig.json (+17 -0)
packages/plugins-service/vite.config.ts (+40 -0)
📝 packages/sync-server/docker/alpine.Dockerfile (+1 -0)
📝 packages/sync-server/docker/ubuntu.Dockerfile (+1 -0)
📝 sync-server.Dockerfile (+1 -0)
📝 tsconfig.json (+2 -1)
upcoming-release-notes/5784.md (+7 -0)

...and 1 more files

📄 Description

  • PR 1: Basic CORS Proxy Structure
  • PR 2: Plugin Service Worker & PWA Infrastructure (This PR)
  • PR 3: System-Wide Feature Flag System + Frontend plugins feature flag
  • PR 4: Plugins Core Package
  • PR 5: Update loot-core to reference plugins-core
  • PR 6: Update desktop-client to reference plugins-core
  • PR 7: Plugin runtime on desktop-client (module federation)
  • PR 8: Plugins frontend pages
  • PR 9: Plugin example
  • PR 10: Integration fixes and documentation

To enable plugins to run on frontend-only (without sync server - uploading the plugin zip directly), we need a service worker to work as a web server. It captures the calls to /plugins-data/ and serve the files from runtime cache.

This just enables the service worker. It doesn't do the communication with the clients (browser), and doesn't have the cache to use.

Since we already have PWA in Actual, I had to merge the VitePWA service worker with the plugin service worker.
Also, since the service worker is mandatory for the frontend plugin to work, the service worker runs even in dev mode (previously wasn't)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/5784 **Author:** [@lelemm](https://github.com/lelemm) **Created:** 9/23/2025 **Status:** ✅ Merged **Merged:** 10/7/2025 **Merged by:** [@lelemm](https://github.com/lelemm) **Base:** `master` ← **Head:** `feat/plugins/plugin-sw` --- ### 📝 Commits (3) - [`b949f16`](https://github.com/actualbudget/actual/commit/b949f164c8011694f2012ed6bfa4df6173f11dbe) Plugin service worker - [`ad01985`](https://github.com/actualbudget/actual/commit/ad01985138045c695de0bd0e3da0b5cff354a808) update lock file - [`f905af2`](https://github.com/actualbudget/actual/commit/f905af2baeb40dd6f388ae75ff446c8d9e9c8d38) trigger actions ### 📊 Changes **21 files changed** (+429 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -0) 📝 `bin/package-browser` (+1 -0) 📝 `bin/package-electron` (+1 -0) 📝 `eslint.config.mjs` (+2 -0) 📝 `package.json` (+4 -2) 📝 `packages/desktop-client/.gitignore` (+3 -0) 📝 `packages/desktop-client/bin/build-browser` (+1 -0) 📝 `packages/desktop-client/bin/watch-browser` (+1 -0) ➕ `packages/desktop-client/tsconfig.service-worker.json` (+18 -0) 📝 `packages/desktop-client/vite.config.mts` (+33 -1) ➕ `packages/plugins-service/bin/build-service-worker` (+28 -0) ➕ `packages/plugins-service/package.json` (+22 -0) ➕ `packages/plugins-service/src/plugin-service-worker.ts` (+159 -0) ➕ `packages/plugins-service/tsconfig.json` (+17 -0) ➕ `packages/plugins-service/vite.config.ts` (+40 -0) 📝 `packages/sync-server/docker/alpine.Dockerfile` (+1 -0) 📝 `packages/sync-server/docker/ubuntu.Dockerfile` (+1 -0) 📝 `sync-server.Dockerfile` (+1 -0) 📝 `tsconfig.json` (+2 -1) ➕ `upcoming-release-notes/5784.md` (+7 -0) _...and 1 more files_ </details> ### 📄 Description - [x] ~PR 1: Basic CORS Proxy Structure~ - [x] PR 2: Plugin Service Worker & PWA Infrastructure (**This PR**) - [ ] PR 3: System-Wide Feature Flag System + Frontend plugins feature flag - [ ] PR 4: Plugins Core Package - [ ] PR 5: Update `loot-core` to reference `plugins-core` - [ ] PR 6: Update `desktop-client` to reference `plugins-core` - [ ] PR 7: Plugin runtime on desktop-client (module federation) - [ ] PR 8: Plugins frontend pages - [ ] PR 9: Plugin example - [ ] PR 10: Integration fixes and documentation To enable plugins to run on frontend-only (without sync server - uploading the plugin zip directly), we need a service worker to work as a web server. It captures the calls to /plugins-data/ and serve the files from runtime cache. This just enables the service worker. It doesn't do the communication with the clients (browser), and doesn't have the cache to use. Since we already have PWA in Actual, I had to merge the VitePWA service worker with the plugin service worker. Also, since the service worker is mandatory for the frontend plugin to work, the service worker runs even in dev mode (previously wasn't) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 21:24:09 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#6115