Current behavior
Period listings (focus past list, report views) use id-based ordering. Sessions are ordered by the order they were logged.
Enhancement
Allow users to choose ordering preference:
- id-based (current): sessions ordered by logging order
- time-based: sessions ordered by session date/time
Could be:
- A
--order parameter on relevant commands
- A config entry in
.env to set the default
- Both (config sets default,
--order overrides)
Rationale
Session date is authoritative for when work happened. Id-based ordering is a valid before/after signal, but time-based ordering respects the session date directly. The choice is about presentation neatness, not correctness — the tool doesn't need to enforce one or the other.
Material
services/period.sh: get_period_window (id-based)
services/database.sh: list_sessions_by_id_range, list_sessions_by_date_range
ORDER BY COALESCE(NULLIF(session_date,''), start_time) as the time-based alternative
Labels
enhancement
Current behavior
Period listings (
focus past list, report views) use id-based ordering. Sessions are ordered by the order they were logged.Enhancement
Allow users to choose ordering preference:
Could be:
--orderparameter on relevant commands.envto set the default--orderoverrides)Rationale
Session date is authoritative for when work happened. Id-based ordering is a valid before/after signal, but time-based ordering respects the session date directly. The choice is about presentation neatness, not correctness — the tool doesn't need to enforce one or the other.
Material
services/period.sh:get_period_window(id-based)services/database.sh:list_sessions_by_id_range,list_sessions_by_date_rangeORDER BY COALESCE(NULLIF(session_date,''), start_time)as the time-based alternativeLabels
enhancement