Skip to content

feat: Inform user if cli is outdated#81

Merged
LisoUseInAIKyrios merged 1 commit into
MorpheApp:devfrom
prateek-who:update-alert
Mar 20, 2026
Merged

feat: Inform user if cli is outdated#81
LisoUseInAIKyrios merged 1 commit into
MorpheApp:devfrom
prateek-who:update-alert

Conversation

@prateek-who

Copy link
Copy Markdown
Contributor

Check the user's version with the latest stable version to see if the user's version is outdated. Currently it only runs with the patch subcommand and the network connection has a 3 sec TTL. Any errors are silently thrown and the patching continues. Do we reduce the TTL or is this fine?

It is running on the main thread itself, but it'll block it max for 3 seconds. In case there are any issues with this implementation, please let me know. I'll make the changes

@LisoUseInAIKyrios

Copy link
Copy Markdown
Contributor

3 second timeout is ok. It's only a courtesy check and not critical.

The check could run on a background thread so there is no delay before patching starts, but that will cause the console log "cli is outdated" message to appear in a non-deterministic ordering. Sometimes it will be the first line, sometimes mixed in with other patcher log statements. I think how it is now (blocks to check if outdated) is ok because in normal conditions the check will be a fraction of a second.

@LisoUseInAIKyrios LisoUseInAIKyrios merged commit 5bcd4f7 into MorpheApp:dev Mar 20, 2026
3 checks passed
@LisoUseInAIKyrios LisoUseInAIKyrios linked an issue Mar 20, 2026 that may be closed by this pull request
2 tasks
@LisoUseInAIKyrios LisoUseInAIKyrios removed a link to an issue Mar 20, 2026
2 tasks
@LisoUseInAIKyrios LisoUseInAIKyrios linked an issue Mar 20, 2026 that may be closed by this pull request
2 tasks
github-actions Bot pushed a commit that referenced this pull request Mar 20, 2026
# [1.6.0-dev.6](v1.6.0-dev.5...v1.6.0-dev.6) (2026-03-20)

### Features

* Inform user if cli is outdated ([#81](#81)) ([5bcd4f7](5bcd4f7))
@cyberboh

Copy link
Copy Markdown

Is this only update CLI to latest release? How if user using Pre-release?

@LisoUseInAIKyrios

Copy link
Copy Markdown
Contributor

Hmm, yeah this could use an adjustment to check pre-release versus stable.

Instead of using github api, can use github raw link to build property. This also avoid problems of non-auth github api refusing connections from some ip blocks.

Change to make:
Check if version string of the CLI contains dev, and if so then check if outdated using raw github link:
https://raw.githubusercontent.com/MorpheApp/morphe-cli/refs/heads/main/gradle.properties

If dev is not present, then fetch and check current version against:
https://raw.githubusercontent.com/MorpheApp/morphe-cli/refs/heads/dev/gradle.properties

@prateek-who

Copy link
Copy Markdown
Contributor Author

Sure thing, do I push updates to this PR itself? Will update the github api with these raw links instead.

One small edge case: What if the latest version is the stable release, then it would never check for the dev release that happen after it right?

@LisoUseInAIKyrios

Copy link
Copy Markdown
Contributor

Can make a new PR with the changes. Old merged PR's can't be reopened.

After dev merges to main, the dev branch is reset to main. So it will show a non dev release in that property file. So it still shows the latest release even if it's not a pre-release anymore.

@wchill

wchill commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

FYI I got a report about the update check not working properly when on dev releases

Update available: v1.5.0 (current: v1.6.0-dev.7). Download from https://github.com/MorpheApp/morphe-cli/releases/latest

@LisoUseInAIKyrios

Copy link
Copy Markdown
Contributor

Changing to GitHub raw links will fix that.

@prateek-who prateek-who deleted the update-alert branch March 21, 2026 05:26
@prateek-who

Copy link
Copy Markdown
Contributor Author

Can make a new PR with the changes. Old merged PR's can't be reopened.

After dev merges to main, the dev branch is reset to main. So it will show a non dev release in that property file. So it still shows the latest release even if it's not a pre-release anymore.

I meant:
If a user is on 1.0.8-dev.8 and stable 1.0.8 releases, they'll get a message to update to 1.0.8 since the dev branch resets to main right? But now they're on 1.0.8 (stable), so future update checks only look at the main branch. When 1.0.9-dev.1 comes out on dev, they won't be notified at all, even though they were previously tracking dev releases. What do we do here?

@LisoUseInAIKyrios

Copy link
Copy Markdown
Contributor

There is no user data or anything that moves across from dev to stable update, so it can't easily remember it started at dev.

Either we tell them there is a new stable release and they can decide to change to it from dev, or if CLI is on dev and the latest is stable then the update check ignores the stable release and it will show an update again when a new dev is available.

I'm not sure which is the better approach.

@prateek-who

Copy link
Copy Markdown
Contributor Author

Maybe we could warn the user when they are about to leave dev for stable? Something like:
"Update available: v1.0.9 (current: v1.0.9-dev.8). Note: This is a stable release. Updating will stop dev update notifications. To keep receiving dev updates, skip this and wait for the next dev release."

@LisoUseInAIKyrios

Copy link
Copy Markdown
Contributor

That works. They user should know there is a new non-dev release and they can decide if they want to change to stable

github-actions Bot pushed a commit that referenced this pull request Mar 22, 2026
# [1.6.0](v1.5.0...v1.6.0) (2026-03-22)

### Bug Fixes

* Bump arsclib version, remove APKEditor ([412847e](412847e))
* Dispatch error when launching app ([#79](#79)) ([989e72a](989e72a))
* Update to latest patcher dev ([496d8e9](496d8e9))
* Update to latest patcher dev ([1356259](1356259))
* Update to latest patcher dev ([fb8a4ff](fb8a4ff))
* Update to latest patcher dev ([1551c8e](1551c8e))
* Update to Patcher 1.3.0 ([19c0846](19c0846))
* Use GitHub raw links for CLI update check ([#87](#87)) ([2aa6263](2aa6263))
* Use more logging verbosity when updating options.json ([#72](#72)) ([4d223f2](4d223f2))

### Features

* Add desktop GUI ([#42](#42)) ([cd627e6](cd627e6))
* Inform user if cli is outdated ([#81](#81)) ([5bcd4f7](5bcd4f7))
AzyrRuthless pushed a commit to AzyrRuthless/morphe-cli that referenced this pull request Mar 24, 2026
github-actions Bot pushed a commit to AzyrRuthless/morphe-cli that referenced this pull request Mar 24, 2026
# [1.4.0-dev.1](v1.3.0...v1.4.0-dev.1) (2026-03-24)

### Bug Fixes

* Bump arsclib version, remove APKEditor ([7db96f0](7db96f0))
* Dispatch error when launching app ([MorpheApp#79](https://github.com/AzyrRuthless/morphe-cli/issues/79)) ([5a18f49](5a18f49))
* Update to latest patcher dev ([0e0ccf0](0e0ccf0))
* Update to latest patcher dev ([df1b416](df1b416))
* Update to latest patcher dev ([0d6d9d8](0d6d9d8))
* Update to latest patcher dev ([e2bd02e](e2bd02e))
* Update to Patcher 1.3.0 ([42a0042](42a0042))
* Update to Patcher 1.3.1 ([a808bf1](a808bf1))
* Update to Patcher 1.3.2 ([d935ad9](d935ad9))
* Use GitHub raw links for CLI update check ([MorpheApp#87](https://github.com/AzyrRuthless/morphe-cli/issues/87)) ([afd0cc3](afd0cc3))
* Use more logging verbosity when updating options.json ([MorpheApp#72](https://github.com/AzyrRuthless/morphe-cli/issues/72)) ([bb00a53](bb00a53))

### Features

* Add desktop GUI ([MorpheApp#42](https://github.com/AzyrRuthless/morphe-cli/issues/42)) ([4e33491](4e33491))
* Inform user if cli is outdated ([MorpheApp#81](https://github.com/AzyrRuthless/morphe-cli/issues/81)) ([093e068](093e068))
github-actions Bot pushed a commit to AzyrRuthless/morphe-cli that referenced this pull request Mar 24, 2026
# [1.4.0](v1.3.0...v1.4.0) (2026-03-24)

### Bug Fixes

* Bump arsclib version, remove APKEditor ([7db96f0](7db96f0))
* Dispatch error when launching app ([MorpheApp#79](https://github.com/AzyrRuthless/morphe-cli/issues/79)) ([5a18f49](5a18f49))
* Update to latest patcher dev ([0e0ccf0](0e0ccf0))
* Update to latest patcher dev ([df1b416](df1b416))
* Update to latest patcher dev ([0d6d9d8](0d6d9d8))
* Update to latest patcher dev ([e2bd02e](e2bd02e))
* Update to Patcher 1.3.0 ([42a0042](42a0042))
* Update to Patcher 1.3.1 ([a808bf1](a808bf1))
* Update to Patcher 1.3.2 ([d935ad9](d935ad9))
* Use GitHub raw links for CLI update check ([MorpheApp#87](https://github.com/AzyrRuthless/morphe-cli/issues/87)) ([afd0cc3](afd0cc3))
* Use more logging verbosity when updating options.json ([MorpheApp#72](https://github.com/AzyrRuthless/morphe-cli/issues/72)) ([bb00a53](bb00a53))

### Features

* Add desktop GUI ([MorpheApp#42](https://github.com/AzyrRuthless/morphe-cli/issues/42)) ([4e33491](4e33491))
* Inform user if cli is outdated ([MorpheApp#81](https://github.com/AzyrRuthless/morphe-cli/issues/81)) ([093e068](093e068))
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.

feat: Support self-update

4 participants