Description
When a user completes a scan in offline mode, the edge inference succeeds, but the app navigates to /analysis. Because the user is offline, the dashboard fails to fetch the scan details from the server, resulting in an empty dashboard and an "unable to connect" error.
Tasks
- Update
src/pages/ScannerPage.tsx to save the edge inference scan result directly to sessionStorage (e.g. offlineScanResult) before navigating to /analysis.
- Update
src/pages/AnalysisDashboard.tsx to handle network failures. If the api.getScan call fails, check sessionStorage for the local offlineScanResult and render that data instead of showing a blank error page.
Description
When a user completes a scan in offline mode, the edge inference succeeds, but the app navigates to
/analysis. Because the user is offline, the dashboard fails to fetch the scan details from the server, resulting in an empty dashboard and an "unable to connect" error.Tasks
src/pages/ScannerPage.tsxto save the edge inference scan result directly tosessionStorage(e.g.offlineScanResult) before navigating to/analysis.src/pages/AnalysisDashboard.tsxto handle network failures. If theapi.getScancall fails, checksessionStoragefor the localofflineScanResultand render that data instead of showing a blank error page.