Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

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

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

jonathanlab merged 1 commit into
mainfrom
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

greptile-apps Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants