fix: Feature: Implement Full-Text Search for Tickets using Supabase pg_trgm#645
Conversation
|
@saij3b is attempting to deploy a commit to the ritesh Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
More reviews will be available in 4 minutes and 19 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #379.
Frontend deps aren't installed in this clone, so I can't fully run build/lint, but the file changes follow existing conventions and imports.
Summary
Added Supabase pg_trgm-backed live ticket search to satisfy bounty #379:
supabase/migrations/20260530000000_ticket_search.sql— enablespg_trgm, adds GIN trigram indexes ontickets.subject/description/category/statusandprofiles.full_name, and defines asearch_tickets(q, limit_count)RPC (SECURITY INVOKER so existing RLS scopes results to the caller's role/company automatically). Returns ticket id, subject, description, category, status, priority, assignee name, and a similarity rank.Frontend/src/admin/components/AdminHeader.jsx— kept the existing search input but wired it to a 300ms-debouncedsupabase.rpc('search_tickets', …)call, rendered a dropdown of up to 8 matches under the input with loading/empty states, added full keyboard navigation (ArrowUp/Down highlight, Enter opens the highlighted ticket via/admin/ticket/:id, Escape clears/closes), click-outside dismissal, and ARIA combobox/listbox roles. Plain Enter without a highlighted result still falls back to the existing/admin/tickets?q=…page filter for continuity.Tests: no test suite detected
Bounty attempt.