Repository navigation
Offer the display update as soon as the display is behind - #140
Merged
Merged
Conversation
The Pi looked a minute after it started and then every six hours, so a release published in between stayed hidden for hours: the app only shows the update button once the Pi has found one. GET /api/state, which the app asks for while More is open and the settings page asks for too, now starts a look in the background when the last one is older than ten minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gby235Tvdg4WjSB3MXB5YG
The app knows its own version, so a display below it has a fitting release waiting even before the Pi's next look has found it. The button then shows right away and makes the Pi look. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gby235Tvdg4WjSB3MXB5YG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Michael · project thread
The Pi looked for a release a minute after it started and then every six hours. The app only showed the display update once the Pi had found one, so a release published in between stayed hidden for hours. That's what happened with v1.0.1: the Pi on v1.0.0 last looked about two hours before it was published.
Two changes:
start()already did that) and install the newest release up to the app's version. There is one edge case: a beta app with a Pi that has nobetas = yes. There the button answers "no update", and the toast for that is now visible (Show the toast over the offline and update covers #137).GET /api/statestarts a background look when the last one is more than ten minutes old (Updates.lookIfOlder). This is for the settings page, which knows no app version. One look at a time, so at most six requests an hour to GitHub. README says when the Pi looks.Tested:
npm test,npm run check; new test inpi/test/update.test.ts.🤖 Generated with Claude Code
https://claude.ai/code/session_01Gby235Tvdg4WjSB3MXB5YG