[PR #6774] [CLOSED] [WIP] Draggable transaction rule ordering within stages #108996

Closed
opened 2026-06-02 17:05:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6774
Author: @totallynotjon
Created: 1/25/2026
Status: ❌ Closed

Base: master ← Head: order_rules


📝 Commits (2)

  • 09335b9 Draggable Rule ordering within stages
  • 0e0c77f Merge branch 'master' into order_rules

📊 Changes

15 files changed (+694 additions, -160 deletions)

View changed files

📝 packages/desktop-client/src/components/ManageRules.tsx (+42 -2)
📝 packages/desktop-client/src/components/rules/RuleRow.tsx (+209 -149)
📝 packages/desktop-client/src/components/rules/RulesList.tsx (+11 -0)
📝 packages/docs/docs/budgeting/rules/index.md (+15 -1)
➕ packages/loot-core/migrations/1769386512055_rules_sort_order.sql (+5 -0)
📝 packages/loot-core/src/server/db/types/index.ts (+1 -0)
📝 packages/loot-core/src/server/rules/app.ts (+12 -0)
📝 packages/loot-core/src/server/rules/rule-utils.ts (+25 -7)
📝 packages/loot-core/src/server/rules/rule.ts (+5 -0)
📝 packages/loot-core/src/server/transactions/__snapshots__/transaction-rules.test.ts.snap (+6 -0)
📝 packages/loot-core/src/server/transactions/transaction-rules.test.ts (+171 -0)
📝 packages/loot-core/src/server/transactions/transaction-rules.ts (+176 -1)
📝 packages/loot-core/src/shared/rules.ts (+9 -0)
📝 packages/loot-core/src/types/models/rule.ts (+1 -0)
➕ upcoming-release-notes/6774.md (+6 -0)

📄 Description

D&d ordering within transaction rule stages. This aims to give further flexibility and customization to the setup of rules.

I am not very versed in front-end, so this is AI assisted. I reviewed the code and everything seems reasonable enough.

We get to re-use some of the other front end components for the interactivity and generating the sort order for movements.

_rankRules is already used to determine to order of rule processing, I just added onto that to take into account the new sort_priority column of the rules.

What the AI did to adjust the db looks right to me, could definitely use some extra eyes and let me know if any of this seems too off.


Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 28 14.55 MB → 14.56 MB (+4.7 kB) +0.03%
loot-core 1 5.85 MB → 5.86 MB (+4.84 kB) +0.08%
api 1 4.39 MB → 4.39 MB (+4.34 kB) +0.10%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
28 14.55 MB → 14.56 MB (+4.7 kB) +0.03%
Changeset
File Δ Size
src/components/rules/RuleRow.tsx 📈 +2.97 kB (+27.38%) 10.83 kB → 13.8 kB
src/components/rules/RulesList.tsx 📈 +240 B (+17.56%) 1.33 kB → 1.57 kB
src/components/ManageRules.tsx 📈 +1.37 kB (+8.95%) 15.28 kB → 16.65 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts 📈 +132 B (+1.63%) 7.93 kB → 8.06 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 9.31 MB → 9.31 MB (+4.7 kB) +0.05%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 12.94 kB 0%
static/js/workbox-window.prod.es5.js 5.64 kB 0%
static/js/da.js 106.62 kB 0%
static/js/de.js 178.39 kB 0%
static/js/en-GB.js 7.18 kB 0%
static/js/en.js 164.16 kB 0%
static/js/es.js 173.83 kB 0%
static/js/fr.js 179.62 kB 0%
static/js/it.js 171.44 kB 0%
static/js/nb-NO.js 157.23 kB 0%
static/js/nl.js 106.65 kB 0%
static/js/pl.js 88.64 kB 0%
static/js/pt-BR.js 146.51 kB 0%
static/js/ru.js 106.97 kB 0%
static/js/sv.js 78.2 kB 0%
static/js/th.js 182.35 kB 0%
static/js/uk.js 215.11 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 120.54 kB 0%
static/js/ReportRouter.js 1.11 MB 0%
static/js/narrow.js 640.46 kB 0%
static/js/TransactionList.js 105.97 kB 0%
static/js/wide.js 160.07 kB 0%
static/js/AppliedFilters.js 9.71 kB 0%
static/js/usePayeeRuleCounts.js 11.79 kB 0%
static/js/useTransactionBatchActions.js 13.23 kB 0%
static/js/FormulaEditor.js 1.04 MB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.85 MB → 5.86 MB (+4.84 kB) +0.08%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts 📈 +3.97 kB (+15.78%) 25.17 kB → 29.14 kB
home/runner/work/actual/actual/packages/loot-core/src/server/rules/rule-utils.ts 📈 +445 B (+7.31%) 5.95 kB → 6.38 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts 📈 +156 B (+6.49%) 2.35 kB → 2.5 kB
home/runner/work/actual/actual/packages/loot-core/src/server/rules/app.ts 📈 +168 B (+4.81%) 3.41 kB → 3.58 kB
home/runner/work/actual/actual/packages/loot-core/src/server/rules/rule.ts 📈 +123 B (+2.47%) 4.87 kB → 4.99 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
kcab.worker.D8ViyCss.js 0 B → 5.86 MB (+5.86 MB) -

Removed

Asset File Size % Changed
kcab.worker.C30497Fh.js 5.85 MB → 0 B (-5.85 MB) -100%

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged
No assets were unchanged


api

Total

Files count Total bundle size % Changed
1 4.39 MB → 4.39 MB (+4.34 kB) +0.10%
Changeset
File Δ Size
src/server/transactions/transaction-rules.ts 📈 +3.58 kB (+16.02%) 22.35 kB → 25.93 kB
src/server/rules/rule-utils.ts 📈 +401 B (+7.60%) 5.15 kB → 5.54 kB
src/shared/rules.ts 📈 +132 B (+6.45%) 2 kB → 2.13 kB
src/server/rules/app.ts 📈 +140 B (+4.55%) 3 kB → 3.14 kB
src/server/rules/rule.ts 📈 +107 B (+2.41%) 4.33 kB → 4.43 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
bundle.api.js 4.39 MB → 4.39 MB (+4.34 kB) +0.10%

Smaller
No assets were smaller

Unchanged
No assets were unchanged


🔄 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/6774 **Author:** [@totallynotjon](https://github.com/totallynotjon) **Created:** 1/25/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `order_rules` --- ### 📝 Commits (2) - [`09335b9`](https://github.com/actualbudget/actual/commit/09335b9c1bfba5c7d4218d42dba4b999dd6b09e8) Draggable Rule ordering within stages - [`0e0c77f`](https://github.com/actualbudget/actual/commit/0e0c77f33f389a1244b8c6e1bed2368fa9e6aa3e) Merge branch 'master' into order_rules ### 📊 Changes **15 files changed** (+694 additions, -160 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/ManageRules.tsx` (+42 -2) 📝 `packages/desktop-client/src/components/rules/RuleRow.tsx` (+209 -149) 📝 `packages/desktop-client/src/components/rules/RulesList.tsx` (+11 -0) 📝 `packages/docs/docs/budgeting/rules/index.md` (+15 -1) ➕ `packages/loot-core/migrations/1769386512055_rules_sort_order.sql` (+5 -0) 📝 `packages/loot-core/src/server/db/types/index.ts` (+1 -0) 📝 `packages/loot-core/src/server/rules/app.ts` (+12 -0) 📝 `packages/loot-core/src/server/rules/rule-utils.ts` (+25 -7) 📝 `packages/loot-core/src/server/rules/rule.ts` (+5 -0) 📝 `packages/loot-core/src/server/transactions/__snapshots__/transaction-rules.test.ts.snap` (+6 -0) 📝 `packages/loot-core/src/server/transactions/transaction-rules.test.ts` (+171 -0) 📝 `packages/loot-core/src/server/transactions/transaction-rules.ts` (+176 -1) 📝 `packages/loot-core/src/shared/rules.ts` (+9 -0) 📝 `packages/loot-core/src/types/models/rule.ts` (+1 -0) ➕ `upcoming-release-notes/6774.md` (+6 -0) </details> ### 📄 Description D&d ordering within transaction rule stages. This aims to give further flexibility and customization to the setup of rules. I am not very versed in front-end, so this is AI assisted. I reviewed the code and everything seems reasonable enough. We get to re-use some of the other front end components for the interactivity and generating the sort order for movements. _rankRules is already used to determine to order of rule processing, I just added onto that to take into account the new sort_priority column of the rules. What the AI did to adjust the db looks right to me, could definitely use some extra eyes and let me know if any of this seems too off. <!--- actual-bot-sections ---> <hr /> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 28 | 14.55 MB → 14.56 MB (+4.7 kB) | +0.03% loot-core | 1 | 5.85 MB → 5.86 MB (+4.84 kB) | +0.08% api | 1 | 4.39 MB → 4.39 MB (+4.34 kB) | +0.10% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 28 | 14.55 MB → 14.56 MB (+4.7 kB) | +0.03% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/components/rules/RuleRow.tsx` | 📈 +2.97 kB (+27.38%) | 10.83 kB → 13.8 kB `src/components/rules/RulesList.tsx` | 📈 +240 B (+17.56%) | 1.33 kB → 1.57 kB `src/components/ManageRules.tsx` | 📈 +1.37 kB (+8.95%) | 15.28 kB → 16.65 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts` | 📈 +132 B (+1.63%) | 7.93 kB → 8.06 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 9.31 MB → 9.31 MB (+4.7 kB) | +0.05% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/indexeddb-main-thread-worker-e59fee74.js | 12.94 kB | 0% static/js/workbox-window.prod.es5.js | 5.64 kB | 0% static/js/da.js | 106.62 kB | 0% static/js/de.js | 178.39 kB | 0% static/js/en-GB.js | 7.18 kB | 0% static/js/en.js | 164.16 kB | 0% static/js/es.js | 173.83 kB | 0% static/js/fr.js | 179.62 kB | 0% static/js/it.js | 171.44 kB | 0% static/js/nb-NO.js | 157.23 kB | 0% static/js/nl.js | 106.65 kB | 0% static/js/pl.js | 88.64 kB | 0% static/js/pt-BR.js | 146.51 kB | 0% static/js/ru.js | 106.97 kB | 0% static/js/sv.js | 78.2 kB | 0% static/js/th.js | 182.35 kB | 0% static/js/uk.js | 215.11 kB | 0% static/js/resize-observer.js | 18.37 kB | 0% static/js/BackgroundImage.js | 120.54 kB | 0% static/js/ReportRouter.js | 1.11 MB | 0% static/js/narrow.js | 640.46 kB | 0% static/js/TransactionList.js | 105.97 kB | 0% static/js/wide.js | 160.07 kB | 0% static/js/AppliedFilters.js | 9.71 kB | 0% static/js/usePayeeRuleCounts.js | 11.79 kB | 0% static/js/useTransactionBatchActions.js | 13.23 kB | 0% static/js/FormulaEditor.js | 1.04 MB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.85 MB → 5.86 MB (+4.84 kB) | +0.08% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts` | 📈 +3.97 kB (+15.78%) | 25.17 kB → 29.14 kB `home/runner/work/actual/actual/packages/loot-core/src/server/rules/rule-utils.ts` | 📈 +445 B (+7.31%) | 5.95 kB → 6.38 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts` | 📈 +156 B (+6.49%) | 2.35 kB → 2.5 kB `home/runner/work/actual/actual/packages/loot-core/src/server/rules/app.ts` | 📈 +168 B (+4.81%) | 3.41 kB → 3.58 kB `home/runner/work/actual/actual/packages/loot-core/src/server/rules/rule.ts` | 📈 +123 B (+2.47%) | 4.87 kB → 4.99 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.D8ViyCss.js | 0 B → 5.86 MB (+5.86 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.C30497Fh.js | 5.85 MB → 0 B (-5.85 MB) | -100% **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.39 MB → 4.39 MB (+4.34 kB) | +0.10% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/server/transactions/transaction-rules.ts` | 📈 +3.58 kB (+16.02%) | 22.35 kB → 25.93 kB `src/server/rules/rule-utils.ts` | 📈 +401 B (+7.60%) | 5.15 kB → 5.54 kB `src/shared/rules.ts` | 📈 +132 B (+6.45%) | 2 kB → 2.13 kB `src/server/rules/app.ts` | 📈 +140 B (+4.55%) | 3 kB → 3.14 kB `src/server/rules/rule.ts` | 📈 +107 B (+2.41%) | 4.33 kB → 4.43 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- bundle.api.js | 4.39 MB → 4.39 MB (+4.34 kB) | +0.10% **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <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-06-02 17:05:54 -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#108996