The mobile app produces different numbers from web for the same account, in two ways. First, it withholds locally-created data from the server: the transaction sync gate refuses to push a transaction while any linked category, party, wallet, or group still lacks a server id (transaction_sync_handler.dart:84-100). The gate itself is correct, but the dependency records are not synced to the server ahead of (or together with) the transaction, so a transaction logged under a not-yet-synced custom category does not reach the server until that dependency happens to sync, and until then anything server-side (stats, the AI) reports it as missing, e.g. a category reads as zero spend. If the dependency never syncs, the gap is permanent. Second, the on-device Reports and Month-in-Review recompute locally instead of reading server stats the way web does, and drift: transfers get counted as spending, the recap can land on an older active month when the current month is empty, and amounts are summed across currencies without conversion.
Constraint: the server (/stats) is the source of truth; mobile should match it, not maintain a second divergent calculation.
Checklist
Synchronization
Calculations (align on-device reports with server /stats)
Acceptance criteria
Related
- Reference behavior:
useReportData.ts in the web app (trakli/webui)
- Source of truth:
trakli/webservice /api/v1/stats
The mobile app produces different numbers from web for the same account, in two ways. First, it withholds locally-created data from the server: the transaction sync gate refuses to push a transaction while any linked category, party, wallet, or group still lacks a server id (
transaction_sync_handler.dart:84-100). The gate itself is correct, but the dependency records are not synced to the server ahead of (or together with) the transaction, so a transaction logged under a not-yet-synced custom category does not reach the server until that dependency happens to sync, and until then anything server-side (stats, the AI) reports it as missing, e.g. a category reads as zero spend. If the dependency never syncs, the gap is permanent. Second, the on-device Reports and Month-in-Review recompute locally instead of reading server stats the way web does, and drift: transfers get counted as spending, the recap can land on an older active month when the current month is empty, and amounts are summed across currencies without conversion.Constraint: the server (
/stats) is the source of truth; mobile should match it, not maintain a second divergent calculation.Checklist
Synchronization
transaction_sync_handler.dart:84-100) passes and the transaction reaches the server promptly instead of waiting on an unrelated later sync.Calculations (align on-device reports with server
/stats)transferId != null) from Reports and Month-in-Review. Web already filters these, and budgets and financial position do too.month_in_review_data.dart:68-86).report_data.dart).Acceptance criteria
Related
useReportData.tsin the web app (trakli/webui)trakli/webservice/api/v1/stats