Conversation
web/src/App.jsx
Outdated
| set({ skipUpdate: false }); | ||
| } else { | ||
| set({ status: s, loaded: true, disconnected: false }); | ||
| if(s.info.version != "0.4.11"){ |
There was a problem hiding this comment.
I would like a more robust version pin than "Remember to update this line before every update"
Finding a way for react to store the poetry version would be ideal, but any way that doesn't require intentional manual upkeep is mandatory for this imo
There was a problem hiding this comment.
#1086 (comment)
Updated this line to:
if(s.info.version != import.meta.env.VITE_BACKEND_VERSION){
|
This PR also has a lot of changes to the various StatusBar style components, that's due to me waffling about which version I should use and wanting them all to have feature parity as I found upgrades I could easily build for my immediate needs |
| echo "Building web app" | ||
| pushd ../web # Change to web directory | ||
| npm install # Install nodejs dependencies | ||
| echo "VITE_BACKEND_VERSION=$(poetry version -s)" > .env # Collect the version number and bake it into the frontend |
There was a problem hiding this comment.
I've learned that Vite can bake environment variables into the compiled webapp if you use a dotenv and prefix the vars with VITE_ so I dynamically grab the poetry version and put it in a .env at build time
cbb7b8f to
0233d21
Compare
862f88e to
e129535
Compare
What does this change intend to accomplish?
If you have a cached version of amplipi, or keep the site open in another tab / in the app before and after an update, your code is liable to be mismatched with the backend and have odd behaviors. This warning surfaces that issue to the user so they know that they're in need of restarting their browser/app or clearing their cache.
Desktop:

Mobile:

Checklist
./scripts/test