Commit Graph
19 Commits
Author SHA1 Message Date
Leon TonhäuserandClaude Opus 5.5 c0c2425dda Merge v2.1-2.2.0 features onto SakaniUI base
Ports calendar, self-service, sorting, image descriptions, logo (2.1),
filename search (2.1.1), statistics page, collab option and bundled
invoice PDF delivery (2.2.0) onto the deployed SakaniUI portal.

Also fixes the statistics daily series, which ended yesterday and so
hid today's activity from the charts, and ignores Playwright
test-results/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 22:19:34 +01:00
Leon Tonhäuser 7204dd6b60 feat: v2.2 batch (calendar, self-service, sort, description, filename search, stats, collab, invoice) on pre-redesign base 2026-11-30 21:20:13 +01:00
Leon Tonhäuser 69264ce165 Secure Sakani portal and show full album titles 2026-11-30 19:14:57 +01:00
Leon Tonhäuser 0b65fbba16 fix: rebuild migration history as baseline so migrate works on prod
Squash the 13 historical migrations into one generated baseline whose
journal entry reuses the original 0000 timestamp: the migrator skips it
on every existing database (prod journal stuck at 0006) and applies it
only on fresh ones. Parity with the old chain verified via pg_dump diff
plus fresh/existing/prod-simulated drizzle-kit migrate runs. Historical
files move to drizzle-history/pre-squash-2026-08/ for integration tests
that exercise legacy migration behavior.

Also repair db tests that already failed before this change:
- raw SQL targeted users, but the table has always been "user"
- membership recheck mocked legacy getAsset.albums instead of searchPhotos
- audit rollback assertion walks drizzle's wrapped error cause chain
- keyset index probe pinned to NULLS LAST ordering, removing a planner
  cost tie-break that flipped with index creation order
2026-08-25 11:56:52 +02:00
Leon TonhäuserandClaude 6a31e5f411 fix: download 404 — Immich getAlbum no longer returns assets
The previous getAlbum fix (removing ?withoutAssets=true) was insufficient:
current Immich's GET /albums/:id NEVER returns assets — AlbumService.get
calls findOrFail with { withAssets: false } and the withoutAssets param is
gone. So album.assets was always empty and every download still failed with
ASSET_NOT_IN_ALBUM → 404. The AI_MEMORY "getAlbum + iterate album.assets"
guidance was stale (written for an older Immich API).

Membership is now verified via /search/metadata with an id + albumIds filter,
which returns the asset only if it belongs to the album. This is the
authoritative test (asset.albums is unreliable for older assets too).

- usages/service.ts: loadRequestedAlbum checks isAssetInAlbum via searchPhotos
  before fetching the album name; getAlbum now only provides albumName.
- bulk-download/route.ts: build the assetId→album map via searchPhotos per
  granted album instead of the empty getAlbum().assets iteration.
- immich client/types: add optional `id` to the searchPhotos input.
- tests: usages mocks now stub searchPhotos; the 13 pre-existing service
  test failures (mock returned getAlbum without assets → TypeError) are
  resolved — 20/20 pass.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 14:25:55 +02:00
Leon Tonhäuser 0576d946c5 fix: resolve remaining typescript errors 2026-08-11 11:27:44 +02:00
Leon Tonhäuser f4c06cbc95 fix: type errors 2026-08-11 11:24:37 +02:00
Leon Tonhäuser 6631530dcb fix: usage-accounting.test.ts syntax error 2026-08-11 11:22:46 +02:00
Leon Tonhäuser 4a9da65901 feat: redesign dashboard, add lightbox bulk download, and standardize ui 2026-08-11 11:18:39 +02:00
Leon Tonhäuser ba673ad732 fix: harden download history and attempt ledger 2026-08-10 16:45:40 +02:00
Leon Tonhäuser 510fde7afa fix: harden delivery accounting and history 2026-08-10 13:44:04 +02:00
Leon Tonhäuser 8871e4794a feat: stream originals with download accounting 2026-08-10 13:10:13 +02:00
Leon Tonhäuser c400167b8f fix: enforce one active logical album grant 2026-08-10 12:14:38 +02:00
Leon Tonhäuser 74ab2eb85f fix: harden legacy normalization and grants 2026-08-10 11:53:28 +02:00
Leon Tonhäuser 3cdca5c82c fix: preserve legacy accounting migration data 2026-08-10 11:39:44 +02:00
Leon Tonhäuser 3de1530074 fix: harden usage accounting idempotency 2026-08-10 10:59:12 +02:00
Leon Tonhäuser 22fe6bf659 feat: add usage and download intent accounting 2026-08-09 22:52:27 +02:00
Leon Tonhäuser 3f84b840d9 fix: serialize editorial approval delivery 2026-08-09 21:23:32 +02:00
Leon Tonhäuser 7acaacb92e feat: add portal database schema 2026-08-09 20:26:18 +02:00