Skip to content

feat(sidebar): show update time instead of creation time#1089

Open
abdulbari149 wants to merge 1 commit intopingdotgg:mainfrom
abdulbari149:feature/sidebar-show-update-time
Open

feat(sidebar): show update time instead of creation time#1089
abdulbari149 wants to merge 1 commit intopingdotgg:mainfrom
abdulbari149:feature/sidebar-show-update-time

Conversation

@abdulbari149
Copy link

@abdulbari149 abdulbari149 commented Mar 14, 2026

What Changed

  • Thread type (types.ts): Added updatedAt to the Thread interface.
  • Store (store.ts): In syncServerReadModel, pass thread.updatedAt from the server read model into client state.
  • Sidebar (Sidebar.tsx): Use thread.updatedAt ?? thread.createdAt for the timestamp label and for sorting threads.
  • Sidebar.logic (Sidebar.logic.ts): Added compareThreadsByLastActivity and ThreadSortInput for sorting threads by last activity.
  • Tests: Updated store.test.ts, worktreeCleanup.test.ts, and ChatView.logic.ts to include updatedAt. Added tests for compareThreadsByLastActivity in Sidebar.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.
image

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

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Show last update time instead of creation time in sidebar thread list

  • Adds updatedAt to the Thread interface and maps it from the server read model in store.ts.
  • Introduces compareThreadsByLastActivity in Sidebar.logic.ts to sort threads by updatedAt (falling back to createdAt), with id as a tiebreaker.
  • Updates the sidebar thread list and focusMostRecentThreadForProject to use the new comparator and display updatedAt when available.
  • Behavioral Change: thread sort order and focused thread on project switch may change for threads that have been updated after creation.

Macroscope summarized fcd6d06.

- 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
@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3a13576f-39db-456b-9de1-3e2a516ecb7a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant