fix(app): sort session list by updated time instead of id#17526
fix(app): sort session list by updated time instead of id#17526education-01 wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
|
The following comment was made by an LLM, it may be inaccurate: I found two related/duplicate PRs addressing the same session sorting issue:
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. |
Summary
time.updated(withtime.createdfallback) instead ofidglobal-sync.tsxandsession-trim.tsWhy
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 sortingpackages/app/src/context/global-sync/session-trim.ts: Use existingcompareSessionRecent()function for sortingThe
compareSessionRecenthelper already implements correct recency ordering with id tiebreaker.