Skip to content

Upload UX polish: per-chip status, done state, size-aware ETA; fix gear position - #204

Merged
aperson30 merged 1 commit into
mainfrom
feat/upload-ux-fixes-2
Aug 28, 2026
Merged

Upload UX polish: per-chip status, done state, size-aware ETA; fix gear position#204
aperson30 merged 1 commit into
mainfrom
feat/upload-ux-fixes-2

Conversation

@aperson30

Copy link
Copy Markdown
Collaborator

Summary

  • Removed the page-wide "Uploading ct.nii.gz..." status line. Each file chip in the dropzone now shows its own status (spinning ring while uploading, green check when done, red tint on failure) instead - the whole dropzone box turns green once every selected file has finished uploading.
  • Restyled file chips (white card + shadow) so they read as distinct objects sitting in the dropzone instead of blending into its near-identical gray background.
  • The inference ETA now scales with file size (previously one flat number per model, off by a lot on anything not close to the one case it was calibrated on) and prefers a real server-measured median once the backend has history for that model/size - GET /api/inference-duration-estimate. The backend now logs (model, file_size_bytes, duration_seconds) for every completed job (measured from GPU-slot grant, not queue entry) to build that history; falls back to the size formula silently when there isn't enough data yet.
  • Viewer: the floating gear shown when the toolbar is hidden was positioned at a fixed left offset that landed in the middle of the axial pane's own CT image on a normal-width screen - anchored to the top-right corner instead.

Also found while investigating "ePAI only shows a few organs"

Traced this end-to-end - the website's label mapping and viewer code (_EPAI_TO_VIEWER, segmentation_categories, OrganCheckbox) were already correct. The real bug was in the ePAI model's own export pipeline (~/ePAI/binary/nnunetv2/inference/export_prediction.py on the GPU server - a separate repo I don't have push access to, same situation as an earlier session's CUDA-cache fix): an explicit "extract only pancreas and tumor" step was zeroing out every other organ before the segmentation file was even saved, regardless of what the model detected. Verified via a real inference run: before the fix, only 2 of 25 possible labels were ever written to disk; after removing the masking step, 21 labels came through on the same test case, with pancreas/tumor stats unchanged within normal GPU nondeterminism. Fixed live on the server and the warm predictor restarted to pick it up - not part of this PR's diff since it's a different repo, documented here for visibility.

Test plan

  • npm run build (tsc -b + vite build) - clean
  • vitest run - 298/298 passing
  • Verified the ePAI export fix directly against a real test case (before: labels {0, 17, 22} only; after: 21 distinct labels, matching the model's full 25-class training set)
  • Manual: select multiple files, confirm each chip shows uploading -> done and the box turns green
  • Manual: run ePAI on a real scan, confirm the ETA text updates plausibly and the viewer now shows more than pancreas/tumor

…ETA; fix floating gear position

- Removed the page-wide "Uploading..." status line - each file chip now
  shows its own uploading/done/failed state (spinner, checkmark, or error
  tint) instead, and the whole dropzone box turns green once every
  selected file has finished uploading.
- Restyled file chips to sit visibly distinct (white card + shadow)
  against the dropzone instead of blending into the same gray background.
- ETA now scales with file size instead of being one flat number per
  model, and prefers a real server-measured median once one exists for
  that model/size (GET /api/inference-duration-estimate) - the backend
  now logs (model, file size, duration) for every completed job to build
  that history over time.
- Viewer: the floating gear shown when the toolbar is hidden was
  positioned at a fixed left-offset that landed in the middle of the
  axial pane's own CT image; anchored to the top-right corner instead,
  clear of every pane's content and label.
@aperson30
aperson30 merged commit 7c19715 into main Aug 28, 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