[GH-ISSUE #696] Show banner to upgrade to latest version when ArchiveBox is out of date #436

Open
opened 2026-03-01 14:43:36 +03:00 by kerem · 2 comments
Owner

Originally created by @pirate on GitHub (Apr 8, 2021).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/696

Many people seem to be running older versions, which can lead to trouble when upgrading many versions at a time.

I'd like to nudge people towards upgrading more frequently by showing something in the UI.

Possibly using: https://github.com/releasepage/version.js

Conditions:

  • If user is logged in
  • If user is_superuser
  • If there is a newer stable ArchiveBox version available from Github.com/ArchiveBox/ArchiveBox
  • If user has not hidden this popup before on this device

Then:

  • Show a small popup/banner somewhere in the Web UI indicating a new version of ArchiveBox is available
  • Show the currently installed version number (linked to Github releases URL), the new version available (linked to github releases URL)
  • Limit next version available to += 1 major version at a time, e.g. if user is on 0.7.0 go to last minor version 0.7.9, then +=1 1 major version at a time to 0.8.9, then finally 0.9.3 latest version
  • link to instructions upgrading, changelog, and roadmap pages in the Docs
  • also at the end of archivebox add/schedule jobs, show hint line in CLI stderr output if upgrade is available
Originally created by @pirate on GitHub (Apr 8, 2021). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/696 Many people seem to be running older versions, which can lead to trouble when upgrading many versions at a time. I'd like to nudge people towards upgrading more frequently by showing something in the UI. Possibly using: https://github.com/releasepage/version.js Conditions: - If user is logged in - If user `is_superuser` - If there is a newer stable ArchiveBox version available from Github.com/ArchiveBox/ArchiveBox - If user has not hidden this popup before on this device Then: - Show a small popup/banner somewhere in the Web UI indicating a new version of ArchiveBox is available - Show the currently installed version number (linked to Github releases URL), the new version available (linked to github releases URL) - Limit next version available to += 1 major version at a time, e.g. if user is on `0.7.0` go to last minor version `0.7.9`, then +=1 1 major version at a time to `0.8.9`, then finally `0.9.3` latest version - link to instructions upgrading, changelog, and roadmap pages in the Docs - also at the end of `archivebox add`/`schedule` jobs, show hint line in CLI stderr output if upgrade is available
Author
Owner

@benmuth commented on GitHub (Nov 26, 2023):

@pirate Couple of questions about the implementation for this:

  • Should the majority of the logic be implemented in JS or Python? I've gotten something mostly working in JS, but I still have to implement the CLI hint which will require some Python modifications anyway.
  • Should we cache the results of the GH releases API call for performance, or is that not important right now? I'm guessing the best way to do that would be to add or modify a Model?
<!-- gh-comment-id:1826458383 --> @benmuth commented on GitHub (Nov 26, 2023): @pirate Couple of questions about the implementation for this: - Should the majority of the logic be implemented in JS or Python? I've gotten something mostly working in JS, but I still have to implement the CLI hint which will require some Python modifications anyway. - Should we cache the results of the GH releases API call for performance, or is that not important right now? I'm guessing the best way to do that would be to add or modify a Model?
Author
Owner

@pirate commented on GitHub (Nov 26, 2023):

Ah just saw this, so unfortunately it has to be in Python not JS, because we need to show the warning in the CLI too, and I don't want every page request to phone home to GitHub so we'd want to do it once on startup of the server and just store it as a global config variable.

No need to store the result on disk or in a model, just check once in config.py and set the result in a variable e.g. LATEST_VERSION = "0.8.9". Then if LATEST_VERSION > VERSION show the CLI warning and a UI banner.

The hiding banner logic can be in JS (if user has hidden the banner, then store a var in their browser's localstorage to not show the banner again).

<!-- gh-comment-id:1826458830 --> @pirate commented on GitHub (Nov 26, 2023): Ah just saw this, so unfortunately it has to be in Python not JS, because we need to show the warning in the CLI too, and I don't want every page request to phone home to GitHub so we'd want to do it once on startup of the server and just store it as a global config variable. No need to store the result on disk or in a model, just check once in config.py and set the result in a variable e.g. LATEST_VERSION = "0.8.9". Then if LATEST_VERSION > VERSION show the CLI warning and a UI banner. The hiding banner logic can be in JS (if user has hidden the banner, then store a var in their browser's localstorage to not show the banner again).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#436
No description provided.