Skip to content

Enhancement: configurable period ordering (--order parameter or config entry) #57

Description

@PeGa

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions