Resume the most recent session on startup - #395
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe7bfecd2a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| private static activityTimestamp(session: ControlPlaneSessionView): number { | ||
| for (const timestamp of [session.updatedAt, session.createdAt]) { |
There was a problem hiding this comment.
Exclude pin mutations from the activity timestamp
When a user pins or unpins an older session and then restarts, this still selects that session rather than the most recently active one. FileConversationSessionService.setPinned() persists through updatePersisted(), which calls ChatSessionRecords.touch() and replaces updatedAt with the current time, so treating updatedAt as pin-independent activity directly contradicts the new selection policy. Use a timestamp that only tracks conversational activity, or avoid advancing that timestamp for presentation-only metadata.
Useful? React with 👍 / 👎.
Summary
Verification