feat(sidebar): show update time instead of creation time#1089
feat(sidebar): show update time instead of creation time#1089abdulbari149 wants to merge 1 commit intopingdotgg:mainfrom
Conversation
- Add updatedAt to Thread type and pass through from store sync - Display thread.updatedAt (fallback to createdAt) in sidebar - Sort threads by updatedAt for most-recently-active-first order - Extract compareThreadsByLastActivity to Sidebar.logic with tests
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can use oxc to improve the quality of JavaScript and TypeScript code reviews.Add a configuration file to your project to customize how CodeRabbit runs oxc. |
What Changed
types.ts): AddedupdatedAtto theThreadinterface.store.ts): InsyncServerReadModel, passthread.updatedAtfrom the server read model into client state.Sidebar.tsx): Usethread.updatedAt ?? thread.createdAtfor the timestamp label and for sorting threads.Sidebar.logic.ts): AddedcompareThreadsByLastActivityandThreadSortInputfor sorting threads by last activity.store.test.ts,worktreeCleanup.test.ts, andChatView.logic.tsto includeupdatedAt. Added tests forcompareThreadsByLastActivityinSidebar.logic.test.ts.Why
The sidebar previously showed the thread creation time instead of the last activity time. Users expect threads to be ordered by when they were last used.
The server already maintains thread.updatedAt and updates it on messages, turns, and session changes. This change surfaces that field on the client and uses it for display and sorting.
UI Changes
Before: Sidebar showed creation time (e.g. "4d ago"). Threads were ordered by creation time.

After: Sidebar shows last activity time (e.g. "5m ago"). Threads are ordered by last activity (most recent first).

Checklist
Note
Show last update time instead of creation time in sidebar thread list
updatedAtto theThreadinterface and maps it from the server read model in store.ts.compareThreadsByLastActivityin Sidebar.logic.ts to sort threads byupdatedAt(falling back tocreatedAt), withidas a tiebreaker.focusMostRecentThreadForProjectto use the new comparator and displayupdatedAtwhen available.Macroscope summarized fcd6d06.