Skip to main content

Offline & Sync

Web vs mobile: Offline support is a mobile-native capability — PanelOne web requires connectivity. Mobile caches reads and queues writes for triage in the field; integration sync and OAuth always need the web app or network.

PanelOne Mobile is designed for MSP engineers who lose connectivity on client sites, in elevators, or during travel. The app caches operational data locally and queues mutations for later sync.


How It Works

Two systems power offline behavior:

SystemPurpose
Offline cacheJSON envelopes in app cache directory — read-only data
Write queuePending mutations with retry and dead-letter handling

Both are scoped per device. Sign-out purges cache and queue entirely.


Cached Reads

When online, the app stores successful API responses in PanelOneMobileCache:

DataCached
Dashboard stats & widgetsYes
Client lists & detailYes
Device lists & detailYes
Alert lists & detailYes
Ticket lists & detailYes
More hub product listsYes
Org capabilities & directoryYes

Each cache entry includes an updatedAt timestamp. Offline views show last-known data with that freshness.

When offline, reads serve from cache first — no network request is attempted.


Write Queue

When you perform a mutation offline, the app enqueues a QueuedWrite:

FieldDescription
idUnique queue entry ID
kindWrite type (see table below)
payloadMutation data
clientMutationIdIdempotency key for server dedup
retriesFailure count
lastErrorLast error message if failed

Supported Write Kinds

KindAction
alert_acknowledgeAcknowledge an alert
ticket_createCreate a new ticket
ticket_status_updateChange ticket status
ticket_field_updateChange priority, assignee, etc.
ticket_commentAdd ticket comment
psa_job_create / psa_job_updatePSA job mutations
psa_lead_create / psa_lead_update / psa_lead_stage_updateLead pipeline
psa_quote_create / psa_quote_updateQuotes
psa_job_task_create / psa_job_task_update / psa_job_task_deleteJob tasks
psa_job_note_createJob notes
psa_timesheet_createTimesheets
psa_timer_start / psa_timer_stopPSA timers

The UI updates optimistically — you see changes immediately; the queue syncs in the background.


Queue Flush & Retry

When connectivity returns:

  1. Foreground — Queue flushes on next online API interaction.
  2. BackgroundBGAppRefreshTask (offline-refresh) attempts flush when authenticated.

Retry Policy

SettingValue
Max retries3 per write
On permanent failureWrite moves to dead-letter queue (offline-write-dead-letter.json)
IdempotencyclientMutationId prevents duplicate server-side application

If a write lands in the dead-letter queue, retry manually when online or contact support with the error from lastError.


What Works Offline

FeatureOffline support
Browse cached listsYes
View cached detailYes
Acknowledge alertsQueued
Create ticketsQueued
Update ticket status/fieldsQueued
Add ticket commentsQueued
PSA writesQueued
Global searchCached entities only
DashboardCached stats

What Requires Connectivity

FeatureWhy
Remote device actionsLive vendor API calls
Patch scan / applyRMM real-time
Document upload/downloadStorage signed URLs
Integration OAuthBrowser auth flow
Marketplace installWeb wizard
Client createNot available on mobile
Passkey registrationWebAuthn ceremony
Fresh data syncSupabase fetch
Push token registrationAPNs setup

Sign-Out Purge

Signing out runs OfflineLocalDataPurger:

  1. Clears all cached JSON files.
  2. Clears active write queue.
  3. Clears dead-letter queue.
  4. Removes Keychain session.

This prevents operational data from persisting on shared devices.


Background Refresh

Each app registers a background refresh task declared in Info.plist:

  • Task identifier: offline-refresh
  • Runs only when an authenticated shell can provide session context
  • Primary purpose: flush queued writes after reconnect

Background execution is best-effort — iOS schedules based on usage patterns.


Realtime Updates (Online)

When online, scoped realtime invalidation refreshes active tabs when Supabase tables change — without full app restart. Offline cache updates on the next successful fetch after invalidation.


Tips & Best Practices

  • Triage offline confidently — Acknowledges and ticket updates queue safely.
  • Verify critical actions when back online — Check alert and ticket state after reconnect.
  • Don't rely on offline for device actions — Schedule reboots/scripts when connected.
  • Sign out on shared iPads — Purge ensures no client data remains.