Skip to content

Saved cases (bookmarks) + jump-to-organ 3D crosshair fix#33

Merged
aperson30 merged 2 commits into
mainfrom
aditya/saved-cases
Jun 24, 2026
Merged

Saved cases (bookmarks) + jump-to-organ 3D crosshair fix#33
aperson30 merged 2 commits into
mainfrom
aditya/saved-cases

Conversation

@aperson30

Copy link
Copy Markdown
Collaborator

Two changes, frontend-only.

1. Saved cases (bookmarks)

Bookmark dataset cases and view them in one place.

  • New savedCases helper — bookmarked case ids in localStorage, storing each card's metadata at save time so the Saved view renders with no extra backend/metadata fetch (mirrors the recentUploads pattern). 5 unit tests.
  • A bookmark toggle on each dataset card (gold when saved, faint white when not); stops propagation so it doesn't open the case.
  • A "Saved (N)" toggle on the dashboard that swaps the grid to show only bookmarked cases, with an empty state; stays in sync across cards and tabs.

2. Jump-to-organ 3D crosshair fix

The jump-to-organ feature (merged in #32) moved the 2D MPR crosshair but left the 3D (NiiVue) view where it was — the Cornerstone crosshair move suppresses its change event (to avoid sync loops), so the 3D view never got updated. The jump handler now moves the NiiVue crosshair explicitly, so all four views recenter. Replaces the now-unused jumpToOrgan helper with getOrganCentroids.

Testing

  • Type-check (tsc -b) ✓
  • ESLint clean on changed files ✓
  • Vitest 48/48 ✓ (5 new savedCases tests)
  • Production build ✓
  • Manually verified: bookmark toggle + Saved view, and jump-to-organ now recentering the 3D view.

- savedCases helper: bookmarked case ids persisted in localStorage, storing each
  card's metadata at save time so the Saved view renders with no extra fetch
  (mirrors the recentUploads pattern). Unit-tested.
- Bookmark toggle on each dataset card (gold when saved); stops propagation so it
  doesn't open the case.
- "Saved (N)" toggle on the dashboard swaps the grid to show only bookmarked cases,
  with an empty state; syncs across cards and tabs.
Jump-to-organ moved the 2D MPR crosshair but not the NiiVue 3D view, because the
Cornerstone crosshair move suppresses its change event (to avoid sync loops). Move
the NiiVue crosshair explicitly in the jump handler so all four views recenter, and
drop the now-unused jumpToOrgan helper in favor of getOrganCentroids.
@aperson30 aperson30 merged commit c18693f into main Jun 24, 2026
6 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