LocalDateConverterTest: added negative test for invalid string input
(DateTimeParseException).
CategoryDaoTest, LocationDaoTest: added getAll tests with multiple
entities to verify complete retrieval.
ItemDaoTest: fixed getExpiringSoon test (was calling non-existent
getExpiringSoon(Int) instead of getExpiringSoonByCutoff(LocalDate));
added getAll, getById positive, and getById negative tests.
JsonRoundtripTest (new): verifies lossless export-import roundtrip
with multiple items covering all fields, nullable fields (null
kcalPer100g, null expiryDate), and empty database edge case.
TestFakes (new): extracted shared Fake DAO implementations from
ImportExportRepositoryImplTest to avoid private class redeclaration
errors across test files in the same package.
Closes#22
autopilot.prompt.md: new agent prompt (Claude Opus 4.6) that works
through the ticket backlog fully automatically. Each cycle:
1. Runs next-ticket.ps1 – stops cleanly when no tickets remain.
2. Invokes nextstep as a fresh, isolated sub-agent (Claude Opus 4.6)
per ticket; no context is shared between iterations.
3. Commits with Conventional Commits after each successful ticket.
4. Repeats until queue is empty or an unresolvable error occurs.
domain/repository/ImportExportRepository.kt: new interface with
exportToJson() and importFromJson(json) suspend functions.
data/export/ExportData.kt: serializable data class bundling all
entity lists for JSON serialization via kotlinx.serialization.
data/export/ImportExportRepositoryImpl.kt: implementation using
kotlinx.serialization + Dispatchers.IO; exportToJson fetches all
DAOs and serializes, importFromJson deserializes and upserts back.
data/db/dao/{Category,Item,Location,Settings}Dao.kt: added @Upsert
upsertAll() suspend function to each DAO to support bulk import.
di/RepositoryModule.kt: bound ImportExportRepositoryImpl to
ImportExportRepository via Hilt @Binds.
test/.../FakeXxxDao.kt: upsertAll() implemented in all four fake
DAOs for unit test coverage.
- 4 Repository-Interfaces in domain/repository/ (Category, Location, Item, Settings)
- 4 Implementierungsklassen in data/repository/ mit Hilt @Inject
- RepositoryModule mit @Binds-Bindings fuer alle Repositories
- Datumslogik (getExpiringSoon) aus ItemDao in ItemRepositoryImpl verschoben
- 20 Unit-Tests mit Fake-DAOs (4 pro Repository)
- DatabaseModule: @Module + @InstallIn(SingletonComponent) with @Singleton-scoped
Room.databaseBuilder provider and four @Provides methods for ItemDao,
CategoryDao, LocationDao and SettingsDao
- DatabaseModuleTest: smoke-test verifies all four DAO providers return
non-null objects using an in-memory Room database
- KrisenvorratDatabase mit allen 4 Entities und LocalDateConverter
- CategoryDao, LocationDao, ItemDao, SettingsDao mit CRUD und Flow-Queries
- ItemDao.getExpiringSoon(daysUntil) als Default-Interface-Methode
- SettingsDao mit @Upsert (Room 2.6.1)
- Instrumentierungstests für alle 4 DAOs (in-memory DB)
- androidx.room:room-testing zu Dependencies ergänzt
Beide Workflow-Prompts erstellten Sub-Tickets per gh issue create, setzten
aber weder Board-Zugehörigkeit (gh project item-add) noch Order-Wert
(gh project item-edit). Das führte dazu, dass neue Tickets auf dem Board
ohne Order-Wert blieben und von next-ticket.ps1 nicht gefunden wurden.
Lösung: In workflow-planning.prompt.md (Phase 4) und
workflow-block-planning.prompt.md (Phase 6) einen neuen Pflichtabschnitt
'Board & Order' ergänzt mit den konkreten gh-Befehlen und Verweis auf SKILL.md.
- Add CategoryEntity, LocationEntity, SettingsEntity, ItemEntity
- ItemEntity: FK to Category+Location with CASCADE, indices on FK columns
- LocalDateConverter: LocalDate? <-> String? (ISO-8601) via @TypeConverter
- Add LocalDateConverterTest: 4 unit tests (null/non-null round-trip)
- ValidateSet entfernt (war zu restriktiv - kein Agent-Fehler mehr bei 'In Progress')
- Normalisierung: 'In Progress' → 'InProgress' via .Trim()/-replace
- Fehlerdetails bei gh-Fehler sichtbar (kein Out-Null mehr)
- Null-Check auf content vor content.number-Vergleich (robuster gegen Draft-Items)
- Board-Fehler mit Exit 1 und Klartext-Meldung
- Getestet: alle 3 Status-Übergänge + 'In Progress' mit Leerzeichen + Fehlerfälle
android-dev.ps1:
- Changed GPU mode from 'auto' to 'guest' (host/auto/swiftshader/angle
all fail with 'OpenGL Core Profile not supported' on this machine)
- Added -no-snapshot-load flag (prevents corrupt snapshot issues)
- Increased PackageManager wait from 5s to 30s (PM needs ~30s after
sys.boot_completed=1 before adb install succeeds)
- Replaced blocking 'adb wait-for-device' with polling loop (120s timeout)
- Improved emulator-stop with force-kill fallback for hung processes
- Simplified screenshot action: exec-out screencap instead of push/pull/rm
- Made all timing values configurable via variables at top of script
android-emulator SKILL.md:
- Updated manual start command to use -gpu guest
- Updated PM wait time reference from 5s to 30s
- Added known issue #3: OpenGL Core Profile not supported (documents
symptoms, affected GPU modes, and workaround)
app/build.gradle.kts:
- Enabled buildConfig in buildFeatures to expose VERSION_NAME
app/src/main/java/de/krisenvorrat/app/MainActivity.kt:
- Replaced plain Text greeting with centered Column layout
- Shows app title 'Krisenvorrat' (headlineLarge) and version
'v1.0' via BuildConfig.VERSION_NAME (bodyMedium, onSurfaceVariant)
Verified: built, deployed to emulator, and confirmed via screenshot.
android-build SKILL.md:
- Replaced all OneDrive path references with x:\krisenvorrat
- Changed 'OneDrive-Locks' terminology to 'File-Locks'
android-build android-dev.ps1:
- Changed 'OneDrive-Lock' comments to 'File-Lock'
- Script already used dynamic $PSScriptRoot path resolution, no path fix needed
android-emulator SKILL.md:
- Updated path references to new project location
Motivation: project was moved from C:\Users\JensR\OneDrive\Code\krisenvorrat
to x:\krisenvorrat to avoid OneDrive sync issues.
pixel_7_pro ist nur das SDK-Hardwareprofil, kein Zielgerät. Erklärung
ergänzt, dass kein Samsung-Profil im SDK verfügbar ist und das AVD
über config.ini auf S24-Ultra-Werte angepasst wird.
Screenshots und andere temporäre Dateien werden jetzt nach tmp/ statt
ins Projekt-Root geschrieben. tmp/ ist in .gitignore eingetragen.
Betrifft android-dev.ps1 Screenshot-Aktion und Skill-Beispiele.
Dokumentiert die 3 in diesem Repo gefundenen Fehlerklassen als
wiederverwendbares Prüf-Prompt für andere Repos mit ähnlichen
gh-tickets PowerShell-Skripten.
next-ticket.ps1:
- --json-Flag: Leerzeichen nach Kommas entfernt ('number, title, labels'
→ 'number,title,labels'). gh CLI interpretierte die Felder als 3
separate Argumente → Fehler 'accepts 1 arg(s), received 3'.
- gh project item-list ohne --limit ergänzt (--limit 200). Das
Standard-Limit von 20 führt bei >20 Board-Items dazu, dass Tickets
nicht gefunden werden.
create-next-ticket.ps1:
- Type-Label-Validierung war unvollständig: nur migration, tech-decision
und infrastructure wurden akzeptiert. Alle 8 gültigen Typen ergänzt
(block-planning, feature, refactoring, planning, test).