Skip to content

feat(ui): add Rank column and enable sorting in vector set similarity results#5973

Merged
dantovska merged 4 commits into
mainfrom
fe/feature/vsim-similarity-rank-column
May 28, 2026
Merged

feat(ui): add Rank column and enable sorting in vector set similarity results#5973
dantovska merged 4 commits into
mainfrom
fe/feature/vsim-similarity-rank-column

Conversation

@dantovska
Copy link
Copy Markdown
Contributor

@dantovska dantovska commented May 27, 2026

Summary

  • Stamps a 1-based rank on each VectorSetSimilarityMatch in the BE response order (in the slice reducer), so rank stays independent of the table's client-side sort.
  • Adds a Rank column rendering a #N badge per row and moves the Similarity column to the rightmost position. Column order is now Element, …attributes(α), Rank, Similarity.
  • Enables sorting on the Element, Rank, attribute, and Similarity columns.
image

Test plan

  • Run a similarity search → Rank shows #1, #2, ... in BE order, Similarity column is the last column.
  • Click an attribute column header → rows sort by that attribute; Rank badges stay attached to their match (don't renumber).
  • Click the Similarity / Element headers → sorting works.
  • Toggle attribute column visibility → still works as before.
  • yarn test (45 + 58 = 103 tests in scope, all green locally).

🤖 Generated with Claude Code


Note

Low Risk
Browser-only vector-set similarity UI and Redux shaping; no auth, API contract, or data-mutation changes beyond stamping rank on search success.

Overview
Adds 1-based rank on each similarity match when search results land in Redux (backend response order), so rank stays on the row when the table is sorted client-side.

The results table gets a Rank column (#N badges), Similarity moves to the far right (Element → attribute columns → RankSimilarity), and header sorting is turned on for Element, Rank, Similarity, and dynamic attribute columns. Attribute sorting uses memoized getParsedAttributes so JSON is not re-parsed on every compare.

Column visibility treats Rank like Element and Similarity (always shown); min-width math includes the new column. Tests cover reducer stamping, column order, and getParsedAttributes caching.

Reviewed by Cursor Bugbot for commit b65d19e. Bugbot is set up for automated code reviews on this repo. Configure here.

@dantovska dantovska requested a review from a team as a code owner May 27, 2026 15:08
@dantovska dantovska self-assigned this May 27, 2026
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 27, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0deb2c0. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.95% 24917/30040
🟡 Branches 68.17% 10461/15346
🟡 Functions 78.15% 6725/8605
🟢 Lines 83.4% 24329/29171

Test suite run success

7023 tests passing in 805 suites.

Report generated by 🧪jest coverage report action from b65d19e

pawelangelow
pawelangelow previously approved these changes May 28, 2026
Copy link
Copy Markdown
Contributor

@pawelangelow pawelangelow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🚀 There are still a couple of valid Cursor suggestions to clean up, but after that, I’m good to approve again.

valkirilov
valkirilov previously approved these changes May 28, 2026
@dantovska dantovska dismissed stale reviews from valkirilov and pawelangelow via b65d19e May 28, 2026 07:59
@dantovska dantovska force-pushed the fe/feature/vsim-similarity-rank-column branch from 0deb2c0 to b65d19e Compare May 28, 2026 07:59
@dantovska dantovska merged commit d623aba into main May 28, 2026
20 checks passed
@dantovska dantovska deleted the fe/feature/vsim-similarity-rank-column branch May 28, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants