Skip to content

fix(repo-selector): preserve results while searching#1968

Merged
jonathanlab merged 1 commit intomainfrom
fix/repo-selector-flicker
May 1, 2026
Merged

fix(repo-selector): preserve results while searching#1968
jonathanlab merged 1 commit intomainfrom
fix/repo-selector-flicker

Conversation

@ryans-posthog
Copy link
Copy Markdown
Contributor

Summary

  • The repository selector flashed empty between keystrokes because each new search query key swapped the multi-query state to pending with no data.
  • Pass placeholderData: (prev) => prev to the per-integration useGithubRepositories query so React Query keeps showing the prior page while the next search loads.
  • First-open "Loading repositories..." state is unchanged (no prior data to fall back to).

Test plan

  • Open the repository selector and type a query — the existing list should remain visible while new results load instead of collapsing to empty.
  • Confirm the initial "Loading repositories..." state still shows on first open.
  • pnpm --filter code typecheck passes.

Use React Query's placeholderData to keep the prior page of repositories
visible while a new search query is loading. Previously the list would
flash empty between keystrokes as the query key changed.

Generated-By: PostHog Code
Task-Id: f099786b-f5df-49dc-9c35-335accd2772c
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 1, 2026

Reviews (1): Last reviewed commit: "fix(repo-selector): preserve results whi..." | Re-trigger Greptile

@jonathanlab jonathanlab merged commit ffef05c into main May 1, 2026
15 checks passed
@jonathanlab jonathanlab deleted the fix/repo-selector-flicker branch May 1, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants