Skip to content

Release v0.22.4 — flexible recurrence + EV coverage#188

Merged
dannymcc merged 1 commit into
mainfrom
dev
May 17, 2026
Merged

Release v0.22.4 — flexible recurrence + EV coverage#188
dannymcc merged 1 commit into
mainfrom
dev

Conversation

@dannymcc

Copy link
Copy Markdown
Owner

Summary

#184 — Flexible reminder recurrence

Replaces the fixed Monthly / Quarterly / Biannual / Yearly picker with a unit + interval pair, so you can pick things like "every 2 years" for a French MOT or "every 3 months" for a service interval. The form now reads as `Every [N] [unit]`.

Legacy values (`quarterly`, `biannual`) still resolve correctly when reminders created on older versions hit `calculate_next_due_date`, so nothing breaks on upgrade.

#175 — Electric vehicle coverage

The headline bug was that EV vehicles showed £0 in the overview totals because `Vehicle.get_total_cost` only summed fuel + expenses. Fixed plus a broader pass:

  • `get_total_cost` now includes `get_total_charging_cost`.
  • New helpers on `Vehicle`: `get_total_charging_kwh`, `get_average_charging_consumption(distance_unit)` (kWh per 100 distance, fill-to-fill style with proper unit conversion), `get_cost_per_kwh`.
  • Vehicle view swaps "Total Fuel Cost" → "Total Charging Cost" and "Avg. Consumption" → "Avg. Charging (kWh / 100 km)" on pure EVs. Plug-in hybrids see both blocks. Fuel Consumption Trend chart is hidden on pure EVs (matches the reporter's "no need for fuel consumption in EVs").
  • Dashboard surfaces a "Total Charging Cost" card when there's any charging spend.
  • Fuel logs page now shows a "Charging History" section beneath the fuel table — so EV users see their sessions in the same place rather than having to navigate to a separate charging page.

Tests

  • 12 new tests (6 for flexible recurrence including legacy-value compatibility; 6 for EV stats including cross-unit conversion).
  • 583 total passing.

#184 — Reminder recurrence is now a unit (day/week/month/year) plus an
integer interval so users can pick things like "every 2 years" for a
French MOT. Legacy values (quarterly, biannual) still resolve correctly
on read so existing reminders keep working. Form picker is "Every | N |
unit" with help text.

#175 — EV vehicles were showing £0 in their overview because
Vehicle.get_total_cost() only summed fuel + expenses, not charging.
Bigger pass alongside the bug fix:

- get_total_cost now includes charging cost
- New helpers: get_total_charging_kwh, get_average_charging_consumption
  (kWh per 100 distance, with unit conversion), get_cost_per_kwh
- Vehicle view replaces "Total Fuel Cost" with "Total Charging Cost"
  and "Avg. Consumption" with "Avg. Charging (kWh / 100 km)" on pure
  EVs; plug-in hybrids see both blocks. Fuel Consumption Trend chart
  also hidden on pure EVs (matches user feedback "no need for fuel
  consumption in EVs").
- Dashboard surfaces a "Total Charging Cost" card when there's any
  charging spend.
- Fuel logs page now shows a "Charging History" section beneath the
  fuel table so EV users see their sessions in the same place.

Tests: 6 new for flexible recurrence (interval, legacy values, daily /
weekly intervals), 6 new for EV stats (total cost, kWh/100km in km and
mi vehicles, cost per kWh, none on empty, fuel-page surfacing). 583
total passing.

Bump APP_VERSION to 0.22.4.
@dannymcc dannymcc merged commit d86e027 into main May 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant