[PR #6632] [CLOSED] [WIP] feat: add custom transaction sequence column for manual ordering #21003

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

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6632
Author: @StephenBrown2
Created: 1/12/2026
Status: Closed

Base: masterHead: custom-transaction-sequence


📝 Commits (9)

  • c9ff8eb feat: add custom transaction sequence column for manual ordering
  • 564a622 [autofix.ci] apply automated fixes
  • 5ad000b Fix release file
  • 75d7a10 Fix sort-order issues from code review
  • 76deac5 Clarify comment in index.ts for assignBatchSeq usage
  • 28d10f2 Document atLimit behavior in assignBatchSeq
  • 11d857a Add date format validation in generateSortOrder
  • 2de4673 Consolidate toDateRepr/fromDateRepr in sort-order.ts
  • 9d8c698 Use fromDateRepr helper in assignBatchSeq

📊 Changes

16 files changed (+907 additions, -40 deletions)

View changed files

📝 packages/desktop-client/src/components/accounts/Account.tsx (+36 -0)
📝 packages/desktop-client/src/components/accounts/Header.tsx (+21 -0)
📝 packages/desktop-client/src/components/reports/reports/Calendar.tsx (+1 -0)
📝 packages/desktop-client/src/components/transactions/TransactionList.tsx (+17 -1)
📝 packages/desktop-client/src/components/transactions/TransactionsTable.tsx (+122 -1)
📝 packages/desktop-client/src/components/transactions/table/utils.ts (+2 -0)
📝 packages/loot-core/src/server/__snapshots__/main.test.ts.snap (+4 -4)
📝 packages/loot-core/src/server/models.ts (+2 -22)
📝 packages/loot-core/src/server/transactions/__snapshots__/transfer.test.ts.snap (+11 -9)
📝 packages/loot-core/src/server/transactions/index.ts (+44 -1)
packages/loot-core/src/server/transactions/sort-order.test.ts (+317 -0)
📝 packages/loot-core/src/server/transactions/transfer.ts (+22 -0)
packages/loot-core/src/shared/sort-order.ts (+287 -0)
📝 packages/loot-core/src/shared/transactions.ts (+14 -2)
📝 packages/loot-core/src/types/prefs.ts (+1 -0)
upcoming-release-notes/6632.md (+6 -0)

📄 Description

Summary

This PR adds a new Sequence (#) column to the transaction table that allows users to manually order transactions within the same day. This is useful for users who want to track the exact order in which transactions occurred, especially when multiple transactions happen on the same date.

Changes

New Sort Order Format

  • Introduces a new sort_order format: YYYYMMDDseq (13 digits total)
    • Date portion: 8 digits (YYYYMMDD)
    • Sequence portion: up to 5 digits (1-99999)
    • Example: 2024-01-15 with sequence 42 = 2024011500042
  • Maintains backward compatibility with legacy Date.now() timestamp format
  • Adds utility functions in packages/loot-core/src/shared/sort-order.ts:
    • generateSortOrder() - Create new sort_order values
    • extractSeq() - Get sequence number from sort_order
    • isLegacyTimestamp() - Detect old timestamp format

UI Changes

  • Adds sequence column toggle in the account column menu (per-account preference stored in showSequence local pref)
  • SequenceCell component displays sequence number and allows editing
  • Tooltip shows "N/M" format (current sequence / total transactions on date)
  • Legacy transactions show empty sequence with "Click to assign sequence" tooltip

Backend Changes

  • Auto-assigns sequence numbers to newly imported/created transactions
  • Sorting by date now uses sort_order for proper sequence ordering
  • Transfer transactions inherit sequence from their source transaction

Screenshots

Dropdown option for visibility:
Screenshot_2026-01-12_14-43-23

Not visible, no change:
Screenshot_2026-01-12_14-42-59

Visible, some same-day transactions ordered:
Screenshot_2026-01-12_14-42-40

Tooltip hint to add sequence:
Screenshot_2026-01-12_14-48-11

Tooltip when sequence is set:
Screenshot_2026-01-12_14-49-22

AI Disclaimer

This enhancement was developed with the aid of Claude.


🔄 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/6632 **Author:** [@StephenBrown2](https://github.com/StephenBrown2) **Created:** 1/12/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `custom-transaction-sequence` --- ### 📝 Commits (9) - [`c9ff8eb`](https://github.com/actualbudget/actual/commit/c9ff8ebc624894f24d2efbdbdcffcdedaf38f304) feat: add custom transaction sequence column for manual ordering - [`564a622`](https://github.com/actualbudget/actual/commit/564a622d473ac8cb7a56b17be5c3cdae58438bf7) [autofix.ci] apply automated fixes - [`5ad000b`](https://github.com/actualbudget/actual/commit/5ad000b9b4d0faeed8a247ff9e57ef79475cad17) Fix release file - [`75d7a10`](https://github.com/actualbudget/actual/commit/75d7a10ae5210297ba70e723869f111d2ed9b9ee) Fix sort-order issues from code review - [`76deac5`](https://github.com/actualbudget/actual/commit/76deac58c989b53f9e5e905cbf3359a4b0198a5f) Clarify comment in index.ts for assignBatchSeq usage - [`28d10f2`](https://github.com/actualbudget/actual/commit/28d10f249b1bc05b79e772b2f46e845d1d620ae4) Document atLimit behavior in assignBatchSeq - [`11d857a`](https://github.com/actualbudget/actual/commit/11d857aeb105ea29d4e39c9f38136e1cb47a5f50) Add date format validation in generateSortOrder - [`2de4673`](https://github.com/actualbudget/actual/commit/2de46730daa53a3c93e0da79fbf244835e18620d) Consolidate toDateRepr/fromDateRepr in sort-order.ts - [`9d8c698`](https://github.com/actualbudget/actual/commit/9d8c698c367fab045e5c0b78a15569fcc5b7e54a) Use fromDateRepr helper in assignBatchSeq ### 📊 Changes **16 files changed** (+907 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/accounts/Account.tsx` (+36 -0) 📝 `packages/desktop-client/src/components/accounts/Header.tsx` (+21 -0) 📝 `packages/desktop-client/src/components/reports/reports/Calendar.tsx` (+1 -0) 📝 `packages/desktop-client/src/components/transactions/TransactionList.tsx` (+17 -1) 📝 `packages/desktop-client/src/components/transactions/TransactionsTable.tsx` (+122 -1) 📝 `packages/desktop-client/src/components/transactions/table/utils.ts` (+2 -0) 📝 `packages/loot-core/src/server/__snapshots__/main.test.ts.snap` (+4 -4) 📝 `packages/loot-core/src/server/models.ts` (+2 -22) 📝 `packages/loot-core/src/server/transactions/__snapshots__/transfer.test.ts.snap` (+11 -9) 📝 `packages/loot-core/src/server/transactions/index.ts` (+44 -1) ➕ `packages/loot-core/src/server/transactions/sort-order.test.ts` (+317 -0) 📝 `packages/loot-core/src/server/transactions/transfer.ts` (+22 -0) ➕ `packages/loot-core/src/shared/sort-order.ts` (+287 -0) 📝 `packages/loot-core/src/shared/transactions.ts` (+14 -2) 📝 `packages/loot-core/src/types/prefs.ts` (+1 -0) ➕ `upcoming-release-notes/6632.md` (+6 -0) </details> ### 📄 Description ### Summary This PR adds a new **Sequence (#)** column to the transaction table that allows users to manually order transactions within the same day. This is useful for users who want to track the exact order in which transactions occurred, especially when multiple transactions happen on the same date. ### Changes #### New Sort Order Format - Introduces a new `sort_order` format: `YYYYMMDDseq` (13 digits total) - Date portion: 8 digits (YYYYMMDD) - Sequence portion: up to 5 digits (1-99999) - Example: 2024-01-15 with sequence 42 = `2024011500042` - Maintains backward compatibility with legacy `Date.now()` timestamp format - Adds utility functions in `packages/loot-core/src/shared/sort-order.ts`: - `generateSortOrder()` - Create new sort_order values - `extractSeq()` - Get sequence number from sort_order - `isLegacyTimestamp()` - Detect old timestamp format #### UI Changes - Adds sequence column toggle in the account column menu (per-account preference stored in `showSequence` local pref) - `SequenceCell` component displays sequence number and allows editing - Tooltip shows "N/M" format (current sequence / total transactions on date) - Legacy transactions show empty sequence with "Click to assign sequence" tooltip #### Backend Changes - Auto-assigns sequence numbers to newly imported/created transactions - Sorting by date now uses `sort_order` for proper sequence ordering - Transfer transactions inherit sequence from their source transaction ### Screenshots Dropdown option for visibility: <img width="276" height="282" alt="Screenshot_2026-01-12_14-43-23" src="https://github.com/user-attachments/assets/9c4748ad-0758-4fb7-a1f9-d31fbfc41201" /> Not visible, no change: <img width="281" height="329" alt="Screenshot_2026-01-12_14-42-59" src="https://github.com/user-attachments/assets/225d45fc-f5f8-432f-a91c-48fbcd36d174" /> Visible, some same-day transactions ordered: <img width="281" height="329" alt="Screenshot_2026-01-12_14-42-40" src="https://github.com/user-attachments/assets/7dd87a4b-bc1a-42ef-ba39-72ae5647ad65" /> Tooltip hint to add sequence: <img width="341" height="167" alt="Screenshot_2026-01-12_14-48-11" src="https://github.com/user-attachments/assets/7fa8b4c9-8b88-4adf-9659-6c304173054e" /> Tooltip when sequence is set: <img width="318" height="168" alt="Screenshot_2026-01-12_14-49-22" src="https://github.com/user-attachments/assets/de3aad87-9179-423d-b74d-6c4596380f07" /> ### AI Disclaimer This enhancement was developed with the aid of Claude. --- <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:51:31 -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#21003