Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54be5523fc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| conn.execute( | ||
| "UPDATE reviews SET commit_sha = ?1, updated_at = ?2 WHERE id = ?3", | ||
| params![commit_sha, now_timestamp(), id], | ||
| "UPDATE reviews SET commit_sha = ?1, updated_at = ?2, completed_at = COALESCE(completed_at, ?3) WHERE id = ?4", |
There was a problem hiding this comment.
Avoid marking reviews completed in update_review_commit_sha
drain_queued_sessions always calls update_review_commit_sha before the queued review session starts (see session_commands.rs), but this update now also sets completed_at via COALESCE. That marks queued reviews as completed at drain/start time, and later completion cannot fix the timestamp because COALESCE preserves the earlier value, so timeline ordering by completedAt will be wrong for queued reviews.
Useful? React with 👍 / 👎.
| UPDATE notes SET completed_at = updated_at WHERE content != ''; | ||
|
|
||
| ALTER TABLE reviews ADD COLUMN completed_at INTEGER; | ||
| UPDATE reviews SET completed_at = updated_at WHERE title IS NOT NULL; |
There was a problem hiding this comment.
Backfill completed_at for reviews without titles
The migration only backfills reviews.completed_at when title IS NOT NULL, but completed reviews can legitimately have no title (the review parser can fail title extraction while still saving comments), so those rows remain NULL after upgrade and will keep sorting by createdAt instead of completion time. This leaves part of existing data in the old incorrect ordering behavior.
Useful? React with 👍 / 👎.
826dbd7 to
3fcb6d1
Compare
Add write-once completion timestamps for notes, reviews, and project notes so timeline ordering reflects when items actually finished instead of when they were queued or later touched. Also align displayed times with completion sorting, restamp adopted auto reviews when they become visible, and cover the new behavior with migration and store tests.
37dc5d7 to
d834f02
Compare
Summary
completed_atcolumn to commits, notes, and reviews tables to track when AI sessions finish producing itemscompleted_at(falling back tocreatedAt) for timeline sorting so that items still being generated (queued/in-progress) naturally sort before completed items instead of appearing interleaved based on creation timeupdated_atas the best approximationTest plan
completed_atcorrectly🤖 Generated with Claude Code