Commit Graph
34 Commits
Author SHA1 Message Date
spark 985188812a fix(desktop): reject update manifests whose signature version disagrees
ci / rust (pull_request) Successful in 4m4s
ci / typescript (pull_request) Successful in 8m25s
A retagged desktop-v* on the wrong commit announced 0.3.25 while the
binary was still signed as 0.3.24. Prefer the newest asset, skip mismatched
releases, and refuse to write such a manifest at build time.
2026-11-02 22:37:35 +00:00
sparkandClaude Opus 5.5 dd07599447 Merge main into archive videos: videos in the stored galleries, old videos found on the next walk, ffmpeg on deploy.
ci / rust (pull_request) Successful in 3m49s
ci / typescript (pull_request) Failing after 6m55s
Videos count in the galleries main now stores (a game's parts share one card): video_count summed per gallery, the
first video's frame as cover of a videos-only gallery, the videos of every part in the gallery page, and only from
published folders. The face review keeps main's own overlay class (.arq-rlightbox).

The migration (renumbered after main's) clears the folders' etags and walks every cloud at once, so the videos the
walks skipped until now are found; photos already indexed keep their etag and are not indexed again.

The API deploy puts a static ffmpeg in ~/.local/ffmpeg (md5 checked) when the host has none; the worker uses it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
2026-10-20 14:40:08 +00:00
spark 4eac0e6f95 fix(infra): serialize pm2 startOrReload between boot.sh and deploy.sh
ci / rust (push) Successful in 3m51s
ci / typescript (push) Successful in 7m22s
Live incident 2026-10-19: node09 rebooted and photoreport-boot.service ran
twice concurrently against a freshly-spawned, still-empty PM2 daemon. Both
invocations saw "not running" and launched photoreport-api, creating a
duplicate that crash-looped forever on EADDRINUSE (1700+ restarts by the
time it was caught, silently -- the original instance kept serving so
/health never flagged it). Deleted the ghost process and re-saved live.

Wrap the pm2 startOrReload calls in both scripts with the same flock so a
boot racing a webhook-triggered deploy (or a double-invoked boot unit)
serializes instead of racing the "is it running" check.

Paperclip-Issue: BIT-31073
Paperclip-Run: 9c6946f6-df0c-4544-97ac-6b00a2de8bd1
2026-10-19 10:05:23 +01:00
sparkandClaude Opus 5.5 da7296af99 Desktop 0.3.20 keeps macOS folder permissions between launches and updates.
ci / rust (pull_request) Failing after 45s
ci / typescript (pull_request) Failing after 3m38s
Unsigned, each build looked like a new app to macOS, so the Desktop prompt came back again and again. The
installer is now signed with one identity (a Developer ID when given, else a local one made once in the
login keychain), and the app says why it needs each folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017sovZz1NXBwx4VySojoyA1
2026-10-18 23:45:01 +00:00
sparkandClaude Opus 5.5 56f8660667 Let archive viewers download at web size, keep the cloud for editors, and serve an archive at its own address.
ci / rust (pull_request) Failing after 37s
ci / typescript (pull_request) Failing after 2m51s
- Downloads: one photo, a selection (up to 100) or a whole gallery (ZIP, up to 1000) at 2048 px with
  metadata, through a short-lived signed link. Gallery and large view get the buttons.
- The cloud is named only to those who edit the folder there (a small "originals" link); sign-in no
  longer mentions it.
- cloud_sources.hostname: the site's middleware serves that archive at the root of its own host;
  Caddy asks /v1/archive/host before getting a certificate. Set in the app (Endereço próprio).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017sovZz1NXBwx4VySojoyA1
2026-10-18 23:27:33 +00:00
spark d17b62d103 Desktop: use the GPU, Neural Engine and CPU together for face recognition.
ci / rust (pull_request) Failing after 38s
ci / typescript (pull_request) Failing after 7m37s
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.
2026-10-17 20:37:16 +01:00
CI Runner c28aae2740 fix(api): drain worker jobs before Prisma pool disconnect (BIT-31189)
ci / typescript (pull_request) Failing after 7s
ci / rust (pull_request) Successful in 9m16s
PM2 max_memory SIGINT was ending the Prisma/pg pool while archive and
delivery jobs still queried it, flooding "Cannot use a pool after calling
end". Await idle on all loop workers before $disconnect, and raise the
worker memory/kill_timeout so burst indexing does not restart every few
minutes.

Paperclip-Agent: David Santos (urlKey founding-engineer; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-31189
Paperclip-Run: 61448079-9293-4b3b-989d-b5857bf058c1
2026-10-15 01:30:06 +01:00
spark 17784c8b22 Desktop: macOS installer and update build on a registered Mac (macos-runner.sh); 0.3.5
ci / typescript (push) Successful in 24m55s
desktop-release / build (--target universal-apple-darwin, dmg,app, darwin-universal, macos) (push) Successful in 19m18s
ci / rust (push) Successful in 24m31s
desktop-release / build (deb,appimage, linux-x86_64, ubuntu-latest) (push) Successful in 1h16m12s
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-13 14:18:28 +01:00
spark 34a18bb862 Desktop 0.3.1: the release build gives the bundler the updater public key
ci / rust (push) Successful in 12m43s
ci / typescript (push) Successful in 14m5s
desktop-release / build (deb,appimage, linux-x86_64, ubuntu-latest) (push) Failing after 34m21s
Signed installers failed to verify (Missing comment in public key) because plugins.updater.pubkey was empty at build time.

Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-13 10:57:28 +01:00
spark daf7fa7c11 Come back by itself after a reboot: boot unit for api and site, TMPDIR at boot, PM2 retries
ci / rust (push) Successful in 9m14s
ci / typescript (push) Successful in 11m18s
photoreport-boot.service runs infra/deploy/boot.sh at boot (starts the PM2 apps from the last built code, without depending on a saved PM2 list); tmpfiles rule for TMPDIR; deploys pm2 save; PM2 retries with exponential backoff while the database starts.

Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-13 10:32:56 +01:00
spark 1177565c8a Desktop 0.3.0: local catalogue, self-updates through the API, offline start
ci / rust (push) Successful in 7m2s
ci / typescript (push) Failing after 9m5s
The catalogue indexes the photographer's own folders by SHA-256 so the editor opens those originals from disk
(incremental rescans, read-only). The shell updates itself from the latest desktop-v* Gitea release, which the API
reads with a read-only token and passes through (signed installers; no key, no updates). Without network the
window opens the web app bundled in the installer. Also fixes two tests that tampered with a signature by setting
a character that could already be the same one.

Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-13 03:33:39 +01:00
spark 906226b68e Auto crop (people, ball, focus; fitted to Peter crops), Shift+A first pass, Info window (I)
ci / rust (push) Successful in 8m15s
ci / typescript (push) Successful in 9m5s
Faces are read again when the original replaces a desktop preview.

Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-13 00:56:58 +01:00
spark 10406eef02 Faces on by default: deploy builds engines and fetches models; enabling biometrics queues old photos
ci / rust (push) Successful in 6m58s
ci / typescript (push) Successful in 7m47s
Also carries the Develop crop/level/flags change pushed as "x" by mistake (8b01ae8).

Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-13 00:24:39 +01:00
spark 4e83a48fc7 fix(deploy-receiver): set HOME for the systemd service
ci / typescript (push) Successful in 14m50s
ci / rust (push) Successful in 15m48s
deploy.sh (set -u) now needs $HOME for the one-time rustup/wasm-bindgen
install under $HOME/.cargo (0cd5119). systemd gives services no HOME by
default, so every deploy of app since that commit failed immediately with
"HOME: unbound variable" -- both the real deploy and its rollback, leaving
pr-app stuck on the pre-0cd5119 build for 5+ pushes.

Paperclip-Issue: BIT-31073
Paperclip-Run: 325858bb-25b9-44f5-81f0-8309989d08ff
2026-10-12 23:14:17 +01:00
spark be771f5e36 Local FTP in the desktop app
ci / typescript (push) Failing after 9m44s
ci / rust (push) Successful in 11m12s
The desktop app runs an FTP server for cameras, set up like the old Studio: port, logins (e.g. 1dx/1dx on a
private network), the ingest folder (default ~/Desktop/ingest) and the work folder originals move to once the
server has them (default ~/Desktop/{year}/{date} - {event}). Library -> FTP local shows what to type into the
camera, chooses the event and starts or stops the server; it can also start with the app.

Each complete JPEG goes to the event through the resumable upload (the event IPTC applies on the server). The
ingest folder is the queue: nothing is deleted, and what did not go is sent on the next start. The feed lives
above the modules, so photos keep arriving in Revelar too. An older desktop app is told to update.

Desktop 0.2.0. The desktop Cargo.lock is refreshed by the build.

Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-12 16:42:03 +01:00
spark 0cd5119581 Deploy builds the develop engine, installing its toolchain once
ci / rust (push) Successful in 6m49s
ci / typescript (push) Successful in 7m42s
The app host had no Rust toolchain, so Revelar showed "engine missing". The deploy now installs rustup, the
wasm32 target and the pinned wasm-bindgen CLI in the deploy user's home the first time, then builds the engine.

Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-12 16:32:16 +01:00
spark adb557290c Release hardening: no symbols, no source maps, no wasm names
ci / rust (push) Successful in 7m1s
ci / typescript (push) Successful in 7m36s
Rust release profiles strip symbols and debug info (desktop: fat LTO, panic=abort), the web app and site ship
without source maps, and wasm-opt drops debug, producer and name sections from the engine.

Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-12 16:13:37 +01:00
spark 1e6a198c89 feat: desktop shows the live web app; API finds its web app and CORS origin from the host
ci / rust (push) Successful in 6m56s
ci / typescript (push) Successful in 7m20s
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-12 15:36:25 +01:00
spark 8c42115a32 fix(app): find the API next to the app when the build does not say; world-readable web releases
ci / rust (push) Successful in 6m50s
ci / typescript (push) Successful in 7m55s
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-12 15:08:53 +01:00
spark f1906d4462 fix(deploy-receiver): strip own env vars before spawning deploy.sh
ci / rust (push) Successful in 6m52s
ci / typescript (push) Successful in 7m20s
Live incident: the receivers PORT=9010 (and DEPLOY_* vars) were inherited by
the deploy.sh child process it spawns, and `pm2 startOrReload --update-env`
reads that inherited env straight into the app. On pr-api this clobbered the
apis own PORT=3000 with 9010, crash-looping it with EADDRINUSE against the
receiver itself the instant a real webhook (or this fix test) ran a deploy.
Recovered the running service manually; this strips the receivers own keys
from the child env so every future deploy (any service, any container) is
unaffected.

Paperclip-Issue: BIT-31073
Paperclip-Run: f8f86a1f-44b2-4845-8a61-e33b080c4699
2026-10-12 14:45:39 +01:00
spark 68c99dac2a fix(infra): source apps/site/.env before pm2 starts the site
ci / typescript (push) Failing after 6m48s
ci / rust (push) Successful in 6m55s
site.config.cjs defaults API_URL to 127.0.0.1:3000, which is wrong whenever
pr-site runs on a different container than pr-api (every multi-container
deployment). pm2 reads process.env at invocation time, not apps/site/.env
(thats Nexts own, separate loading), so source it in deploy.sh before
startOrReload, same pattern as the prisma CLI fix. Adds .env.example to
document the var.

Paperclip-Issue: BIT-31073
Paperclip-Run: f8f86a1f-44b2-4845-8a61-e33b080c4699
2026-10-12 14:24:24 +01:00
spark 217ee3e186 fix(infra): source apps/api/.env before prisma migrate deploy
ci / typescript (push) Successful in 10m47s
ci / rust (push) Successful in 10m50s
prisma.config.ts reads DATABASE_URL straight from process.env with no .env
fallback, so `pnpm exec prisma migrate deploy` failed with "Connection url is
empty" even though the app itself (started with `node --env-file=.env`) had
no trouble reading it. Source the env file into the subshell first.

Paperclip-Issue: BIT-31073
Paperclip-Run: f547e267-f300-4ca3-a746-be388d7e38b2
2026-10-12 13:55:24 +01:00
spark 2fdbf18fc8 fix(infra): allow host-local override of pm2 api exec_mode/instances
ci / typescript (push) Successful in 9m42s
ci / rust (push) Successful in 10m34s
photoreport-api crashes immediately under node cluster mode on some LXC hosts
(native addons: sharp, @node-rs/argon2) while fork mode runs fine. Default
stays cluster/2 everywhere; a host can opt into fork mode by writing
/etc/photoreport/pm2-api.override.json, outside the repo so deploy.sh never
touches it.

Paperclip-Issue: BIT-31073
Paperclip-Run: f547e267-f300-4ca3-a746-be388d7e38b2
2026-10-12 13:52:02 +01:00
spark e7d619c841 fix(desktop): build script restarts itself after updating
ci / typescript (push) Successful in 17m35s
ci / rust (push) Successful in 22m35s
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 23:52:42 +01:00
spark 0ef9ed376e fix(desktop): build every shared package before the app
ci / typescript (push) Successful in 16m44s
ci / rust (push) Successful in 21m12s
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 23:50:53 +01:00
spark 749c482d6e build(desktop): one-command macOS installer build; engine in release workflow
ci / rust (push) Successful in 9m27s
ci / typescript (push) Successful in 10m50s
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 23:46:14 +01:00
sparkandClaude Opus 5.5 d074707f51 docs(infra): example reverse proxy (Caddy) and SFTPGo configuration
ci / rust (push) Successful in 7m7s
ci / typescript (push) Successful in 7m50s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 23:02:12 +01:00
sparkandClaude Opus 5.5 8947a51d83 feat(shop): galleries on the public sites, Stripe checkout and rendered downloads
ci / typescript (push) Successful in 15m12s
ci / rust (push) Successful in 22m16s
Sites per domain with two skins (PhotoReport, ShootYourMove) in apps/site (Next.js); public, unlisted and private galleries with watermarked photos; products, cart, orders with VIES reverse charge; the organization's own Stripe Checkout and signed webhooks; bought files rendered from the original with edits and IPTC, emailed; Vendas module in the app.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 22:36:16 +01:00
sparkandClaude Opus 5.5 64da90d2f2 feat(develop): Revelar, the synced editor with one engine on web, desktop and server
ci / typescript (push) Successful in 9m59s
ci / rust (push) Successful in 21m53s
engine/core renders with the LightCraft pipeline; engine/wasm runs it in the browser; workers/render replays op logs and renders originals natively. Op log with live fan-out and offline outbox; edited thumbnails and deliveries rendered from the original. Revelar page with Basic and optional modules, crop with aspect presets and straighten, before/after, undo/redo, copy/paste settings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 22:36:02 +01:00
sparkandClaude Opus 5.5 3f702c4e23 feat(faces): detect, group and name players by face; squad reference photos
ci / rust (push) Successful in 2m3s
ci / typescript (push) Successful in 4m26s
Faces end to end (YuNet + AuraFace worker in Rust, grouping per event, confirm/merge/ignore, suggestions from known people, loupe boxes), blurred faces kept out of groups (sharpness gate tuned on a real football match), and reference photos for the squad.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 18:41:07 +01:00
sparkandClaude Opus 5.5 fca9281f4e feat: phase 1 ingest, library, IPTC and Nextcloud delivery
ci / rust (push) Successful in 2m20s
ci / typescript (push) Successful in 5m23s
- packages/metadata: {variable} templates, Photo Mechanic code replacement, IPTC fields of the current pad (title = persons shown), IIM/XMP mapping, delivery folder and file-name templates (FPA, Liga)
- API: events with agenda and IPTC template, FTP logins, ingest worker (hash, dedupe, EXIF in Lisbon time, routing by agenda + capture time, previews), library culling, IPTC preview, code list, signed file URLs
- Realtime: Socket.io with Postgres LISTEN/NOTIFY fan-out
- Delivery: queue with fixed sequence numbers, 4000 px JPEG 100 with IPTC via ExifTool, WebDAV upload with retries, OCS share links, encrypted app passwords
- Web app: approved type and Lightroom-style workspace, grid/loupe with keyboard culling, players, IPTC panel, delivery queue, code list editor

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 15:46:07 +01:00
sparkandClaude Opus 5.5 29e96b3023 feat: deploy script with rollback; crop command contract (8/10)
ci / typescript (push) Failing after 34s
ci / rust (push) Successful in 1m41s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 14:48:58 +01:00
sparkandClaude Opus 5.5 74f8ee8704 feat: engine crop command and panels; deploy receiver (7/10)
ci / typescript (push) Failing after 36s
ci / rust (push) Successful in 1m41s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 14:48:15 +01:00
sparkandClaude Opus 5.5 b1e4eca6c5 chore: monorepo config, CI, architecture docs and agent rules
ci / typescript (push) Failing after 40s
ci / rust (push) Successful in 1m52s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HT6iXLYUUp9pJz5Kza9xCW
2026-10-11 13:54:20 +01:00