Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds Dynamic Search Rules support: new types, four SDK methods (list, get, patch, delete), tests and code samples, and bumps Meilisearch runtime from v1.40 to v1.42. Also includes a minor timeout simplification and a small test assertion adjustment. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant SDK as Meilisearch SDK
participant Server as Meilisearch Server
Client->>SDK: call getDynamicSearchRules(parameters)
SDK->>Server: POST /dynamic-search-rules (body: parameters)
Server-->>SDK: 200 { results: [...], total: N }
SDK-->>Client: return results
sequenceDiagram
participant Client
participant SDK as Meilisearch SDK
participant Server as Meilisearch Server
Client->>SDK: call updateDynamicSearchRule(uid, rule)
SDK->>Server: PATCH /dynamic-search-rules/{uid} (body: rule)
Server-->>SDK: 200 { uid, actions, ... }
SDK-->>Client: return updated rule
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 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 |
63108f8 to
8579763
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2171 +/- ##
==========================================
+ Coverage 97.95% 97.97% +0.02%
==========================================
Files 14 14
Lines 635 642 +7
Branches 106 104 -2
==========================================
+ Hits 622 629 +7
Misses 12 12
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/get_search.test.ts`:
- Around line 151-153: The test currently only checks that each key from
dataset[1] exists on hit, which is too permissive; update the assertion to
validate exact shape and values by using expect(hit).toMatchObject(dataset[1])
and also assert strict key count (e.g., compare Object.keys(hit).length ===
Object.keys(dataset[1]).length) so extra fields are caught; modify the block
that uses Object.keys(dataset[1]).forEach((key) =>
expect(hit).toHaveProperty(key)) to perform these two checks against dataset[1]
and the hit variable.
In `@tests/search-rules.test.ts`:
- Around line 27-30: The test is bypassing types because
RuntimeTogglableFeatures is missing dynamicSearchRules; add a field
dynamicSearchRules?: boolean | null to the RuntimeTogglableFeatures type in
src/types/experimental-features.ts so it matches other toggles, then update the
test to remove the unsafe "as unknown as" cast and use "satisfies
Parameters<Meilisearch['updateExperimentalFeatures']>[0]" for the
dynamicSearchRulesFeature object; reference the RuntimeTogglableFeatures type
and the updateExperimentalFeatures method to locate where to change types and
the failing call in tests (dynamicSearchRules,
masterClient.updateExperimentalFeatures).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e3005fda-47b8-4231-bb5b-de28a22b5875
📒 Files selected for processing (9)
.code-samples.meilisearch.yaml.github/workflows/tests.ymldocker-compose.ymlsrc/meilisearch.tssrc/task.tssrc/types/index.tssrc/types/search-rules.tstests/get_search.test.tstests/search-rules.test.ts
Pull Request
Related issue
Fixes #2167
What does this PR do?
v1.42v1.42AI disclosure
Cursor with
gpt-5.1-highandcodex-5.3-mediumPR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!
Summary by CodeRabbit
New Features
Chores
Documentation
Types
Tests