Files
ai-contract-platform/mobile/STATUS.md
T
2026-04-24 13:44:17 +08:00

61 lines
3.7 KiB
Markdown

# Mobile scaffold status
Created on 2026-04-18.
- Flutter scaffold added under `mobile/`
- Android-first app shell uses bottom navigation for core V1 flows
- Theme, asset folders, config placeholders, and lightweight session/network placeholders are ready for follow-up work
- Backend integration, generated Flutter platform folders, and real assets are intentionally not included yet
## Auth/session progress
- `apiBaseUrl` is now pointed at local Android emulator backend routing (`http://10.0.2.2:8000/api/v1`)
- `http` dependency added for real API calls
- Mobile login flow now calls `/auth/login`
- Current-user sync now calls `/auth/me`
- Session state now hydrates from local storage on app start and writes back through `SharedPreferences`
- In-memory session state continues to broadcast through `ValueNotifier`
- App shell now gates the main tabs behind a login screen when no session exists
- Dashboard and profile now reflect real login/session state instead of pure placeholder copy
## Review entry progress
- `review_entry_screen.dart` is now a real editable form instead of placeholder blocks
- The mobile side now captures:
- contract text
- contract type
- review side (`party_a` / `party_b`)
- optional file attachment
- A draft/request model is defined in `features/review/domain/review_draft.dart`
- A submission controller is defined in `features/review/application/review_submission_controller.dart`
- Current submit action now goes through `ReviewDraft -> ReviewSubmissionController -> ApiClient.submitReview()`
- `/reviews` now supports text-only, file-only, or text+file submission from the mobile draft/controller structure
- File selection UI is present, but still depends on Flutter/file_picker runtime validation in a real mobile environment
## Review history progress
- `ApiClient.fetchReviewHistory()` now calls `GET /reviews` with the current bearer token
- A list-domain model is defined in `features/review_history/domain/review_history_item.dart`
- A history controller is defined in `features/review_history/application/review_history_controller.dart`
- `review_history_screen.dart` now loads and renders real list data for the current signed-in user
- The mobile side can now form a basic path of login -> submit review -> view review history
## Review detail/result progress
- `ApiClient.fetchReviewDetail()` now calls `GET /reviews/{review_id}`
- `ApiClient.fetchReviewResult()` now calls `GET /reviews/{review_id}/result`
- `features/review_history/domain/review_detail.dart` and `review_result_summary.dart` provide the detail/result/report models
- `review_detail_controller.dart` now loads task detail first and, for `completed` / `partial`, also loads result summary and report metadata
- `review_history_screen.dart` can navigate from a list item into the detail/result screen
- `review_detail_screen.dart` now renders task information, text preview, result summary, risk distribution, clause/risk counts, review opinion, and report metadata with copy-link action
- The detail screen now supports pull-to-refresh and app-bar refresh for status/result/report updates after submit
- Review submit success now auto-navigates into the newly created detail page
## Current limitation
- Session persistence is still local-only and not encrypted
- The live backend login path still depends on PostgreSQL/audit write success, so mobile login will fully work only after the backend DB chain is available
- File upload support has been wired into the request path, but still needs Flutter SDK / device validation for real picker behavior
- Report flow currently covers metadata + copy link; true file download/preview remains a next step
- Brand/image assets are still placeholders; asset constants are intentionally nulled until real png/svg resources are added