Skip to content

feat: implement pg_trgm ticket full-text search with debounced dropdown UI (closes #379)#854

Open
singhanurag0317-bit wants to merge 1 commit into
ritesh-1918:mainfrom
singhanurag0317-bit:feat/trgm-search-379
Open

feat: implement pg_trgm ticket full-text search with debounced dropdown UI (closes #379)#854
singhanurag0317-bit wants to merge 1 commit into
ritesh-1918:mainfrom
singhanurag0317-bit:feat/trgm-search-379

Conversation

@singhanurag0317-bit
Copy link
Copy Markdown

Description

This pull request resolves Issue #379 ("Feature: Implement Full-Text Search for Tickets using Supabase pg_trgm") by introducing a highly performant, access-filtered, and keyboard-accessible global ticket search bar in the admin dashboard header.

Key Implementation Details

  1. Supabase Trigram Query Optimization (pg_trgm): Added a database migration (20260531_add_tickets_trgm_search.sql) that enables the pg_trgm PostgreSQL extension and creates GIN indexes on the high-frequency searchable fields: subject, description, category, status, and assigned_team.
  2. Debounced Search Invocation (300ms): Implemented debouncing in React to avoid spamming database query calls while typing.
  3. Multi-Tenant Access Control Filters: Enforced security filters so that admins/agents can only search tickets associated with their corresponding company_id, while master admins can search across all tickets globally.
  4. Rich Floating Dropdown UI: Renders matching results immediately below the input with priority badges, ticket IDs, category highlights, and clean loading animations conforming to the premium design system.
  5. Keyboard Accessibility: Supports standard navigation patterns:
    • ArrowDown & ArrowUp to navigate through dropdown options.
    • Enter to open/navigate to the highlighted ticket detail (/admin/ticket/{ticket_id}).
    • Escape to close the dropdown and reset the query.

Verification

  • Ran Vite production compilation via npm run build in the Frontend workspace, verifying that the entire bundle builds cleanly with zero errors or warnings:
    vite v7.3.1 building client environment for production...
    ✓ 3659 modules transformed.
    dist/index.html                     1.69 kB │ gzip:   0.62 kB
    dist/assets/index-B6yW3lSY.css    122.64 kB │ gzip:  18.15 kB
    dist/assets/index-Cjx7RURB.js   2,212.16 kB │ gzip: 619.93 kB
    ✓ built in 31.27s
    

@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

@singhanurag0317-bit is attempting to deploy a commit to the ritesh Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Warning

Review limit reached

@singhanurag0317-bit, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 14 minutes and 58 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b01b0f1d-7a4e-46ab-8bc9-8f815400c7bb

📥 Commits

Reviewing files that changed from the base of the PR and between da8faf2 and 9733946.

📒 Files selected for processing (2)
  • Frontend/src/admin/components/AdminHeader.jsx
  • supabase/migrations/20260531_add_tickets_trgm_search.sql
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant