[PR #3689] [CLOSED] Duplicating Budget and Budget Snapshots #19367

Closed
opened 2026-04-14 21:05:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/3689
Author: @tlesicka
Created: 10/19/2024
Status: Closed

Base: masterHead: snapshot-and-duplicate-budget


📝 Commits (10+)

  • 7127d46 Initial Commit
  • 74004f5 Merge remote-tracking branch 'upstream/master' into snapshot-and-duplicate-budget
  • 62f5175 Fixed database copy error
  • 597b0fa Removing unused code
  • f90fc5d Create 3689.md
  • b4f2aae Merge remote-tracking branch 'upstream/master' into snapshot-and-duplicate-budget
  • e96e646 Fixed issue with database duplication
  • 133a7ed fixed lint and typecheck errors
  • d0dcb28 Merge remote-tracking branch 'upstream/master' into snapshot-and-duplicate-budget
  • eb8f270 Fixed small errors

📊 Changes

15 files changed (+1077 additions, -71 deletions)

View changed files

📝 packages/desktop-client/src/components/Modals.tsx (+11 -0)
📝 packages/desktop-client/src/components/manager/BudgetList.tsx (+40 -5)
📝 packages/desktop-client/src/components/modals/LoadBackupModal.tsx (+84 -14)
packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx (+253 -0)
📝 packages/desktop-client/src/components/sidebar/BudgetName.tsx (+27 -2)
📝 packages/loot-core/src/client/actions/budgets.ts (+53 -0)
📝 packages/loot-core/src/client/state-types/modals.d.ts (+38 -1)
📝 packages/loot-core/src/platform/server/fs/index.web.ts (+77 -16)
packages/loot-core/src/server/backups.d.ts (+24 -0)
📝 packages/loot-core/src/server/backups.electron.ts (+60 -27)
packages/loot-core/src/server/backups.web.ts (+271 -0)
📝 packages/loot-core/src/server/main.ts (+111 -4)
📝 packages/loot-core/src/server/util/budget-name.ts (+5 -2)
📝 packages/loot-core/src/types/server-handlers.d.ts (+17 -0)
upcoming-release-notes/3689.md (+6 -0)

📄 Description

Adding an option from the budget management screen to duplicate the budget file. Also, will allow individual budget on the web-app to create dated snapshots like the Electron app.

Current known issue:
File copy will not allow large files to copy. Reading a file larger than default-db.sqlite will cause a read fault in packages/loot-core/src/platform/server/fs/index.web.ts

Needed:
Write new _copySqlFile function that will copy the database on a block-by-block basis rather than full file basis.


🔄 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/3689 **Author:** [@tlesicka](https://github.com/tlesicka) **Created:** 10/19/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `snapshot-and-duplicate-budget` --- ### 📝 Commits (10+) - [`7127d46`](https://github.com/actualbudget/actual/commit/7127d46870f6f56cd745dd7d305d8ae60d11fcd5) Initial Commit - [`74004f5`](https://github.com/actualbudget/actual/commit/74004f5b8eaab97a81da508499a49a8f39602bca) Merge remote-tracking branch 'upstream/master' into snapshot-and-duplicate-budget - [`62f5175`](https://github.com/actualbudget/actual/commit/62f517566b1eddd006e24251de90122afef63709) Fixed database copy error - [`597b0fa`](https://github.com/actualbudget/actual/commit/597b0fa59b46f857b27361f8f3b0a21211c4e280) Removing unused code - [`f90fc5d`](https://github.com/actualbudget/actual/commit/f90fc5d3ca24d595b0bd4f89387ba11d92fd1e97) Create 3689.md - [`b4f2aae`](https://github.com/actualbudget/actual/commit/b4f2aaed09bbf85e36d4b3a4c8f6716b024003af) Merge remote-tracking branch 'upstream/master' into snapshot-and-duplicate-budget - [`e96e646`](https://github.com/actualbudget/actual/commit/e96e6465a91ef8136c0ef512412d6a2b552dc4d9) Fixed issue with database duplication - [`133a7ed`](https://github.com/actualbudget/actual/commit/133a7ed753540ed041e0881de3879ac3611db539) fixed lint and typecheck errors - [`d0dcb28`](https://github.com/actualbudget/actual/commit/d0dcb28809a69fa347a42b9877a7b5aca9b13aa1) Merge remote-tracking branch 'upstream/master' into snapshot-and-duplicate-budget - [`eb8f270`](https://github.com/actualbudget/actual/commit/eb8f270a74766828ca8a40f0cc6005ebe6745dd4) Fixed small errors ### 📊 Changes **15 files changed** (+1077 additions, -71 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/Modals.tsx` (+11 -0) 📝 `packages/desktop-client/src/components/manager/BudgetList.tsx` (+40 -5) 📝 `packages/desktop-client/src/components/modals/LoadBackupModal.tsx` (+84 -14) ➕ `packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx` (+253 -0) 📝 `packages/desktop-client/src/components/sidebar/BudgetName.tsx` (+27 -2) 📝 `packages/loot-core/src/client/actions/budgets.ts` (+53 -0) 📝 `packages/loot-core/src/client/state-types/modals.d.ts` (+38 -1) 📝 `packages/loot-core/src/platform/server/fs/index.web.ts` (+77 -16) ➕ `packages/loot-core/src/server/backups.d.ts` (+24 -0) 📝 `packages/loot-core/src/server/backups.electron.ts` (+60 -27) ➕ `packages/loot-core/src/server/backups.web.ts` (+271 -0) 📝 `packages/loot-core/src/server/main.ts` (+111 -4) 📝 `packages/loot-core/src/server/util/budget-name.ts` (+5 -2) 📝 `packages/loot-core/src/types/server-handlers.d.ts` (+17 -0) ➕ `upcoming-release-notes/3689.md` (+6 -0) </details> ### 📄 Description Adding an option from the budget management screen to duplicate the budget file. Also, will allow individual budget on the web-app to create dated snapshots like the Electron app. Current known issue:<br/>File copy will not allow large files to copy. Reading a file larger than ```default-db.sqlite``` will cause a read fault in ```packages/loot-core/src/platform/server/fs/index.web.ts``` Needed:<br/>Write new ```_copySqlFile``` function that will copy the database on a block-by-block basis rather than full file basis. --- <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-14 21:05:02 -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#19367