Skip to content

Conversation

@0x46616c6b
Copy link
Member

This pull request adds offline support and persistent caching to the application, improving the user experience when the network is unavailable. It introduces a service worker for asset and API caching, uses React Query's persistence features to store data in localStorage, and provides a user-visible offline warning. Additionally, it updates the application's logic to better detect and handle offline states.

How to test?

  1. Build the frontend: npm run build
  2. Start the preview with SW: npm run preview
  3. Go to http://localhost:4173/
  4. Open Dev Tools and set Offline

@0x46616c6b 0x46616c6b added the feature Major new feature with breaking changes label Jan 1, 2026
Copy link
Contributor

@doobry-systemli doobry-systemli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice, thanks for tackling this! I made some comments, mostly nitpicking.

d="M18.364 5.636a9 9 0 010 12.728M5.636 5.636a9 9 0 000 12.728M12 12h.01M8.464 8.464a5 5 0 017.072 7.072M8.464 15.536a5 5 0 010-7.072"
/>
</svg>
<p>You appear to be offline. Some content may be outdated.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking, but this could be shortened: "Offline, content may be outdated."

Copy link
Contributor

@doobry-systemli doobry-systemli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some local testing and it seems to work well.

  • The offline indicator message shows immediately when going offline and hides when going back online.
  • After opening the ticker once in the browser, I can close the browser and open it again while being offline and the ticker page loads from cache.
  • When scrolling to the bottom and then going back online, additional messages load immediately.
  • When new messages are added to the ticker while the browser is offline, they load immediately after going back online.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 7, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
77.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Major new feature with breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants