Repository navigation
Expand file tree
/
Copy pathprogress.txt
More file actions
24 lines (21 loc) · 3.36 KB
/
Copy pathprogress.txt
File metadata and controls
24 lines (21 loc) · 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Codebase Patterns
- `./gradlew compileDebugKotlin --rerun` with grep for "warning:.*deprecat" is the reliable way to enumerate real Kotlin-compiler deprecation warnings across app/src/main (gradle's own "Deprecated Gradle features" noise is unrelated and always present - filter it out).
- `./gradlew ktlintFormat` auto-fixes ktlint line-wrap violations introduced by a manual edit faster than hand-formatting.
- Check a new AndroidX package actually ships in the *currently pinned* dependency version before doing a bare import swap for a "moved to package X" deprecation - `jar tf` on the cached transformed jar under ~/.gradle/caches confirms without bumping the version.
## 2026-07-19 - US-002
- Enumerated every deprecation warning in app/src/main via compileDebugKotlin. Fixed 5 categories with confirmed same-version drop-in replacements (hiltViewModel import path, LocalLifecycleOwner import path, KeyboardOptions autoCorrect->autoCorrectEnabled rename, Locale(String) -> Locale.Builder, Icons.Filled.ViewList -> Icons.AutoMirrored.Filled.ViewList).
- Left 3 categories unfixed with notes in prd.json: EncryptedSharedPreferences/MasterKey (androidx.security-crypto has no direct successor, only a full Tink rewrite), LocalClipboardManager (replacement is suspend-based, not a like-for-like swap), ScrollableTabRow/rememberSwipeToDismissBoxState's confirmValueChange (Compose's own docs say no direct equivalent exists).
- Files changed: MainActivity.kt and 15 other screen files (hiltViewModel import), ScannerScreen.kt (LocalLifecycleOwner import), AuthScreen/HouseholdsScreen/HouseholdEditScreen/SettingsScreen/SearchScreen/LocationDetailScreen/StorageOverviewScreen.kt (autoCorrectEnabled), LocationDetailScreen.kt (ViewList icon).
- **Learnings for future iterations:**
- No regression tests were added for this story - these are compile-time API surface renames with byte-for-byte identical runtime behavior, not logic changes, so nothing new to assert.
- Full JVM test suite, ktlintCheck, detekt all green.
---
## 2026-07-19 - US-003
- Genuine audit of app/src/main/java for unguarded !!, unsafe casts, and division/index on possibly-empty collections in ViewModels/DTO mapping. No confirmed defects found - codebase was already hardened (zero `!!` anywhere in prod source; the one real `as` cast is a system-service cast not DTO data; the one real division-by-collection-size is already zero-guarded in DashboardLocationChart.kt; the one `.first()` call is already gated by a `size == 1` check per CLAUDE.md's documented prior fix).
- No files changed, no fix/test added - per PRD instructions, a category with nothing to fix is marked passing with notes explaining what was checked, not padded with a fabricated fix.
- Full JVM test suite, ktlintCheck, detekt all pass.
- **Learnings for future iterations:**
- This repo has no separate DTO-to-UiState "Mapper" class/object layer - mapping happens inline inside ViewModels, so audit ViewModels directly rather than searching for `*Mapper` files.
- grep for `!!`, `as [A-Z]`, division near `.size`/`.count()`, and `.first()`/`.last()`/`.random()` across app/src/main/java (exclude androidTest) is a fast way to sweep this bug class; cross-check each hit's file/line against CLAUDE.md's "Deletes"/"Editing the hierarchy" sections first since several of these were already fixed and documented in a prior branch.
All PRD stories now pass (US-001, US-002, US-003).
---