Skip to content

fix(cmdk): Include tags.length in section query key to prevent stale cache#114165

Open
JonasBa wants to merge 1 commit into
masterfrom
jb/cmdk/issues-search-tags-fix
Open

fix(cmdk): Include tags.length in section query key to prevent stale cache#114165
JonasBa wants to merge 1 commit into
masterfrom
jb/cmdk/issues-search-tags-fix

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Apr 28, 2026

Add tags to queryKey

…cache

With staleTime: Infinity, the first cached result would win forever once
the section query fired on mount. Tags that arrived later (e.g. when
issuePlatformTagsQuery resolved after eventsTagsQuery) would never appear
in the "Event Tags" section.

Adding tags.length to the queryKey invalidates the cache when the tag list
grows, matching the pattern already used in spansCommandPaletteActions.tsx.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 28, 2026
@JonasBa JonasBa marked this pull request as ready for review April 28, 2026 14:44
@JonasBa JonasBa requested a review from a team as a code owner April 28, 2026 14:44
@getsantry
Copy link
Copy Markdown
Contributor

getsantry Bot commented May 26, 2026

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry Bot added the Stale label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants