feat(app): scan-mode sync, confirmation-gated documents, single-pass product classification
Fixes reported from APK field testing: DO/Product scan mode was inconsistent between the camera drawer and documents screen (now one shared provider, with an orange/green color cue); unconfirmed scans leaked into history with placeholder data before the user tapped confirm (backend now gates GET /documents on a new `confirmed` column, flipped only by PUT); and Product Scan ran the GPU classifier twice, once at upload and again on review (now a single pass at upload, persisted and read directly by the editor). Also removes the unused "Hubungkan ke PO" field and fabricated PO/SO/DO placeholder values from the Product Scan flow, closes out the per-document-polling and save-recovery tasks (6.1/6.3), and splits several touched files to stay under the repo's 256-line guideline. Full detail in docs/iteration-log.md and backend/docs/iteration-log.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2febe0c886
commit
ada6488592
67 files changed
+5705
-1142
No files matched your search
@@ -122,8 +122,9 @@ no clear "done" condition). If so:
|
||||
(memory/CPU) assumptions per `SKILLS.md`.
|
||||
- In your final response, state which task(s) were completed and the exact menu/navigation path to see the new feature.
|
||||
|
||||
## 3. File Size & Refactoring Rules
|
||||
## 3. File Size, Refactoring & SOLID Rules
|
||||
|
||||
- **SOLID Principles**: Always design, implement, and refactor code adhering to SOLID programming principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion). This ensures code is modular, testable, and maintainable.
|
||||
- **256-line threshold**: any code/script file — new, modified, or pre-existing —
|
||||
that exceeds 256 lines of code must be split into smaller, modular, logical files.
|
||||
This is a repo-wide rule, not just for new work; if you touch a file over the
|
||||
@@ -190,9 +191,12 @@ Recorded 2026-07-08, from adopting this kit into the existing `app-pfm-ocr-v2` r
|
||||
only if/when touched going forward), **Flutter only** now that `backend/` is out of
|
||||
scope for this kit (see §Scope above; backend's own debt list, re-verified
|
||||
2026-07-08, lives in `backend/AGENTS.md`'s Adaptation Notes instead):
|
||||
`lib/features/editor/editor_screen.dart` (682), `lib/features/documents/documents_screen.dart`
|
||||
(442), `lib/features/camera/image_preview_screen.dart` (380), `lib/features/camera/camera_screen.dart`
|
||||
(376), `lib/features/documents/pending_documents_provider.dart` (271).
|
||||
`lib/features/camera/image_preview_screen.dart` (380), `lib/features/camera/camera_screen.dart`
|
||||
(376). (`editor_screen.dart` was split 2026-07-10 when task 6.3 touched it —
|
||||
see root `plans/next-enhancements.md` §6.3 and `docs/iteration-log.md`;
|
||||
`documents_screen.dart` and `pending_documents_provider.dart` were already
|
||||
split down by earlier iterations and are no longer over threshold — this
|
||||
line was stale.)
|
||||
- **No Demo/Live or Cloud/Local switch exists yet** (§5, §6). The closest existing
|
||||
analogue is `AppConfig.initializeApiBaseUrl()` in `lib/config/app_config.dart`,
|
||||
which dynamically resolves a *real* backend endpoint (ngrok tunnel, falling back to
|
||||
|
||||
Reference in new issue
Block a user