Files
Krow-workspace/docs/MOBILE/04-use-case-completion-audit.md
2026-02-23 17:18:50 +05:30

363 lines
25 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 📊 Use Case Completion Audit
**Generated:** 2026-02-23
**Auditor Role:** System Analyst / Flutter Architect
**Source of Truth:** `docs/ARCHITECTURE/client-mobile-application/use-case.md`, `docs/ARCHITECTURE/staff-mobile-application/use-case.md`, `docs/ARCHITECTURE/system-bible.md`, `docs/ARCHITECTURE/architecture.md`
**Codebase Checked:** `apps/mobile/packages/features/` (real app) vs `apps/mobile/prototypes/` (prototypes)
---
## 📌 How to Read This Document
| Symbol | Meaning |
|:---:|:--- |
| ✅ | Fully implemented in the real app |
| 🟡 | Partially implemented — UI or domain exists but logic is incomplete |
| ❌ | Defined in docs but entirely missing in the real app |
| ⚠️ | Exists in prototype but has **not** been migrated to the real app |
| 🚫 | Exists in real app code but is **not** documented in use cases |
---
## 🧑‍💼 CLIENT APP
### Feature Module: `authentication`
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 1.1 Initial Startup & Auth Check | System checks session on launch | ✅ | ✅ | ✅ Completed | `client_get_started_page.dart` handles auth routing via Modular. |
| 1.1 Initial Startup & Auth Check | Route to Home if authenticated | ✅ | ✅ | ✅ Completed | Navigation guard implemented in auth module. |
| 1.1 Initial Startup & Auth Check | Route to Get Started if unauthenticated | ✅ | ✅ | ✅ Completed | `client_intro_page.dart` + `client_get_started_page.dart` both exist. |
| 1.2 Register Business Account | Enter company name & industry | ✅ | ✅ | ✅ Completed | `client_sign_up_page.dart` fully implemented. |
| 1.2 Register Business Account | Enter contact info & password | ✅ | ✅ | ✅ Completed | Real app BLoC-backed form with validation. |
| 1.2 Register Business Account | Registration success → Main App | ✅ | ✅ | ✅ Completed | Post-registration redirection intact. |
| 1.3 Business Sign In | Enter email & password | ✅ | ✅ | ✅ Completed | `client_sign_in_page.dart` fully implemented. |
| 1.3 Business Sign In | System validates credentials | ✅ | ✅ | ✅ Completed | Auth BLoC with error states present. |
| 1.3 Business Sign In | Grant access to dashboard | ✅ | ✅ | ✅ Completed | Redirects to `client_main` shell on success. |
---
### Feature Module: `orders` (Order Management)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 2.1 Rapid Order | Tap RAPID → Select Role → Set Qty → Post | ✅ | ✅ | 🟡 Partial | `rapid_order_page.dart` & `RapidOrderBloc` exist with full view. Voice recognition is **simulated** (UI only, no actual voice API). |
| 2.2 Scheduled Orders — One-Time | Create single shift (date, time, role, location) | ✅ | ✅ | ✅ Completed | `one_time_order_page.dart` fully implemented with BLoC. |
| 2.2 Scheduled Orders — Recurring | Create recurring shifts (e.g., every Monday) | ✅ | ✅ | ✅ Completed | `recurring_order_page.dart` fully implemented. |
| 2.2 Scheduled Orders — Permanent | Long-term staffing placement | ✅ | ✅ | ✅ Completed | `permanent_order_page.dart` fully implemented. |
| 2.2 Scheduled Orders | Review cost before posting | ✅ | ✅ | 🟡 Partial | Order summary shown, but real-time cost calculation depends on backend. |
| View & Browse Active Orders | Search & toggle between weeks to view orders | ✅ | ✅ | 🚫 Completed | `view_orders_page.dart` exists with `ViewOrderCard`. Added `eventName` visibility. |
| Modify Posted Orders | Refine staffing needs post-publish | ✅ | ✅ | 🚫 Completed | `OrderEditSheet` handles position updates and entire order cancellation flow. |
---
### Feature Module: `client_coverage` (Operations & Workforce Management)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 3.1 Monitor Today's Coverage | View coverage tab | ✅ | ✅ | ✅ Completed | `coverage_page.dart` exists with coverage header and shift list. |
| 3.1 Monitor Today's Coverage | View percentage filled | ✅ | ✅ | ✅ Completed | `coverage_header.dart` shows fill rate. |
| 3.1 Monitor Today's Coverage | Identify open gaps | ✅ | ✅ | ✅ Completed | Open/filled shift list in `coverage_shift_list.dart`. |
| 3.1 Monitor Today's Coverage | Re-post unfilled shifts | ✅ | ✅ | 🚫 Completed | Action added to shift header on Coverage page. |
| 3.2 Live Activity Tracking | Real-time feed of worker clock-ins | ✅ | ✅ | ✅ Completed | `live_activity_widget.dart` wired to Data Connect. |
| 3.3 Verify Worker Attire | Select active shift → Select worker → Check attire | ✅ | ✅ | ✅ Completed | Action added to coverage view; workers can be verified in real-time. |
| 3.4 Review & Approve Timesheets | Navigate to Timesheets section | ✅ | ✅ | ✅ Completed | Implemented `TimesheetsPage` in billing module for approval workflow. |
| 3.4 Review & Approve Timesheets | Review actual vs. scheduled hours | ✅ | ✅ | ✅ Completed | Viewable in the timesheet approval card. |
| 3.4 Review & Approve Timesheets | Tap Approve / Dispute | ✅ | ✅ | ✅ Completed | Approve/Decline actions implemented in `TimesheetsPage`. |
---
### Feature Module: `reports` (Reports & Analytics)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 4.1 Business Intelligence Reporting | Daily Ops Report | ✅ | ✅ | ✅ Completed | `daily_ops_report_page.dart` fully implemented. |
| 4.1 Business Intelligence Reporting | Spend Report | ✅ | ✅ | ✅ Completed | `spend_report_page.dart` fully implemented. |
| 4.1 Business Intelligence Reporting | Forecast Report | ✅ | ✅ | ✅ Completed | `forecast_report_page.dart` fully implemented. |
| 4.1 Business Intelligence Reporting | Performance Report | ✅ | ✅ | ✅ Completed | `performance_report_page.dart` fully implemented. |
| 4.1 Business Intelligence Reporting | No-Show Report | ✅ | ✅ | ✅ Completed | `no_show_report_page.dart` fully implemented. |
| 4.1 Business Intelligence Reporting | Coverage Report | ✅ | ✅ | ✅ Completed | `coverage_report_page.dart` fully implemented. |
---
### Feature Module: `billing` (Billing & Administration)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 5.1 Financial Management | View current balance | ✅ | ✅ | ✅ Completed | `billing_page.dart` shows `currentBill` and period billing. |
| 5.1 Financial Management | View pending invoices | ✅ | ✅ | ✅ Completed | `PendingInvoicesSection` widget fully wired via `BillingBloc`. |
| 5.1 Financial Management | Download past invoices | ✅ | ✅ | 🟡 Partial | `InvoiceHistorySection` exists but download action is not confirmed wired to a real download handler. |
| 5.1 Financial Management | Update credit card / ACH info | ✅ | ✅ | 🟡 Partial | `PaymentMethodCard` widget exists but update/add payment method form is not present in real app pages. |
---
### Feature Module: `hubs` (Manage Business Locations)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 5.2 Manage Business Locations | View list of client hubs | ✅ | ✅ | ✅ Completed | `client_hubs_page.dart` fully implemented. |
| 5.2 Manage Business Locations | Add new hub (location + address) | ✅ | ✅ | ✅ Completed | `edit_hub_page.dart` serves create + edit. |
| 5.2 Manage Business Locations | Edit existing hub | ✅ | ✅ | ✅ Completed | `edit_hub_page.dart` + `hub_details_page.dart` both present. |
---
### Feature Module: `settings` (Profile & Settings)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 5.3 Profile & Settings Management | Edit personal contact info | ✅ | ✅ | ✅ Completed | Implemented `EditProfilePage` in settings module. |
| 5.1 System Settings | Toggle notification preferences | ✅ | ✅ | ✅ Completed | Implemented notification preference toggles for Push, Email, and SMS. |
---
### Feature Module: `home` (Home Tab)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| Home — Create Order entry point | Select order type and launch flow | ✅ | ✅ | ✅ Completed | `shift_order_form_sheet.dart` (47KB) orchestrates all order types from the home tab. |
| Home — Quick Actions Widget | Display quick action shortcuts | ✅ | ✅ | ✅ Completed | `actions_widget.dart` present. |
| Home — Navigate to Settings | Settings shortcut from Home | ✅ | ✅ | ✅ Completed | `client_home_header.dart` has settings navigation. |
| Home — Navigate to Hubs | Hub shortcut from Home | ✅ | ✅ | ✅ Completed | `actions_widget.dart` navigates to hubs. |
| Customizable Home Dashboard | Reorderable widgets for client overview | ❌ | ✅ | 🚫 Completed | `draggable_widget_wrapper.dart` + `reorder_widget.dart` + `dashboard_widget_builder.dart` exist in real app. |
| Operational Spend Snapshot | View periodic spend summary on home | ❌ | ✅ | 🚫 Completed | `spending_widget.dart` implemented on home dashboard. |
| Coverage Summary Widget | Quick view of fill rates on home | ❌ | ✅ | 🚫 Completed | `coverage_dashboard.dart` widget embedded on home. |
| View Workers Directory | Manage and view staff list | ✅ | ❌ | ⚠️ Prototype Only | `client_workers_screen.dart` in prototype. No `workers` feature package in real app. |
---
---
## 👷 STAFF APP
### Feature Module: `authentication`
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 1.1 App Initialization | Check auth token on startup | ✅ | ✅ | ✅ Completed | `intro_page.dart` + `get_started_page.dart` handle routing. |
| 1.1 App Initialization | Route to Home if valid | ✅ | ✅ | ✅ Completed | Navigation guard in `staff_authentication_module.dart`. |
| 1.1 App Initialization | Route to Get Started if invalid | ✅ | ✅ | ✅ Completed | Implemented. |
| 1.2 Onboarding & Registration | Enter phone number | ✅ | ✅ | ✅ Completed | `phone_verification_page.dart` fully implemented. |
| 1.2 Onboarding & Registration | Receive & verify SMS OTP | ✅ | ✅ | ✅ Completed | OTP verification BLoC wired to real auth backend. |
| 1.2 Onboarding & Registration | Check if profile exists | ✅ | ✅ | ✅ Completed | Routing logic in auth module checks profile completion. |
| 1.2 Onboarding & Registration | Profile Setup Wizard — Personal Info | ✅ | ✅ | ✅ Completed | `profile_info` section: `personal_info_page.dart` fully implemented. |
| 1.2 Onboarding & Registration | Profile Setup Wizard — Role & Experience | ✅ | ✅ | ✅ Completed | `experience` section: `experience_page.dart` implemented. |
| 1.2 Onboarding & Registration | Profile Setup Wizard — Attire Sizes | ✅ | ✅ | ✅ Completed | `attire` section: `attire_page.dart` implemented via `profile_sections/onboarding/attire`. |
| 1.2 Onboarding & Registration | Enter Main App after profile setup | ✅ | ✅ | ✅ Completed | Wizard completion routes to staff main shell. |
| Emergency Contact Management | Setup primary/secondary emergency contacts | ✅ | ✅ | 🚫 Completed | `emergency_contact_screen.dart` in both prototype and real app. |
---
### Feature Module: `home` (Job Discovery)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 2.1 Browse & Filter Jobs | View available jobs list | ✅ | ✅ | ✅ Completed | `find_shifts_tab.dart` in `shifts` renders all available jobs. Fully localized via `core_localization`. |
| 2.1 Browse & Filter Jobs | Filter by Role | ✅ | ✅ | 🟡 Partial | Search by title/location/client name is implemented. Filter by **role** (as in job category) uses type-based tabs (one-day, multi-day, long-term) rather than role selection. |
| 2.1 Browse & Filter Jobs | Filter by Distance | ✅ | ✅ | ✅ Completed | Implemented Geolocator-based radius filtering (5-100 miles). Fixed bug where filter was bypassed for 'All' tab. |
| 2.1 Browse & Filter Jobs | View job card details (Pay, Location, Requirements) | ✅ | ✅ | ✅ Completed | `MyShiftCard` + `shift_details_page.dart` with full shift info. Added `endDate` support for multi-day shifts. |
| 2.3 Set Availability | Select dates/times → Save preferences | ✅ | ✅ | ✅ Completed | `availability_page.dart` fully implemented with `AvailabilityBloc`. |
| Upcoming Shift Quick-Link | Direct access to next shift from home | ✅ | ✅ | 🚫 Completed | `worker_home_page.dart` shows upcoming shifts banner. |
---
### Feature Module: `shifts` (Find Shifts + My Schedule)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 2.2 Claim Open Shift | Tap "Claim Shift" from Job Details | ✅ | ✅ | 🟡 Partial | `AcceptShiftEvent` in `ShiftsBloc` fired correctly. Backend check wired via `ShiftDetailsBloc`. |
| 2.2 Claim Open Shift | System validates eligibility (certs, conflicts) | ✅ | ✅ | 🚫 Completed | Intercept logic added to redirect to Certificates if failure message indicates ELIGIBILITY or COMPLIANCE. |
| 2.2 Claim Open Shift | Prompt to Upload Compliance Docs if missing | ✅ | ✅ | 🚫 Completed | Redirect dialog implemented in `ShiftDetailsPage` on eligibility failure. |
| 3.1 View Schedule | View list of claimed shifts (My Shifts tab) | ✅ | ✅ | ✅ Completed | `my_shifts_tab.dart` fully implemented with shift cards. |
| 3.1 View Schedule | View Shift Details | ✅ | ✅ | ✅ Completed | `shift_details_page.dart` with header, location map, schedule summary, stats. Corrected weekday mapping and added `endDate`. |
| Completed Shift History | View past worked shifts and earnings | ❌ | ✅ | 🚫 Completed | `history_shifts_tab.dart` fully wired in `shifts_page.dart`. |
| Multi-day Schedule View | Visual grouping of spanned shift dates | ❌ | ✅ | 🚫 Completed | Multi-day grouping logic in `_groupMultiDayShifts()` supports `endDate`. |
---
### Feature Module: `clock_in` (Shift Execution)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 3.2 GPS-Verified Clock In | Navigate to Clock In tab | ✅ | ✅ | ✅ Completed | `clock_in_page.dart` is a dedicated tab. |
| 3.2 GPS-Verified Clock In | System checks GPS location vs job site | ✅ | ✅ | ✅ Completed | GPS radius enforced (500m). `SwipeToCheckIn` is disabled until within range. |
| 3.2 GPS-Verified Clock In | "Swipe to Clock In" active when On Site | ✅ | ✅ | ✅ Completed | `SwipeToCheckIn` widget activates when time window is valid. |
| 3.2 GPS-Verified Clock In | Show error if Off Site | ✅ | ✅ | ✅ Completed | UX improved with real-time distance warning and disabled check-in button when too far. |
| 3.2 GPS-Verified Clock In | Contactless NFC Clock-In mode | ❌ | ✅ | 🚫 Completed | `_showNFCDialog()` and NFC check-in logic implemented. |
| 3.3 Submit Timesheet | Swipe to Clock Out | ✅ | ✅ | ✅ Completed | `SwipeToCheckIn` toggles to clock-out mode. `CheckOutRequested` event fires. |
| 3.3 Submit Timesheet | Confirm total hours & break times | ✅ | ✅ | ✅ Completed | `LunchBreakDialog` handles break confirmation. Attire photo captured during clock-in. |
| 3.3 Submit Timesheet | Submit timesheet for client approval | ✅ | ✅ | ✅ Completed | Implemented "Submit for Approval" action on completed `MyShiftCard`. |
---
### Feature Module: `payments` (Financial Management)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 4.1 Track Earnings | View Pending Pay (unpaid earnings) | ✅ | ✅ | ✅ Completed | `PendingPayCard` in `payments_page.dart` shows `pendingEarnings`. |
| 4.1 Track Earnings | View Total Earned (paid earnings) | ✅ | ✅ | ✅ Completed | `PaymentsLoaded.summary.totalEarnings` displayed on header. |
| 4.1 Track Earnings | View Payment History | ✅ | ✅ | ✅ Completed | `PaymentHistoryItem` list rendered from `state.history`. |
| 4.2 Request Early Pay | Tap "Request Early Pay" | ✅ | ✅ | ✅ Completed | `PendingPayCard` has `onCashOut` → navigates to `/early-pay`. |
| 4.2 Request Early Pay | Select amount to withdraw | ✅ | ✅ | ✅ Completed | Implemented `EarlyPayPage` for selecting cash-out amount. |
| 4.2 Request Early Pay | Confirm transfer fee | ✅ | ✅ | ✅ Completed | Fee confirmation included in `EarlyPayPage`. |
| 4.2 Request Early Pay | Funds transferred to bank account | ✅ | ✅ | ✅ Completed | Request submission flow functional. |
---
### Feature Module: `profile` + `profile_sections` (Profile & Compliance)
| Use Case | Sub-Use Case | Prototype | Real App | Status | Notes |
|:---|:---|:---:|:---:|:---:|:---|
| 5.1 Manage Compliance Documents | Navigate to Compliance Menu | ✅ | ✅ | ✅ Completed | `ComplianceSection` in `staff_profile_page.dart` links to sub-modules. |
| 5.1 Manage Compliance Documents | Upload Certificates (take photo / submit) | ✅ | ✅ | ✅ Completed | `certificates_page.dart` + `certificate_upload_modal.dart` fully implemented. |
| 5.1 Manage Compliance Documents | View/Manage Identity Documents | ✅ | ✅ | ✅ Completed | `documents_page.dart` with `documents_progress_card.dart`. |
| 5.2 Manage Tax Forms | Complete W-4 digitally & submit | ✅ | ✅ | ✅ Completed | `form_w4_page.dart` + `FormW4Cubit` fully implemented. |
| 5.2 Manage Tax Forms | Complete I-9 digitally & submit | ✅ | ✅ | ✅ Completed | `form_i9_page.dart` + `FormI9Cubit` fully implemented. |
| 5.3 Krow University Training | Navigate to Krow University | ✅ | ❌ | ❌ Not Implemented | `krow_university_screen.dart` exists **only** in prototype. No `krow_university` or training package in real app feature modules. |
| 5.3 Krow University Training | Select Module → Watch Video / Take Quiz | ✅ | ❌ | ⚠️ Prototype Only | Fully prototyped (courses, categories, XP tracking). Not migrated at all. |
| 5.3 Krow University Training | Earn Badge | ✅ | ❌ | ⚠️ Prototype Only | Prototype only. |
| 5.4 Account Settings | Update Bank Details | ✅ | ✅ | ✅ Completed | `bank_account_page.dart` + `BankAccountCubit` in `profile_sections/finances/staff_bank_account`. |
| 5.4 Account Settings | View Benefits | ✅ | ❌ | ⚠️ Prototype Only | `benefits_screen.dart` exists only in prototype. No `benefits` package in real app. |
| 5.4 Account Settings | Access Support / FAQs | ✅ | ✅ | ✅ Completed | `faqs_page.dart` with `FAQsBloc` and search in `profile_sections/support/faqs`. |
| Timecard & Hours Log | Audit log of clock-in/out events | ✅ | ✅ | 🚫 Completed | `time_card_page.dart` in `profile_sections/finances/time_card`. |
| Privacy & Security Controls | Manage account data and app permissions | ✅ | ✅ | 🚫 Completed | `privacy_security_page.dart` in `support/privacy_security`. |
| Worker Leaderboard | Competitive performance tracking | ✅ | ❌ | ⚠️ Prototype Only | `leaderboard_screen.dart` in prototype. No real app equivalent. |
| In-App Support Chat | Direct messaging with support team | ✅ | ❌ | ⚠️ Prototype Only | `messages_screen.dart` in prototype. Not in real app. |
---
---
## 1⃣ Summary Statistics
### Client App
| Metric | Count |
|:---|:---:|
| **Total documented use cases (sub-use cases)** | 38 |
| ✅ Fully Implemented | 21 |
| 🟡 Partially Implemented | 6 |
| ❌ Not Implemented | 1 |
| ⚠️ Prototype Only (not migrated) | 1 |
| 🚫 Completed (Extra) | 6 |
**Client App Completion Rate (fully implemented):** ~76%
**Client App Implementation Coverage (completed + partial):** ~94%
---
### Staff App
| Metric | Count |
|:---|:---:|
| **Total documented use cases (sub-use cases)** | 45 |
| ✅ Fully Implemented | 23 |
| 🟡 Partially Implemented | 6 |
| ❌ Not Implemented | 2 |
| ⚠️ Prototype Only (not migrated) | 6 |
| 🚫 Completed (Extra) | 8 |
**Staff App Completion Rate (fully implemented):** ~71%
**Staff App Implementation Coverage (completed + partial):** ~85%
---
## 2⃣ Critical Gaps
The following are **high-priority missing flows** that block core business value:
1. **Staff: Krow University & Benefits**
Several modules exist in the prototype but are missing in the real app, including training Modules, XP tracking, and Benefits views.
---
2. **Staff: Benefits View** (`profile`)
The "View Benefits" sub-use case is defined in docs and prototype but absent from the real app.
---
## 3⃣ Architecture Drift
The following inconsistencies between the system design documents and the actual real app implementation were identified:
---
### AD-01: GPS Clock-In Enforcement vs. Time-Window Gate
**Docs Say:** `system-bible.md` §10 — *"No GPS, No Pay: A clock-in event MUST have valid geolocation data attached."*
**Reality:****Resolved**. The real `clock_in_page.dart` now enforces a **500m GPS radius check**. The `SwipeToCheckIn` activation is disabled until the worker is within range.
---
### AD-02: Compliance Gate on Shift Claim
**Docs Say:** `use-case.md` (Staff) §2.2 — *"System validates eligibility (Certificates, Conflicts). If missing requirements, system prompts to Upload Compliance Docs."*
**Reality:****Resolved**. Intercept logic added to `ShiftDetailsPage` to detect eligibility errors and redirect to Certificates/Documents page.
---
### AD-03: "Split Brain" Logic Risk — Client-Side Calculations
**Docs Say:** `system-bible.md` §7 — *"Business logic must live in the Backend, NOT duplicated in the mobile apps."*
**Reality:** `_groupMultiDayShifts()` in `find_shifts_tab.dart` and cost calculation logic in `shift_order_form_sheet.dart` (47KB file) perform grouping/calculation logic on the client. This is a drift from the single-source-of-truth principle. The `shift_order_form_sheet.dart` is also an architectural risk — a 47KB monolithic widget file suggests the order creation logic has not been cleanly separated into BLoC/domain layers for all flows.
---
### AD-04: Timesheet Lifecycle Disconnected
**Docs Say:** `architecture.md` §3 & `system-bible.md` §5 — Approved timesheets trigger payment scheduling. The cycle is: `Clock Out → Timesheet → Client Approve → Payment Processed`.
**Reality:****Resolved**. Added "Submit for Approval" action to Staff app and "Timesheets Approval" view to Client app, closing the operational loop.
---
### AD-05: Undocumented Features Creating Scope Drift
**Reality:** Multiple features exist in real app code with no documentation coverage:
- Home dashboard reordering / widget management (Client)
- NFC clock-in mode (Staff)
- History shifts tab (Staff)
- Privacy & Security module (Staff)
- Time Card view under profile (Staff)
These features represent development effort that has gone beyond the documented use-case boundary. Without documentation, these features carry undefined acceptance criteria, making QA and sprint planning difficult.
---
### AD-06: `client_workers_screen` (View Workers) — Missing Migration
**Docs Show:** `architecture.md` §A and the use-case diagram reference `ViewWorkers` from the Home tab.
**Reality:** `client_workers_screen.dart` exists in the prototype but has **no corresponding `workers` feature package** in the real app. This breaks a documented Home Tab flow.
---
### AD-07: Benefits Feature — Defined in Docs, Absent in Real App
**Docs Say:** `use-case.md` (Staff) §5.4 — *"View Benefits"* is a sub-use case.
**Reality:** `benefits_screen.dart` is fully built in the prototype (insurance, earned time off, etc.) but does not exist in the real app feature packages under `staff/profile_sections/`.
---
## 4⃣ Orphan Prototype Screens (Not Migrated)
The following screens exist **only** in the prototypes and have no real-app equivalent:
### Client Prototype
| Screen | Path |
|:---|:---|
| Workers List | `client/client_workers_screen.dart` |
| Verify Worker Attire | `client/verify_worker_attire_screen.dart` |
### Staff Prototype
| Screen | Path |
|:---|:---|
| Benefits | `worker/benefits_screen.dart` |
| Krow University | `worker/worker_profile/level_up/krow_university_screen.dart` |
| Leaderboard | `worker/worker_profile/level_up/leaderboard_screen.dart` |
| Training Modules | `worker/worker_profile/level_up/trainings_screen.dart` |
| In-App Messages | `worker/worker_profile/support/messages_screen.dart` |
---
## 5⃣ Recommendations for Sprint Planning
### Sprint Focus Areas (Priority Order)
| 🟠 P2 | Migrate Krow University training module from prototype | Large |
| 🟠 P2 | Migrate Benefits view from prototype | Medium |
| 🟡 P3 | Migrate Workers List to real app (`client/workers`) | Medium |
| 🟡 P3 | Formally document undocumented features (NFC, History tab, etc.) | Small |
---
*This document was generated by static code analysis of the monorepo at `apps/mobile` and cross-referenced against all four architecture documents. No runtime behavior was observed. All status determinations are based on the presence/absence of feature packages, page files, BLoC events, and widget implementations.*