Commit Graph
10 Commits
Author SHA1 Message Date
Leon Tonhäuser a3dc56778d fix: prioritize authorized search album 2026-08-12 17:58:27 +02:00
Leon Tonhäuser 9aa79cbce9 feat: enable downloads from search results 2026-08-12 16:45:42 +02:00
Leon Tonhäuser 86dfe8053d fix: harden production flows and user messaging 2026-08-11 16:07:13 +02:00
Leon TonhäuserandClaude 962e2c7dc2 fix: download 404, next/image thumbnail 400, and cross-album search
Three production bugs on redaktionen.leon-tonhaeuser.de:

1. Download 404 (POST /api/download-intents → 404). getAlbum requested
   ?withoutAssets=true, so album.assets was always empty and the usages
   membership check (album.assets.some(id)) always failed → ASSET_NOT_IN_ALBUM
   → 404. Same root cause broke bulk-download's assetToGrantedAlbum map.
   Removed withoutAssets so consumers that authorize via album.assets get the
   real list; grants/thumbnail consumers ignore the extra data.

2. _next/image 400 on thumbnail proxy. next/image's optimizer choked on the
   watermarked streaming thumbnail response. Thumbnails are already
   server-resized to 800px, so the optimizer added nothing — switched
   leuchtkasten + admin AlbumGrid to plain <img>, matching photo-gallery.

3. Cross-album search "finds nothing". Immich albumIds is AND across albums
   (PR #18985): one /search/metadata call with all granted ids requires the
   asset to be in EVERY album, so single-album photos never match. Album-
   internal search passed one id so it worked. Fan out per granted album and
   merge; callers already paginate in-app.

Also drop the jahr filter from the album-internal search form (unnecessary
within a single album); backend still honors a jahr query param.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 14:12:19 +02:00
Leon TonhäuserandClaude a3ec068cac feat: redesign photo overview (masonry + lightbox) and fix hoch/quer search
The album search could not distinguish portrait from landscape: the format
filter ran client-side over a single 60-item page and relied on exifInfo that
Immich never returned (no withExif flag), so the orientation guard fell
through and every photo matched every filter. Pagination links also dropped
format/jahr on the next page.

- immich/client: send withExif: true on /search/metadata so
  exifImageWidth/Height are populated for orientation filtering and masonry
  aspect ratios.
- albums/filter (new): filter + paginate across the full fetched set so total,
  page slice and has-more-pages stay consistent with active filters; both the
  album detail and the cross-album search pages use it.
- albums/photo-gallery (new client component): masonry grid with native
  EXIF aspect ratios (object-fit: cover, no more 3:2 letterboxing), hover
  overlay with filename/date + merken/lizenzieren/vergrößern, and a
  full-screen lightbox with keyboard nav (Esc/arrow keys).
- catalog-content: drop the old PhotoContactSheet; keep AlbumContactSheet and
  thread format/jahr through PhotoPagination links.
- Album detail search form restyled to the editorial design system (sharp ink
  borders) instead of the shadcn rounded card.
- Tests: filter.test.ts covers the orientation/year/pagination logic;
  catalog-content.test.tsx updated to the gallery + lightbox structure;
  immich client test expects withExif: true.

Skipped: global search form still uses shadcn styling (visually inconsistent
but functionally fixed); albums > 1000 photos lose tail items (noted with a
ponytail ceiling comment).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 13:36:46 +02:00
Leon Tonhäuser e555069ee1 feat: merge cross-album search, auto-rules, album UI redesign, editorial archiving and pdf download into main 2026-08-11 02:53:19 +02:00
Leon Tonhäuser 375e5b8b7d feat: add cross-album search, auto-rules, album UI redesign, editorial archiving and pdf download 2026-08-11 02:53:15 +02:00
Leon TonhäuserandClaude 8dfaf8284e fix: support Immich v3 search/metadata cursor pagination
Immich v3 (server runs v3.1.0) returns search `nextPage` as an opaque cursor
string instead of a page number. The client schema validated `nextPage` as
`number`, so every album open failed schema validation and surfaced as
"Fotos momentan nicht erreichbar" (the catalog catch swallows the real
IMMICH_INVALID_RESPONSE into IMMICH_UNAVAILABLE).

Accept `string | number` for nextPage/previousPage in the schema and the
ImmichSearchPage type; we only use nextPage as a has-more-pages signal.
Pagination links are now derived from the current page number (currentPage ± 1)
instead of the returned nextPage value, since the v3 cursor can't be used as a
page number. Album page passes the normalized current page through.

Add a client test locking the v3 cursor-string response.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 02:23:21 +02:00
Leon Tonhäuser 846904f3db fix: harden editorial thumbnail authorization 2026-08-09 22:32:18 +02:00
Leon Tonhäuser 66f0599653 feat: add branded editorial photo catalog 2026-08-09 22:22:31 +02:00