Skip to content

Disabled-arrow pick-class hint + undo/redo ordering fixes + JHU blue accents - #159

Merged
harleensachdev merged 8 commits into
mainfrom
fix/disabled-arrow-hint-and-cleanup
Aug 15, 2026
Merged

Disabled-arrow pick-class hint + undo/redo ordering fixes + JHU blue accents#159
harleensachdev merged 8 commits into
mainfrom
fix/disabled-arrow-hint-and-cleanup

Conversation

@harleensachdev

Copy link
Copy Markdown
Collaborator

See individual commits for details.

undoMaskEdit/redoMaskEdit always preferred the smart-fill stack
regardless of order, so an older fill-type undo could jump ahead of a
newer brush stroke. Track _lastFillEditTime/_lastBrushEditTime and
pick whichever stack was touched most recently.

Also gives point/box segment its own sparse before/after undo entry
on the same fill-history stack (touching only voxels that actually
changed), and swaps the post-submit full representation rebuild for
the same lightweight _notifySegmentationChanged() refresh brush/
smart-fill already use, avoiding an every-class-mask flash on every
click/box prompt.

Adds LIVEWIRE_OUTWARD_BIAS_VOXELS to nudge the live-wire/magnet snap
point past the raw gradient-magnitude peak, correcting an inward
boundary bias relative to the visually-perceived edge.
usePolygonDraw's own Ctrl+Z listener (pop last placed point) and the
global mask-edit undo listener are both on window, so stopPropagation
alone didn't stop the sibling listener — one press was undoing a
pending point AND a previous brush stroke. Use
stopImmediatePropagation() instead.

useKeyboardShortcuts now takes an onUndo callback (owned by
VisualizationPage) instead of calling undoMaskEdit() directly, so a
pending polygon point can be peeled off first before falling through
to the committed-edit undo stack.
…use handling

- Introduces handleUndo() as the single entry point for both the
  Undo button and Ctrl+Z: peels off a pending scissors/lasso point
  before falling through to undoMaskEdit().
- useInteractivePromptTool now tracks status (idle/applying/success/
  error) and calls onComplete() only on a successful, voxel-changing
  submit, so point/box segment (single-shot, unlike paint/erase)
  deselects itself after one use instead of staying armed.
- Point/box segment now calls releasePrimaryMouseTools() (not just
  toggling the crosshair off), since box-segment's mousedown->drag->
  mouseup was still bound to Cornerstone's default primary-drag tool
  (pan/window-level), so dragging a box also panned/adjusted the CT
  view underneath it.
- 3D pane defaults to mesh mode for non-local (dataset) cases instead
  of always volume.
- Removes the enhance.state === 'streaming' gate blocking 3D volume
  viewport setup, and drops the unused sessionDisplayLabel/
  loadRecentUploads lookup in favor of showing the raw caseId.
- Smart-fill preview point color updated from orange to JHU blue to
  match the accent color change.
The FlyoutArrow next to equip-and-use tools called openToolSettings
unconditionally, bypassing the enabled check the main icon button
already had — clicking it with no class selected silently opened an
empty settings flyout. Routes it through the same pickClassHintOpen
walkthrough popout instead.

Also:
- Adds onGuidedPickingChange prop so VisualizationPage can suppress
  Crosshairs for a guided slice-anchor pick's entire lifecycle, not
  just the picking sub-phase.
- pointSegment/boxSegment no longer get a settings arrow (equip-and-
  use with no configurable settings).
- Tightens several tool description strings and the sliceOps guided-
  hint copy.
vp-topbar had a bubbling onClick that closed showAnnotationToolbar on
any click inside the topbar (blank space, dividers, every button)
except two explicitly excluded refs. This silently overrode all
per-button close logic and also fired on clicks in dead space between
button groups, not just the intended 'other tool' clicks.

Removed the handler. Closing the annotation toolbar/SegmentsPopup now
only happens via the explicit closeAnnotationToolbarIfOpen() calls on
Download and HD, plus the Annotate button's own toggle — Crosshair,
Measure, View, Cine/Play, Undo, Redo, Layout (MPR), Window (soft
tissue), and Adjust are left untouched.
@harleensachdev
harleensachdev merged commit 05f0a80 into main Aug 15, 2026
8 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.

1 participant