Skip to content

refactor: tmpo backup list now displays backups in chronological order#127

Merged
DylanDevelops merged 2 commits into
mainfrom
tmpo-backup-list-order
Jun 4, 2026
Merged

refactor: tmpo backup list now displays backups in chronological order#127
DylanDevelops merged 2 commits into
mainfrom
tmpo-backup-list-order

Conversation

@DylanDevelops

Copy link
Copy Markdown
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.

Description

This pull request updates the backup listing functionality to sort and display backups in oldest-to-newest order (instead of newest-to-oldest), and updates the CLI output to clearly indicate the latest backup. The test suite and documentation are also updated to match this new behavior.

Backup ordering and display changes:

  • Changed the ListBackups function in internal/storage/backup.go to return backups sorted oldest-first (1 = oldest), instead of newest-first. This includes updating the sorting logic and the function's documentation comment. [1] [2]
  • Updated the CLI output in cmd/backups/list.go to add a "← latest" tag next to the most recent (latest) backup, making it clear to users which backup is the newest.

Test and documentation updates:

  • Renamed and updated the test TestListBackups_SortedNewestFirst to TestListBackups_SortedOldestFirst in internal/storage/backup_test.go, and adjusted assertions to expect oldest-first order. [1] [2]

@DylanDevelops DylanDevelops merged commit 5e9702b into main Jun 4, 2026
5 checks passed
@DylanDevelops DylanDevelops deleted the tmpo-backup-list-order branch June 4, 2026 03:00
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