Skip to content

Sort chat recents by last activity#6844

Open
NilayYadav wants to merge 1 commit into
unslothai:mainfrom
NilayYadav:chat-recents-sort
Open

Sort chat recents by last activity#6844
NilayYadav wants to merge 1 commit into
unslothai:mainfrom
NilayYadav:chat-recents-sort

Conversation

@NilayYadav

Copy link
Copy Markdown
Contributor

Adds an updatedAt field to chat threads that gets bumped whenever a message is written. The Recents sidebar now sorts by last activity instead of creation time, so continuing an old chat bubbles it to the top.

  • Backend: new updated_at column with migration backfill from existing messages
  • Frontend: sorts sidebar items by updatedAt ?? createdAt; compare pairs take the newest activity across both panes
  • Empty state in the sidebar only renders after the first fetch resolves, preventing a flash on load

@NilayYadav NilayYadav requested a review from danielhanchen as a code owner July 3, 2026 15:09
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an updatedAt field to chat threads to track and sort by the last activity time (e.g., when messages are added or synced). It includes backend database schema updates, a migration to backfill existing threads, API model adjustments, and frontend updates to sort threads by updatedAt and display a "No chats yet" message when the sidebar is empty. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant