Summary
api/client.go:FetchLatestVersion uses the default http.Get:
func FetchLatestVersion() string {
resp, err := http.Get("https://api.github.com/repos/ali5ter/wwlog/releases/latest")
http.Get uses the default client, which has no timeout. In practice this means:
- Slow or unreachable network (airplane mode, captive portals, corporate proxies) can stall the TUI for 30-90 seconds.
- The version check is fired as a background Bubble Tea command on every TUI launch — a connection that never returns will keep that goroutine open for the lifetime of the process.
Why it matters
The version check is entirely optional UX. A hang here degrades startup for every user on a slow or offline network.
Suggested approach
Use a short-lived client with an aggressive timeout (2–3 seconds):
client := &http.Client{Timeout: 3 * time.Second}
resp, err := client.Get("https://api.github.com/repos/ali5ter/wwlog/releases/latest")
That matches the spirit of "returns empty string on any error" while bounding the worst-case wait.
🤖 Generated with Claude Code on behalf of Alister
Summary
api/client.go:FetchLatestVersionuses the defaulthttp.Get:http.Getuses the default client, which has no timeout. In practice this means:Why it matters
The version check is entirely optional UX. A hang here degrades startup for every user on a slow or offline network.
Suggested approach
Use a short-lived client with an aggressive timeout (2–3 seconds):
That matches the spirit of "returns empty string on any error" while bounding the worst-case wait.
🤖 Generated with Claude Code on behalf of Alister