Devices and sync status show stale data after purge until manual refresh

After using Settings → Purge Devices, the UI does not immediately reflect the updated state. Both the Devices table and the sync status panel display outdated or incomplete information until the user manually refreshes the page.

Observed behaviours:

1. Devices still appear after purge

  • After purging, navigating back to the Devices page still shows the old devices.

  • Only after a full browser refresh do the purged devices disappear from UI

2. Re-sync shows incorrect sync status

After purge + "Sync Devices":

  • Sync status panel gets stuck at 0% (“We’re working on it”).

  • Meanwhile, the Logs page shows a full successful sync:

    • PSA sync completed

    • Devices added

    • Warranty sync completed

    • Sync completed successfully

This means the backend completed everything, but the UI did not update to reflect completion.

3. Devices table and header become inconsistent

  • The header sometimes shows “Found 3 of 3”,

  • while the table displays “No records to display”.

  • After refreshing the page, all devices appear correctly.

This confirms the UI is rendering stale state instead of re-fetching current data.


Expected Behaviour

  • After purge, returning to the Devices page should show an empty list (or whatever the correct state is) without requiring manual refresh.

  • After re-sync, the sync status panel should update from 0% → 100% and show completion when the backend has completed all tasks without refresh needed.

  • Device header counts and table rows should remain consistent.


For Review

  • Does purge trigger any state or cache invalidation events?

  • Is the Devices page using a cached result instead of re-querying the backend?

  • Is the sync status component listening for the correct completion events after a purge?

  • Are different parts of the UI using different sources or timings for device counts vs. device rows?

  • Confirm whether the frontend needs:

    • A re-fetch on navigation

    • A state reset after purge

    • Additional invalidation logic after sync completion


Acceptance Criteria

  • Devices page always shows accurate post-purge state without manual refresh.

  • Sync status updates correctly during and after sync.

  • No UI state where:

    • Sync appears stuck at 0% while backend completed, or

    • Header says “Found X of X” but table is empty.

  • Navigating or returning to the Devices page always reflects the real device table state.

Please authenticate to join the conversation.

Upvoters
Status

Submitted

Board
Custom icon

COW

Tags

Bug / Fix

Date

4 months ago

Author

purfektblyss

Subscribe to post

Get notified by email when there are changes.