Wave 3: all six screens (E1 shell/setup/locations/settings, E2 library/detail/scan)
Nav graph, setup with distinct URL-vs-credential errors, locations tree with reorder and bulk move, settings; library grid with search/sort/filter, detail with soft-delete undo, continuous scan with duplicate-ISBN warning. Verified by orchestrator: assembleDebug exit 0; testDebugUnitTest exit 0, 91 tests, 0 failures, 0 errors (68 -> 91). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
fdc7809c-518c-4711-b7a9-781a33e330d5
|
||||
@@ -0,0 +1,14 @@
|
||||
=== E1-shell attempts=1 quota_waits=0 hard_fails=0 ===
|
||||
cost=$2.8037944 turns=6 err=?
|
||||
--- result (tail) ---
|
||||
ull nav graph; `library?shelfId={shelfId}` doubles as bare `library` via a nullable arg
|
||||
- `ui/setup/SetupViewModel.kt`, `ui/setup/SetupScreen.kt` — new: URL/email/password form; reachability probe is a short-timeout GET to `/api/health` done *before* attempting login, so URL/network errors and 400/401/403 credential errors get distinct messages
|
||||
- `ui/locations/LocationsViewModel.kt`, `ui/locations/LocationsScreen.kt` — new: bookcase→shelf tree, add/edit/delete dialogs, up/down reorder, per-shelf book counts, tap-shelf navigation, "Move books" bulk action
|
||||
- `ui/settings/SettingsViewModel.kt`, `ui/settings/SettingsScreen.kt` — new: server URL, account (user id — see gap below), sign out, manual sync + last-sync time, book/cover counts
|
||||
- `data/repo/LocationRepository.kt` — extended with `moveBooks(fromShelfId, toShelfId?)`, built only from BookDao's existing observe/upsert surface (no BookDao edit)
|
||||
- `app/src/test/.../LocationRepositoryTest.kt` — new: 3 tests covering `moveBooks` (reassign, unassign, PENDING_CREATE preserved)
|
||||
- `MainActivity.kt` — rewritten to host `BookshelfNavHost`; picks `setup` vs `library` start route from `authRepository.serverUrl`/`isLoggedIn`
|
||||
|
||||
**Boundaries respected:** did not touch `ui.library`/`ui.detail`/`ui.scan`, `ui.theme`/`ui.components`, `BookDao`/`BookRepository`, or any build files. Waited out E2's in-progress work (including one quota-wait cycle) rather than working around missing `LibraryScreen`/`DetailScreen`/`ScanScreen`.
|
||||
|
||||
**Gap vs SPEC:** the Settings "account" section shows the PocketBase user id, not the email — `AuthRepository`/`SettingsStore` (wave-2, out of my edit scope) never persists the login email, only the token and user id. Not blocking, but worth a follow-up if a human-readable account label is wanted.
|
||||
@@ -0,0 +1 @@
|
||||
c4155cba-b34d-4321-b0a7-e7c225b23e32
|
||||
@@ -0,0 +1,19 @@
|
||||
=== E2-books attempts=2 quota_waits=1 hard_fails=0 ===
|
||||
cost=$0.25929520000000006 turns=5 err=?
|
||||
--- result (tail) ---
|
||||
s/gw assembleDebug` → **exit 0** (UP-TO-DATE, `app-debug.apk` already built)
|
||||
- `~/bookshelf/tasks/gw testDebugUnitTest` → **exit 0**, **91 tests, 0 failures, 0 errors, 0 skipped**
|
||||
|
||||
**My scope (ui.library, ui.detail, ui.scan) — all present and unchanged:**
|
||||
- `ui/library/LibraryModels.kt`, `LibrarySyncPresenter.kt`, `LibraryViewModel.kt`, `LibraryScreen.kt` — adaptive cover grid, search, filter by bookcase/shelf, sort, empty state, FAB→scan, pull-to-refresh sync status line
|
||||
- `ui/detail/DetailViewModel.kt`, `DetailScreen.kt` — cover/metadata, collapsible description, editable notes, location picker, edit mode, soft-delete with undo snackbar
|
||||
- `ui/scan/ScanModels.kt`, `ScanViewModel.kt`, `ScanScreen.kt` — CameraX preview + reticle on the existing `ScannerController`/`IsbnBarcodeAnalyzer`, found/not-found/duplicate-warning bottom sheet, continuous mode with session counter, torch toggle, permission handling, manual-ISBN dialog
|
||||
- Tests: `LibrarySortTest`, `LibraryFilterLogicTest`, `LibrarySyncPresenterTest`, `ScanModelsTest`, plus an added `observeById` case in `BookDaoTest`
|
||||
|
||||
**Minimal justified extensions (still in place):** `AppContainer.metadataRepository` wired with a bare `OkHttpClient` (no PocketBase auth token leaked to third-party APIs); `BookDao`/`BookRepository.observeById` for live detail-screen updates.
|
||||
|
||||
**Not touched:** ui.nav, ui.setup, ui.locations, ui.settings, MainActivity, ui.theme, ui.components, build.gradle.kts, libs.versions.toml, LocationRepository/ShelfDao/BookcaseDao.
|
||||
|
||||
**Unverifiable in this environment:** actual camera/torch/reticle behavior on-device — no emulator/KVM available, so verification is compile + unit tests only, per the project's stated quality bar.
|
||||
|
||||
Nothing further to do — the wave-3 E2 deliverable is done and green.
|
||||
Reference in New Issue
Block a user