Repository navigation
feat(citations): add prompt filter with a searchable combobox - #55
Merged
Merged
Conversation
The Citations page lets you slice by topic, platform, region, and a
few flags — but not by an individual prompt. For 200+ prompt brands,
"what URLs are AI engines citing when answering THIS prompt?" was
unanswerable without exporting and pivoting in a spreadsheet.
This change adds a Prompt filter between Topic and Platform in the
filter bar. Because prompt lists get long, it's a combobox with an
inline search input (live filter, keyboard nav) instead of a plain
select. The combobox is built as a thin shadcn-style wrapper around
the existing @base-ui/react/combobox primitive — no new package
deps (cmdk, radix-popover, etc.), and consistent with the way every
other UI primitive in the repo (Select, Sheet, Tabs, Dialog) is
wired up.
Two implementation notes worth flagging for review:
- Items are rendered through Combobox.Collection (render-prop)
rather than a manual .map() over the items array. base-ui's
built-in filter only applies to children fed through Collection;
a manual map silently bypasses the search input.
- Combobox.Empty stays in the DOM as an aria-live region even
when there are matches. Without `empty:hidden` its padding leaks
vertical whitespace above the list when the search hasn't
narrowed anything down.
Backend just adds promptIds: string[] to CitationsFilters and an
.in('prompt_id', filters.promptIds) clause next to the existing
platforms / regions filters.
Closes #43, closes #17.
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #43, closes #17 (duplicate).
What's new for the codebase
Two implementation notes worth flagging for review
Test plan