Low Risk
Low risk: changes only client-side navigation after thread deletion, with added unit tests; main risk is incorrect fallback selection in edge cases (e.g., bulk delete or cross-project threads).
Overview
When deleting the currently viewed thread, the sidebar now navigates to a deterministic fallback thread: the top remaining thread in the same project according to the configured sidebar thread sort order, while skipping any other threads being deleted in the same bulk action.
This introduces getFallbackThreadIdAfterDelete in Sidebar.logic.ts, uses it from Sidebar.tsx during thread deletion (including adding sidebarThreadSortOrder to the callback deps), and adds targeted tests covering sort-order selection and bulk-delete skipping.
Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b671f726ebe8ef53e0f86f2f0929a8db975490e0. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
539ecbd8-26de-4d0f-be9c-56628ab37da6You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands and usage tips.