You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Branch picker flashes "Loading refs..." repeatedly while typing #45328
Typing into the branch/ref picker repeatedly flashes "Loading refs..." on every keystroke, clearing the list momentarily while typing.
Diagnosis
In apps/web/src/components/BranchToolbarBranchSelector.tsx (lines 277-286), branchQuery is passed directly to usePaginatedBranches with query: sanitizeNewRefName(trimmedBranchQuery) without debouncing.
In apps/web/src/state/queries.ts (lines 206-287), usePaginatedBranches keys vcsRefPagesAtom on [environmentId, cwd, query] and does not retain previous query results while a new query is pending. As a result, each uncached keystroke sets branchRefState.data to null and branchRefState.isPending to true, which makes isInitialBranchesLoadPendingtrue (BranchToolbarBranchSelector.tsx line 338). This flashes "Loading refs..." (BranchToolbarBranchSelector.tsx lines 389-390), empties refs, and disables ComboboxTrigger (BranchToolbarBranchSelector.tsx line 906) until the request resolves.
Steps to reproduce
Open a project with ~148 refs in T3 Code Desktop.
Open the branch/ref picker from the composer toolbar.
Type a non-matching or multi-character query (e.g. asfasddfasdfasdfas).
Observe "Loading refs..." flashing repeatedly in the popup footer as you type.
Version
0.1.12-nightly.20261125.5230 (custom fork based on ~2-day-old nightly; unrelated modifications)
Environment
Linux x64 (7.3.5-200.fc44.x86_64), Node v24.22.1, T3 Code Desktop
Activity