Skip to content

Forward offline wardrive batches to Custom API after upload - #28

Merged
MrAlders0n merged 3 commits into
MeshMapper:devfrom
DataArchitectPro:feature/offline-custom-api-forward
Aug 19, 2026
Merged

Forward offline wardrive batches to Custom API after upload#28
MrAlders0n merged 3 commits into
MeshMapper:devfrom
DataArchitectPro:feature/offline-custom-api-forward

Conversation

@DataArchitectPro

@DataArchitectPro DataArchitectPro commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

After a successful offline session upload to meshmapper.net, forward the same ping batch to the configured Custom API endpoint — mirroring the existing online queue behavior (api_queue_service already calls forwardPings() on success).

  • app_state_provider.dart: call _forwardOfflineBatchToCustomApi() after each successful offline batch
  • custom_api_service.dart: optional source (online/offline), contact/iata overrides, clearer [CUSTOM API] debug logs

Motivation

Online uploads already fire-and-forget to Custom API. Offline uploads (_uploadOfflineSessionIsolated) previously only POSTed to meshmapper.net — third-party endpoints (e.g. wardrive bridges) never received offline data.

Test plan

  • Active online: meshmapper.net upload + Custom API forward
  • Passive online: DISC pings forwarded
  • Offline mode: record pings → reconnect → upload → Custom API receives batch (verified with MM→MCT bridge)
  • Custom API disabled: offline upload to meshmapper.net unaffected

Fork test build: DataArchitectPro/MeshMapper_Flutter_App v1.0.0-offline-custom-api

DataArchitectPro and others added 2 commits July 2, 2026 01:40
After a successful offline batch upload to MeshMapper, mirror the online
queue behavior by forwarding the same pings to the configured Custom API
endpoint. Adds detailed [CUSTOM API] / [OFFLINE] debug logging for tracing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keeps upstream PR limited to offline Custom API forward changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@MrAlders0n

MrAlders0n commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Reviewed — the forward logic is solid and mirrors the online queue path exactly (verified the partial-upload retry can't double-forward, and the contact format matches the online contactGetter byte-for-byte). Thanks for the thorough test plan.

I pushed one small follow-up commit (c6f0fc3) with three log-hygiene tweaks rather than round-tripping review comments:

  • The Forwarding → log now records the endpoint host instead of the full URL — debug log files get uploaded verbatim with bug reports, and custom endpoint URLs can embed tokens in query strings.
  • The Forward requested/skipped lines are skipped entirely when the Custom API feature is disabled, so users who never enabled it don't get two extra lines per queue flush.
  • Added a doc comment noting offline batches are stamped with the upload-location zone (fresh /auth at current GPS), not the record-location zone — worth knowing for bridge consumers when a session spans regions.

Will merge once CI is happy.

…ntics

Review follow-ups on the offline Custom API forward:
- Log the endpoint host instead of the full URL — debug log files are
  uploaded with bug reports and custom endpoint URLs may embed tokens.
- Skip the "Forward requested/skipped" logging entirely when the Custom
  API feature is disabled (no per-flush noise for users who never
  enabled it).
- Document that offline batches are stamped with the upload-location
  zone, not the record-location zone.
@MrAlders0n
MrAlders0n force-pushed the feature/offline-custom-api-forward branch from 55fac41 to c6f0fc3 Compare August 19, 2026 12:36
@MrAlders0n
MrAlders0n merged commit 5d866e1 into MeshMapper:dev Aug 19, 2026
@DataArchitectPro

Copy link
Copy Markdown
Contributor Author

Thanks for the review and the follow-up commit — the host-only logging, quiet disabled path, and iata semantics note all make sense. Appreciate the merge!

@DataArchitectPro
DataArchitectPro deleted the feature/offline-custom-api-forward branch August 19, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants