The photo turns under an upright crop while cropping (the engine still renders the
whole frame unturned; the loupe shows the angle), so the crop matches the result.
- Drag outside the crop rotates the photo with the pointer (grid and angle readout).
- Ctrl/Cmd + drag draws a line to level along (horizon or plumb lines).
- Corners and edges resize and stay on the rotated photo; Shift keeps the shape,
Alt resizes about the centre.
- X swaps portrait/landscape keeping the aspect, A locks the aspect, O / Shift+O
cycle and turn the guides, Enter done, Esc cancels, Ctrl/Cmd+Alt+R resets.
Geometry is a port of lightcraft-geom (crop.rs, crop_drag.rs) and the ui-egui
crop guides, in apps/app/src/develop/crop.ts, with tests.
Also fixes the app typecheck (CardScan waitLine) that broke the app build.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RL6fqg8fuk1vKF4H6Zrh9V
Closing it only hides the window; a bar at the bottom opens it again. The Mac build also links compiler-rt, which the GPU recogniser needs and the installer was missing.
The boxes stay on the CPU interpreter. The recogniser uses every accelerator when a startup check still matches that interpreter, so the names stay the same.
Node reports a signal kill as exit code null, so the in-flight request failed as "face worker exited (null)" with an empty stderr. Retry that request on a new process, and keep the signal name if it dies again. Closing the worker is not reported as that crash.
Paperclip-Agent: Bug Squasher (urlKey bug-squasher; id 4669adc7-6368-43ef-bf27-5a601a6b7b83)
Paperclip-Issue: BIT-31393
Paperclip-Run: 16662666-cc93-4b3c-9b85-cf591a921062
The desktop app reads the folder locally and only asks the server for a name. A photo already read is not read again. While a folder is still read on the server, face processes keep being added until the CPU is full.
A face is named from the match when one of them matches, and only then from the rest of the organization. The scan runs one face process per spare core.
A face is named from the match (players and officials) when one of them matches, and only then from the rest of the organization. The scan runs one face process per spare core so a full folder is read in parallel.
The game was already shown, but each face was compared with every person in the organization. The picker now limits that comparison to the two teams' squad for the season, which is who can be named and a much smaller search.
Search a folder for faces and numbers, then import the selection. Also newest-first face analysis, official FPA short codes, archive season dating, and desktop card offload.
The folder name sorted before the archive viewer migration, which is already applied. Deploy applies pending folders in name order and refuses one that lands behind a later applied migration.
A photographer can point at any folder, read the clear faces and jersey numbers without copying the files in, filter by name, club or number, and import only the photos they choose into the open event.
The folder date now comes from EXIF DateTimeOriginal when it can be read — a
JPEG's own EXIF, or a RAW's paired JPEG (RAW+JPEG shooting) — so a card offloaded
days after the shoot still lands in the day it was shot. It falls back to the
file's modification time when there is no EXIF (RAW-only formats with no reader
yet, e.g. CR3), so it is never worse than before.
exif_date() added to preview.rs (follows the ExifIFD pointer to DateTimeOriginal,
same byte-walking as exif_orientation); card.rs reads it for JPEGs and for a RAW's
sibling JPEG. Still needs CI to build.
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
A new "Cartão…" button in the library offers Photo Mechanic's card offload: it
copies (default) or moves the photos from a card/folder into a dated folder on
this computer, with a folder template ({iptcyear4}/{iptcyear4}{iptcmonth0}{iptcday0}/{type}),
RAW+JPEG handling, overwrite, and WAV/XMP sidecars. The last settings used are
remembered. Pure filesystem — nothing is sent to the server.
Safety: the default is copy. "Move" copies, verifies the copy (size and SHA-256),
and only then deletes the original; on any mismatch or error it never deletes, so
a card is never emptied of a file that did not arrive whole.
The capture day comes from the file's modification time (on a card straight from
the camera that is when the frame was shot). Exact EXIF/RAW capture time — the CR3
case — is a later refinement; the shell has no RAW decoder yet (that is the
exiv2-FFI work on the engine roadmap).
New: card.rs (card_scan/card_ingest/card_settings/card_save_settings), wired in
lib.rs, build.rs and capabilities; CardIngest.tsx dialog; chrono added for the
local date. NOT built/typechecked here (no toolchain) — needs CI. chrono is new,
so Cargo.lock must be regenerated (cargo build) if CI runs --locked.
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
A gallery whose folder name has no date (e.g. "J6 - ALA x ASSO") was dated from
the Nextcloud folder's modified time — when it was copied to the cloud, not when
the game was played — so 2018/19 games showed as 2026. A wrong season also
misidentifies faces (it matches against the wrong season's squads).
Date priority is now: the folder name's date, then the photos' capture day (both
already tried), then the season from the path (".../FPA/Fotos/2018_2019/..." ->
a date in that season), and only as a last resort the cloud's modified time. The
"current event still fits" check also rejects an event whose season no longer
matches the path, so the next scan re-dates the galleries already mis-catalogued.
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
Fills homeShort/awayShort on events created before the automatic fill, from the
same official FPA club list. Dry-run by default; --apply writes. Uses pg and
DATABASE_URL so it needs no build.
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
Handball fixtures carry no team abbreviations, so homeShort/awayShort were empty
and the delivery folder fell back to the full team name ("CDE Gil Eanes x CD
Feirense" instead of "GIL x CDF"). Add the federation's official "Cores, Siglas
e Nomes" short codes (Campeonato Betclic, men and women) and, when creating an
event, fill homeShort/awayShort from the club name whenever the fixture gave none.
Matching is by a normalised name (case, accents, punctuation and sponsor dashes
ignored); a club not on the list simply keeps the full name, so the fallback is
never worse than today. The list lives in one file to update once a season.
Only new events are filled here; existing events keep their current values (set
them by hand in the event settings, or ask for a one-off backfill).
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
The analysis queue was ordered oldest-first (created_at ascending), so a newly
shot or just-imported game went to the back, behind any older backlog of pending
photos, and seemed not to start until the event was boosted by hand ("Analisar
caras do jogo"). A photographer wants the game they just shot analysed now.
Order non-boosted photos newest-first (created_at DESC); a manually boosted event
still jumps ahead. The partial index is recreated to match the new order so the
claim stays index-ordered.
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
Autopilot skipped hand uploads (source UPLOAD) and only ran on photos that
arrived by FTP or the desktop app's ingest. A second photographer often adds
their photos by hand, and those should go through the event's autopilot too.
Now autopilot runs for every source but archive re-imports (CLOUD) when the
event has it switched on, both on arrival (ingest) and when photos join an event
(adopt). The arrival rename is unchanged — hand uploads keep their own names.
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
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
The send button chose a single destination. You can now pick several (a checklist
appears when there is more than one destination) and one send queues the photos to
all of them — the same photos to the agency FTP, a ZeroZero desk and a cloud
folder in one go. "Melhores" and "Enviar de novo" follow the same set.
Each destination still goes through the existing per-target deliver() path (queued
offline when there is no network), looped over the chosen set and the results
merged, so the server and the delivery queue are unchanged.
The chosen set is remembered on every change (not only on send), so it survives
switching tabs — which also fixes the earlier "forgets the destination" bug, so
this supersedes task/library-remember-target. Older saved single-id values are
still read.
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
Delivery folders/filenames use {homeShort}/{awayShort}, which fall back to the
full team name when the event has no short code. Short codes are only filled in
when an event is created from a fixture that carries abbreviations; an event made
by hand, or from a fixture without them, has none, so its folder gets the full
names ("CDE GIL Eanes x CD Feirense -Movit" instead of "CDE x CDF").
Add "Sigla casa"/"Sigla visitante" fields to the event settings (match events
only) so the codes can be set or corrected on any existing event; the folder
picks them up on the next delivery. The API and SDK already accept homeShort/
awayShort on updateEvent — this only wires the UI. Labels are inline for now to
avoid touching i18n.ts, which another branch is editing.
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
On the libunftp version in use, server.listen() returns Err when the server is
shut down gracefully, and the listen task writes that into the shared last_error
asynchronously. ftp_save_settings restarts the server (stop -> sleep -> start):
start() clears last_error and brings up a new server, but the *old* listen task
then returns its expected "shutdown error" and writes it into the same shared
slot — so a perfectly running server reports `server error: shutdown error`.
Give each server instance an epoch. The listen task records its error only while
it is still the current server; stop() moves the epoch on (so the server's own
shutdown is ignored) and clears last_error, since a server stopped on purpose is
not a server in error.
No command signatures change. cargo build/clippy/test to run in CI (no Rust
toolchain on this machine).
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
Two causes of the "half-loaded" grid where some READY photos stay grey:
1. cachedImage fetched thumbnails with no timeout, inside a 6-slot concurrency
limiter. A single stalled request (busy server, dropped connection) held its
slot forever and starved every queued tile, so the rest of the grid never
loaded. Download now runs through an AbortController that aborts after 20s,
freeing the slot so the queue keeps moving; the stalled photo falls back to
loading its URL directly instead of blocking the others.
2. The grid cell rendered `shown && <img>` with no onError and no fallback, so a
pending or failed image was an indistinguishable grey blank. A READY photo
now shows "…" while its thumbnail is still resolving and "erro" if the image
fails to load (onError), mirroring the loupe's resilience.
UI/cache only; no API or data changes.
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
The FPA destination preset built the game folder and file name from the full
team names ({home} x {away}), e.g. "Vitória SC x AA Águas Santas". FPA expects
the short codes ("VSC x AAAS"). Switch the FPA folder and fileName templates to
{homeShort} x {awayShort}.
Safe by construction: buildVars sets homeShort/awayShort with a `?? home`
fallback, so when an event has no short code the segment is the full name (never
empty, never a missing-variable error). Liga keeps full names on purpose
("1. Casa Pia x Sporting"), so its preset is unchanged.
Test: the FPA fixture now uses distinct full names + short codes, proving the
template renders the short code rather than the full name.
Claude-Session: https://claude.ai/code/session_01RAkmwWv6L5KmpX4h9JPD2i
The backlog is oldest-first, so a game someone asks to analyse now never starts. Boosted photos are claimed first, and the library says when the face worker is not running.
A single-occurrence critical alert (BIT-31305) traced to node09 CT 264: the
worker crashed with AssertionError [ERR_ASSERTION]: false == true at
Parser.finish in Node's bundled undici. That is nodejs/undici#5360 -- the
HTTP/1 parser asserts !this.paused when the remote socket ends while the
parser is paused for backpressure, and throws uncatchably from the socket
end handler. pm2 already restarted the worker within the same second, but
watchProcess() was also killing the whole process (and losing any other
in-flight work) for this one already-closed connection.
Recognize the narrow ERR_ASSERTION + undici + Parser.finish signature in
watchProcess() and report it as a warning without exiting; every other
uncaught exception still fails fast as before.
Paperclip-Issue: BIT-31305
Paperclip-Run: 02f17eaf-2939-43e0-93b2-f6d047452558