[PR #4830] [MERGED] [Final PR] Move remaining loot-core/client files to desktop-client feature folders #5607

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

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/4830
Author: @joel-jeremy
Created: 4/16/2025
Status: Merged
Merged: 5/16/2025
Merged by: @joel-jeremy

Base: masterHead: loot-core-client-to-desktop-client-final-pr


📝 Commits (10+)

  • 0eb2919 Move loot-core/client/modals code over to desktop-client package
  • df5bc36 Fix lint error
  • b531116 Move loot-core/client/data-hooks over to desktop-client package
  • 5c452bf Fix typecheck and lint errors
  • f928007 Fix lint error
  • e91b5a6 [Final PR] Move remaining loot-core/client files to desktop-client feature folders
  • aa49f55 Fix tests
  • 0acc792 Clear server on each run
  • 9b32a2d Fix lint errors
  • be10184 Fix imports

📊 Changes

108 files changed (+1282 additions, -869 deletions)

View changed files

📝 packages/desktop-client/src/browser-preload.browser.js (+1 -1)
📝 packages/desktop-client/src/components/App.tsx (+2 -2)
📝 packages/desktop-client/src/components/GlobalKeys.ts (+1 -1)
📝 packages/desktop-client/src/components/Titlebar.tsx (+2 -2)
📝 packages/desktop-client/src/components/accounts/Account.tsx (+3 -6)
📝 packages/desktop-client/src/components/accounts/Reconcile.tsx (+3 -2)
📝 packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/envelope/BalanceMenu.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/envelope/BalanceMovementMenu.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx (+1 -2)
📝 packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudgetAmount.tsx (+1 -2)
📝 packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudgetMenu.tsx (+1 -2)
📝 packages/desktop-client/src/components/budget/envelope/budgetsummary/TotalsList.tsx (+1 -2)
📝 packages/desktop-client/src/components/budget/index.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/tracking/budgetsummary/ExpenseTotal.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/tracking/budgetsummary/IncomeTotal.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/tracking/budgetsummary/Saved.tsx (+1 -2)

...and 80 more files

📄 Description

Final PR in the series 🎉

The original reason this was designed this way it to share the code with a mobile app. But since we no longer have a mobile app, these codes can now be merged to desktop-client package.

  • accounts folder
  • app folder
  • budgets folder
  • modals folder
  • notifications folder
  • prefs folder
  • queries folder
  • users folder
  • data-hooks folder
  • store folder
  • files under root loot-core/client folder

There will be some suppressed import warning due to loot-core importing some desktop-client files but this is only temporary until we migrate all the files

Changes done:

  1. Moved loot-core/client/reports.ts --> desktop-client/src/components/reports/util.ts
  2. Moved loot-core/client/platform.ts --> desktop-client/src/platform.ts
  3. Moved loot-core/client/platform.web.ts --> desktop-client/src/platform.web.ts
  4. Moved loot-core/client/platform.electron.ts --> desktop-client/src/platform.electron.ts
  5. Renamed loot-core/client/query-hooks.ts --> useQuery.ts and moved to desktop-client/src/hooks/useQuery.ts
  6. Renamed loot-core/client/SpreadsheetProvider.tsx --> useSpreadsheet.tsx and moved to desktop-client/src/hooks/useSpreadsheet.tsx
    • Removed reference to Node type from loot-core/server/spreadsheet/spreadsheet.ts
  7. Moved loot-core/client/undo.ts --> desktop-client/src/undo/index.ts
  8. Renamed loot-core/client/shared-listeners.ts --> sync-events.ts and moved to desktop-client/src/sync-events.ts
  9. Moved loot-core/client/transfer.ts --> desktop-client/src/transactions/transfer.ts
  10. Breakdown loot-core/client/query-helpers.ts into multiple files and moved to desktop-client/src/queries folder:
  • runQuery.ts
  • liveQuery.ts
  • pagedQuery.ts
  1. Replace loot-core/server/platform.ts with loot-core/shared/platform.ts counterpart
  2. VSCode handled all the import updates (just had to fix some minor stuff)
  3. Run yarn lint:fix

🔄 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/4830 **Author:** [@joel-jeremy](https://github.com/joel-jeremy) **Created:** 4/16/2025 **Status:** ✅ Merged **Merged:** 5/16/2025 **Merged by:** [@joel-jeremy](https://github.com/joel-jeremy) **Base:** `master` ← **Head:** `loot-core-client-to-desktop-client-final-pr` --- ### 📝 Commits (10+) - [`0eb2919`](https://github.com/actualbudget/actual/commit/0eb2919790f4eca39874089c1d13c14689d2c598) Move loot-core/client/modals code over to desktop-client package - [`df5bc36`](https://github.com/actualbudget/actual/commit/df5bc360bd9c71d0ad16ca421260275e57880d96) Fix lint error - [`b531116`](https://github.com/actualbudget/actual/commit/b5311166164f7e271182717c602e5e7859755b3f) Move loot-core/client/data-hooks over to desktop-client package - [`5c452bf`](https://github.com/actualbudget/actual/commit/5c452bf8a1480a1011800cc7437604cc373cbabf) Fix typecheck and lint errors - [`f928007`](https://github.com/actualbudget/actual/commit/f92800756870cbb80e94072b7ad7f1525c60e17d) Fix lint error - [`e91b5a6`](https://github.com/actualbudget/actual/commit/e91b5a6d3ad771126c582c48c62908548ad8f879) [Final PR] Move remaining loot-core/client files to desktop-client feature folders - [`aa49f55`](https://github.com/actualbudget/actual/commit/aa49f559d0d89efbcb460f1432595cc792e34e48) Fix tests - [`0acc792`](https://github.com/actualbudget/actual/commit/0acc792a5ff5223e50566d04b08bd5fc8a63a0d6) Clear server on each run - [`9b32a2d`](https://github.com/actualbudget/actual/commit/9b32a2dbf81599b09d7bd3cb8082e0beb6aa3539) Fix lint errors - [`be10184`](https://github.com/actualbudget/actual/commit/be10184a2e93fd89c5e385cc6a6a2272d14f024d) Fix imports ### 📊 Changes **108 files changed** (+1282 additions, -869 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/browser-preload.browser.js` (+1 -1) 📝 `packages/desktop-client/src/components/App.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/GlobalKeys.ts` (+1 -1) 📝 `packages/desktop-client/src/components/Titlebar.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/accounts/Account.tsx` (+3 -6) 📝 `packages/desktop-client/src/components/accounts/Reconcile.tsx` (+3 -2) 📝 `packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/envelope/BalanceMenu.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/envelope/BalanceMovementMenu.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx` (+1 -2) 📝 `packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudgetAmount.tsx` (+1 -2) 📝 `packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudgetMenu.tsx` (+1 -2) 📝 `packages/desktop-client/src/components/budget/envelope/budgetsummary/TotalsList.tsx` (+1 -2) 📝 `packages/desktop-client/src/components/budget/index.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/tracking/budgetsummary/ExpenseTotal.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/tracking/budgetsummary/IncomeTotal.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/tracking/budgetsummary/Saved.tsx` (+1 -2) _...and 80 more files_ </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> # Final PR in the series 🎉 The original reason this was designed this way it to share the code with a mobile app. But since we no longer have a mobile app, these codes can now be merged to `desktop-client` package. - [x] accounts folder - [x] app folder - [x] budgets folder - [x] modals folder - [x] notifications folder - [x] prefs folder - [x] queries folder - [x] users folder - [x] data-hooks folder - [x] store folder - [x] files under root `loot-core/client` folder There will be some suppressed import warning due to loot-core importing some desktop-client files but this is only temporary until we migrate all the files # Changes done: 1. Moved `loot-core/client/reports.ts` --> `desktop-client/src/components/reports/util.ts` 2. Moved `loot-core/client/platform.ts` --> `desktop-client/src/platform.ts` 3. Moved `loot-core/client/platform.web.ts` --> `desktop-client/src/platform.web.ts` 4. Moved `loot-core/client/platform.electron.ts` --> `desktop-client/src/platform.electron.ts` 5. Renamed `loot-core/client/query-hooks.ts` --> `useQuery.ts` and moved to `desktop-client/src/hooks/useQuery.ts` 6. Renamed `loot-core/client/SpreadsheetProvider.tsx` --> `useSpreadsheet.tsx` and moved to `desktop-client/src/hooks/useSpreadsheet.tsx` - Removed reference to `Node` type from `loot-core/server/spreadsheet/spreadsheet.ts` 7. Moved `loot-core/client/undo.ts` --> `desktop-client/src/undo/index.ts` 8. Renamed `loot-core/client/shared-listeners.ts` --> `sync-events.ts` and moved to `desktop-client/src/sync-events.ts` 9. Moved `loot-core/client/transfer.ts` --> `desktop-client/src/transactions/transfer.ts` 10. Breakdown `loot-core/client/query-helpers.ts` into multiple files and moved to `desktop-client/src/queries` folder: - runQuery.ts - liveQuery.ts - pagedQuery.ts 11. Replace `loot-core/server/platform.ts` with `loot-core/shared/platform.ts` counterpart 12. VSCode handled all the import updates (just had to fix some minor stuff) 13. Run yarn lint:fix --- <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:15:17 -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#5607