Repository navigation
Let the @ picker match threads past the first 200 - #5476
Merged
Merged
Conversation
Drop the sidebar refetch on every mention open and the shared path-row gating: realtime already delivers renames and new projects, and the path gating blanked file-search results on every keystroke. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Human comments
What was wrong
The composer
@picker matches threads against the sidebar's in-memory thread list, but cut that list to the first 200 entries before matching (buildThreadMentionCandidatesinapps/app/src/hooks/queries/thread-queries.ts). The cap came over from the olderGET /threads?limit=200fetch when #1884 moved the picker onto sidebar data. The sidebar list is ordered project by project with personal threads last, so past 200 active threads, later projects and all personal threads become unmentionable, even by exact title.What changed
selectThreadMentionCandidates. The picker still shows at most 8 thread rows. The short startup fallback fetch before the sidebar loads keeps its 200 limit.usePromptMentions.coverage.test.tsx): 215 sidebar threads; an exact search for the last one must return it.Deviations from the issue's proposals, deliberately not included:
staleTime: 0): the rename and new-project cases do not reproduce in the real app. Realtime delivered both instantly on unfixedmain, and reconnects already invalidate the cache. The change would add a fullsidebar-bootstrapdownload on every@.usePathSuggestions, which the right-panel file search (NewTabFileSearch) also uses. There it would blank results and show "Searching files..." on every keystroke. In the@picker the stale rows linger for about 120 ms, so this is left for a picker-scoped follow-up if wanted.How you verified
mainand passes with the fix.pnpm exec turbo run test --filter=@bb/app -- src/hooks/usePromptMentions src/hooks/usePathSuggestions src/hooks/queries/thread-queries src/hooks/queries/sidebar-navigation-query src/hooks/threadMentionSuggestions src/hooks/pathMentionSuggestions src/hooks/promptMentionCandidates: 64 tests across 9 files pass.pnpm exec turbo run lint typecheck --filter=@bb/apppasses.pnpm start:worktreewith 215 seeded threads: typing@Bulk thread 1in the new-thread composer was missing that thread before (results started at 199) and lists it first after. On the unfixed build, a CLI rename (bb thread update --title) and a CLI-created project both appeared in the picker immediately.Fixes #5475
🤖 Generated with Claude Code