From 1c89e690308512c558ad45cd0de4e820629b63c7 Mon Sep 17 00:00:00 2001 From: Padreug Date: Sat, 6 Jun 2026 20:47:27 +0200 Subject: [PATCH 1/2] feat(api): include voided transactions in user-entries endpoint The /api/v1/entries/user view was silently dropping any transaction tagged 'voided', so users couldn't see entries that had been rejected against their accounts. Per the libra reject convention, voided entries keep the '!' flag and carry a 'voided' tag for audit; clients can use the tag to style them distinctly. Pending-approval listing still filters voided. Co-Authored-By: Claude Opus 4.7 (1M context) --- views_api.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/views_api.py b/views_api.py index d31f881..90aabf1 100644 --- a/views_api.py +++ b/views_api.py @@ -486,10 +486,6 @@ async def api_get_user_entries( if e.get("flag") in _SYNTHETIC_FLAGS: continue - # Skip voided transactions - if "voided" in e.get("tags", []): - continue - # Extract user ID from metadata or account names user_id_match = None entry_meta = e.get("meta", {}) From 781059af5fb633071596c9b06a18ea8b0fc194b1 Mon Sep 17 00:00:00 2001 From: Padreug Date: Sat, 6 Jun 2026 20:47:42 +0200 Subject: [PATCH 2/2] fix(dashboard): detect voided rows by tag, not by flag char The admin transactions table assumed voided entries used flag='x', but the libra reject convention keeps the '!' flag and appends a 'voided' tag. Without this, the dashboard rendered voided rows as orange 'Pending' once they started reaching it. Detect via tag and give the voided icon precedence over the flag-based branch. Co-Authored-By: Claude Opus 4.7 (1M context) --- static/js/index.js | 4 ++++ templates/libra/index.html | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/static/js/index.js b/static/js/index.js index 3905bf3..418ec41 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -1707,6 +1707,10 @@ window.app = Vue.createApp({ if (entry.tags && entry.tags.includes('equity-contribution')) return true if (entry.account && entry.account.includes('Equity')) return true return false + }, + isVoided(entry) { + // Voided entries keep '!' flag and carry a 'voided' tag (libra convention). + return Array.isArray(entry.tags) && entry.tags.includes('voided') } }, async created() { diff --git a/templates/libra/index.html b/templates/libra/index.html index 01de17a..0de0e71 100644 --- a/templates/libra/index.html +++ b/templates/libra/index.html @@ -497,7 +497,10 @@