Skip to content

CELE-144 Fix synapses that are not removed after the deletion of a related Neuron#110

Merged
ddelpiano merged 2 commits into
developfrom
feature/CELE-144
Aug 26, 2025
Merged

CELE-144 Fix synapses that are not removed after the deletion of a related Neuron#110
ddelpiano merged 2 commits into
developfrom
feature/CELE-144

Conversation

@aranega

@aranega aranega commented Aug 22, 2025

Copy link
Copy Markdown
Member

This closes the issue encoutered by @SimaoBolota-MetaCell for CELE-144

@aranega aranega requested review from Copilot and ddelpiano August 22, 2025 15:51

Copilot AI left a comment

Copy link
Copy Markdown

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 fixes an issue where synapses were not being properly removed when their related neurons were deleted. The fix ensures that when a neuron is deleted, all associated synapses are also deactivated and cleaned up from the workspace state.

Key changes:

  • Added a new method to deactivate synapses when a neuron is deleted
  • Updated the neuron deletion handler to clean up related synapses
  • Enhanced synapse visibility checking with null safety

Reviewed Changes

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

File Description
workspace.ts Added deactivateSynapsesOfNeuron method and helper function collectLeafProps to clean up synapses when neurons are deleted
SynapsesTreeViewHelpers.ts Added null check for synapse visibility to prevent errors
SynapsesTreeView.tsx Updated useCallback dependencies to include synapse-related state for proper re-rendering
Neurons.tsx Modified delete handler to call synapse cleanup before neuron deletion

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread applications/visualizer/frontend/src/models/workspace.ts
Comment thread applications/visualizer/frontend/src/models/workspace.ts
Comment thread applications/visualizer/frontend/src/models/workspace.ts

@ddelpiano ddelpiano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@ddelpiano ddelpiano merged commit 1200888 into develop Aug 26, 2025
11 checks passed
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