Repository navigation
NGLASS-2431 Clear rejected CATMAID merge previews from Seg - #270
Merged
seankmartin merged 7 commits intoNov 13, 2026
Merged
seankmartin merged 7 commits into
seankmartin merged 7 commits into
Conversation
afonsobspinto
marked this pull request as ready for review
November 12, 2026 19:05
seankmartin
approved these changes
Nov 13, 2026
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
When CATMAID rejects a merge, Neuroglancer restores the original skeletons but leaves the temporary merge result visible and starred in Seg. This change removes the temporary ID from Seg during rollback.
When CATMAID rejects a Merge, Undo, or Redo, rollback removes the preview by its exact provisional ID. Before publishing the preview, the runtime uses the explicit Seg reader to capture normal visibility, temporary visibility, and starred state as
SegmentVisibilityState, keyed by logical segment handle. On rejection, it applies the captured values to the current rollback hints, including after a rebase. The reader, restore flag, remap hint, and tests use the same visibility-state terminology.The browser regression holds a join request long enough to see the preview, returns a 409, and checks that both original skeletons and their Seg entries are restored, Undo/Redo has no new entry, and the reverse merge succeeds.
The rejection tests share one helper for holding a CATMAID request and returning a
409. The new regression saves a merge, undoes it, hides a restored Seg entry, and verifies that a rejected Redo keeps the entry hidden and starred. It then retries Redo successfully.Rollback examples
While tracing a neuron, you might join fragments
10and20. Neuroglancer previews the edit while CATMAID processes the request. These examples show what happens in Seg when CATMAID rejects it.20into10, and CATMAID rejects the join because20is linked to a proofreading task.20from the browse view with its eye toggled off in Seg. CATMAID rejects the join.20visible.20stays hidden and keeps its prior starred state.10, and click Undo. CATMAID rejects the split request.Related pull requests