Feat/fuzzy search#1961
Conversation
Signed-off-by: DESIREDDY MOHITH REDDY <desireddymohithreddy@MRD-2.local>
Signed-off-by: DESIREDDY MOHITH REDDY <desireddymohithreddy@MRD-2.local>
Signed-off-by: DESIREDDY MOHITH REDDY <desireddymohithreddy@MRD-2.local>
Fixes SonarCloud warnings and DCO Signed-off-by: DESIREDDY MOHITH REDDY <desireddymohithreddy@MRD-2.local>
Signed-off-by: DESIREDDY MOHITH REDDY <desireddymohithreddy@MRD-2.local>
|
Someone is attempting to deploy a commit to the s3dfx-cyber's projects Team on Vercel. A member of the Team first needs to authorize it. |
💬 Faster Reviews & AssignmentsHi @desireddymohithreddy0925, for faster coordination and smoother communication, consider joining our Discord community: Useful Channels
|
👋 Thanks for opening a PR, @desireddymohithreddy0925!Your PR has entered the 🚦 PR Review Pipeline.
🔄 Review Flow
A pipeline status comment may appear automatically as your PR progresses. ✅ Contributor Checklist
|
|
✅ DCO Sign-off VerifiedHi @desireddymohithreddy0925 👋 All commits in this PR contain valid Thank you for following the DCO requirements 🚀 |
|
🚦 PR Review Pipeline
Last updated: Thu, 25 Jun 2026 20:18:56 GMT |
🤖 TENET Agent Review📋 SummaryThis PR introduces fuzzy search functionality for organizations, significantly enhancing the user experience by making search more resilient to typos and misspellings. It refactors the client-side script loading into a robust, centralized utility with CDN fallbacks and improves the theme management logic. While the feature implementation and code structure improvements are commendable, a critical security vulnerability is introduced by loading 🔐 Security Findings
🧹 Code Quality
✅ What's Done Well
📝 Overall Verdict[REQUEST CHANGES] - Critical security issue with missing SRI for Review powered by TENET Agent 🛡️ | Triggered automatically on PR #1961 |
|
Warning Review limit reached
More reviews will be available in 33 minutes and 39 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ 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 |
There was a problem hiding this comment.
4 issues found across 4 files
Confidence score: 2/5
index.htmlloads external Fuse.js without Subresource Integrity (integrity: ''), which creates a concrete supply-chain risk if CDN content is tampered with and could expose users to injected script behavior. Add valid SRI hashes (or pin/self-host the asset) before merging..github/workflows/program-classification-validator.ymlappears unrelated to the fuzzy-search scope, so merging as-is risks accidental CI/policy changes that are hard to notice during feature review. Split or revert this workflow edit so it can be reviewed independently.src/js/app.jsmixes theme-behavior changes into this fuzzy-search PR and usesMediaQueryList.addEventListenerwithout anaddListenerfallback, increasing regression risk and potentially breaking behavior in older Safari. Limit this PR to fuzzy-search logic and add the Safari-compatible listener fallback (or move theme changes to a separate PR) before merge.
Architecture diagram
sequenceDiagram
participant Browser as Browser
participant head as "<head>"
participant CDN as "External CDN"
participant fallback as "Fallback CDN"
participant LS as "localStorage"
participant app as "app.js"
participant Fuse as "Fuse.js Library"
participant UI as "Search UI"
participant globalThis as "globalThis"
Note over Browser,UI: Page Load & Dependency Loading
Browser->>head: Parse HTML
head->>head: NEW: loadDependencies() runs for fuse, marked, DOMPurify, html2pdf
loop For each dependency
head->>CDN: injectScript(primary URL)
alt CDN loads successfully
CDN-->>head: script loaded
head->>head: dep.check() for Fuse
alt check fails (e.g., Fuse undefined)
head->>fallback: injectScript(fallback URL)
fallback-->>head: script loaded
end
else CDN fails (onerror)
CDN-->>head: error
head->>fallback: injectScript(fallback URL)
fallback-->>head: script loaded
end
end
Browser->>LS: Read saved theme
LS-->>Browser: theme value
alt theme === 'dark'
Browser->>Browser: add dark class
else theme === 'light'
Browser->>Browser: remove dark class
else no theme saved && prefers-color-scheme: dark
Browser->>Browser: add dark class
end
Note over Browser,UI: Search Flow
UI->>app: applyFilters(search, sort)
app->>app: CHANGED: Reset globalThis.orgSearchScores Map
alt search string present
app->>Fuse: orgSearchFuse.search(search)
Note over Fuse: threshold: 0.3, keys: ['name','tags','cat']
Fuse-->>app: results[{item, score}]
app->>globalThis: Store scores in orgSearchScores
app->>app: baseOrgs = results mapped to items
else no search
app->>app: baseOrgs = all ORGS
end
app->>app: baseOrgs.filter(matchesFilters)
app->>UI: filteredOrgs
alt search string present
app->>app: sort filteredOrgs with searchComparator
Note over app: searchComparator logic:
alt exact match
app->>app: exact match first (ignores score)
else startsWith match
app->>app: prefix match second (ignores score)
else
app->>globalThis: orgSearchScores to compare scores
app->>app: lower score = better rank
end
app->>app: applySecondarySort for tiebreaker
end
app-->>UI: sorted, filtered orgs
UI->>UI: Render results
Note over Browser,UI: Theme Change Listener (CHANGED)
Browser->>LS: NO theme saved (user cleared preference)
LS-->>Browser: null
Browser->>Browser: CHANGED: Listen for prefers-color-scheme change
alt dark mode preferred
Browser->>Browser: toggle dark class
end
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Signed-off-by: DESIREDDY MOHITH REDDY <desireddymohithreddy@MRD-2.local>
fe953a1 to
005ffdb
Compare
🤖 TENET Agent Review📋 SummaryThis pull request introduces fuzzy search capabilities to the organization search bar using 🔐 Security Findings
🧹 Code Quality
✅ What's Done Well
📝 Overall VerdictREQUEST CHANGES - Missing Subresource Integrity for |
|
✅ Merge Conflicts ResolvedThanks @desireddymohithreddy0925, this PR is mergeable again. |



feat: Implement Fuzzy Searching for Organizations
Fixes #1949
✨ Feature Description
Integrated
Fuse.jsinto the main organization search bar to gracefully handle typos and misspellings, ensuring organizations can still be discovered if a user misspells a technology or name.🛠️ Implementation Details
fuse.jsasynchronously utilizing the new centralized CDN fallback utility.app.jsto utilize aFuseinstance with a0.3threshold applied toname,tags, andcatfields.searchComparatorto intelligently prioritize exact and prefix matches above fuzzy score-based results.filtering.test.jsto validate theFusesorting integration.✅ Acceptance Criteria Met