You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(components): read 'items' instead of deprecated 'hits' from 'useInfiniteHits' - #1630
hits returned by useInfiniteHits is deprecated in favor of items. SearchModal and AiDock now destructure items and keep the local name hits, so the rest of each component is unchanged.
In connectInfiniteHits, both fields are the same array (hits: items, items: items), so behavior is identical.
Verification
tsc, oxlint and oxfmt pass; typescript/no-deprecated no longer reports hits in these files.
Local dev: Cmd+K search for useQuery renders results as before.
Summary by CodeRabbit
Bug Fixes
Search results in chat and command search now use the correct results collection, keeping result display and pagination working as expected.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Review was skipped as selected files did not have any reviewable changes.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 41030e14-a1a3-4409-9019-7bcfbd21682c
Commits
Reviewing files that changed from the base of the PR and between 19114dc and f5b3379.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Both SearchResultsInChat and CommandSearchResults now read infinite-search results from the items property. Their pagination and result handling remain unchanged.
Changes: Search result access
Layer / File(s)
Summary
Update search result access src/components/AiDock.tsx, src/components/SearchModal.tsx
Both components now read result records from items. Existing pagination and downstream handling remain unchanged.
This swaps a deprecated search-result property for its replacement in two search components. Behavior is expected to stay the same, and no merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title says the refactor reads 'items' instead of the deprecated 'hits' from 'useInfiniteHits'. The raw summary confirms this: SearchModal.tsx destructures items and aliases it to hits, and AiDock.…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title says the refactor reads 'items' instead of the deprecated 'hits' from 'useInfiniteHits'. The raw summary confirms this: SearchModal.tsx destructures items and aliases it to hits, and AiDock.tsx obtains results through items. The PR objectives match, noting the same migration with the local variable kept as hits. The title names the primary change and uses no vague terms.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 9625a2da-88f7-4c6e-b8b3-41a1ea0f2333
Commits
Reviewing files that changed from the base of the PR and between d994265 and 19114dc.
Files selected for processing: 2
src/components/AiDock.tsx
src/components/SearchModal.tsx
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
The installed Algolia connector exposes hits and items as the same array, so this keeps search results and pagination unchanged while removing the deprecated property access.
AI review notes: Reviewed both changed call sites at f5b3379 and verified connectInfiniteHits returns hits: items and items: items. CI passed; reported JavaScript gzip decreases 0.06 KiB and CSS is unchanged. I did not repeat the author’s browser search test. CodeRabbit skipped this diff, which is not an independent approval.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hitsreturned byuseInfiniteHitsis deprecated in favor ofitems.SearchModalandAiDocknow destructureitemsand keep the local namehits, so the rest of each component is unchanged.In
connectInfiniteHits, both fields are the same array (hits: items, items: items), so behavior is identical.Verification
tsc,oxlintandoxfmtpass;typescript/no-deprecatedno longer reportshitsin these files.Cmd+Ksearch foruseQueryrenders results as before.Summary by CodeRabbit