Skip to content

Conversation

@mateodurante
Copy link
Contributor

This pull request introduces a new mechanism to notify users when a new version of the frontend is available, prompting them to refresh the page to get the latest updates. It does this by adding a version popup component, updating the build process to include version information, and adding the necessary dependencies for the popup functionality.

Version update notification feature:

  • Added a custom hook useVersionPopup that checks for frontend updates by comparing the current version tag in /version.json with the last seen version in local storage, and displays a popup using react-update-popup when a new version is available. (frontend/src/hooks/useVersionPopup.jsx)
  • Integrated the VersionPopup component into the main App component so users are notified of new frontend versions. (frontend/src/App.jsx)

Build and environment improvements:

  • Updated the production Dockerfile to inject version information (APP_VERSION_TAG, APP_COMMIT, APP_BRANCH, and build file) into the environment and write it to /usr/share/nginx/html/version.json for use by the update notification system. (frontend/Dockerfile.prod)

Dependency management:

  • Added react-update-popup as a new dependency to support the version notification popup. (frontend/package.json, frontend/package-lock.json) [1] [2] [3]
  • Added swr and updated use-sync-external-store to support the new popup component's requirements. (frontend/package-lock.json) [1] [2]

@mateodurante mateodurante merged commit 7656fc3 into develop Nov 20, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants