Pick sidebar fallback thread after delete#1395
Merged
juliusmarminge merged 1 commit intomainfrom Mar 25, 2026
Merged
Conversation
- Choose the next visible thread by sidebar sort order - Skip other threads deleted in the same action
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
emrezeytin
pushed a commit
to emrezeytin/t3code
that referenced
this pull request
Mar 25, 2026
apexsloth
pushed a commit
to apexslothforks/t3code
that referenced
this pull request
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Why
UI Changes
Checklist
Note
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
getFallbackThreadIdAfterDeleteinSidebar.logic.ts, uses it fromSidebar.tsxduring thread deletion (including addingsidebarThreadSortOrderto the callback deps), and adds targeted tests covering sort-order selection and bulk-delete skipping.Written by Cursor Bugbot for commit b671f72. This will update automatically on new commits. Configure here.
Note
Pick fallback thread from same project when deleting the active sidebar thread
getFallbackThreadIdAfterDeletein Sidebar.logic.ts to find the top remaining thread in the deleted thread's project, sorted bysidebarThreadSortOrder, skipping any other threads being deleted in the same action.Macroscope summarized b671f72.