feat: cluster drill-down and annotation#27
Merged
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/clio-agents/sisyphus) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Tests Report 📄Tests Succees ✅JUnit Details
Coverage Details (100% >= 90%) ✅Diff Cover Details
|
||||||||||||||||||||||||||||||||||||||||||
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.
Summary
Implements #12 -- cluster drill-down, sub-clustering, and annotation.
Cluster Detail Panel
Click a cluster name in the legend to open a slide-in drawer showing every item in that cluster, sorted by distance to centroid, with pagination and image thumbnails.
Sub-Clustering
Re-run k-means within a single cluster. Results render as a mini 3D scatter plot (PCA-reduced) inside the detail drawer.
Annotations
Rename clusters, add notes and tags. Changes auto-save (debounced) as JSON sidecar files in
annotations/(gitignored). Annotations persist across page reloads, scoped per plot job.API Endpoints
GET /api/plot/{job_id}/cluster/{index}-- paginated cluster detailPOST /api/plot/{job_id}/cluster/{index}/sub-cluster-- sub-cluster with configurable kGET /api/annotations/{job_id}-- fetch annotationsPUT /api/annotations/{job_id}-- update annotationsDELETE /api/annotations/{job_id}-- delete annotationsBackend
ClusterItemResponse,ClusterDetailResponse,SubClusterRequest/Point/Info/Response,AnnotationUpdate,ClusterAnnotation)AnnotationManagerwith file-based JSON persistencecompute_plot_data()now returns internal fields (embeddings, labels, IDs) stripped before sending to frontendFrontend
ClusterDetailDrawer(280 lines) -- side panel with metadata, images, annotations, sub-cluster toggleSubClusterView(110 lines) -- mini 3D scatter via @react-three/fiberClusterLegend-- name click opens drawer, eye icon toggles visibility, annotation indicator dotTests
test_annotations.py,test_cluster_detail.py,test_sub_cluster.py,test_server_annotations.pytest_scatter_plot.py,test_server_plot.pyCloses #12