Friendly scan names (model + date) with inline rename - #140
Merged
Conversation
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.
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.
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.gzor 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)inrecentUploads.ts— the default name.UploadPagesets that as the label on upload, and keeps the original filename in a new optionalsourceNamefield (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.stopPropagation'd so editing doesn't open the viewer.Backward-compatible:
sourceNameis optional, so existinglocalStorageentries still parse; the reconstruction entry keeps its already-meaningful "ePAI on reconstruction" name.