Review detail: - Add review risk actions with status tracking and skip/apply support - Pull-to-refresh and auto-navigate after review submit - Report download, open, share, and copy-link actions Contract lifecycle: - Add contract lifecycle models and controller for mobile - Version chain display and lifecycle status transitions - Contract result screen now shows lifecycle tasks File service: - New unified file_service.dart for file management API client: - Add review risk actions and contract lifecycle endpoints Screen polish: - Login screen visual polish with brand assets - Dashboard redesign with updated layout - Profile screen updates - Review entry/history screen improvements - Theme and brand asset updates Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
68 KiB
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
apiBaseUrlis now pointed at local Android emulator backend routing (http://10.0.2.2:8000/api/v1)httpdependency added for real API calls- Mobile login flow now calls
/auth/login - Current-user sync now calls
/auth/me - Session state now hydrates from secure storage on app start and automatically migrates any legacy
SharedPreferencessession blob forward - 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.dartis 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() /reviewsnow 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 callsGET /reviewswith 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.dartnow 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 callsGET /reviews/{review_id}ApiClient.fetchReviewResult()now callsGET /reviews/{review_id}/resultfeatures/review_history/domain/review_detail.dartandreview_result_summary.dartprovide the detail/result/report modelsreview_detail_controller.dartnow loads task detail first and, forcompleted/partial, also loads result summary and report metadatareview_history_screen.dartcan navigate from a list item into the detail/result screenreview_detail_screen.dartnow renders task information, text preview, result summary, risk distribution, clause/risk counts, review opinion, and report metadata- Report flow now supports local download, direct open, system share, and copy-link action through a dedicated report controller
- Mobile chat now has a first Review -> Chat flow: detail page can open a context-aware review assistant screen and stream answers from
/chat/stream - The chat screen carries
review_context, preservesconversation_idfor continuous follow-up, and shows source cards plus a legal-use disclaimer - Dashboard now exposes an independent legal Q&A entry that reuses the same streaming chat surface without
review_context - Chat now loads
/conversationshistory and can reopen prior conversation detail, so independent法律问答和审查追问都具备基础历史恢复能力 - Contract generation now has a mobile surface: template list, variable form, preview, generate, result display, and local file actions
- Contract generation history is now visible on mobile with keyword search, contract-type filtering, pagination, and reopen-to-detail flow
- Review detail can now jump into contract generation with review-derived prefill so title/type/risk/advice can land in matching template variables
- Contract generation history can now reopen a prior result into the builder for continued editing and re-generation
- Contract builder now lets the user switch export format (
docx/pdf/html/txt) before preview and generation - Generated contract result screen can also continue editing from the current generated payload instead of forcing the user back to the history list
- Legal-document drafting is now wired into mobile:
/legal-document-typesand/legal-document-draftsare now reachable from the app- the
AI工具tab now exposes a legal-document workspace alongside contract generation - document types, element schemas, drafts, validation, and generate-from-draft are modeled on the client
- focused tests now cover the new legal-document models and controller flows
- Legal-document drafting now accepts review-context handoff from review detail:
- review detail shows a dedicated
起草法律文书entry point - the legal-document type list pre-fills its search query from the review result recommendation
- the legal-document builder pre-fills title and matching schema fields from the review result
- focused tests now cover
LegalDocumentReviewContextmapping plus the type-list/builder handoff - validation completed with
flutter analyze --no-pub,flutter test --no-pub, andflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood mobile/tools/real-device-smoke.ps1 -ConfigureDevice -SmokeDepth documents-workspaceis still blocked by wireless ADB discovery on the current machine (SMOKE_BLOCKER=wireless_adb_unavailable)- the refreshed wireless-debug port
192.168.3.93:35593passeddocuments-workspacesmoke on the real device withSMOKE_OK=True
- review detail shows a dedicated
- Chat bubbles now surface source relevance when available, and will explicitly warn when a round returns no directly citeable sources
- Legal chat steadiness is now stronger on mobile:
- assistant bubbles classify the answer into
已引用来源 / 通用建议 / 结论不确定 / 需补充资料 - explicit no-answer wording now renders as a clearer refusal state instead of a generic fallback warning
- no-source or guidance-only rounds now show a structured explanation with suggested next steps
- the source panel is now grouped into
直接来源and辅助提示, with expandable evidence cards and simple relevance labels
- assistant bubbles classify the answer into
- 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
- Server-backed mobile login is now validated against
192.168.3.90; remaining runtime uncertainty is mainly around system-level open/share handlers on the emulator image - File upload support is now validated on
ai-contract-platform-lite-api34; the currentai-contract-platform-atd34image still lacks a file explorer that can answerACTION_OPEN_DOCUMENT, so attachment picking remains device-image dependent rather than app-logic dependent - Report flow now downloads correctly from the deployed server, but emulator-side open/share still depends on which external handlers are available on the current device image
- 独立法律问答入口和合同生成入口已经纳入底部
AI工具Tab,当前剩余的是移动端在真机上的系统级 handler 兼容性 - 合同生成已经有历史、筛选、预填和继续编辑,现在也接入了模板分类 / 行业入口筛选;后续还可以继续收口独立预览恢复参数的承接细节
- Brand/image assets are still placeholders; asset constants are intentionally nulled until real png/svg resources are added
Contract taxonomy mobile upgrade (2026-05-25)
- Mobile contract templates now carry
template_categoryandindustry_categorythrough the model and API layer. - The contract template workspace now filters by contract type, template category, and industry entry, while the cards show all three taxonomy tags.
- Contract builder, generated result, and history tiles now surface the same taxonomy labels for easier matching and continuation.
- Focused mobile tests now cover taxonomy parsing and the controller forwarding the new filter params.
- Validation completed locally:
flutter analyze --no-pubflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- Real-device smoke is back online on the wireless X60PRO:
- connected serial:
192.168.3.93:43033 adbreports the app insigned_in_shelltools/real-device-smoke.ps1 -ExpectedIp 192.168.3. -ConfigureDevice -SkipInstall -SmokeDepth shell-onlyreturnedSMOKE_OK=True- artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-25T15-35-15-258/
- connected serial:
- The smoke helper now also has a
contract-taxonomydepth, and it passed on the same device:- contract workbench was opened from
AI tools - template filters were applied to
legal_opinion+nda - filtered results stayed active and excluded
property_service tools/real-device-smoke.ps1 -ExpectedIp 192.168.3. -ConfigureDevice -SkipInstall -SmokeDepth contract-taxonomyreturnedSMOKE_OK=True- artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-25T15-51-23-045/
- contract workbench was opened from
- Android true-device validation continued on the wireless X60PRO:
- connected serial:
192.168.3.93:44421 tools/real-device-smoke.ps1now supports-DeviceSerialfor known wireless-debug ports- reconnect and smoke helpers now wait for the wireless serial to reach
adbstatedevice, so a transientofflinesession is reported as a wireless ADB blocker instead of an app-surface failure documents-workspacenow passes through signed-in shell -> AI tools -> legal-document workspace -> type list -> builder- legal-document type cards, builder primary actions, and draft actions now expose stable semantic labels for accessibility and automation
- widget tests now lock the legal-document workspace and builder semantic labels through injectable controllers, so the Android smoke markers are guarded locally before device runs
tools/real-device-smoke.ps1 -DeviceSerial 192.168.3.93:44421 -ConfigureDevice -SkipInstall -SmokeDepth documents-workspace -LoginAccount <member-account> -LoginPassword <member-password>returnedSMOKE_OK=True- artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-25T21-26-28-369/ - current wireless-debug serial rotated again to
192.168.3.93:38491; the first rerun hitadboffline, so the reconnect/smoke helpers were hardened to wait for the serial to reachdevicebefore continuing - the latest
documents-workspaceretry on192.168.3.93:38491now exits cleanly withSMOKE_BLOCKER=wireless_adb_unavailableinstead of an app-surface misfire, which makes the remaining issue explicit - the next wireless-debug serial was
192.168.3.93:45167; the app relaunched into the login form and surfaced that the Chinese IME entered the email domain separator as。, so mobile login now normalizes full-width account punctuation before calling the API - after installing the rebuilt APK,
tools/real-device-smoke.ps1 -DeviceSerial 192.168.3.93:45167 -ConfigureDevice -SmokeDepth documents-workspace -LoginAccount <member-account> -LoginPassword <member-password>returnedSMOKE_OK=TruewithDOCUMENTS_WORKSPACE_READY=True,DOCUMENTS_TYPE_LIST_OK=True, andDOCUMENTS_BUILDER_OK=True - artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-25T23-44-09-374/ - the general mobile legal-chat entry now also exposes 4
business_auxiliaryquick prompts:- 履约义务提取
- 工商/备案材料清单
- 谈判策略
- 法律意见书强边界兜底
ReviewChatScreennow supports controller injection so widget tests can verify the mobile Chat product entry without hitting live APIs- the
AI工具header now promotes the same business-auxiliary launch strip above the embedded chat, so the mobile entry point is visible before the user scrolls into the conversation area - focused validation now covers both the routing keywords and the mobile UI exposure of the 4 business auxiliary entries:
flutter test --no-pub test/features/chat/domain/review_chat_context_test.dart test/features/chat/presentation/review_chat_screen_test.dart test/features/tools/presentation/tools_hub_screen_test.dart
- full mobile validation passed again:
flutter analyze --no-pubflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
tools/real-device-smoke.ps1now supports abusiness-auxiliarydepth for the mobile Chat product entry- the first
business-auxiliaryreal-device retry was blocked by wireless ADB churn again:adb mdns servicesreturned no_adb-tls-connectendpoint and the previous192.168.3.93:45167port refused connection - latest blocker artifact:
mobile/qa-artifacts/real-device-smoke/2026-05-26T00-26-51-814/
- connected serial:
Phase 0/1 mobile structure progress
project-docs/移动端开发方案-2026-05-01.mdnow records the mobile product scope, IA, phased plan, and acceptance criteria- App shell now separates unauthenticated login from the signed-in bottom-navigation experience
- Bottom navigation metadata is centralized in
app/navigation/app_router.dart - Login screen no longer pre-fills demo credentials and now has basic local validation, loading state, password visibility toggle, and a productized hero
- Dashboard now reads real review history and shows recent review counts, in-progress counts, high-risk counts, quick actions, and latest tasks
- Profile now hides API diagnostics unless
MOBILE_SHOW_DIAGNOSTICS=true - Review labels are centralized in
shared/constants/review_labels.dartso mobile pages show Chinese contract types, statuses, risk levels, source types, and review sides - Review submission now validates file extension and 20MB maximum size before uploading
- API exceptions now carry HTTP status codes; review list/detail/submission clear local session on 401/403
Verification note
flutter analyzepassedflutter testpassedflutter build apk --debug --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfoodproducedbuild/app/outputs/flutter-apk/app-debug.apk- Android emulator tooling is installed locally and the lightweight
ai-contract-platform-atd34AVD now boots successfully
Runtime validation update (2026-05-03)
- Runtime validation used
ai-contract-platform-atd34againsthttp://192.168.3.90:8001/api/v1 - Login succeeded on-device and the session persisted after reinstall
- Text-only review submission succeeded and auto-opened detail for
review-369b53d5ecf1 - Review history and review detail both rendered the new task correctly
- Independent legal Q&A succeeded: a quick-prompt message created a new conversation record and returned a two-message session in
/conversations - Review-context chat succeeded: follow-up messages were sent, streaming answers returned, source cards rendered, and history conversations were recorded
- Contract generation succeeded end-to-end: template selection, variable fill, preview, and generate all passed; a generated file named
保密协议标准模板_20260503_125037.docxwas returned on-device - Report download URL normalization was fixed in
shared/network/api_client.dart; the report link now resolves tohttp://192.168.3.90:8001/api/v1/reviews/review-369b53d5ecf1/report/download - Report download was verified on-device and saved to
/data/user/0/com.example.ai_contract_mobile/app_flutter/review_reports/review-report-review-369b53d5ecf1.pdf - Generated-contract download was verified on-device and saved to
/data/user/0/com.example.ai_contract_mobile/app_flutter/generated_contracts/保密协议标准模板_20260503_125037.docx - Review attachment picking no longer throws an unhandled crash in app code; on the current ATD image the plugin returns
invalid_format_typebecause no system file explorer is installed, and the UI now stays on-page with a friendly retry message - Review attachment picking was fully validated on
ai-contract-platform-lite-api34:mobile-upload.txtwas selected throughDocumentsUI, cached byfile_picker, and rendered back in the mobile review form - A real wireless Android device is now paired and reusable for dogfooding (
model=M20201419,device=X60PRO, Android 11) tools/reconnect-wireless-device.ps1can now re-discover the current_adb-tls-connectmDNS endpoint, reconnect the phone, and re-apply long screen timeout / stay-awake settings- On the real device,
DocumentsUIopens successfully and the app-side file picker no longer crashes; the current remaining friction is OEM-specific picker interaction plus wireless ADB instability during long unattended runs - Real-device attachment selection now succeeds end-to-end when the OEM picker receives an explicit select-confirm interaction;
mobile-upload.txtwas loaded throughDocumentsUI, cached byfile_picker, and rendered back into the mobile review form - Real-device report download was validated for member data:
review-report-review-59c9d1a83e63.pdfdownloaded to/data/user/0/com.example.ai_contract_mobile/app_flutter/review_reports/review-report-review-59c9d1a83e63.pdf - Real-device report open now hands the PDF off to an external viewer app; on this device the default handler is
com.feimi.browserrather than a dedicated PDF app - Real-device contract download was validated for member data:
保密协议标准模板_20260503_125037.docxdownloaded to/data/user/0/com.example.ai_contract_mobile/app_flutter/generated_contracts/保密协议标准模板_20260503_125037.docx - Real-device contract share now escalates into WeChat's chat target (
com.tencent.mm/.ui.chatting.ChattingUI), which confirms system-level share handoff on this OEM build - Mobile review history, review detail, generated-contract history, and contract template loading now keep the last successful data set on transient non-auth failures instead of clearing the screen immediately
tools/reconnect-wireless-device.ps1now retries mDNS discovery before failing, which reduces the number of manual reconnect attempts needed after the device rotates its wireless debug port- Remaining runtime edge: on the no-window ATD emulator, external viewer/share-target behavior is still device-image dependent, so open/share can be invoked but not yet fully asserted as a stable automated oracle
Runtime validation update (2026-05-04)
- Runtime validation continued on the paired real device (
model=M20201419,device=X60PRO, Android 11) againsthttp://192.168.3.90:8001/api/v1 tools/reconnect-wireless-device.ps1 -ExpectedIp 192.168.3. -ConfigureDevicesuccessfully rediscovered and reconnected the rotated wireless-debug endpoint (192.168.3.93:42823)- Server reachability was rechecked before validation; both
http://192.168.3.90:8001/healthandhttp://192.168.3.90:3003/returned200 - A freshly seeded member session resumed correctly on-device and rendered the workbench header for
Mobile Member · member - Member review history revalidation passed: the real device rendered review
review-eecc2296519awith completed status,servicecontract type,party_a, and medium risk - Member review detail revalidation passed: the real device opened
review-eecc2296519a, rendered the result summary, and exposed the report actions forreview-report-review-eecc2296519a.pdf - Report share system handoff is now fully evidenced on the real device:
- the app surfaced
已调起系统分享 - Android raised
android/com.android.internal.app.ChooserActivity - the chooser preview attached
review-report-review-eecc2296519a.pdf - the chooser offered share targets including
发送给朋友,添加到微信收藏,打印, and电子邮件
- the app surfaced
- Member contract-history revalidation passed on-device:
- the generated-contract history section rendered normally
- the seeded item
保密协议标准模板_20260504_052610.docxappeared under已生成合同历史 - opening the history item reached the generated-result screen with file metadata, plus
继续编辑 / 下载合同 / 打开文件 / 分享合同
- Session persistence is no longer plain
SharedPreferencesonly:SessionStorenow writes toflutter_secure_storage- legacy
SharedPreferencessessions are migrated forward on first hydrate - targeted unit coverage now locks both secure-storage hydration and legacy-session migration
- Post-migration validation passed again:
flutter analyze --no-pubflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- A new unattended helper now exists for real-device dogfooding:
tools/real-device-smoke.ps1reconnects wireless ADB, checks server health, relaunches the app, capturesdumpsys activity topplusuiautomatorXML, and writes a timestamped artifact bundle- this reduces the amount of manual phone babysitting needed for routine “is the device still reachable and does the app still launch?” checks
tools/real-device-smoke.ps1now supports smoke-depth profiles:login-onlyfor auth-entrypoint checksshell-onlyfor unattended signed-in shell checksshare-prooffor deeper report-share chooser evidence on the proven X60PRO real-device profiledocuments-workspacefor deeper proof of the legal-document workspace entrypoint
- The depth profiles have now been exercised on the real device:
login-onlyreturnedSMOKE_OK=Trueshell-onlyreturnedSMOKE_OK=Trueshare-proofreturnedSMOKE_OK=True,SHARE_CHOOSER_ACTIVITY=android/com.android.internal.app.ChooserActivity, andSHARE_PDF_PREVIEW_OK=True
documents-workspacecurrently reaches the workspace and type-list surface on a seeded signed-in session; the builder pass was later closed with a device-sideSMOKE_OK=Truerun, and the current blocker is wireless ADB availability on the rotated wireless-debug serial- Lightweight notification infrastructure is now in place:
flutter_local_notificationsdrives local notificationsworkmanagerregisters periodic review-status polling on signed-in Android sessions- review submissions are added to a persistent watchlist
- review history loads seed additional pending reviews into that watchlist
- contract generation now emits a completion notification immediately
- tapping a review notification routes back to review detail
- tapping a contract notification routes back to generated contract detail
- Notification implementation validation passed at code/build level:
flutter analyze --no-pubflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- Chat steadiness validation passed at code/build level:
flutter analyze --no-pubflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- Information architecture is now more formal for user-side AI workflows:
- bottom navigation now includes a first-class
AI工具tab 法律问答and合同生成are no longer hidden only behind dashboard shortcuts- the new tools tab uses an in-place segmented switch, so both capabilities are promoted without overcrowding the bottom navigation
- dashboard shortcuts still exist, but now jump into the dedicated tools tab instead of opening them as only workbench-level shortcuts
- bottom navigation now includes a first-class
- Brand and UI polish moved a step closer to a product surface:
BrandAssetsnow provides a shared palette, gradient hero band, and reusable brand mark- login was rewritten around the branded hero surface instead of the earlier placeholder shell
- the dashboard now uses a cleaner action grid and a more productized workbench hero
- the new
AI工具first-class entry now has its own hero and clearer switch surface, instead of reading like a debug container
- Real-device runtime evidence for background scheduling exists:
adb shell dumpsys jobschedulernow showscom.example.ai_contract_mobile/androidx.work.impl.background.systemjob.SystemJobService
- Remaining unattended-device wrinkle:
- after reinstall, this OEM build can still surface a lockscreen/SystemUI overlay during smoke, so
real-device-smoke.ps1may produce a false negative even whenMainActivityis already top-most indumpsys activity top
- after reinstall, this OEM build can still surface a lockscreen/SystemUI overlay during smoke, so
- Current Phase 6 status: the remaining runtime risk is no longer the report-share path itself; the major residual instability is still OEM wireless-ADB churn during long unattended sessions
UI cleanup update (2026-05-04)
- Remaining visible mojibake in the main mobile workflow has now been cleaned from:
- review labels
- profile
- review history
- review detail
- contract template list
- contract builder
- generated contract result
- Product-surface polish continues to land in the core mobile flow:
- login uses the branded hero surface and shared palette
- dashboard uses a more productized action grid instead of a plain action list
- the first-class
AI工具tab now sits inside the same visual language as login and workbench
- Post-cleanup validation passed again:
flutter analyze --no-pubflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- Shell-level regression coverage is now stronger:
app_shell_test.dartverifies the first-classAI工具tab is visible for authenticated usersapp_shell_test.dartalso verifies the dashboard quick action for合同生成correctly jumps into the dedicated tools hub
- Real-device smoke reporting is now clearer:
real-device-smoke.ps1explicitly reportsSMOKE_BLOCKER=device_lockedwhen OEM keyguard/pattern unlock blocks unattended validationreal-device-smoke.ps1also reportsSMOKE_BLOCKER=login_requiredwhen reinstall/relaunch drops the app back to the login shell instead of the authenticated workbench- this avoids treating current lockscreen overlays as a generic unknown smoke failure
- We also tried extending smoke toward unattended auto-login:
- backend credentials for the seeded mobile member are still valid
- the current blocker is the OEM input method on this phone, which mutates
adb input textenough to make unattended credential entry unreliable - for now,
login_requiredis still the honest result when the app falls back to the login shell
- The strengthened shell and smoke tooling passed together:
flutter test --no-pub test/app_shell_test.dartflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfoodreal-device-smoke.ps1 -SmokeDepth shell-onlynow exits with a precise environment blocker when the phone is still pattern-locked
Real-device dogfood revisit (2026-05-04)
- After the keyboard-avoidance login fix, the updated APK was reinstalled on the real device and manual login succeeded
- Workbench dogfood passed on-device:
- the branded workbench hero rendered
- the bottom navigation now shows 5 tabs, including the first-class
AI工具entry - the workbench quick-action grid is visible on-device instead of the older plain action list
AI工具dogfood passed on-device:- entering the tab opened the dedicated AI tools surface
- the hero band and segmented switch rendered correctly
- tapping
合同生成successfully switched the embedded tool view away from legal chat
- Review-detail dogfood passed on-device:
- the history tab opened a completed review detail successfully
- task metadata and result summary rendered on the updated product surface
- the updated review-detail layout remained readable on the real device without the earlier mojibake-heavy copy
- Profile dogfood passed on-device:
- the
我的tab opened the refreshed account surface successfully - account identity, role, tenant, and status rendered on the updated product surface
- the
- The remaining weak spot in this revisit is contract-history deep reopening inside the embedded
合同生成tool view:- the formal tools entry and contract-generation switch render correctly on-device
- but the revisit session repeatedly bounced between history/detail and tools surfaces before the history-result reopen could be re-proven in the same pass
Contract workspace refinement (2026-05-04)
- The mobile contract-generation surface was restructured away from the old “template cards endlessly stacked down the page” layout
合同生成now behaves more like a compact workspace:开始生成历史结果are now separated into clearer work areas instead of being flattened into one long scroll
- Template cards were tightened into more scannable compact surfaces, and the history-result cards now present
查看结果 / 继续编辑as their own focused actions - Code/build validation passed after the contract-workspace restructuring:
flutter analyze --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
Shared AI + admin snapshot update (2026-05-04)
- The mobile plan's remaining P2 management-assist slice is now implemented in a lightweight form:
- Profile shows Shared AI runtime status
- admin sessions now get a read-only management snapshot
- the snapshot aggregates knowledge-base status, template availability, audit activity, and governance queue summary
- The backend now exposes:
/api/v1/system/shared-ai/api/v1/system/admin-snapshot
- Shared AI knowledge-base routing is now tighter:
- backend shared-ai SDK no longer emits an empty bearer header when
api_keyis blank - remote shared-ai test deployment now uses a concrete
SHARED_AI_PLATFORM_API_KEY - the deploy script now ensures the
ai-contract-platformapp registry/scopes exist on the shared-ai side
- backend shared-ai SDK no longer emits an empty bearer header when
- Remote web validation now confirms:
/knowledge-basescan showHybridretrieval mode for shared-ai-backed KBs/profilecontinues to showRemote preferred + hybrid
- New validation pass:
pytest tests/test_system_api.py tests/test_shared_ai_platform_client.py tests/test_knowledge_bases_api.pyflutter analyze --no-pubflutter test --no-pub
- Current plan status:
- P0 complete
- P1 complete
- P2 functional scope now complete in lightweight delivery form
- remaining risk is primarily environment/runtime stability, not missing product features from the mobile plan
Contract history real-device closure (2026-05-04)
- Rebuilt and reinstalled the latest debug APK onto the real device:
flutter analyze --no-pubflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfoodadb -s 192.168.3.93:39787 install -r D:\ai-contract-platform\mobile\build\app\outputs\flutter-apk\app-debug.apk
- Real-device contract-history validation is now fully closed inside
AI工具 -> 合同生成 -> 历史结果:- switched the embedded contract workspace into
历史结果 - surfaced the latest generated contract card for
保密协议标准模板_20260504_053915.docx - confirmed the history card exposes both
查看结果and继续编辑 - tapping
查看结果opened the generated-contract result screen - returning to history and tapping
继续编辑opened the contract builder with the same template context
- switched the embedded contract workspace into
- The latest manual proof artifacts are in:
mobile/qa-artifacts/manual-contract-history/window_dump_view_result.xmlmobile/qa-artifacts/manual-contract-history/window_dump_continue_edit.xml
- Practical device note:
- forcing portrait (
user_rotation=0) made the embedded contract workspace much more stable for real-device validation than the OEM landscape state
- forcing portrait (
AI tools contract-page split (2026-05-04)
- The
AI工具tab no longer embeds the full contract workspace inside the bottom portion of the tools surface - The tools hub now behaves as:
- an in-place legal-chat surface
- a dedicated
打开合同工作台launch action for contract generation
- Entering contract generation from:
- the dashboard quick action
- the
AI工具tab launch action now opens a standalone full-screen合同生成page instead of a cramped nested scroll region
- Validation passed after the split:
flutter analyze --no-pubflutter test --no-pub test/app_shell_test.dartflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- Real-device proof now exists for the new launch shape:
- the
AI工具tab shows a dedicated打开合同工作台button - tapping it opens a standalone page with app-bar title
合同生成 - the standalone page shows the contract workspace header and the
模板 / 历史结果split as a full-screen flow - manual proof artifacts are in
mobile/qa-artifacts/manual-tools-standalone/
- the
Direct contract launch cleanup (2026-05-05)
- Navigation was simplified so the dashboard contract shortcut no longer routes through
AI工具and then auto-pushes the contract page - Current launch behavior is now split more cleanly:
- dashboard
合同生成quick action -> direct standalone合同生成page AI工具tab -> in-place legal chat plus an explicit打开合同工作台launch button
- dashboard
- The old shell workaround based on
ToolsHubView.contractsauto-launch was removed, so the tools tab is no longer carrying contract-page launch state inside the shell - Validation after the cleanup:
flutter analyze --no-pubflutter test --no-pub test/app_shell_test.dartflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
Standalone contract page polish (2026-05-05)
- The standalone
合同生成page was tightened from a documentation-heavy tool page into a denser mobile work surface - Main surface changes:
- removed the larger explanatory header card
- replaced the old always-open filter card with a compact toolbar
- moved type filtering into a bottom-sheet filter flow
- kept the main canvas focused on template/history lists instead of static explanation copy
- added a lighter top bar with
模板 / 历史结果counts
- The standalone contract page now reads more like:
- compact page heading
- switch surface
- search/refresh/filter tools
- primary list content instead of "big description + big filter card + list pushed below"
- Validation passed after the page polish:
flutter analyze --no-pubflutter test --no-pub test/app_shell_test.dartflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- Real-device confirmation exists for the polished standalone page:
- the dashboard contract quick action still opens the standalone page directly
- the page now shows the tighter top bar, compact toolbar, and direct template list presentation
- proof artifacts are in
mobile/qa-artifacts/manual-contract-polish/
Contract list-density polish (2026-05-05)
- The standalone contract page was tightened again to feel more like a professional mobile workbench list:
- top counts now react to live template/history data instead of staying static
- template items were compressed into denser list rows with the primary action aligned inline
- history items now use a tighter summary row, file-size/time metadata, and smaller result/edit actions
- filter controls stay in the compact toolbar + bottom sheet instead of consuming a large permanent card
- Validation after the list-density pass:
flutter analyze --no-pubflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood- latest APK reinstalled to the real device successfully
PC-aligned mobile visual refresh (2026-05-20)
- The mobile visual system has been realigned with the current PC workbench style:
- PC colors are reflected in Flutter:
#12A884,#0A725F, dark workbench panels, lime/cyan/amber/coral accents, soft green canvas, and 8px control/card radius - the signed-in shell now uses a dark top bar, compact brand mark, live status chip, elevated bottom navigation, and a subtle grid canvas
- shared cards, form controls, buttons, chips, chat bubbles, and workbench panels now use the same elevated white/dark-surface language as the PC side
- PC colors are reflected in Flutter:
- Main refreshed surfaces:
- login hero
- dashboard hero, primary review action, quick-action grid, and recent-review cards
- review submission hero, attachment card, and submission preview chips
- review history hero and risk/status task cards
- review detail hero
AI工具header and legal-chat composer/bubbles- standalone
合同生成workspace top bar, toolbar, template list, and history cards - profile/account/shared-ai cards inherit the refreshed shared card and hero treatment
- Validation after the visual refresh:
flutter analyze --no-pubflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- Build-environment note:
- the first build attempts stalled because
D:\DevCaches\Gradleonly had a partialgradle-8.14-all.zip.part - the complete Gradle 8.14 wrapper cache already existed under the user Gradle cache and was copied into
D:\DevCaches\Gradle, after which the debug APK built successfully - the build also installed the missing Android SDK Platform 35 package
- the first build attempts stalled because
- Real-device smoke status:
- the refreshed APK was built at
mobile/build/app/outputs/flutter-apk/app-debug.apk - real-device smoke could not run because the wireless ADB endpoint dropped after the build:
adb mdns servicesno longer listed an_adb-tls-connectservice and the previous192.168.3.93:43249endpoint refused connection - next real-device step is to re-enable or re-pair wireless debugging on the phone, then rerun
tools/real-device-smoke.ps1 -ExpectedIp 192.168.3. -ConfigureDevice -SmokeDepth shell-only
- the refreshed APK was built at
Wireless real-device smoke closure (2026-05-20)
- Wireless debugging was repaired with the user's help:
- paired to
192.168.3.93:34287 - connected to the refreshed wireless debug endpoint
192.168.3.93:34707 - installed the refreshed debug APK successfully before the final login-state check
- paired to
- The user logged in with their own registered account; administrator credentials were not required for the mobile UI smoke.
- Manual real-device launch evidence:
TOP_HAS_APP=TrueAPP_SURFACE=signed_in_shellSMOKE_OK=True- artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-20T15-05-24-013-manual-shell/
- Standard smoke helper passed without reinstalling the APK:
- command:
tools/real-device-smoke.ps1 -ExpectedIp 192.168.3. -ConfigureDevice -SkipInstall -SmokeDepth shell-only SERVER_API_STATUS=200SERVER_WEB_STATUS=200TOP_ACTIVITY=com.example.ai_contract_mobile/.MainActivityAPP_SURFACE=signed_in_shellSMOKE_OK=True- artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-20T15-05-48-752/
- command:
Review history mobile workbench upgrade (2026-05-20)
- The mobile
审查记录surface now behaves more like a working list instead of a static dump:- summary counters for total reviews, active reviews, high-risk reviews, and completed reviews
- local keyword search across title, id, contract type, review side, status, risk label, and created time
- status chips for
待处理 / 处理中 / 已完成 / 部分完成 / 失败 - risk chips for
高风险 / 中风险 / 低风险 / 待评估 - a
高风险优先switch that ranks high-risk and non-terminal work ahead while preserving stable order inside the same rank - filtered-empty state with a clear reset action
- First-run / no-record accounts now get a productized empty state:
- explains that submitted reviews will create status, risk, and report records
- exposes
发起合同审查directly from the history tab - keeps
刷新列表available for newly created or externally updated reviews
- Validation after the review-history upgrade:
flutter analyze --no-pubflutter test --no-pub test/features/review_history/domain/review_history_filter_test.dart test/app_shell_test.dartflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- Real-device validation on the wireless X60PRO:
- standard smoke after installing the new APK:
SMOKE_OK=True - artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-20T15-19-40-523/ - the logged-in user account currently has no review records, so the empty-state CTA was verified instead of populated-list filters
- empty-state proof artifact:
mobile/qa-artifacts/real-device-smoke/2026-05-20T15-20-19-530-review-history-empty-cta/
- standard smoke after installing the new APK:
Review submission draft recovery (2026-05-20)
- The mobile
发起合同审查flow now has local draft recovery:- contract text is auto-saved after editing
- selected contract type and review side are restored together with the text
- a compact draft status bar shows the latest local save time
- users can clear the draft from the submission page
- successful submission clears the saved draft before opening the review detail page
- Draft storage is intentionally privacy-conscious:
- persisted through
flutter_secure_storage - stores only text/type/side/update time
- does not persist attachment bytes, file names, or MIME metadata
- empty text drafts are removed instead of being saved
- persisted through
- New focused coverage:
review_draft_store_test.dartverifies save/restore, empty-draft cleanup, corrupt-payload cleanup, and attachment metadata exclusion
- Validation after the draft-recovery slice:
flutter analyze --no-pubflutter test --no-pub test/features/review/application/review_draft_store_test.dartflutter test --no-pubpassed with 33 testsgit diff --check -- mobilereported no whitespace errors, only Windows line-ending noticesflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- Real-device validation on the wireless X60PRO:
- standard shell smoke after installing the new APK returned
SMOKE_OK=True - artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-20T15-33-10-432/ - a direct
uiautomatorpass entered the review tab, typed a temporary draft, switched away, returned to the review tab, and confirmed the text plus草稿已保存status restored - the temporary draft was cleared after validation, leaving the submit form empty again
- standard shell smoke after installing the new APK returned
Review detail next-action guidance (2026-05-20)
- The mobile review-detail page now shows a focused next-action card near the top of the page, so users do not need to infer the next step from static fields.
- A new domain helper,
ReviewDetailNextAction, maps task state into a primary action:- failed reviews -> refresh task status first
- pending / processing reviews -> refresh or come back later
- completed reviews without result metadata -> refresh result sync
- high-risk reviews -> open the review assistant with a high-risk revision-list prompt
- revise recommendations -> continue into contract generation with review context
- low-risk completed reviews with a report -> open the report directly
- The detail page primary action now routes into the existing mobile workflows instead of duplicating logic:
- refresh uses the existing detail reload
- assistant follow-up reuses the review-context chat
- contract generation reuses the review-derived prefill flow
- report opening reuses the existing report controller
- Focused validation:
review_detail_next_action_test.dartcovers processing, failed, high-risk, revise, and report-ready casesflutter test --no-pub test/features/review_history/domain/review_detail_next_action_test.dartflutter analyze --no-pub
- Full validation after the next-action slice:
flutter test --no-pubpassed with 38 testsgit diff --check -- mobilereported no whitespace errors, only Windows line-ending noticesflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- Real-device validation on the wireless X60PRO:
- standard shell smoke after installing the new APK returned
SMOKE_OK=True - artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-20T15-50-52-933/ - the currently logged-in self-registered account still has no review records, so detail-card runtime proof should be captured after a real review exists for this account
- standard shell smoke after installing the new APK returned
Real-device review-detail closure (2026-05-20)
- A real text-only review was submitted from the currently signed-in self-registered account on the wireless X60PRO device.
- created review:
review-7cf9ade7a183 - title:
文本输入合同 - created at:
2026-05-20T07:55:55.633671+00:00 - history rendered it as completed, service contract, party A, medium risk
- created review:
- Runtime follow-up found and fixed a real-device-only blank detail body:
- before fix, tapping the populated history item opened the app bar but left the detail body blank
AppScaffoldPagenow accepts optional scroll physicsreview_detail_screen.dartnow returnsAppScaffoldPagedirectly from each detail-body state instead of nesting it inside an outerListView- pull-to-refresh is preserved with
AlwaysScrollableScrollPhysics
- Real-device proof after the layout fix:
- history item opens the populated detail page
- the detail hero renders
文本输入合同,review-7cf9ade7a183, completed status, service contract, and medium risk - the next-action card renders
审查已完成,报告可用 - the primary action renders as
打开报告 - proof screenshot:
mobile/qa-artifacts/manual-review-detail-next-action/detail-after-layout-fix.png
- Validation after the real-device closure:
flutter analyze --no-pubflutter test --no-pub test\features\review_history\domain\review_detail_next_action_test.dart test\features\review_history\application\review_detail_controller_test.dartflutter test --no-pubpassed with 38 testsflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfoodtools/real-device-smoke.ps1 -ExpectedIp 192.168.3. -ConfigureDevice -SmokeDepth shell-onlyreturnedSMOKE_OK=True- artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-20T16-12-21-981/
Review detail risk-insight upgrade (2026-05-20)
- The mobile review-detail result summary now surfaces risk item labels and suggestion highlights that were already parsed from the backend result payload.
风险重点lists the key risk-item titles / risk descriptions修改建议lists concrete suggestion text from risk items- each block keeps the first four visible items and points users to the full report when more items exist
- New focused coverage:
review_result_summary_test.dartverifies extraction of risk labels and suggestion highlights fromrisk_items
- Validation after the risk-insight slice:
flutter test --no-pub test\features\review_history\domain\review_result_summary_test.dartflutter analyze --no-pubflutter test --no-pubpassed with 39 testsflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfoodtools/real-device-smoke.ps1 -ExpectedIp 192.168.3. -ConfigureDevice -SmokeDepth shell-onlyreturnedSMOKE_OK=True- artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-20T16-29-14-860/
- Real-device proof on the wireless X60PRO:
- opened
review-7cf9ade7a183 - result summary rendered
风险重点with保密义务建议细化and付款与验收条件建议明确 - result summary rendered
修改建议with concrete confidentiality and payment / acceptance suggestions - proof screenshot:
mobile/qa-artifacts/manual-review-detail-insights/review-detail-insights.png
- opened
Review to legal-document handoff closure (2026-05-26)
- The mobile review-history -> legal-document drafting handoff now works on the real wireless X60PRO flow.
- The smoke script now scrolls to the actual review card, opens the review detail page, enters legal-document drafting, and verifies both the type list and builder are carrying the review context forward.
- Validation:
flutter analyze --no-pubflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfoodmobile/tools/real-device-smoke.ps1 -DeviceSerial 192.168.3.93:35593 -ConfigureDevice -SmokeDepth review-legal-document -LoginAccount cyuqei@gmail.comreturnedSMOKE_OK=True- artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-26T02-02-19-720/
Dashboard recent-review handoff closure (2026-05-26)
- The dashboard's recent review preview now acts as a real entry point into review detail instead of a dead preview card.
- Tapping a recent review now switches to history and opens the matching review detail page with the review title prefilled.
- Validation:
flutter analyze --no-pubflutter test --no-pubflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfoodmobile/tools/real-device-smoke.ps1 -DeviceSerial 192.168.3.93:40011 -ConfigureDevice -SmokeDepth dashboard-review-preview -LoginAccount cyuqei@gmail.comreturnedSMOKE_OK=True- artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-26T06-53-17-885/
Business auxiliary real-device closure (2026-05-26)
- The mobile
AI工具business auxiliary strip is now validated as a real user path on the wireless X60PRO device. - The smoke helper now taps the shortcut by Android
content-descbutton bounds, which matches Flutter's accessibility tree for these quick-prompt chips. - Real-device proof confirms all 4 business auxiliary entries are visible and that
提取履约义务can trigger the shared Chat flow without leaving the app surface. - Validation:
- PowerShell parser check for
mobile/tools/real-device-smoke.ps1returnedPARSE_OK flutter test --no-pub test/features/tools/presentation/tools_hub_screen_test.dartflutter analyze --no-pubflutter test --no-pubmobile/tools/real-device-smoke.ps1 -DeviceSerial 192.168.3.93:40011 -ConfigureDevice -SmokeDepth business-auxiliary -LoginAccount cyuqei@gmail.comreturnedSMOKE_OK=True- artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-26T07-01-10-567/
- PowerShell parser check for
Product smoke suite scaffold (2026-05-26)
- A batch runner now exists at
mobile/tools/run-real-device-product-smoke-suite.ps1. - The suite chains the current Android product paths into one reportable run:
shell-only,share-proof,contract-taxonomy,documents-workspace,review-legal-document,dashboard-review-preview, andbusiness-auxiliary. - The suite writes both
suite-summary.jsonandsuite-summary.txt, so later Android rounds can capture one artifact bundle instead of many ad hoc shell invocations. - Validation:
- PowerShell parser check for
mobile/tools/run-real-device-product-smoke-suite.ps1returnedPARSE_OK - a one-step failure-path run on
192.168.3.93:40011still produced a suite report and per-step summary - current blocker is external: wireless ADB for
192.168.3.93:40011is unavailable right now, so the suite could not complete a live device pass - suite artifact root:
mobile/qa-artifacts/real-device-product-smoke-suite/2026-05-26T07-46-28-254/
- PowerShell parser check for
Product smoke suite pass (2026-05-26)
- The real-device Android product smoke suite now passes end-to-end on the wireless device
192.168.3.93:43767. - Two remaining failures were closed in the smoke helper rather than the app itself:
share-proofnow scrolls to the real report section, taps the real分享报告button, and dismisses the low-battery system warning if it appears before the Android chooser is captured.documents-workspacenow only accepts realopen-legal-document-*entry buttons and no longer falls back to the generic management buttons that caused false starts.
- Latest validation:
mobile/tools/run-real-device-product-smoke-suite.ps1 -DeviceSerial 192.168.3.93:43767 -SkipInitialInstallreturnedSUITE_OK=True- passed steps:
shell-only,share-proof,contract-taxonomy,documents-workspace,review-legal-document,dashboard-review-preview,business-auxiliary - suite artifact root:
mobile/qa-artifacts/real-device-product-smoke-suite/2026-05-26T08-24-01-233/
Generated contract result actions upgrade (2026-05-26)
- The mobile contract-generation result flow now has stable automation anchors for the production-facing actions:
- contract workspace template cards and generated-contract history actions
- contract builder preview / generate actions
- generated-contract result download, open, share, and continue-editing actions
mobile/tools/real-device-smoke.ps1now supports a dedicatedcontract-result-actionsdepth.mobile/tools/run-real-device-product-smoke-suite.ps1now includescontract-result-actionsin the default suite betweencontract-taxonomyanddocuments-workspace.- Validation:
- PowerShell parser checks passed for both smoke scripts.
flutter analyze --no-pubflutter test --no-pub test/features/contracts/presentation/contract_screens_test.dart test/features/contracts/application/contract_template_controller_test.dart test/features/contracts/application/generated_contract_history_controller_test.dartflutter test --no-pubpassed with 61 tests.flutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
- Real-device smoke status:
- the current wireless-debug serial
192.168.3.93:45347is connected and usable for real-device smoke. mobile/tools/real-device-smoke.ps1 -DeviceSerial 192.168.3.93:45347 -ConfigureDevice -SkipInstall -SmokeDepth contract-result-actions -LoginAccount cyuqei@gmail.com -LoginPassword <member-password>returnedSMOKE_OK=True.- the full product smoke suite now passes on the same device:
mobile/tools/run-real-device-product-smoke-suite.ps1 -DeviceSerial 192.168.3.93:45347 -ConfigureDevice -SkipInitialInstall -LoginAccount cyuqei@gmail.com -LoginPassword <member-password>returnedSUITE_OK=True- passed steps:
shell-only,share-proof,contract-taxonomy,contract-result-actions,documents-workspace,review-legal-document,dashboard-review-preview,business-auxiliary
- latest artifact root:
mobile/qa-artifacts/real-device-product-smoke-suite/2026-05-26T10-30-31-688/
- the current wireless-debug serial
Generated contract version-chain mobile closure (2026-05-26)
- The generated-contract result page now exposes the backend version-chain capability on Android:
- version list with base/generated version and saved editor versions
- mobile diff preview between generated-contract versions
- version download entry
- lightweight editor entry that saves edited contract content as a new backend version
- Mobile API/client coverage now includes:
GET /contracts/{contract_id}/versionsGET /contracts/{contract_id}/versions/diffPOST /contracts/{contract_id}/versionsGET /contracts/{contract_id}/versions/{version_id}/download
mobile/tools/real-device-smoke.ps1now supportscontract-version-chain.mobile/tools/run-real-device-product-smoke-suite.ps1now includescontract-version-chainin the default suite betweencontract-result-actionsanddocuments-workspace.- Validation:
- PowerShell parser checks passed for both smoke scripts.
flutter analyze --no-pubflutter test --no-pub test/features/contractsflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfoodmobile/tools/real-device-smoke.ps1 -DeviceSerial 192.168.3.93:45347 -ConfigureDevice -SmokeDepth contract-version-chain -LoginAccount cyuqei@gmail.com -LoginPassword <member-password>returnedSMOKE_OK=Truemobile/tools/run-real-device-product-smoke-suite.ps1 -DeviceSerial 192.168.3.93:45347 -ConfigureDevice -SkipInitialInstall -LoginAccount cyuqei@gmail.com -LoginPassword <member-password>returnedSUITE_OK=True- passed suite steps:
shell-only,share-proof,contract-taxonomy,contract-result-actions,contract-version-chain,documents-workspace,review-legal-document,dashboard-review-preview,business-auxiliary - latest artifact root:
mobile/qa-artifacts/real-device-product-smoke-suite/2026-05-26T11-23-24-023/
Generated contract version save-loop hardening (2026-05-26)
- The Android version editor now exposes stable automation anchors for:
- change-summary input
- contract-content input
- bottom save action
- The
contract-version-chainsmoke depth is no longer display-only:- it enters the editor from a generated contract result
- appends a timestamped smoke marker to the summary/content
- saves a new backend version
- verifies the app returned to the result page and the created version marker is visible in the version list
- Additional result fields now exist in
summary.txtfor the save loop:CONTRACT_VERSION_CHAIN_SAVE_OKCONTRACT_VERSION_CHAIN_CREATED_VISIBLECONTRACT_VERSION_CHAIN_SAVE_MARKER
- Local validation for this hardening slice:
flutter analyze --no-pubflutter test --no-pub test/features/contracts- PowerShell parser check for
mobile/tools/real-device-smoke.ps1
Android remaining backlog (2026-05-27)
- The Android mainline product paths are now functionally closed through real-device smoke:
shell-onlyshare-proofcontract-taxonomycontract-result-actionscontract-version-chaindocuments-workspacereview-legal-documentdashboard-review-previewbusiness-auxiliary
- The latest real-device product smoke suite passed end-to-end again on the wireless X60PRO:
- device serial:
192.168.3.93:40911 - suite result:
SUITE_OK=True - suite artifact root:
mobile/qa-artifacts/real-device-product-smoke-suite/2026-05-27T08-36-40-365/
- device serial:
- The refreshed suite now also includes
system-interopand passed end-to-end on the same real device:- device serial:
192.168.3.93:40911 - suite result:
SUITE_OK=True - passed steps:
shell-only,system-interop,share-proof,contract-taxonomy,contract-result-actions,contract-version-chain,documents-workspace,review-legal-document,dashboard-review-preview,business-auxiliary - suite artifact root:
mobile/qa-artifacts/real-device-product-smoke-suite/2026-05-27T15-54-21-779/
- device serial:
Remaining not fully closed
- System-level file picker / open / share compatibility is now script-probed but still OEM-dependent:
system-interoprecords whether the current device exposes usable handlers forACTION_OPEN_DOCUMENT, PDF view, and PDF share- this turns external handler gaps into explicit evidence instead of app-surface failures
- Wireless ADB unattended stability is now script-probed but still an environment risk:
check-wireless-adb-stability.ps1records repeated online probes, mDNS output, andadb devices -l- port rotation,
offline, and lockscreen overlays remain external blockers during long unattended runs
- Brand and image assets are functionally swapped in; future work here is only final production art direction:
- bundled raster assets now feed app mark, login banner, dashboard hero image, launcher icon, and splash image
- final designer-supplied brand pack can still replace these generated assets later
Closed and should not be re-counted as open gaps
- Chinese-variable contract template preview + generate validation
- Contract-generation preview continuation and persisted draft preview restore
- System interop handler probing for file picker / open / share
- Wireless ADB stability preflight reporting
- Functional bundled brand/image asset integration
- Login/session persistence
- Review submit/history/detail/report flow
- Review -> Chat follow-up
- Review -> contract generation handoff
- Review -> legal-document handoff
- Business auxiliary real-device entry
- Contract result actions
- Contract version-chain editor save loop
- Product smoke suite batch runner and report artifacts
Review risk actions and contract lifecycle mobile closure (2026-06-01)
-
The mobile review detail page now integrates the backend risk-actions API:
GET /reviews/{id}/risk-actionsloads all risk items with their status, suggested text, and applied version links.PUT /reviews/{id}/risk-actions/{action_id}lets users adopt or ignore individual risk suggestions.POST /reviews/{id}/risk-actions/{action_id}/applyapplies a risk suggestion to a generated contract, creating a new version.
-
New domain models:
ReviewRiskAction,AppliedContractVersion,ReviewRiskActionListResponse,ApplyActionResult. -
New controller:
ReviewRiskActionsControllerwith load, update, and apply methods. -
review_detail_screen.dartnow shows a风险操作card below the继续追问section, listing each risk item with its level badge, status badge, and action buttons (采纳/忽略/应用到合同). -
The mobile generated contract result page now integrates the contract lifecycle and tasks API:
GET /contracts/{id}/lifecycle/tasksloads tasks with status summary.PUT /contracts/{id}/lifecycle/tasks/{task_id}marks tasks as completed.PATCH /contracts/{id}/lifecycleendpoint is now reachable from the mobile client.
-
New domain models:
ContractLifecycle,ContractLifecycleTask,ContractLifecycleTaskListResponse. -
New controller:
ContractLifecycleControllerwith loadTasks and updateTask methods. -
generated_contract_result_screen.dartnow shows a合同生命周期card below the版本链section, listing tasks with priority/status badges and a "标记完成" action. -
Validation after this slice:
-
flutter analyze --no-pub -
flutter test --no-pubpassed with 70 tests -
flutter analyze --no-pub -
flutter test --no-pubpassed with 70 tests -
flutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfoodproducedbuild/app/outputs/flutter-apk/app-debug.apk
-
-
The mobile client now has a unified file management layer (
file_service.dart) that wraps the backend/filesAPI:GET /files— file list with paginationPOST /files— file upload with multipartGET /files/{id}— file detailDELETE /files/{id}— file deletionGET /files/{id}/download-url— signed download URLGET /files/{id}/download— direct binary download
-
New domain models:
FileInfo,FileListResponse,FileDetailResponse,FileUploadResponse -
New
FileServiceclass with typed methods andFileServiceExceptionerror handling -
This service is ready to replace the ad-hoc multipart file uploads in review submission and contract generation flows
Chinese-variable template validation closure (2026-05-27)
property_serviceChinese variable template preview and generate are now treated as closed verification paths rather than an open Android backlog item.- Closure evidence now exists at three layers:
- backend automated coverage in
backend/tests/test_contracts_api.py - explicit UTF-8-safe verifier at
scripts/verify-chinese-contract-template-utf8.ps1 - broader runtime integration through the
property_serviceChinese-variable generation case inscripts/run-phase15-product-smoke.ps1
- backend automated coverage in
- Current verified state:
- preview returned
200 - generate returned
200 - remote member account successfully created new
property_servicegenerated contracts through the UTF-8-safe path
- preview returned
- Resulting boundary update:
- this is no longer a missing contract-generation capability
- the remaining concern is only whether future release gates should require this verification by default
Brand and image asset closure (2026-05-27)
- The mobile workspace now has real bundled brand assets instead of
.gitkeepplaceholders only:assets/branding/brand-mark.pngassets/branding/login-banner.pngassets/icons/app-icon-1024.pngassets/images/workbench-hero.png
- Android launcher and splash assets were refreshed from the same generated brand family:
android/app/src/main/res/mipmap-*/ic_launcher.pngandroid/app/src/main/res/mipmap-*/launch_image.pngandroid/app/src/main/res/drawable*/launch_background.xmlnow renders the bundled launch image instead of the commented placeholder block
- App-surface integration now uses those assets directly:
BrandMarkrenders the bundled bitmap brand markLoginScreenshows the bundled login banner above the hero bandDashboardScreenrenders the bundled workbench hero image through the sharedBrandHeroBand
- Validation after the asset closure:
flutter analyze --no-pubflutter test --no-pub test/features/contracts/presentation/contract_screens_test.dartflutter build apk --debug --no-pub --dart-define=API_BASE_URL=http://192.168.3.90:8001/api/v1 --dart-define=APP_ENV=server-dogfood
Android external interop and unattended probe closure (2026-05-27)
- System-level file picker / open / share compatibility now has a dedicated real-device probe instead of relying only on business smoke side effects.
mobile/tools/real-device-smoke.ps1now supports-SmokeDepth system-interop.- The system interop probe records:
SYSTEM_INTEROP_PROOF_OKSYSTEM_OPEN_DOCUMENT_HANDLER_OKSYSTEM_PDF_VIEW_HANDLER_OKSYSTEM_PDF_SHARE_HANDLER_OK- raw intent resolver output under the smoke artifact directory
- Real-device evidence on
192.168.3.93:40911:SYSTEM_INTEROP_PROOF_OK=TrueSYSTEM_OPEN_DOCUMENT_HANDLER_OK=TrueSYSTEM_PDF_VIEW_HANDLER_OK=TrueSYSTEM_PDF_SHARE_HANDLER_OK=True- artifact bundle:
mobile/qa-artifacts/real-device-smoke/2026-05-27T15-34-31-199/
mobile/tools/run-real-device-product-smoke-suite.ps1now includessystem-interopin the default suite before the business flows.- Wireless ADB unattended stability also has a dedicated preflight:
mobile/tools/check-wireless-adb-stability.ps1- repeated
adb get-stateprobes - before/after
adb mdns services - before/after
adb devices -l - JSON and text summaries under
mobile/qa-artifacts/wireless-adb-stability/
- Real-device preflight evidence on
192.168.3.93:40911:WIRELESS_ADB_STABILITY_OK=TruePROBE_COUNT=2ONLINE_COUNT=2- artifact bundle:
mobile/qa-artifacts/wireless-adb-stability/2026-05-27T15-30-40-369/
- The same pass also hardened two previously flaky real-device smoke assertions:
share-proofnow waits for the Android chooser instead of checking too early while report sharing is still processingreview-legal-documentnow accepts visible builder prefill evidence such as suggested action, handling suggestion, and review opinion text, not only the older context label
- Resulting boundary update:
- missing Android system handlers and wireless-debug churn are still external/OEM risks
- they are now measured and reported as first-class readiness evidence instead of being left as vague product backlog
Contract preview continuation closure (2026-05-27)
- The contract-generation builder now restores more than just variable values when users continue from history/result flows.
- Current closed behavior:
- reopening the builder from generated history or generated result carries forward
initialPreview - the builder now persists per-template draft state locally through secure storage
- persisted draft state includes:
- variable values
- export format
- latest preview payload
- successful generation clears the persisted draft for that template
- reopening the builder from generated history or generated result carries forward
- Closure evidence:
- local persistence store:
mobile/lib/features/contracts/application/contract_builder_draft_store.dart - focused persistence test:
mobile/test/features/contracts/application/contract_builder_draft_store_test.dart - widget coverage for preview restoration:
mobile/test/features/contracts/presentation/contract_screens_test.dart
- local persistence store:
- Remaining note:
- any future work here is deeper product polish around richer multi-template continuation UX, not a missing preview-restore core flow