feat(android): add-to-album overflow + timeline multi-select (Spec 064) #1280

Merged
chris merged 3 commits from spec/064-android into main 2026-10-17 09:28:33 +02:00
Owner

Summary

Spec 064 Android-Lane (S4 + S5). Schließen nach PR #1278 (API-Batch-Endpoint, bereits gemergt).

  • API-Client: MemoriesApi + HttpMemoriesApi neu addAlbumItems(...) → POST /api/albums/{id}/items/batch (Body mediaItemId-Liste, Antwort {added, skipped}); AlbumDetailViewModel.addItems vom POST-Loop auf einen Batch-Call umgestellt (danach einmaliges Re-Read für echte Thumbnails)
  • Viewer (a): neues ViewerActionsMenu (MoreVert + Dropdown) im ViewerTopBar-trailing-Slot — Favorit, Teilen, Download, Info, Papierkorb + neu „Zu Album hinzufügen"; wiederverwendet die ViewerActionsRow-Handler
  • Timeline (b): TimelineViewModel Selection-State (enterSelection/toggleSelection/exitSelection/trashSelected); Long-Press → Auswahl, Tap toggelt; Selection-Header (Zähler + Close) + Bottom-Toolbar: Zu bestehendem Album, Album erstellen, Löschen (mit Confirm), Auswahl aufheben
  • Shared: AddToAlbumViewModel + AddToAlbumSheet bedienen beide Einstiegspunkte
  • Teilweise fehlgeschlagener Trash behält fehlgeschlagene IDs ausgewählt (retryable); Snackbar des Callers statt einer unsichtbaren Sheet-eigenen

Verification

  • ./gradlew :app:testDebugUnitTest (workdir apps/android, erzwungener --rerun durch Orchestrator): 514 Tests, 0 Failures, 0 Errors
  • Lint: 17 vorbestehende Errors identisch zu main; die drei neuen Dateien ohne Findings
  • CI auf spec/064-android: Run scoped PR tests success

Refs: spec 064, S064T003

## Summary Spec 064 Android-Lane (S4 + S5). Schließen nach PR #1278 (API-Batch-Endpoint, bereits gemergt). - **API-Client:** `MemoriesApi` + `HttpMemoriesApi` neu `addAlbumItems(...)` → `POST /api/albums/{id}/items/batch` (Body `mediaItemId`-Liste, Antwort `{added, skipped}`); `AlbumDetailViewModel.addItems` vom POST-Loop auf einen Batch-Call umgestellt (danach einmaliges Re-Read für echte Thumbnails) - **Viewer (a):** neues `ViewerActionsMenu` (MoreVert + Dropdown) im `ViewerTopBar`-trailing-Slot — Favorit, Teilen, Download, Info, Papierkorb + neu „Zu Album hinzufügen"; wiederverwendet die `ViewerActionsRow`-Handler - **Timeline (b):** `TimelineViewModel` Selection-State (`enterSelection`/`toggleSelection`/`exitSelection`/`trashSelected`); Long-Press → Auswahl, Tap toggelt; Selection-Header (Zähler + Close) + Bottom-Toolbar: Zu bestehendem Album, Album erstellen, Löschen (mit Confirm), Auswahl aufheben - **Shared:** `AddToAlbumViewModel` + `AddToAlbumSheet` bedienen beide Einstiegspunkte - Teilweise fehlgeschlagener Trash behält fehlgeschlagene IDs ausgewählt (retryable); Snackbar des Callers statt einer unsichtbaren Sheet-eigenen ## Verification - `./gradlew :app:testDebugUnitTest` (workdir `apps/android`, erzwungener `--rerun` durch Orchestrator): **514 Tests, 0 Failures, 0 Errors** - Lint: 17 vorbestehende Errors identisch zu `main`; die drei neuen Dateien ohne Findings - CI auf `spec/064-android`: `Run scoped PR tests` success Refs: spec 064, S064T003
feat(android): add-to-album overflow + timeline multi-select
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 5s
Build and Deploy / Android unit tests and debug APK (push) Successful in 3m26s
e924772a70
Spec 064 S4+S5: bring the Android app to parity with the web's album-add
flow and timeline multi-select.

- API: add the new idempotent batch endpoint
  `POST /api/albums/{albumId}/items/batch` -> {added, skipped}. The
  singular `mediaItemId` field carrying an array is the server's contract,
  not a typo; documented as such. `AlbumDetailViewModel.addItems` now makes
  ONE batch call instead of looping a POST per photo, then re-reads album
  detail (the batch returns counts only) so the grid keeps real thumbnails.
- Viewer: a "…"-overflow (MoreVert + DropdownMenu) in the ViewerTopBar
  trailing slot exposes favorite/share/download/info/trash plus the new
  "Zu Album hinzufügen". It reuses the existing ViewerActionsRow handlers
  rather than duplicating them.
- Timeline multi-select (web parity): long-press enters selection, tap
  toggles, a selection header (count + close) and a bottom action bar offer
  add-to-existing-album, create-album, trash (with a TrashConfirmDialog) and
  clear-selection. After an action the selection clears and a snackbar fires;
  a partial trash failure keeps the failed ids selected so they stay retryable.
- Shared AddToAlbumViewModel + AddToAlbumSheet (list accepted albums, add via
  batch, or create-and-add) back both the viewer overflow and the timeline
  bar; wired through the app-scoped ViewModel factory.
Merge remote-tracking branch 'origin/main' into spec/064-android
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 5s
Build and Deploy / Android unit tests and debug APK (push) Successful in 9m43s
7904780692
Merge remote-tracking branch 'origin/main' into spec/064-android
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 5s
Build and Deploy / Android unit tests and debug APK (push) Successful in 2m7s
dc09d27545
chris merged commit 50ab544b12 into main 2026-10-17 09:28:33 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1280
No description provided.