Delivery: take a photo back when it is rejected or un-picked #10

Merged
spark merged 1 commits from task/delivery-retract-unwanted into main 2026-10-17 17:14:54 +01:00
Owner

A rejected or un-picked photo is removed from every destination. An edit that changes the folder or file name removes the previous file on every transport.

A rejected or un-picked photo is removed from every destination. An edit that changes the folder or file name removes the previous file on every transport.
spark added 1 commit 2026-10-17 17:14:53 +01:00
Delivery: take a photo back from its destinations when it is rejected or un-picked
ci / typescript (pull_request) Failing after 4m28s
ci / rust (pull_request) Successful in 13m17s
7c67a23cb9
A photo could be pulled off a destination only on ZeroZero, and only when an edit
replaced it. Now a delivered photo that is rejected, or un-picked (PICK -> none),
is taken back from every destination, and an edit that moves the file to a new
folder or name removes the old one on every transport (not just ZeroZero), so no
orphan is left behind.

- Transport gains remove(remotePath); implemented for Nextcloud (WebDAV DELETE),
  SFTP, FTP and Dropbox (ZeroZero already had it). Missing-file is never an error.
- delivery_items gains a `retract` flag and a RETRACTED terminal status. A rejected
  or un-picked photo's deliveries are queued for removal (DONE/WAITING) or cancelled
  outright (QUEUED, never uploaded); the worker removes them and marks them RETRACTED.
- The flag PATCH triggers the retraction (REJECT for any, or the photos still PICK
  when they go to none, i.e. un-pick), reading the old flags first.
- deliveryState() ignores RETRACTED, so a taken-back photo reads as not delivered.

Destructive on the client's live destinations (it deletes delivered files, agency
FTP included, by request). Not run locally — no toolchain/space on this machine;
needs CI to compile and a throwaway target to try before production.

Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
spark merged commit 99e43ad482 into main 2026-10-17 17:14:54 +01:00
Author
Owner

Merged. API deploy of this change succeeded (health b6abdaf, RETRACTED status in the database). The first app deploy rolled back: DeliveryPage had no label for RETRACTED. Fixed in #12, which is what the app is serving.

Merged. API deploy of this change succeeded (health b6abdaf, RETRACTED status in the database). The first app deploy rolled back: DeliveryPage had no label for RETRACTED. Fixed in #12, which is what the app is serving.
Sign in to join this conversation.