[PR #6543] [MERGED] Only reverse import preview transactions if they appear to be sorted by date ascending #20953

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

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6543
Author: @kivikakk
Created: 1/4/2026
Status: Merged
Merged: 1/16/2026
Merged by: @matt-fidd

Base: masterHead: push-myukvsuvpwkw


📝 Commits (3)

  • c6b29ae Sort import preview transactions by (parsed) date, descending
  • d88c231 Merge branch 'master' into push-myukvsuvpwkw
  • e3e532b Update VRT screenshots

📊 Changes

9 files changed (+29 additions, -18 deletions)

View changed files

📝 packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-import-csv-file-twice-1-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-import-csv-file-twice-2-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-import-csv-file-twice-3-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-imports-transactions-from-a-CSV-file-1-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-imports-transactions-from-a-CSV-file-2-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-imports-transactions-from-a-CSV-file-3-chromium-linux.png (+0 -0)
📝 packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx (+22 -17)
📝 packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts (+1 -1)
upcoming-release-notes/6543.md (+6 -0)

📄 Description

Hi! This is a tiny fix: I noted in the source code that Actual aims to show the preview of transactions to import sorted by date descending, to match the account page itself. To do this, it reverses the transaction list, assuming they tend to be ascending.

At least in the case of my bank (and also in packages/loot-core/src/mocks/files/data.ofx), this isn't the case, so it ends up reversing them back to ascending. This PR reverses the transaction list only if the dates appear to be ascending to begin with.

Summary by CodeRabbit

Release Notes

  • Enhancements
    • Improved transaction import preview to intelligently detect and handle transaction ordering based on date patterns, reversing only when appropriate.

✏️ Tip: You can customize this high-level summary in your review settings.


🔄 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/6543 **Author:** [@kivikakk](https://github.com/kivikakk) **Created:** 1/4/2026 **Status:** ✅ Merged **Merged:** 1/16/2026 **Merged by:** [@matt-fidd](https://github.com/matt-fidd) **Base:** `master` ← **Head:** `push-myukvsuvpwkw` --- ### 📝 Commits (3) - [`c6b29ae`](https://github.com/actualbudget/actual/commit/c6b29ae4d43b25c6cddc34607d617dd84ad0a250) Sort import preview transactions by (parsed) date, descending - [`d88c231`](https://github.com/actualbudget/actual/commit/d88c2312a29cf3a51e03237b6fa36f93eb73f6a4) Merge branch 'master' into push-myukvsuvpwkw - [`e3e532b`](https://github.com/actualbudget/actual/commit/e3e532ba139c75d2d6b712b3964c4ee2dd37f3d9) Update VRT screenshots ### 📊 Changes **9 files changed** (+29 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-import-csv-file-twice-1-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-import-csv-file-twice-2-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-import-csv-file-twice-3-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-imports-transactions-from-a-CSV-file-1-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-imports-transactions-from-a-CSV-file-2-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/accounts.test.ts-snapshots/Accounts-Import-Transactions-imports-transactions-from-a-CSV-file-3-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx` (+22 -17) 📝 `packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts` (+1 -1) ➕ `upcoming-release-notes/6543.md` (+6 -0) </details> ### 📄 Description Hi! This is a tiny fix: I noted in the source code that Actual aims to show the preview of transactions to import sorted by date descending, to match the account page itself. To do this, it reverses the transaction list, assuming they tend to be ascending. At least in the case of my bank (and also in `packages/loot-core/src/mocks/files/data.ofx`), this isn't the case, so it ends up reversing them _back_ to ascending. This PR reverses the transaction list only if the dates appear to be ascending to begin with. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Enhancements** * Improved transaction import preview to intelligently detect and handle transaction ordering based on date patterns, reversing only when appropriate. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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:50:23 -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#20953