#42 - The Convert tab shows the latest scan's negatives, without adding them again #45

Merged
eliott merged 1 commit from feat/42-convert-after-scan into main 2026-11-21 11:59:42 +01:00
Owner

After a scan of negatives, the Convert tab already has the RAW files that scan saved: nothing to add again by hand. They come in on their own whenever Convert is open, during the scan as well as after it. When the scan ends, a Convert the N negatives button appears under Start scan and opens the tab.

Closes #42

How it works

  • The session keeps the RAW files the latest scan saved: everything except the JPEGs, and only when the film type is Negative (slides aren't converted). Starting a new scan clears the list, so two rolls never end up mixed in the Convert tab, which measures one film base for every negative in it.
  • POST /api/negatives/scanned gives the page those paths and then empties the list, so each file is handed over once. A negative you remove from the Convert list doesn't come back when you switch tabs or reload the page.
  • The page loads them through the same path as files dropped on the window (/api/negatives/path). They're read where they are, one at a time, each showing "reading…" until it's in. The app's state includes scanned_negatives (how many are waiting), and Convert takes them whenever it's open and that number isn't zero.

Tested

  • cargo test: 309 passed. A new server test runs a 3-frame scan on the simulated rig and checks that the endpoint returns the 3 RAW files once, then nothing.
  • cargo clippy --all-targets and cargo fmt --check are clean, and pnpm build in site/ passes.
  • In a browser, on the release build: a 3-frame scan on the simulated rig, with three real X-T5 RAF files copied in where it saved them. Checked that Convert the 3 negatives shows after the scan and opens Convert, that the three files are read and the first one shows, and that one of them converts. Also checked that the page opening straight on Convert takes them by itself, and that a removed negative stays out after switching tabs back and forth.

Not tested

  • On the real scanner: no scan has been run with a camera and the Arduino.
  • New files coming in while a scan is still running, with Convert open. It goes through the same path as after a scan (each frame event re-reads the state), but it hasn't been run.
  • Windows and macOS.

Changes in behaviour

  • With Convert open, or as soon as you open it, the RAW files of the latest scan of negatives are added to its list.
After a scan of negatives, the Convert tab already has the RAW files that scan saved: nothing to add again by hand. They come in on their own whenever Convert is open, during the scan as well as after it. When the scan ends, a **Convert the N negatives** button appears under **Start scan** and opens the tab. Closes #42 ## How it works - The session keeps the RAW files the latest scan saved: everything except the JPEGs, and only when the film type is Negative (slides aren't converted). Starting a new scan clears the list, so two rolls never end up mixed in the Convert tab, which measures one film base for every negative in it. - `POST /api/negatives/scanned` gives the page those paths and then empties the list, so each file is handed over once. A negative you remove from the Convert list doesn't come back when you switch tabs or reload the page. - The page loads them through the same path as files dropped on the window (`/api/negatives/path`). They're read where they are, one at a time, each showing "reading…" until it's in. The app's state includes `scanned_negatives` (how many are waiting), and Convert takes them whenever it's open and that number isn't zero. ## Tested - `cargo test`: 309 passed. A new server test runs a 3-frame scan on the simulated rig and checks that the endpoint returns the 3 RAW files once, then nothing. - `cargo clippy --all-targets` and `cargo fmt --check` are clean, and `pnpm build` in `site/` passes. - In a browser, on the release build: a 3-frame scan on the simulated rig, with three real X-T5 RAF files copied in where it saved them. Checked that **Convert the 3 negatives** shows after the scan and opens Convert, that the three files are read and the first one shows, and that one of them converts. Also checked that the page opening straight on Convert takes them by itself, and that a removed negative stays out after switching tabs back and forth. ## Not tested - On the real scanner: no scan has been run with a camera and the Arduino. - New files coming in while a scan is still running, with Convert open. It goes through the same path as after a scan (each frame event re-reads the state), but it hasn't been run. - Windows and macOS. ## Changes in behaviour - With Convert open, or as soon as you open it, the RAW files of the latest scan of negatives are added to its list.
feat(app): show the latest scan's negatives in the convert tab, without adding them again
All checks were successful
app / linux (pull_request) Successful in 5m36s
app / windows (pull_request) Successful in 2m58s
website / build (pull_request) Successful in 51s
c9acf48e99
The RAW files a scan of negatives saves are kept by the app until the
Convert tab takes them, each once: they come in by themselves while
Convert is shown, during the scan as after it, and one removed from the
list stays out. After a scan, Convert the N negatives opens the tab.
Slides and JPEG-only shots are left out.

Closes #42
eliott merged commit f99d2d3e02 into main 2026-11-21 11:59:42 +01:00
eliott deleted branch feat/42-convert-after-scan 2026-11-21 11:59:42 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
RollNote/rollscan!45
No description provided.