Repository navigation
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What was wrong
In a collection's Points tab, a similarity search (the Find Similar button, or an id typed into Similar to (id)) always shows a Load More button, even when every result is already listed. Clicking it sends the same request again and nothing changes on screen.
Steps on
master(413a120): open a collection with 7 points, click Find Similar on a point. The other 6 points are listed, Load More is shown below them, and clicking it does nothing.I did not find an existing issue for this.
Cause. The similarity branch of
PointsTabsstores the number of returned points as the next offset (setNextPageOffset(newPoints.points.length)), so the value is truthy for any non-empty result and the button is always rendered. The scroll branches usenext_page_offsetfrom the API, which isnullon the last page, so they are not affected.What changed
When the similarity query returns fewer points than the requested
limit, there is nothing left to load, so the next offset is set tonulland the button is hidden. A full page keeps the previous behaviour. Four changed lines insrc/components/Points/PointsTabs.jsx, plus a new test file.flowchart TD A[Find Similar on a point] --> B{Fewer results than the page limit} B -->|Before| C[Load More shown and does nothing] B -->|After| D[Load More hidden]Narrated recording, before then after (sound on):
evidence.mp4
Edge cases and unchanged behaviour checked
Checked in the running app (
npm startagainst a local Qdrant 1.20.1 container) and shown in the recording:city:Berlin) leaves 2 results and no Load More.Checked by unit tests only (
src/components/Points/PointsTabs.test.jsx, new):limit: 20, shows 15 and hides the button.Tests
With the fix reverted and the new tests kept, the first two tests fail (2 failed, 1 passed).
npx eslint src/components/Points/PointsTabs.jsxandnpx prettier --checkon both files pass.Not run locally: the full test suite and
npm audit.AI tools (Claude Code) assisted with this change; the bug was reproduced and the fix verified manually in the running app.
🤖 Generated with Claude Code