[PR #7033] [MERGED] [AI] Remove usage of 'web' file types #32817

Closed
opened 2026-04-18 08:47:36 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7033
Author: @MatissJanis
Created: 2/19/2026
Status: Merged
Merged: 2/20/2026
Merged by: @MatissJanis

Base: masterHead: matiss/desktop-and-tooling-updates-2


📝 Commits (10+)

  • d4fe5e9 [AI] Desktop client, E2E, loot-core, sync-server and tooling updates
  • da1d8dc Refactor database handling in various modules to use async/await for improved readability and error handling. This includes updates to database opening and closing methods across multiple files, ensuring consistent asynchronous behavior. Additionally, minor adjustments were made to encryption functions to support async operations.
  • 3f773a3 Refactor sync migration tests to utilize async/await for improved readability. Updated transaction handling to streamline event expectations and cleanup process.
  • 79d34e7 Refactor various functions to utilize async/await for improved readability and error handling. Updated service stopping, encryption, and file upload/download methods to ensure consistent asynchronous behavior across the application.
  • f7b0c80 Refactor BudgetFileSelection component to use async/await for onSelect method, enhancing error handling and readability. Update merge tests to utilize async/await for improved clarity in transaction merging expectations.
  • c8125b2 Refactor filesystem module to use async/await for init function and related database operations, enhancing error handling and consistency across file interactions. Updated tests to reflect asynchronous behavior in database operations and file writing.
  • a29297b Fix typo in init function declaration to ensure it returns a Promise instead of Proise.
  • 90df214 Update VRT screenshots
  • 3efec43 Update tests to use async/await for init function in web filesystem, ensuring consistent asynchronous behavior in database operations.
  • 5cf54ad Merge branch 'master' into matiss/desktop-and-tooling-updates

📊 Changes

33 files changed (+957 additions, -1053 deletions)

View changed files

📝 packages/component-library/vitest.web.config.ts (+0 -1)
📝 packages/desktop-client/vite.config.mts (+0 -4)
📝 packages/loot-core/package.json (+4 -4)
packages/loot-core/src/platform/server/asyncStorage/index.api.ts (+2 -0)
📝 packages/loot-core/src/platform/server/fetch/index.electron.ts (+3 -4)
packages/loot-core/src/platform/server/fs/index.api.ts (+2 -0)
📝 packages/loot-core/src/platform/server/fs/index.electron.ts (+40 -31)
📝 packages/loot-core/src/platform/server/fs/index.test.ts (+0 -0)
📝 packages/loot-core/src/platform/server/fs/index.ts (+390 -53)
packages/loot-core/src/platform/server/fs/index.web.ts (+0 -396)
packages/loot-core/src/platform/server/fs/path-join.api.ts (+1 -0)
📝 packages/loot-core/src/platform/server/fs/path-join.ts (+97 -2)
packages/loot-core/src/platform/server/fs/path-join.web.ts (+0 -99)
📝 packages/loot-core/src/platform/server/fs/shared.ts (+1 -3)
packages/loot-core/src/platform/server/sqlite/index.api.ts (+2 -0)
📝 packages/loot-core/src/platform/server/sqlite/index.test.ts (+1 -8)
📝 packages/loot-core/src/platform/server/sqlite/index.ts (+201 -20)
packages/loot-core/src/platform/server/sqlite/index.web.ts (+0 -218)
📝 packages/loot-core/src/server/db/index.ts (+6 -6)
packages/loot-core/src/server/encryption/encryption-internals.api.ts (+2 -0)

...and 13 more files

📄 Description

Getting rid of the ".web.ts" file types. The defaults should be the "web" variants. And then ".api.ts" and "*.electron.ts" should be the platform-specific overrides (which I would eventually also like to kill, but that's another story).

It might seem like this is a lot of changes, but it is mostly just mv packages/loot-core/src/shared/platform.web.ts packages/loot-core/src/shared/platform.ts type of change with a few types patched.

Split off from: https://github.com/actualbudget/actual/pull/6809


Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 27 14.83 MB 0%
loot-core 1 5.82 MB → 5.82 MB (+85 B) +0.00%
api 1 4.36 MB → 4.43 MB (+73.36 kB) +1.64%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
27 14.83 MB 0%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/platform.ts 🆕 +398 B 0 B → 398 B
home/runner/work/actual/actual/packages/loot-core/src/shared/platform.web.ts 🔥 -398 B (-100%) 398 B → 0 B
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 9.52 MB 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/ca.js 182.95 kB 0%
static/js/da.js 106.46 kB 0%
static/js/de.js 180.27 kB 0%
static/js/en-GB.js 7.18 kB 0%
static/js/en.js 168.59 kB 0%
static/js/es.js 173.67 kB 0%
static/js/fr.js 179.8 kB 0%
static/js/it.js 171.27 kB 0%
static/js/nb-NO.js 157.07 kB 0%
static/js/nl.js 106.47 kB 0%
static/js/pl.js 88.48 kB 0%
static/js/pt-BR.js 154.41 kB 0%
static/js/th.js 182.04 kB 0%
static/js/uk.js 214.89 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 120.54 kB 0%
static/js/ReportRouter.js 1.16 MB 0%
static/js/narrow.js 637.68 kB 0%
static/js/TransactionList.js 106.22 kB 0%
static/js/wide.js 164.15 kB 0%
static/js/AppliedFilters.js 9.71 kB 0%
static/js/usePayeeRuleCounts.js 10.04 kB 0%
static/js/useTransactionBatchActions.js 13.23 kB 0%
static/js/FormulaEditor.js 1.04 MB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.82 MB → 5.82 MB (+85 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/platform/server/fs/index.ts 🆕 +8.71 kB 0 B → 8.71 kB
home/runner/work/actual/actual/packages/loot-core/src/platform/server/sqlite/index.ts 🆕 +4.05 kB 0 B → 4.05 kB
home/runner/work/actual/actual/packages/loot-core/src/platform/server/fs/path-join.ts 🆕 +2.73 kB 0 B → 2.73 kB
home/runner/work/actual/actual/packages/loot-core/src/server/encryption/encryption-internals.ts 🆕 +2.64 kB 0 B → 2.64 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/platform.ts 🆕 +335 B 0 B → 335 B
home/runner/work/actual/actual/packages/loot-core/src/platform/server/fs/index.web.ts 🔥 -8.62 kB (-100%) 8.62 kB → 0 B
home/runner/work/actual/actual/packages/loot-core/src/platform/server/sqlite/index.web.ts 🔥 -4.05 kB (-100%) 4.05 kB → 0 B
home/runner/work/actual/actual/packages/loot-core/src/platform/server/fs/path-join.web.ts 🔥 -2.73 kB (-100%) 2.73 kB → 0 B
home/runner/work/actual/actual/packages/loot-core/src/server/encryption/encryption-internals.web.ts 🔥 -2.64 kB (-100%) 2.64 kB → 0 B
home/runner/work/actual/actual/packages/loot-core/src/shared/platform.web.ts 🔥 -335 B (-100%) 335 B → 0 B
View detailed bundle breakdown

Added

Asset File Size % Changed
kcab.worker.Dbl7pyXw.js 0 B → 5.82 MB (+5.82 MB) -

Removed

Asset File Size % Changed
kcab.worker.C2MZfWzQ.js 5.82 MB → 0 B (-5.82 MB) -100%

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged
No assets were unchanged


api

Total

Files count Total bundle size % Changed
1 4.36 MB → 4.43 MB (+73.36 kB) +1.64%
Changeset
File Δ Size
node_modules/ua-parser-js/src/main/ua-parser.mjs 🆕 +73.46 kB 0 B → 73.46 kB
src/server/encryption/encryption-internals.electron.ts 🆕 +1.7 kB 0 B → 1.7 kB
src/shared/platform.ts 🆕 +311 B 0 B → 311 B
src/mocks/random.ts 📈 +219 B (+811.11%) 27 B → 246 B
src/platform/server/fs/index.electron.ts 📈 +18 B (+0.41%) 4.29 kB → 4.31 kB
src/platform/server/fs/index.api.ts +0 B (0%) 0 B → 0 B
src/server/budgetfiles/app.ts 📉 -32 B (-0.28%) 11.22 kB → 11.18 kB
src/server/sheet.ts 📉 -499 B (-9.54%) 5.11 kB → 4.62 kB
src/server/encryption/encryption-internals.ts 🔥 -1.69 kB (-100%) 1.69 kB → 0 B
src/shared/platform.electron.ts 🔥 -134 B (-100%) 134 B → 0 B
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
bundle.api.js 4.36 MB → 4.43 MB (+73.36 kB) +1.64%

Smaller
No assets were smaller

Unchanged
No assets were unchanged


🔄 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/7033 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 2/19/2026 **Status:** ✅ Merged **Merged:** 2/20/2026 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `matiss/desktop-and-tooling-updates-2` --- ### 📝 Commits (10+) - [`d4fe5e9`](https://github.com/actualbudget/actual/commit/d4fe5e94e259fa080a07cdd76bd263a1ba1d4f01) [AI] Desktop client, E2E, loot-core, sync-server and tooling updates - [`da1d8dc`](https://github.com/actualbudget/actual/commit/da1d8dcee6b51359183a6c3697dca8f6a13fde80) Refactor database handling in various modules to use async/await for improved readability and error handling. This includes updates to database opening and closing methods across multiple files, ensuring consistent asynchronous behavior. Additionally, minor adjustments were made to encryption functions to support async operations. - [`3f773a3`](https://github.com/actualbudget/actual/commit/3f773a33ba5ebee3f0be94c44d55c9cd58363a87) Refactor sync migration tests to utilize async/await for improved readability. Updated transaction handling to streamline event expectations and cleanup process. - [`79d34e7`](https://github.com/actualbudget/actual/commit/79d34e79232675cf36da128fbac07426c6adf035) Refactor various functions to utilize async/await for improved readability and error handling. Updated service stopping, encryption, and file upload/download methods to ensure consistent asynchronous behavior across the application. - [`f7b0c80`](https://github.com/actualbudget/actual/commit/f7b0c809231be747550b88cc378cc11766324743) Refactor BudgetFileSelection component to use async/await for onSelect method, enhancing error handling and readability. Update merge tests to utilize async/await for improved clarity in transaction merging expectations. - [`c8125b2`](https://github.com/actualbudget/actual/commit/c8125b23c18e9b6763509d12abc2bb4c0788a822) Refactor filesystem module to use async/await for init function and related database operations, enhancing error handling and consistency across file interactions. Updated tests to reflect asynchronous behavior in database operations and file writing. - [`a29297b`](https://github.com/actualbudget/actual/commit/a29297b98ff0a9727531bb2d294b3fc4c6366082) Fix typo in init function declaration to ensure it returns a Promise<void> instead of Proise<void>. - [`90df214`](https://github.com/actualbudget/actual/commit/90df21423e79799b4056b12601872e3b2c3305d0) Update VRT screenshots - [`3efec43`](https://github.com/actualbudget/actual/commit/3efec4307159c2d305a0a993b26557d0791baf19) Update tests to use async/await for init function in web filesystem, ensuring consistent asynchronous behavior in database operations. - [`5cf54ad`](https://github.com/actualbudget/actual/commit/5cf54ad5fc004958aa4f3b5566cbcf28b2bec457) Merge branch 'master' into matiss/desktop-and-tooling-updates ### 📊 Changes **33 files changed** (+957 additions, -1053 deletions) <details> <summary>View changed files</summary> 📝 `packages/component-library/vitest.web.config.ts` (+0 -1) 📝 `packages/desktop-client/vite.config.mts` (+0 -4) 📝 `packages/loot-core/package.json` (+4 -4) ➕ `packages/loot-core/src/platform/server/asyncStorage/index.api.ts` (+2 -0) 📝 `packages/loot-core/src/platform/server/fetch/index.electron.ts` (+3 -4) ➕ `packages/loot-core/src/platform/server/fs/index.api.ts` (+2 -0) 📝 `packages/loot-core/src/platform/server/fs/index.electron.ts` (+40 -31) 📝 `packages/loot-core/src/platform/server/fs/index.test.ts` (+0 -0) 📝 `packages/loot-core/src/platform/server/fs/index.ts` (+390 -53) ➖ `packages/loot-core/src/platform/server/fs/index.web.ts` (+0 -396) ➕ `packages/loot-core/src/platform/server/fs/path-join.api.ts` (+1 -0) 📝 `packages/loot-core/src/platform/server/fs/path-join.ts` (+97 -2) ➖ `packages/loot-core/src/platform/server/fs/path-join.web.ts` (+0 -99) 📝 `packages/loot-core/src/platform/server/fs/shared.ts` (+1 -3) ➕ `packages/loot-core/src/platform/server/sqlite/index.api.ts` (+2 -0) 📝 `packages/loot-core/src/platform/server/sqlite/index.test.ts` (+1 -8) 📝 `packages/loot-core/src/platform/server/sqlite/index.ts` (+201 -20) ➖ `packages/loot-core/src/platform/server/sqlite/index.web.ts` (+0 -218) 📝 `packages/loot-core/src/server/db/index.ts` (+6 -6) ➕ `packages/loot-core/src/server/encryption/encryption-internals.api.ts` (+2 -0) _...and 13 more files_ </details> ### 📄 Description Getting rid of the "*.web.ts" file types. The defaults should be the "web" variants. And then "*.api.ts" and "*.electron.ts" should be the platform-specific overrides (which I would eventually also like to kill, but that's another story). It might seem like this is a lot of changes, but it is mostly just `mv packages/loot-core/src/shared/platform.web.ts packages/loot-core/src/shared/platform.ts` type of change with a few types patched. Split off from: https://github.com/actualbudget/actual/pull/6809 <!--- actual-bot-sections ---> <hr /> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 27 | 14.83 MB | 0% loot-core | 1 | 5.82 MB → 5.82 MB (+85 B) | +0.00% api | 1 | 4.36 MB → 4.43 MB (+73.36 kB) | +1.64% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 27 | 14.83 MB | 0% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/shared/platform.ts` | 🆕 +398 B | 0 B → 398 B `home/runner/work/actual/actual/packages/loot-core/src/shared/platform.web.ts` | 🔥 -398 B (-100%) | 398 B → 0 B </details> <details> <summary>View detailed bundle breakdown</summary> <div> **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 | 9.52 MB | 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/ca.js | 182.95 kB | 0% static/js/da.js | 106.46 kB | 0% static/js/de.js | 180.27 kB | 0% static/js/en-GB.js | 7.18 kB | 0% static/js/en.js | 168.59 kB | 0% static/js/es.js | 173.67 kB | 0% static/js/fr.js | 179.8 kB | 0% static/js/it.js | 171.27 kB | 0% static/js/nb-NO.js | 157.07 kB | 0% static/js/nl.js | 106.47 kB | 0% static/js/pl.js | 88.48 kB | 0% static/js/pt-BR.js | 154.41 kB | 0% static/js/th.js | 182.04 kB | 0% static/js/uk.js | 214.89 kB | 0% static/js/resize-observer.js | 18.37 kB | 0% static/js/BackgroundImage.js | 120.54 kB | 0% static/js/ReportRouter.js | 1.16 MB | 0% static/js/narrow.js | 637.68 kB | 0% static/js/TransactionList.js | 106.22 kB | 0% static/js/wide.js | 164.15 kB | 0% static/js/AppliedFilters.js | 9.71 kB | 0% static/js/usePayeeRuleCounts.js | 10.04 kB | 0% static/js/useTransactionBatchActions.js | 13.23 kB | 0% static/js/FormulaEditor.js | 1.04 MB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.82 MB → 5.82 MB (+85 B) | +0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/platform/server/fs/index.ts` | 🆕 +8.71 kB | 0 B → 8.71 kB `home/runner/work/actual/actual/packages/loot-core/src/platform/server/sqlite/index.ts` | 🆕 +4.05 kB | 0 B → 4.05 kB `home/runner/work/actual/actual/packages/loot-core/src/platform/server/fs/path-join.ts` | 🆕 +2.73 kB | 0 B → 2.73 kB `home/runner/work/actual/actual/packages/loot-core/src/server/encryption/encryption-internals.ts` | 🆕 +2.64 kB | 0 B → 2.64 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/platform.ts` | 🆕 +335 B | 0 B → 335 B `home/runner/work/actual/actual/packages/loot-core/src/platform/server/fs/index.web.ts` | 🔥 -8.62 kB (-100%) | 8.62 kB → 0 B `home/runner/work/actual/actual/packages/loot-core/src/platform/server/sqlite/index.web.ts` | 🔥 -4.05 kB (-100%) | 4.05 kB → 0 B `home/runner/work/actual/actual/packages/loot-core/src/platform/server/fs/path-join.web.ts` | 🔥 -2.73 kB (-100%) | 2.73 kB → 0 B `home/runner/work/actual/actual/packages/loot-core/src/server/encryption/encryption-internals.web.ts` | 🔥 -2.64 kB (-100%) | 2.64 kB → 0 B `home/runner/work/actual/actual/packages/loot-core/src/shared/platform.web.ts` | 🔥 -335 B (-100%) | 335 B → 0 B </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.Dbl7pyXw.js | 0 B → 5.82 MB (+5.82 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.C2MZfWzQ.js | 5.82 MB → 0 B (-5.82 MB) | -100% **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.36 MB → 4.43 MB (+73.36 kB) | +1.64% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `node_modules/ua-parser-js/src/main/ua-parser.mjs` | 🆕 +73.46 kB | 0 B → 73.46 kB `src/server/encryption/encryption-internals.electron.ts` | 🆕 +1.7 kB | 0 B → 1.7 kB `src/shared/platform.ts` | 🆕 +311 B | 0 B → 311 B `src/mocks/random.ts` | 📈 +219 B (+811.11%) | 27 B → 246 B `src/platform/server/fs/index.electron.ts` | 📈 +18 B (+0.41%) | 4.29 kB → 4.31 kB `src/platform/server/fs/index.api.ts` | +0 B (0%) | 0 B → 0 B `src/server/budgetfiles/app.ts` | 📉 -32 B (-0.28%) | 11.22 kB → 11.18 kB `src/server/sheet.ts` | 📉 -499 B (-9.54%) | 5.11 kB → 4.62 kB `src/server/encryption/encryption-internals.ts` | 🔥 -1.69 kB (-100%) | 1.69 kB → 0 B `src/shared/platform.electron.ts` | 🔥 -134 B (-100%) | 134 B → 0 B </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- bundle.api.js | 4.36 MB → 4.43 MB (+73.36 kB) | +1.64% **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <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-04-18 08:47:36 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#32817