Skip to content

Inform users about a new release #304

Open

Description

@perber

I think it is good to let the user know that a new version is available in the UI.
This mechanism should be disabled by a flag. If you run LeafWiki in an airgapped environment it should not check automatically for updates.
The plan is not to update it, but at least to inform the user that a new version is available.

Activity

  1. added
    enhancementNew feature or request
    backlogThe card is in backlog and not planned for a release yet
    on Nov 9, 2025
  2. perber commented on Nov 10, 2025

    @perber
    OwnerAuthor

    @Hugo-Galley - Would you like to take something like this? - At the beginning just the backend part in go?
    We already have a config endpoint. We could add in the config that the check is enabled or disabled this should be configurable via ENVs/args. (Something like --disable-update-info)
    The config endpoint also requries the current version. This will help us later to identify issues in a specific version.

    Maybe you could suggest how we get the current version into the image.

    One way could be how I have done it during the build to embed the frontend:

    // EmbedFrontend is a flag to enable or disable embedding the frontend
    // This is useful for testing purposes, where we might not want to embed the frontend
    // During build time, we can set this to false to disable embedding the frontend
    var EmbedFrontend = "false"
    
    RUN go build \
      -ldflags="-s -w -X github.com/perber/wiki/internal/http.EmbedFrontend=true -X github.com/perber/wiki/internal/http.EnableCors=false -X github.com/perber/wiki/internal/http.Environment=production" \
      -o /out/${OUTPUT} ./cmd/leafwiki/main.go
    

    Let me know what you are thinking. It is not urgent.

  3. Hugo-Galley commented on Nov 10, 2025

    @Hugo-Galley
    Contributor

    @perber So if I understand correctly, the idea would be for the application to know its own version number, and when a new update is available, an Update button would appear, allowing us to update the app while keeping our current data?

    As for Go, I’ve never worked with it before, so I’m not sure I’m the most qualified person for that part.
    That said, I really like the idea, I was actually planning to open an issue about this myself :D

    I’m definitely open to discussing it further and happy to help brainstorm how we could make it happen.

  4. perber commented on Nov 10, 2025

    @perber
    OwnerAuthor

    Sounds. Good. I think at the beginning we just show the user that a new release is existing. We shouldn't update it at least not in this version. I will prepare something the upcoming days and we can discuss it in the issue here?

    What do you think?

  5. removed
    backlogThe card is in backlog and not planned for a release yet
    on Nov 10, 2025
  6. Hugo-Galley commented on Nov 10, 2025

    @Hugo-Galley
    Contributor

    @perber Yes, of course, we can discuss it here.
    I think what could be done is to store the currently running version in a variable, and then, at regular intervals (every week? every two days? or maybe a user-configurable option), check whether the version we have matches the tag of the latest release on the Hub.

    That could probably be handled in Go, I suppose — something to explore, maybe using cron jobs.

    I’m not sure if that’s how you see it — is it?
    Otherwise, how do you envision it?

  7. perber commented on Nov 10, 2025

    @perber
    OwnerAuthor

    I think the check if a new version is available can be implemented with a simple endpoint in go. (Just retrieving the last version from github)
    When the frontend is opened it will call the internal endpoint / which is just a wrapper to avoid CORS issues. (In the frontend we ca add something which is checking every 3 hours or so if a new version is available. If someone has LeafWiki all the time open.)

    The frontend can then call the config endpoint. Which holds the current version & our internal wrapper for the request to github.

  8. Hugo-Galley commented on Nov 10, 2025

    @Hugo-Galley
    Contributor

    That sounds good to me. Our two ideas are quite similar at their core. When it’s ready, I’ll be happy to discuss it with you.

  9. Hugo-Galley commented on Nov 10, 2025

    @Hugo-Galley
    Contributor

    You’re planning to develop it for the next release, if I understood correctly — version 0.4.10?

  10. perber commented on Nov 10, 2025

    @perber
    OwnerAuthor

    Yes, but we can move it further away. It is not urgent. Currently I'm focusing more on the e2e tests. I added it to the milestone for visibility. The next release is planned for the 28th of November.

  11. Hugo-Galley commented on Nov 10, 2025

    @Hugo-Galley
    Contributor

    Yes, exactly — it’s not urgent. It’s a great feature, but indeed, the UI/UX will be what’s most visible to the user. You’re right.

  12. perber commented on Nov 11, 2025

    @perber
    OwnerAuthor

    Hey @Hugo-Galley,

    let me know if this helps you to implement the backend part of it.

    1. In the printUsage() section, please add the description for the new flag and the corresponding ENV variable
      → main.go#L13
      It should be an opt-out flag like --disable-update-check.

    2. Add the new variable and the ENV here
      → main.go#L47

    3. Pass the flag here
      → router.go#L29
      (If you like, you could refactor this into a small RouterConfig struct.)

    4. Make sure to pass both the flag value and the current version to the router here.

    5. Add a simple new endpoint to retrieve the latest release version from GitHub —
      something like /get-last-release would be perfect. You can take a look at the config endpoint. I think this should be enough.
      (Keep it simple and straightforward.)

    The frontend part is out of scope for now — I might create another card later to implement these changes on the UI side.

  13. Hugo-Galley commented on Nov 11, 2025

    @Hugo-Galley
    Contributor

    @perber I think there was a bit of a misunderstanding 😅
    I thought you were the one working on that part and just wanted some external feedback.
    Unfortunately, I can’t take care of that part myself since I don’t know anything about Go.
    So I’ll leave this issue to you — sorry for the confusion!

  14. perber commented on Nov 11, 2025

    @perber
    OwnerAuthor

    Ah ok... :D ... No worries. I will do that.

  15. perber commented on Nov 15, 2025

    @perber
    OwnerAuthor

    I will remove this one from the milestone. I think it is a bit to early atm.

  16. added
    backlogThe card is in backlog and not planned for a release yet
    on Nov 15, 2025
  17. removed their assignment
    on Dec 18, 2025
  18. removed
    backlogThe card is in backlog and not planned for a release yet
    on Apr 26, 2026
  19. added this to the v0.11.0 milestone on Apr 26, 2026
  20. modified the milestones: v0.11.0, After v1 on May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions