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

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

Original Pull Request: https://github.com/actualbudget/actual/pull/6632

State: closed
Merged: No


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.

**Original Pull Request:** https://github.com/actualbudget/actual/pull/6632 **State:** closed **Merged:** No --- ### 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.
GiteaMirror added the pull-request label 2026-02-28 21:30:59 -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#6640