ref(cmdk): Eagerly load filter key sections and cap boolean attributes#114125
ref(cmdk): Eagerly load filter key sections and cap boolean attributes#114125
Conversation
Remove the `state === 'selected'` gate from the section-level resources in both issue list and spans command palette actions. The section queryFns only map over already-loaded in-memory data (no API calls), so deferring them until selection was unnecessary and prevented filter keys from appearing in search results. Also wrap span boolean attributes in a capped section (limit=4) so they no longer pollute search results unboundedly. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 39c2197. Configure here.
| tags: Tag[], | ||
| cacheKey: string | ||
| ): ((q: string, ctx: CMDKResourceContext) => CMDKQueryOptions) => | ||
| (_q, ctx) => |
There was a problem hiding this comment.
Eager section query caches stale tags
Medium Severity
After removing the enabled: ctx.state === 'selected' gate, the section query now fires on mount but its queryKey does not include tags.length. With staleTime: Infinity, the first cached result wins forever, so any tags that arrive later (for example when issuePlatformTagsQuery resolves after eventsTagsQuery) never appear in the "Event Tags" section. The sibling makeStringSectionResource in spansCommandPaletteActions.tsx includes tags.length precisely for this reason.
Reviewed by Cursor Bugbot for commit 39c2197. Configure here.
#114125) Update issues and traces search to populate the cmdk with more results Co-authored-by: Claude <noreply@anthropic.com>


Update issues and traces search to populate the cmdk with more results