Skip to content

Comments

Sort multiple resume session by created_at asc#447

Open
Soph wants to merge 1 commit intomainfrom
soph/resume-session-ordering
Open

Sort multiple resume session by created_at asc#447
Soph wants to merge 1 commit intomainfrom
soph/resume-session-ordering

Conversation

@Soph
Copy link
Collaborator

@Soph Soph commented Feb 20, 2026

No description provided.

Entire-Checkpoint: ca22077c95e2
Copilot AI review requested due to automatic review settings February 20, 2026 19:53
@Soph Soph requested a review from a team as a code owner February 20, 2026 19:53
@cursor
Copy link

cursor bot commented Feb 20, 2026

PR Summary

Low Risk
Behavior-only change to CLI display ordering for multi-session resumes; minimal risk aside from potentially different ordering if timestamps are missing/incorrect.

Overview
Improves multi-session resume output by ordering restored sessions by their metadata CreatedAt timestamp so the most recent session is consistently shown last/marked “most recent”, even when checkpoint subdirectory indices are out of order.

Extends strategy.RestoredSession to include CreatedAt, and populates it during ManualCommitStrategy.RestoreLogsOnly so resume can sort sessions deterministically before printing per-session resume commands.

Written by Cursor Bugbot for commit 7df74ed. Configure here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the display order of multiple sessions during resume operations. Previously, sessions were displayed in subdirectory index order which didn't reflect their actual chronological creation order. Now sessions are sorted by their CreatedAt timestamp in ascending order, ensuring the most recent session is displayed last.

Changes:

  • Added CreatedAt field to RestoredSession struct to track session creation time
  • Populated CreatedAt from checkpoint metadata in ManualCommitStrategy.RestoreLogsOnly
  • Sorted sessions by CreatedAt in ascending order before displaying resume commands

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
cmd/entire/cli/strategy/strategy.go Added CreatedAt field to RestoredSession struct with documentation
cmd/entire/cli/strategy/manual_commit_rewind.go Populated CreatedAt field from session metadata during restore
cmd/entire/cli/resume.go Added sorting logic to order sessions by creation time before display

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant