[PR #7848] Filter tags without hashes #77420

Open
opened 2026-05-16 19:18:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7848
Author: @alecbakholdin
Created: 5/15/2026
Status: 🔄 Open

Base: masterHead: filter-tags-without-hashes


📝 Commits (9)

  • 15255f7 can now filter by tags without hashes
  • 45cde2a extracted a method and added a new hasAnyTags rule
  • 57f9d2a added hasAnyTag, still need to figure out why tests are failing
  • 6991513 fixed unit tests
  • ae6edba release notes
  • eef78a2 fixed based on coderabbit
  • 5894532 tag.toLowerCase()
  • b41f3d5 variable scope fix
  • 54cf344 Merge branch 'master' into filter-tags-without-hashes

📊 Changes

14 files changed (+222 additions, -26 deletions)

View changed files

📝 packages/desktop-client/src/components/filters/FilterExpression.tsx (+2 -1)
📝 packages/desktop-client/src/components/filters/FiltersMenu.tsx (+2 -1)
📝 packages/desktop-client/src/components/filters/updateFilterReducer.ts (+1 -0)
📝 packages/desktop-client/src/components/reports/reports/CustomReport.tsx (+7 -1)
📝 packages/desktop-client/src/components/rules/RuleEditor.tsx (+7 -1)
📝 packages/loot-core/src/server/rules/condition.ts (+13 -2)
📝 packages/loot-core/src/server/rules/rule-utils.ts (+1 -0)
📝 packages/loot-core/src/server/transactions/transaction-rules.test.ts (+134 -7)
📝 packages/loot-core/src/server/transactions/transaction-rules.ts (+19 -10)
📝 packages/loot-core/src/shared/rules.test.ts (+2 -0)
📝 packages/loot-core/src/shared/rules.ts (+5 -2)
packages/loot-core/src/shared/tags.ts (+16 -0)
📝 packages/loot-core/src/types/models/rule.ts (+7 -1)
upcoming-release-notes/7848.md (+6 -0)

📄 Description

Description

This PR accomplishes two things:

  1. Resolves #7798 by adding new "has any tag" filter option, much like how we allow users to specify "category one of ". Also renamed "has tag" to say "has all tags"
  2. Resolves #7797 by allowing both "has***Tags" filters to allow regular words not starting with '#,' meaning that 'tag tag2,' '#tag #tag2,' and 'tag #tag2' filter for the same thing now.
image image

Resolves #7798
Resolves #7797

Testing

Tested filtering in transactions table, rules, and reports

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 33 13.95 MB → 13.96 MB (+795 B) +0.01%
loot-core 1 5.31 MB → 5.31 MB (+761 B) +0.01%
api 2 3.94 MB → 3.94 MB (+744 B) +0.02%
cli 1 7.97 MB 0%
crdt 1 11.12 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
33 13.95 MB → 13.96 MB (+795 B) +0.01%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/tags.ts 🆕 +379 B 0 B → 379 B
home/runner/work/actual/actual/packages/loot-core/src/server/rules/condition.ts 📈 +231 B (+2.90%) 7.78 kB → 8 kB
src/components/filters/updateFilterReducer.ts 📈 +29 B (+2.53%) 1.12 kB → 1.15 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts 📈 +80 B (+1.09%) 7.17 kB → 7.24 kB
src/components/filters/FilterExpression.tsx 📈 +22 B (+0.38%) 5.73 kB → 5.75 kB
src/components/filters/FiltersMenu.tsx 📈 +22 B (+0.10%) 21.67 kB → 21.7 kB
src/components/rules/RuleEditor.tsx 📈 +17 B (+0.04%) 46.89 kB → 46.9 kB
src/components/reports/reports/CustomReport.tsx 📈 +15 B (+0.04%) 41.84 kB → 41.85 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/Value.js 4.96 MB → 4.96 MB (+707 B) +0.01%
static/js/chart-theme.js 800.08 kB → 800.15 kB (+73 B) +0.01%
static/js/ReportRouter.js 1.22 MB → 1.22 MB (+15 B) +0.00%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 2.01 MB 0%
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 962.55 kB 0%
static/js/ScheduleEditForm.js 146.45 kB 0%
static/js/TransactionEdit.js 190.43 kB 0%
static/js/TransactionList.js 85.81 kB 0%
static/js/bankSyncUtils.js 54.15 kB 0%
static/js/ca.js 187.72 kB 0%
static/js/client.js 451.37 kB 0%
static/js/da.js 101.28 kB 0%
static/js/de.js 170.38 kB 0%
static/js/en-GB.js 10.01 kB 0%
static/js/en.js 193.42 kB 0%
static/js/es.js 178.83 kB 0%
static/js/extends.js 519.29 kB 0%
static/js/fr.js 178.71 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 165.13 kB 0%
static/js/narrow.js 364.2 kB 0%
static/js/nb-NO.js 148.19 kB 0%
static/js/nl.js 106.34 kB 0%
static/js/pt-BR.js 189.39 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 174.62 kB 0%
static/js/theme.js 31.67 kB 0%
static/js/uk.js 207.56 kB 0%
static/js/useFormatList.js 4.96 kB 0%
static/js/wide.js 453 B 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 117.75 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.31 MB → 5.31 MB (+761 B) +0.01%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/tags.ts 🆕 +391 B 0 B → 391 B
home/runner/work/actual/actual/packages/loot-core/src/server/rules/condition.ts 📈 +235 B (+2.78%) 8.25 kB → 8.48 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts 📈 +30 B (+1.39%) 2.1 kB → 2.13 kB
home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts 📈 +89 B (+0.41%) 21.09 kB → 21.17 kB
home/runner/work/actual/actual/packages/loot-core/src/server/rules/rule-utils.ts 📈 +16 B (+0.34%) 4.64 kB → 4.66 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
kcab.worker.Bbtc-Ivb.js 0 B → 5.31 MB (+5.31 MB) -

Removed

Asset File Size % Changed
kcab.worker.CT6IRZbP.js 5.31 MB → 0 B (-5.31 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
2 3.94 MB → 3.94 MB (+744 B) +0.02%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/tags.ts 🆕 +379 B 0 B → 379 B
home/runner/work/actual/actual/packages/loot-core/src/server/rules/condition.ts 📈 +231 B (+2.90%) 7.77 kB → 8 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts 📈 +29 B (+1.42%) 2 kB → 2.03 kB
home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts 📈 +90 B (+0.43%) 20.57 kB → 20.66 kB
home/runner/work/actual/actual/packages/loot-core/src/server/rules/rule-utils.ts 📈 +15 B (+0.33%) 4.47 kB → 4.49 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 3.94 MB → 3.94 MB (+744 B) +0.02%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
models.js 0 B 0%

cli

Total

Files count Total bundle size % Changed
1 7.97 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
cli.js 7.97 MB 0%

crdt

Total

Files count Total bundle size % Changed
1 11.12 kB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 11.12 kB 0%

🔄 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/7848 **Author:** [@alecbakholdin](https://github.com/alecbakholdin) **Created:** 5/15/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `filter-tags-without-hashes` --- ### 📝 Commits (9) - [`15255f7`](https://github.com/actualbudget/actual/commit/15255f794c1107e659a42aa39cd9b447040066ce) can now filter by tags without hashes - [`45cde2a`](https://github.com/actualbudget/actual/commit/45cde2a986d8a4d0631ea7a8f6989bfc401c8cc2) extracted a method and added a new hasAnyTags rule - [`57f9d2a`](https://github.com/actualbudget/actual/commit/57f9d2a74d6302b721216bc46c5695c048f35b71) added hasAnyTag, still need to figure out why tests are failing - [`6991513`](https://github.com/actualbudget/actual/commit/69915134f886ddbd75884b1e8344a56f7ec807c3) fixed unit tests - [`ae6edba`](https://github.com/actualbudget/actual/commit/ae6edba9855b5eef00c81210a020b3e15bbdba3e) release notes - [`eef78a2`](https://github.com/actualbudget/actual/commit/eef78a22b8ef83d2b8a1934b6279413bf00ef55a) fixed based on coderabbit - [`5894532`](https://github.com/actualbudget/actual/commit/58945327be5b00aaf546c8a6418eaa1423157c35) tag.toLowerCase() - [`b41f3d5`](https://github.com/actualbudget/actual/commit/b41f3d57446b88b3f697fadd25d6152babbce06d) variable scope fix - [`54cf344`](https://github.com/actualbudget/actual/commit/54cf3445e00ed9197f6778588e5b60290530e160) Merge branch 'master' into filter-tags-without-hashes ### 📊 Changes **14 files changed** (+222 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/filters/FilterExpression.tsx` (+2 -1) 📝 `packages/desktop-client/src/components/filters/FiltersMenu.tsx` (+2 -1) 📝 `packages/desktop-client/src/components/filters/updateFilterReducer.ts` (+1 -0) 📝 `packages/desktop-client/src/components/reports/reports/CustomReport.tsx` (+7 -1) 📝 `packages/desktop-client/src/components/rules/RuleEditor.tsx` (+7 -1) 📝 `packages/loot-core/src/server/rules/condition.ts` (+13 -2) 📝 `packages/loot-core/src/server/rules/rule-utils.ts` (+1 -0) 📝 `packages/loot-core/src/server/transactions/transaction-rules.test.ts` (+134 -7) 📝 `packages/loot-core/src/server/transactions/transaction-rules.ts` (+19 -10) 📝 `packages/loot-core/src/shared/rules.test.ts` (+2 -0) 📝 `packages/loot-core/src/shared/rules.ts` (+5 -2) ➕ `packages/loot-core/src/shared/tags.ts` (+16 -0) 📝 `packages/loot-core/src/types/models/rule.ts` (+7 -1) ➕ `upcoming-release-notes/7848.md` (+6 -0) </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://actualbudget.org/docs/contributing/#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> ## Description This PR accomplishes two things: 1. Resolves #7798 by adding new "has any tag" filter option, much like how we allow users to specify "category one of <category>". Also renamed "has tag" to say "has all tags" 2. Resolves #7797 by allowing both "has***Tags" filters to allow regular words not starting with '#,' meaning that 'tag tag2,' '#tag #tag2,' and 'tag #tag2' filter for the same thing now. <img width="645" height="529" alt="image" src="https://github.com/user-attachments/assets/16dd1c7e-1c37-497a-adfb-444069e3c886" /> <img width="665" height="391" alt="image" src="https://github.com/user-attachments/assets/af617f2c-b3b8-4018-87ec-c6ae56d88952" /> ## Related issue(s) Resolves #7798 Resolves #7797 ## Testing Tested filtering in transactions table, rules, and reports ## Checklist - [x] Release notes added (see link above) - [x] No obvious regressions in affected areas - [x] Self-review has been performed - I understand what each change in the code does and why it is needed <!--- actual-bot-sections ---> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 33 | 13.95 MB → 13.96 MB (+795 B) | +0.01% loot-core | 1 | 5.31 MB → 5.31 MB (+761 B) | +0.01% api | 2 | 3.94 MB → 3.94 MB (+744 B) | +0.02% cli | 1 | 7.97 MB | 0% crdt | 1 | 11.12 kB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 33 | 13.95 MB → 13.96 MB (+795 B) | +0.01% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/shared/tags.ts` | 🆕 +379 B | 0 B → 379 B `home/runner/work/actual/actual/packages/loot-core/src/server/rules/condition.ts` | 📈 +231 B (+2.90%) | 7.78 kB → 8 kB `src/components/filters/updateFilterReducer.ts` | 📈 +29 B (+2.53%) | 1.12 kB → 1.15 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts` | 📈 +80 B (+1.09%) | 7.17 kB → 7.24 kB `src/components/filters/FilterExpression.tsx` | 📈 +22 B (+0.38%) | 5.73 kB → 5.75 kB `src/components/filters/FiltersMenu.tsx` | 📈 +22 B (+0.10%) | 21.67 kB → 21.7 kB `src/components/rules/RuleEditor.tsx` | 📈 +17 B (+0.04%) | 46.89 kB → 46.9 kB `src/components/reports/reports/CustomReport.tsx` | 📈 +15 B (+0.04%) | 41.84 kB → 41.85 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/Value.js | 4.96 MB → 4.96 MB (+707 B) | +0.01% static/js/chart-theme.js | 800.08 kB → 800.15 kB (+73 B) | +0.01% static/js/ReportRouter.js | 1.22 MB → 1.22 MB (+15 B) | +0.00% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 2.01 MB | 0% static/js/BackgroundImage.js | 121.09 kB | 0% static/js/FormulaEditor.js | 962.55 kB | 0% static/js/ScheduleEditForm.js | 146.45 kB | 0% static/js/TransactionEdit.js | 190.43 kB | 0% static/js/TransactionList.js | 85.81 kB | 0% static/js/bankSyncUtils.js | 54.15 kB | 0% static/js/ca.js | 187.72 kB | 0% static/js/client.js | 451.37 kB | 0% static/js/da.js | 101.28 kB | 0% static/js/de.js | 170.38 kB | 0% static/js/en-GB.js | 10.01 kB | 0% static/js/en.js | 193.42 kB | 0% static/js/es.js | 178.83 kB | 0% static/js/extends.js | 519.29 kB | 0% static/js/fr.js | 178.71 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 165.13 kB | 0% static/js/narrow.js | 364.2 kB | 0% static/js/nb-NO.js | 148.19 kB | 0% static/js/nl.js | 106.34 kB | 0% static/js/pt-BR.js | 189.39 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 174.62 kB | 0% static/js/theme.js | 31.67 kB | 0% static/js/uk.js | 207.56 kB | 0% static/js/useFormatList.js | 4.96 kB | 0% static/js/wide.js | 453 B | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% static/js/zh-Hans.js | 117.75 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.31 MB → 5.31 MB (+761 B) | +0.01% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/shared/tags.ts` | 🆕 +391 B | 0 B → 391 B `home/runner/work/actual/actual/packages/loot-core/src/server/rules/condition.ts` | 📈 +235 B (+2.78%) | 8.25 kB → 8.48 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts` | 📈 +30 B (+1.39%) | 2.1 kB → 2.13 kB `home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts` | 📈 +89 B (+0.41%) | 21.09 kB → 21.17 kB `home/runner/work/actual/actual/packages/loot-core/src/server/rules/rule-utils.ts` | 📈 +16 B (+0.34%) | 4.64 kB → 4.66 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.Bbtc-Ivb.js | 0 B → 5.31 MB (+5.31 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.CT6IRZbP.js | 5.31 MB → 0 B (-5.31 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 ----------- | ----------------- | --------- 2 | 3.94 MB → 3.94 MB (+744 B) | +0.02% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/shared/tags.ts` | 🆕 +379 B | 0 B → 379 B `home/runner/work/actual/actual/packages/loot-core/src/server/rules/condition.ts` | 📈 +231 B (+2.90%) | 7.77 kB → 8 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts` | 📈 +29 B (+1.42%) | 2 kB → 2.03 kB `home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts` | 📈 +90 B (+0.43%) | 20.57 kB → 20.66 kB `home/runner/work/actual/actual/packages/loot-core/src/server/rules/rule-utils.ts` | 📈 +15 B (+0.33%) | 4.47 kB → 4.49 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 ----- | --------- | --------- index.js | 3.94 MB → 3.94 MB (+744 B) | +0.02% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- models.js | 0 B | 0% </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.97 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- cli.js | 7.97 MB | 0% </div> </details> --- #### crdt **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 11.12 kB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- index.js | 11.12 kB | 0% </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-05-16 19:18:49 -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#77420