Skip to content

Friendly scan names (model + date) with inline rename - #140

Merged
aperson30 merged 1 commit into
mainfrom
feat/scan-friendly-name
Aug 13, 2026
Merged

Friendly scan names (model + date) with inline rename#140
aperson30 merged 1 commit into
mainfrom
feat/scan-friendly-name

Conversation

@aperson30

Copy link
Copy Markdown
Collaborator

What

Uploaded scans now get a meaningful name instead of a weird one, and users can rename them.

Before: a scan was labelled with the raw upload filename (often ct.nii.gz or a cryptic export name), or the session UUID if that was empty — useless in the history list.

After: the default name is <model> · <date> (e.g. ePAI · Aug 13, 2026), and each finished scan has an inline rename control.

How

  • friendlyScanName(model, timestamp) in recentUploads.ts — the default name.
  • UploadPage sets that as the label on upload, and keeps the original filename in a new optional sourceName field (shown as a tooltip on the name, so nothing is lost).
  • renameRecentUpload(sessionId, label) persists a rename to localStorage; empty input falls back to the friendly default so a scan is never nameless.
  • Inline edit UI on the completed-scan card: a pencil button opens an input; Enter or blur saves, Escape cancels. Clicks are stopPropagation'd so editing doesn't open the viewer.

Backward-compatible: sourceName is optional, so existing localStorage entries still parse; the reconstruction entry keeps its already-meaningful "ePAI on reconstruction" name.

Uploaded scans were labelled with the raw filename (often 'ct.nii.gz' or a
cryptic export name) or, failing that, the session UUID -- meaningless in the
history list. Default the name to a friendly '<model> · <date>' (e.g.
'ePAI · Aug 13, 2026') via friendlyScanName(), and add inline rename in the
history list (pencil -> input, Enter/blur saves, Escape cancels) backed by
renameRecentUpload(). The original filename is preserved on the entry
(sourceName) and shown as a tooltip, so nothing is lost.
@aperson30
aperson30 merged commit 18defa2 into main Aug 13, 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