Skip to content

Release v0.38.2 - #332

Merged
dannymcc merged 2 commits into
mainfrom
dev
Aug 25, 2026
Merged

Release v0.38.2#332
dannymcc merged 2 commits into
mainfrom
dev

Conversation

@dannymcc

@dannymcc dannymcc commented Aug 25, 2026

Copy link
Copy Markdown
Owner

0.38.2

A small fix to how charging sessions are ordered.

Fixes

  • Charging sessions logged on the same date are now listed in odometer order, the highest reading first, rather than in whatever order the database happened to return them. A session's date carries no time of day, so several charges on one day could appear out of sequence and the reading on the top row was not necessarily the vehicle's latest — easy to hit on a plug-in hybrid. The list is still ordered by date, most recent first. A session with no odometer recorded has nothing to order by, so it stays wherever the database puts it within that date. Thanks to the reporter of #329. This is the same fix #325 made for trips.

Other

  • README now describes the ordering of the charging list.

Note that the ordering applies to the charging list page. Charging sessions shown on the vehicle timeline and in the charging block on the fuel log page are still ordered by date alone.

Summary by CodeRabbit

  • Bug Fixes

    • Charging sessions on the same date are now listed by odometer reading, highest first.
    • Date remains the primary sorting criterion, with sessions lacking odometer readings retaining database order.
  • Documentation

    • Added guidance for recording electric and plug-in hybrid charging sessions, including energy, charge level, costs, charger details and ordering.
  • Release

    • Updated the application version to 0.38.2.

Harness and others added 2 commits August 24, 2026 23:49
The charging list ordered strictly by date, which carries no time of
day, so several sessions logged on one day came back in insertion order
and the reading on the top row was not necessarily the vehicle's latest.
Plug-in hybrids hit this routinely. Add odometer as a secondary sort key,
mirroring the fix made for trips in #325.

Closes #329

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dannymcc
dannymcc merged commit e7034e2 into main Aug 25, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f2c8f68-8a60-4268-94e2-f5e6493b0f35

📥 Commits

Reviewing files that changed from the base of the PR and between 05c2d3d and ccb2f5a.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • README.md
  • app/routes/charging.py
  • config.py
  • tests/test_charging.py

📝 Walkthrough

Walkthrough

Charging session listings now sort by date descending, then odometer descending for matching dates. Tests cover both ordering rules. The README and changelog document the behaviour, and the application version changes to 0.38.2.

Changes

Charging session ordering

Layer / File(s) Summary
Charging ordering and validation
app/routes/charging.py, tests/test_charging.py, README.md
The query applies odometer descending after date descending. Tests verify same-day and date-first ordering. The README documents charging session fields and list ordering.
Release metadata
config.py, CHANGELOG.md
APP_VERSION changes to 0.38.2. The changelog records the ordering behaviour, including sessions without odometer readings.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Trips - odometer sorting

1 participant