Skip to content

feat(citations): show full prompt text on hover in the prompt filter dropdown - #324

Merged
gkhngyk merged 1 commit into
mainfrom
feature/citations-prompt-tooltip
Jun 30, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
feature/citations-prompt-tooltip

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

On the Citations page, the Prompt filter dropdown truncated long prompts with no way to read the full text. The combobox items only kept a pre-sliced label, so the original prompt text was discarded before render.

Change (web/src/app/[locale]/(dashboard)/dashboard/citations/page.tsx):

  • Keep the full prompt on each item as fullText: p.text.
  • Drop the manual slice(0, 80) — ComboboxItem already truncates visually via the CSS truncate class, so the slice only threw the full text away.
  • Pass title={item.fullText} to ComboboxItem, which spreads {...props} onto the underlying element → native browser tooltip on hover (also read by screen readers). No new dependency or tooltip component.

web/src/components/ui/combobox.tsx needed no change — title already reaches the DOM node via {...props}.

Related issue

Closes #298

Type of change

  • feat — New feature

How to test

  1. Open /dashboard/citations for a brand with a long prompt (>80 chars).
  2. Open the Prompt filter dropdown — long options are still visually truncated with an ellipsis.
  3. Hover a truncated option → the full prompt text appears as a native tooltip.
  4. Short prompts behave exactly as before. No new runtime dependency.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

…dropdown

Keep the untruncated prompt on each combobox item (fullText) and pass it
as title to ComboboxItem for a native hover tooltip. Drop the manual
slice(0, 80) — the combobox already truncates visually via CSS, so the
slice only discarded the full text. No new dependency.
@gkhngyk
gkhngyk merged commit befbb0c into main Jun 30, 2026
4 checks passed
@gkhngyk
gkhngyk deleted the feature/citations-prompt-tooltip branch June 30, 2026 14:31
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.

feat(citations): show full prompt text on hover in the prompt filter dropdown

1 participant