Adding DBL projects into create project dropdown - #313
Adding DBL projects into create project dropdown #313Joel-Joseph-George wants to merge 2 commits into
Conversation
…e, or abbreviation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAdds authenticated source Bible search with language grouping, flat Bible results, query filtering, response schemas, repository coverage, and provider mapping in standard Bible responses. ChangesSource Bible Search
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change adds authenticated Bible search results with language grouping and provider metadata in standard Bible responses. The supplied implementation and coverage indicate no remaining merge-blocking risk. Sequence Diagram(s)sequenceDiagram
participant Client
participant searchBiblesRoute
participant bibleService
participant searchSourceBibles
participant Database
Client->>searchBiblesRoute: GET /bibles/search?q
searchBiblesRoute->>bibleService: searchSourceBibles(q)
bibleService->>searchSourceBibles: Forward query
searchSourceBibles->>Database: Query matching Bibles and languages
Database-->>searchSourceBibles: Return up to 100 rows
searchSourceBibles-->>bibleService: Return grouped and flat results
bibleService-->>searchBiblesRoute: Return result
searchBiblesRoute-->>Client: Return response data or error
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
…-server into ft/dropdown-search
kaseywright
left a comment
There was a problem hiding this comment.
Automated review found two correctness issues worth addressing before merge.
| ) | ||
| : undefined | ||
| ) | ||
| .limit(100); |
There was a problem hiding this comment.
searchSourceBibles uses .limit(100) with no ORDER BY, making results non-deterministic and able to silently drop matches. If a search matches more than 100 rows, Postgres gives no ordering guarantee for LIMIT without ORDER BY, so repeated identical requests can return a different subset of 100 rows (e.g. after autovacuum, index scans, or concurrent writes), causing the dropdown to show inconsistent or incomplete results. Every other .limit(n>1) query in this codebase pairs the limit with .orderBy(); this one is the outlier.
| .innerJoin(languages, eq(bibles.languageId, languages.id)) | ||
| .where( | ||
| cleanQuery.length > 0 | ||
| ? or( |
There was a problem hiding this comment.
User-supplied search text is interpolated into a SQL LIKE pattern without escaping LIKE metacharacters (% and _). A search containing a literal underscore (e.g. an abbreviation like NIV_1) will also match unrelated rows like NIVX1 since _ is a LIKE wildcard for any single character. A literal % in the query would similarly broaden matches unexpectedly.
Summary by CodeRabbit
New Features
Tests