Filter out Beancount summarization entries from Recent Transactions #3

Open
opened 2026-01-02 19:53:30 +00:00 by padreug · 0 comments
Owner

Problem

The "Recent Transactions" card in the Castle UI is showing Beancount summarization/opening balance entries that shouldn't appear to users.

Examples from UI

The following entries are showing in Recent Transactions (all dated 12/17/2025, 0 sats):

User Description Fiat Amount
- Opening balance for 'Assets:Cash' (Summarization) €5,089.49
- Opening balance for 'Assets:FixedAssets:Equipment' (Summarization) €3,300.36
- Opening balance for 'Assets:FixedAssets:FarmEquipment' (Summarization) €8,641.30
- Opening balance for 'Assets:FixedAssets:Network' (Summarization) €481.66
- Opening balance for 'Assets:Inventory' (Summarization) €2,955.67
- Opening balance for 'Assets:Livestock' (Summarization) €60.00
alice Opening balance for 'Assets:Receivable:User-cfe378b3' (Summarization) €1,856.75
bob Opening balance for 'Assets:Receivable:User-e2598a84' (Summarization) €520.00
- Opening balance for 'Assets:Tools' (Summarization) €433.41
- Opening balance for 'Equity:Earnings:Previous' (Summarization) €11,408.02

These are internal Beancount entries created during ledger summarization/closing, not actual user transactions.

Expected Behavior

Recent Transactions should only show actual transactions:

  • Expenses
  • Receivables
  • Payments/Settlements
  • Revenue entries

Suggested Fix

Filter out entries in the journal query that match summarization patterns:

  • Entries with "(Summarization)" in the narration
  • Entries with S flag (Beancount's summarize flag)
  • Or filter by checking for ^castle- or ^exp- / ^rcv- links (real Castle entries have these)

Affected Code

Likely in views_api.py where journal entries are fetched, or in fava_client.py query methods.

## Problem The "Recent Transactions" card in the Castle UI is showing Beancount summarization/opening balance entries that shouldn't appear to users. ### Examples from UI The following entries are showing in Recent Transactions (all dated 12/17/2025, 0 sats): | User | Description | Fiat Amount | |------|-------------|-------------| | - | Opening balance for 'Assets:Cash' (Summarization) | €5,089.49 | | - | Opening balance for 'Assets:FixedAssets:Equipment' (Summarization) | €3,300.36 | | - | Opening balance for 'Assets:FixedAssets:FarmEquipment' (Summarization) | €8,641.30 | | - | Opening balance for 'Assets:FixedAssets:Network' (Summarization) | €481.66 | | - | Opening balance for 'Assets:Inventory' (Summarization) | €2,955.67 | | - | Opening balance for 'Assets:Livestock' (Summarization) | €60.00 | | alice | Opening balance for 'Assets:Receivable:User-cfe378b3' (Summarization) | €1,856.75 | | bob | Opening balance for 'Assets:Receivable:User-e2598a84' (Summarization) | €520.00 | | - | Opening balance for 'Assets:Tools' (Summarization) | €433.41 | | - | Opening balance for 'Equity:Earnings:Previous' (Summarization) | €11,408.02 | These are internal Beancount entries created during ledger summarization/closing, not actual user transactions. ## Expected Behavior Recent Transactions should only show actual transactions: - Expenses - Receivables - Payments/Settlements - Revenue entries ## Suggested Fix Filter out entries in the journal query that match summarization patterns: - Entries with "(Summarization)" in the narration - Entries with `S` flag (Beancount's summarize flag) - Or filter by checking for `^castle-` or `^exp-` / `^rcv-` links (real Castle entries have these) ## Affected Code Likely in `views_api.py` where journal entries are fetched, or in `fava_client.py` query methods.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: aiolabs/castle#3
No description provided.