Make cached frontend data safer by adding stale-while-revalidate patterns, explicit sync fallbacks, and clearer user status when data may be outdated.
- Affected files: app/frontend/src/lib/watchlist.ts, app/frontend/src/components/NotificationCenterProvider.tsx, app/frontend/src/app/notifications/page.tsx, app/frontend/public/sw.js, app/frontend/src/app/layout.tsx, app/frontend/src/components/PWAHandler.tsx, app/frontend/src/app/offline/page.tsx, app/frontend/src/lib/api.ts, app/frontend/src/app/dashboard/page.tsx
- Acceptance criteria:
- Cached user data clearly distinguishes fresh, stale, and unavailable states.
- Background sync or refresh behavior does not overwrite newer local state with stale responses.
- Offline-and-refresh transitions are documented and validated for critical client data sets.
Make cached frontend data safer by adding stale-while-revalidate patterns, explicit sync fallbacks, and clearer user status when data may be outdated.