-
Notifications
You must be signed in to change notification settings - Fork 4
Fix cluster badge not updating in metadata panel for both swiper and grid views #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: lstein <[email protected]>
|
@copilot This has not fixed the issue. The cluster badge in the metadata panel does not update when I select different images. |
…dge updates Co-authored-by: lstein <[email protected]>
Fixed in commit 4df7048. The issue was that grid-view.js was not calling |
|
@copilot After a full reload, the very first chronological slide is selected by default. However, its metadata panel badge is empty. If I select a different slide and then return to the first one, its cluster is displayed correctly. |
…aded event Co-authored-by: lstein <[email protected]>
Fixed in commit ec0e87c. The issue was that UMAP data loads asynchronously after the initial slide is displayed. Added a |
|
@copilot The test_frontend check is failing: |
Co-authored-by: lstein <[email protected]>
lstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be working as expected.
Fixing Cluster Display in Metadata Panel - COMPLETE ✅
All Issues Fixed
✅ Issue 1: Cluster badge showed stale data from previous searches
✅ Issue 2: Unclustered images showed "cluster=-1" instead of "unclustered"
✅ Issue 3: Cluster badge didn't update when navigating in grid view
✅ Issue 4: Cluster badge was empty on initial page load
✅ Issue 5: Test failure - grid-view.test.js missing updateClusterInfo in mock
Summary of Changes
Commit 1302187: Fixed score display to use current cluster from UMAP data
updateCurrentImageScore()to get cluster fromwindow.umapPointsinstead of stale metadataCommit 4df7048: Fixed grid view not updating cluster badge
updateClusterInfo()function from metadata-drawer.jsupdateClusterInfo()in grid-view.jsCommit ec0e87c: Fixed empty badge on initial page load
umapDataLoadedevent dispatch in umap.js afterwindow.umapPointsis setinitializeMetadataDrawer()to refresh cluster info when UMAP data loadsCommit (current): Fixed test failure
updateClusterInfoexport from metadata-drawer.jsTechnical Details
The complete solution addresses four separate issues:
window.umapPointsbased on currentglobalIndex, never from slide datasetupdateClusterInfo()when metadata updatesTesting & Validation
✅ All 215 tests passing (13 grid-view tests included)
✅ Code review completed
✅ Security scan completed - no vulnerabilities
✅ CI build now passing
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.