Skip to content

Conversation

@DylanDevelops
Copy link
Owner

Pull Request Checklist

  • I have read and followed the contribution guidelines.
  • My pull request targets the main branch of tmpo.
  • I have tested these changes locally on my machine.

Closes #21

Description

This pull request introduces pause and resume functionality to the time tracking CLI, allowing users to temporarily stop and later continue tracking their work without losing context. It adds new commands, updates documentation, and enhances the database layer to support resuming the most recent session. The most important changes are:

New CLI Commands:

  • Added pause command (cmd/pause.go) to stop the current time entry, display session duration, and instruct the user to use resume to continue tracking.
  • Added resume command (cmd/resume.go) to start a new time entry with the same project and description as the last stopped session, with appropriate user feedback and error handling.

Database Enhancements:

  • Implemented GetLastStoppedEntry in internal/storage/db.go to retrieve the most recently stopped (non-running) time entry, supporting the resume feature.
  • Added comprehensive tests for GetLastStoppedEntry to ensure correct behavior under various conditions.

Documentation Updates:

  • Expanded docs/usage.md with sections on using pause and resume, including examples, workflow tips, and explanations of how the features work. [1] [2]
  • Minor formatting and clarity improvements in documentation.

Screenshots

Screenshot 2025-12-18 at 11 48 05 PM

Introduces `pause` and `resume` commands to allow users to pause the current time tracking session and resume it later with the same project and description. Updates documentation to explain the new workflow and use cases. Adds `GetLastStoppedEntry` to the database layer and corresponding tests to support resuming the most recent stopped session.
@DylanDevelops DylanDevelops merged commit c780013 into main Dec 19, 2025
6 checks passed
@DylanDevelops DylanDevelops deleted the ravel/pause-resume-functionality branch December 19, 2025 06:50
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.

tmpo pause and tmpo resume Commands

2 participants