feat: add automatic version update check#98
Merged
Merged
Conversation
Implement a startup check that compares the current binary version
against
the latest release on `proxy.golang.org`.
```mermaid
sequenceDiagram
participant App
participant UI as Model
participant API as proxy.golang.org
App->>UI: Init()
UI->>UI: checkLatestVersion()
UI->>API: GET @latest
API-->>UI: Return latest version
UI-->>App: latestVersionMsg
App->>UI: Run() completes
UI->>App: Notify if update available
```
Contributor
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Code Review
This pull request implements an update notification system that checks for newer versions via the Go proxy and displays a notice after the UI finishes. It also refactors UI styles and reduces startup delays. Reviewers identified a bug where HTTP errors in the version check were handled silently and suggested further UX improvements, such as removing artificial sleeps and parallelizing the version and git status checks to prevent blocking the application startup.
Coverage Report for CI Build 26122594823Coverage increased (+0.9%) to 33.269%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Return a descriptive error instead of an undefined variable when the latest version check API returns a non-200 status code.
Reorder imports to follow standard Go formatting conventions by placing third-party packages together.
* Refactor `CheckLatest` to support testability by extracting
configuration
to package-level variables.
* Export `LatestResponse` and `Origin` structs.
* Add comprehensive unit tests using `httptest` to verify version
comparison
logic and error handling.
```mermaid
sequenceDiagram
participant App
participant Proxy as proxy.golang.org
App->>Proxy: GET /@latest
Proxy-->>App: Return JSON (LatestResponse)
App->>App: Compare semantic versions
App-->>App: Return newer version or empty string
```
Introduce `setupLatestTestServer` to encapsulate repetitive test boilerplate, including server lifecycle management and package variable patching. This improves test readability and ensures cleaner resource cleanup using `t.Cleanup`.
rm-hull
added a commit
that referenced
this pull request
May 23, 2026
…/delete-line-capability * 'main' of github.com:rm-hull/git-commit-summary: feat: separate system instructions and user prompts (#102) feat: support Gemini 3.5 Flash model chore(deps): Bump github.com/openai/openai-go/v3 from 3.36.0 to 3.37.0 (#100) chore(deps): Bump google.golang.org/genai from 1.57.0 to 1.58.0 (#101) style: reorder version notice message parts style: adjust new version notification format refactor: defer error check in app.Run chore: go get -u && go mod tidy (#99) feat: add automatic version update check (#98) chore(deps): Bump github.com/revrost/go-openrouter from 1.5.0 to 1.6.0 (#97) chore: go get -u && go mod tidy (#96) fix: reset cursor position in commit summary textarea feat: display LLM generation duration in UI feat: add Gemma 4 26B and 31B models feat: add `--yolo` flag for immediate commits (#93) chore: go get -u && go mod tidy (#95) feat: add support for including all modified files (#94) chore(deps): Bump google.golang.org/genai from 1.56.0 to 1.57.0 (#92)
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.
Implement a startup check that compares the current binary version against
the latest release on
proxy.golang.org.sequenceDiagram participant App participant UI as Model participant API as proxy.golang.org App->>UI: Init() UI->>UI: checkLatestVersion() UI->>API: GET @latest API-->>UI: Return latest version UI-->>App: latestVersionMsg App->>UI: Run() completes UI->>App: Notify if update available