Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
- Last reviewed commit: 7fc68b494716a22c5f30c260def4517715111ea0
- Latest commit, not reviewed: 42197a9b0825e4218fae3482667b0df46c9f601c
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- ▶️ Resume reviews
- 🔍 Trigger review
Walkthrough
The change adds a client setting to sort active inbox threads by user-message time. The sidebar applies the selected ordering to display and drag handling. Settings restore, search, tests, and documentation include the setting and its behavior.
Changes: Inbox send-time sorting
Layer / File(s) Summary Setting contract and controls
packages/contracts/src/settings.ts,apps/web/src/components/settings/*,docs/user/thread-sidebar.md,apps/desktop/src/settings/DesktopClientSettings.test.tsThe settings schema and Labs panel add the inbox sort setting. Search and restore flows include it. The documentation and desktop test fixture also describe or set the option. Send-time sorting algorithm
packages/client-runtime/src/state/threadInbox.ts,packages/client-runtime/src/state/threadInbox.test.tssortInboxThreadsBySendorders threads by the newest applicable creation, unsettled, user-message, or observed-return timestamp. Tests cover authored-message time, fallback message time, returned threads, and unsettled threads.Sidebar ordering and drag handling
apps/web/src/components/Sidebar.logic.ts,apps/web/src/components/Sidebar.tsxThe sidebar uses send-time ordering when enabled, return-time ordering when the Working shelf is enabled, and existing sidebar order otherwise. Drag ordering and drop planning treat active threads as time-ordered when either setting is enabled. Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Feature
Sequence Diagram(s)
mermaid1 sequenceDiagram 2 participant LabsSettingsPanel 3 participant ClientSettings 4 participant Sidebar 5 participant sortInboxThreadsBySend 6 LabsSettingsPanel->>ClientSettings: update sidebarInboxSortBySendEnabled 7 ClientSettings->>Sidebar: provide sidebarInboxSortBySendEnabled 8 Sidebar->>sortInboxThreadsBySend: active threads and observed return times 9 sortInboxThreadsBySend-->>Sidebar: newest-first thread order Possibly related issues
- Issue 24884 — Adds opt-in sorting of the flat thread list by latest user message, matching the issue’s reported ordering objective.
Suggested reviewers:
t3dotgg
Merge Risk: External image Low · previous review 7fc68
With the optional sorting enabled, some threads can appear in the wrong order after a reload or on older servers. These issues are bounded but should be addressed.
Pre-merge checks: Passed 4
Check name Status Explanation Title check Passed The title clearly and concisely describes the main change: an opt-in Beta toggle that sorts the inbox by the user’s last message. Description check Passed The description follows the required Problem, Change, Scope and approval, and Verification sections. It explains the behavior and scope, documents the lack of explicit maintainer approval, includes fo… Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request. Full details: Description check
Explanation
The description follows the required Problem, Change, Scope and approval, and Verification sections. It explains the behavior and scope, documents the lack of explicit maintainer approval, includes focused test results, known limitations, screenshots, and a recording.
Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts