v0.2.2: surface skipped transactions in the transactions list

This commit is contained in:
Bonna
2026-06-08 13:34:14 -05:00
parent 7c253978e2
commit 987b45a56b
4 changed files with 26 additions and 1 deletions

View File

@@ -3,6 +3,10 @@
All notable changes to Moon Household Budget. Newest first. All notable changes to Moon Household Budget. Newest first.
Generated from changelog.json by release.py — do not edit by hand. Generated from changelog.json by release.py — do not edit by hand.
## 0.2.2 — 2026-06-08
- Show a banner and filter for transactions skipped during review that still need a category
## 0.2.1 — 2026-06-06 ## 0.2.1 — 2026-06-06
- Edit bills inline from the bills page - Edit bills inline from the bills page

8
app.py
View File

@@ -822,6 +822,9 @@ def transactions_view():
spending_by_cat = dict(sorted(spending_by_cat.items(), key=lambda x: x[1], reverse=True)) spending_by_cat = dict(sorted(spending_by_cat.items(), key=lambda x: x[1], reverse=True))
week_label = f"Week {current_week_num} ({week_start.strftime('%b %-d')} {week_end.strftime('%b %-d')})" week_label = f"Week {current_week_num} ({week_start.strftime('%b %-d')} {week_end.strftime('%b %-d')})"
# Count skipped (reviewed but no category, not ignored) for the banner
skipped_count = sum(1 for t in transactions if t.get("reviewed") and not t.get("category") and not t.get("ignored"))
# Optional filters from query string # Optional filters from query string
filter_from = request.args.get("from_date", "") filter_from = request.args.get("from_date", "")
filter_to = request.args.get("to_date", "") filter_to = request.args.get("to_date", "")
@@ -840,7 +843,9 @@ def transactions_view():
reviewed = [t for t in reviewed if date_parser.parse(t["date"]).date() <= to_d] reviewed = [t for t in reviewed if date_parser.parse(t["date"]).date() <= to_d]
except Exception: except Exception:
pass pass
if filter_cat: if filter_cat == "__skipped__":
reviewed = [t for t in reviewed if not t.get("category") and not t.get("ignored")]
elif filter_cat:
reviewed = [t for t in reviewed if t.get("category") == filter_cat] reviewed = [t for t in reviewed if t.get("category") == filter_cat]
if filter_search: if filter_search:
q = filter_search.lower() q = filter_search.lower()
@@ -862,6 +867,7 @@ def transactions_view():
week_label=week_label, week_label=week_label,
month_name=cal_mod.month_name[month], month_name=cal_mod.month_name[month],
year=year, month=month, year=year, month=month,
skipped_count=skipped_count,
) )

View File

@@ -1,4 +1,11 @@
[ [
{
"version": "0.2.2",
"date": "2026-06-08",
"changes": [
"Show a banner and filter for transactions skipped during review that still need a category"
]
},
{ {
"version": "0.2.1", "version": "0.2.1",
"date": "2026-06-06", "date": "2026-06-06",

View File

@@ -99,6 +99,13 @@
</details> </details>
{% endif %} {% endif %}
{% if skipped_count %}
<div style="background:#fffbe6;border:1px solid #f5c542;border-radius:var(--radius);padding:0.65rem 1rem;margin-bottom:1rem;display:flex;align-items:center;gap:0.75rem;">
<span>⏭️ <strong>{{ skipped_count }} transaction{{ 's' if skipped_count != 1 else '' }}</strong> still need{{ '' if skipped_count != 1 else 's' }} a category (skipped for now).</span>
<a href="{{ url_for('transactions_view', category='__skipped__') }}" class="btn btn-ghost" style="font-size:0.82rem;padding:0.2rem 0.65rem;">Show them</a>
</div>
{% endif %}
<form method="GET" style="display:flex;gap:0.75rem;align-items:flex-end;flex-wrap:wrap;margin-bottom:1.25rem;background:var(--warm-white);padding:0.85rem 1rem;border-radius:var(--radius);border:1px solid var(--border);"> <form method="GET" style="display:flex;gap:0.75rem;align-items:flex-end;flex-wrap:wrap;margin-bottom:1.25rem;background:var(--warm-white);padding:0.85rem 1rem;border-radius:var(--radius);border:1px solid var(--border);">
<div style="flex:1;min-width:180px;"> <div style="flex:1;min-width:180px;">
<label style="display:block;font-size:0.8rem;margin-bottom:0.2rem;">Search</label> <label style="display:block;font-size:0.8rem;margin-bottom:0.2rem;">Search</label>
@@ -116,6 +123,7 @@
<label style="display:block;font-size:0.8rem;margin-bottom:0.2rem;">Category</label> <label style="display:block;font-size:0.8rem;margin-bottom:0.2rem;">Category</label>
<select name="category" class="budget-input"> <select name="category" class="budget-input">
<option value="">— all —</option> <option value="">— all —</option>
<option value="__skipped__" {% if filter_cat == '__skipped__' %}selected{% endif %}>⏭️ Needs category</option>
{% for cat in categories %} {% for cat in categories %}
<option value="{{ cat }}" {% if filter_cat == cat %}selected{% endif %}>{{ cat }}</option> <option value="{{ cat }}" {% if filter_cat == cat %}selected{% endif %}>{{ cat }}</option>
{% endfor %} {% endfor %}