Fix update check timeout bug#558
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a race in the first-run update check cache. The 250 ms foreground wait for the background refresh task often expired before GitHub's API responded, so ~/.winapp/.update-check was never written and every subsequent invocation re-raced. This PR raises the wait to 1000 ms and also writes a placeholder cache file synchronously on first run so the 24-hour gate trips even if the refresh loses the race.
Changes:
- Increase
FirstRunRefreshTimeoutfrom 250 ms to 1000 ms. - Write a placeholder
UpdateCheckCache(withLastCheck = UtcNow) synchronously before scheduling the background refresh on first run.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Build Metrics ReportBinary Sizes
Test Results✅ 1186 passed, 1 skipped out of 1187 tests in 448.8s (+20.5s vs. baseline) Test Coverage❌ 17.2% line coverage, 36.2% branch coverage · ✅ no change vs. baseline CLI Startup Time40ms median (x64, Updated 2026-06-01 18:05:09 UTC · commit |
fixes #555
Upped timeout on github request from 250ms to 1s
Writing a placeholder value to update check file to ensure there aren't subsequent failures