Skip to content

fix(app): sort session list by updated time instead of id#17526

Closed
education-01 wants to merge 1 commit intoanomalyco:devfrom
education-01:fix-session-sort-updated
Closed

fix(app): sort session list by updated time instead of id#17526
education-01 wants to merge 1 commit intoanomalyco:devfrom
education-01:fix-session-sort-updated

Conversation

@education-01
Copy link
Copy Markdown

Summary

  • Fix session list sorting to use time.updated (with time.created fallback) instead of id
  • Change two sort comparators in global-sync.tsx and session-trim.ts

Why

Fixes #17474 - Session list was sorted by id, making the order appear random.

Changes

  • packages/app/src/context/global-sync.tsx: Use (b.time.updated ?? b.time.created) - (a.time.updated ?? a.time.created) for sorting
  • packages/app/src/context/global-sync/session-trim.ts: Use existing compareSessionRecent() function for sorting

The compareSessionRecent helper already implements correct recency ordering with id tiebreaker.

@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found two related/duplicate PRs addressing the same session sorting issue:

  1. PR [FIX] session list should be sorted by updated time, not id #17524 - [FIX] session list should be sorted by updated time, not id

  2. PR fix(app): session listing sorted by update time rather than id #17475 - fix(app): session listing sorted by update time rather than id

Both PRs are addressing the same core issue: sorting sessions by updated time instead of ID, which is exactly what PR #17526 (the current PR) is attempting to fix. These are likely duplicates or related attempts to solve issue #17474.

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

Labels

needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App: session list sorted by id rather than updated time

1 participant