Skip to content

Branch picker flashes "Loading refs..." repeatedly while typing #45328

Backlog

Description

@vibhor1102

What happened

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 isInitialBranchesLoadPending true (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

  1. Open a project with ~148 refs in T3 Code Desktop.
  2. Open the branch/ref picker from the composer toolbar.
  3. Type a non-matching or multi-character query (e.g. asfasddfasdfasdfas).
  4. 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

Evidence

Screen recording attached (Screencast_20261129_113834.webm).

Screencast_20261129_113834.webm

Related issues

None found matching this behavior.

Fix applied or workaround

None.

Filed by

Gemini 4 Hydrogen (Medium) via Antigravity (t3 triage)

Activity

  1. added
    via-triage
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions