[PR #71] [MERGED] Add ability to import Actual files; enable export on desktop #3000

Closed
opened 2026-02-28 20:34:50 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/71
Author: @jlongster
Created: 5/26/2022
Status: Merged
Merged: 5/27/2022
Merged by: @jlongster

Base: masterHead: jlongster-import-export


📝 Commits (1)

  • d7e7115 Add ability to import Actual files; enable export on desktop

📊 Changes

9 files changed (+264 additions, -137 deletions)

View changed files

📝 packages/desktop-client/src/components/Settings.js (+5 -7)
📝 packages/desktop-client/src/components/manager/Modals.js (+5 -0)
📝 packages/loot-core/src/platform/client/fetch/index.web.js (+18 -15)
📝 packages/loot-core/src/platform/server/connection/index.electron.js (+25 -48)
📝 packages/loot-core/src/platform/server/fs/index.web.js (+8 -4)
📝 packages/loot-core/src/server/cloud-storage.js (+55 -55)
📝 packages/loot-core/src/server/main.js (+35 -0)
📝 packages/loot-design/src/components/manager/Import.js (+9 -8)
packages/loot-design/src/components/manager/ImportActual.js (+104 -0)

📄 Description

This PR does a few things, but the two main things it enables are:

  • Exporting data as a compressed zip file on the desktop app. This was already available on the web app, but due to limitations of the IPC used by the desktop app it hadn't been enabled yet.
  • Allows importing of these compressed zip files that Actual exports. Clicking "import file" will show a list of file types to import that now includes Actual.

These compressed files are just zip files containing two files: a db.sqlite and metadata.json. If you are using the desktop app, you can see these two files locally by opening up a budget file in your local Actual directory. All it does it zip them up.

As you can see in the PR, there were several annoying bugfixes required for this which is why it took a while to get this working.

In my research, I also discovered the the IPC layer used by the desktop app was double JSON encoding messages. We were manually encoding them, and then the IPC layer was automating doing it as well. We can pass objects directly to the IPC layer without calling JSON.stringify/`JSON.parseˆ.


🔄 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/71 **Author:** [@jlongster](https://github.com/jlongster) **Created:** 5/26/2022 **Status:** ✅ Merged **Merged:** 5/27/2022 **Merged by:** [@jlongster](https://github.com/jlongster) **Base:** `master` ← **Head:** `jlongster-import-export` --- ### 📝 Commits (1) - [`d7e7115`](https://github.com/actualbudget/actual/commit/d7e71158b931842afa51698e6c5a1662c79c4510) Add ability to import Actual files; enable export on desktop ### 📊 Changes **9 files changed** (+264 additions, -137 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/Settings.js` (+5 -7) 📝 `packages/desktop-client/src/components/manager/Modals.js` (+5 -0) 📝 `packages/loot-core/src/platform/client/fetch/index.web.js` (+18 -15) 📝 `packages/loot-core/src/platform/server/connection/index.electron.js` (+25 -48) 📝 `packages/loot-core/src/platform/server/fs/index.web.js` (+8 -4) 📝 `packages/loot-core/src/server/cloud-storage.js` (+55 -55) 📝 `packages/loot-core/src/server/main.js` (+35 -0) 📝 `packages/loot-design/src/components/manager/Import.js` (+9 -8) ➕ `packages/loot-design/src/components/manager/ImportActual.js` (+104 -0) </details> ### 📄 Description This PR does a few things, but the two main things it enables are: * Exporting data as a compressed zip file on the desktop app. This was already available on the web app, but due to limitations of the IPC used by the desktop app it hadn't been enabled yet. * Allows importing of these compressed zip files that Actual exports. Clicking "import file" will show a list of file types to import that now includes Actual. These compressed files are just zip files containing two files: a `db.sqlite` and `metadata.json`. If you are using the desktop app, you can see these two files locally by opening up a budget file in your local Actual directory. All it does it zip them up. As you can see in the PR, there were several annoying bugfixes required for this which is why it took a while to get this working. In my research, I also discovered the the IPC layer used by the desktop app was double JSON encoding messages. We were manually encoding them, and then the IPC layer was automating doing it as well. We can pass objects directly to the IPC layer without calling `JSON.stringify`/`JSON.parseˆ. --- <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 20:34:50 -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#3000