Skip to content

Conversation

@cornhundred
Copy link
Collaborator

Summary

  • add a selected_cells trait and helper method so notebooks can send highlighted cell ids to the Landscape widget
  • propagate selected cell selections to the frontend observable store and refresh deck.gl layers with highlight-aware colors
  • embed cell ids in scatter data so highlighted cells render brightly while other points are dimmed

Testing

  • Not run (not requested)

Codex Task

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds cell highlighting functionality to the Landscape widget, enabling notebooks to visually emphasize specific cells while dimming others. The implementation synchronizes selected cell IDs between Python and JavaScript, updates the rendering pipeline to apply highlight-aware colors, and embeds cell identifiers in scatter plot data.

Key Changes:

  • Added selected_cells trait and highlight_cells() method to the Python widget for cell selection management
  • Implemented frontend state management for highlighted cells with observable store integration and layer refresh logic
  • Modified cell rendering to display highlighted cells in bright blue while dimming non-highlighted cells to low opacity

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/celldega/viz/widget.py Adds selected_cells trait and highlight_cells() helper method for syncing cell IDs from notebook to widget
js/viz/landscape_ist.js Implements highlighted cell state management, model synchronization listener, and layer refresh mechanism
js/obs_store/obs_store.js Adds selected_cells observable to the store for tracking highlighted cells
js/deck-gl/layers/cell_layer.js Updates color function to handle highlighting logic, embeds cell names in scatter data, and adds selection trigger

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Base automatically changed from codex/refactor-manual-categories-to-use-obs_store to main November 25, 2025 21:59
@cornhundred cornhundred changed the title Add highlighted cell syncing for Landscape Jupyter-Scatter API update Dec 1, 2025
@cornhundred cornhundred changed the title Jupyter-Scatter API update selected_cells API for jupyter-scatter Dec 1, 2025
Copy link
Contributor

@huanlity huanlity left a comment

Choose a reason for hiding this comment

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

I tested on my end and it worked as expected. The only comment I have is that the marker for the selected cell is hard to see at default zoom level as shown below. It might be helpful to change the highlighting color from dark blue to cyan and/or increase the dot size, whatever is minimal but effective.
Screenshot 2025-12-01 at 4 14 51 PM

Copy link
Contributor

@jaspreetishar jaspreetishar left a comment

Choose a reason for hiding this comment

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

LGTM! Works as expected.

@cornhundred cornhundred merged commit cb44e8f into main Dec 2, 2025
10 checks passed
@cornhundred cornhundred deleted the codex/integrate-jupyter-scatter-with-landscape branch December 2, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants