Skip to content

OpenConceptLab/ocl_issues#2315 | Updated Search Highlights dialog#7

Open
snyaggarwal wants to merge 2 commits intomainfrom
issues#2315
Open

OpenConceptLab/ocl_issues#2315 | Updated Search Highlights dialog#7
snyaggarwal wants to merge 2 commits intomainfrom
issues#2315

Conversation

@snyaggarwal
Copy link
Copy Markdown
Contributor

@snyaggarwal snyaggarwal commented Apr 3, 2026

Reworks the Search Highlights dialog per the acceptance criteria in OpenConceptLab/ocl_issues#2315:

  • Renamed "Search Highlight" → "Match Details", "Search Score" → "Unified Score", "Search Raw Score" → "Raw Scores"
  • Moved close button to top-right X (CloseIconButton)
  • Scores displayed using color-coded chips consistent with the candidates tab, with per-algorithm raw score breakdown
  • Added "Matched Attributes" section header; category names as sub-headers
  • Improved synonyms readability (smaller font, tighter line-height, increased spacing)
  • Extracted getScoreDetails and ScoreValueChip from Score.jsx for reuse
  • Fixed truthy check on CIELMappedSources.length (was length, now length > 0)

@paynejd
Copy link
Copy Markdown
Member

paynejd commented Apr 9, 2026

@snyaggarwal — Review notes. Overall this looks good and addresses all of the original acceptance criteria from #2315. A couple of things:

Suggested PR description (feel free to copy into the PR body):

Reworks the Search Highlights dialog per the acceptance criteria in OpenConceptLab/ocl_issues#2315:

  • Renamed "Search Highlight" → "Match Details", "Search Score" → "Unified Score", "Search Raw Score" → "Raw Scores"
  • Moved close button to top-right X (CloseIconButton)
  • Scores displayed using color-coded chips consistent with the candidates tab, with per-algorithm raw score breakdown
  • Added "Matched Attributes" section header; category names as sub-headers
  • Improved synonyms readability (smaller font, tighter line-height, increased spacing)
  • Extracted getScoreDetails and ScoreValueChip from Score.jsx for reuse
  • Fixed truthy check on CIELMappedSources.length (was length, now length > 0)

Minor: key collision risk — In SearchHighlightsDialog.jsx, the raw scores list uses key={`${rawScore.algorithm}-${rawScore.score}`}. If two algorithms return the same score for a concept, the keys collide. Low probability but easy fix — append the array index:

{map(rawScores, (rawScore, index) => (
  <Stack
    key={`${rawScore.algorithm}-${rawScore.score}-${index}`}
    ...

Otherwise LGTM.

@snyaggarwal
Copy link
Copy Markdown
Contributor Author

@paynejd updated PR

Copy link
Copy Markdown
Member

@paynejd paynejd left a comment

Choose a reason for hiding this comment

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

LGTM — key collision fix looks good. All acceptance criteria from ocl_issues#2315 addressed. Approving.

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.

Enhanced Multi-Candidate Concept Details View

3 participants