Skip to content

fix: nightly update display, infinite loop, and per-user install detection (#265)#269

Merged
Orinks merged 7 commits intodevfrom
fix/nightly-version-display
Feb 8, 2026
Merged

fix: nightly update display, infinite loop, and per-user install detection (#265)#269
Orinks merged 7 commits intodevfrom
fix/nightly-version-display

Conversation

@Orinks
Copy link
Owner

@Orinks Orinks commented Feb 8, 2026

Summary

Fixes multiple issues with the nightly update system, especially for per-user installs.

Bug Fixes

1. Version display shows '0.4.3' instead of nightly date
All three update dialogs (startup auto-check, Help menu, Settings) showed Current: 0.4.3 instead of the nightly date (e.g. 20260205) when running a nightly build. Fixed by using display_version that prefers the nightly date when a build tag is present.

2. Infinite update prompt loop on startup
If _build_info.py failed to load (build_tag = None), the comparison logic assumed any nightly release was newer (return True), causing the update dialog to appear on every restart. Fixed by skipping the startup auto-check when build_tag is missing and the channel is nightly. Users can still check manually via Help > Check for Updates.

3. Per-user installs falsely detected as portable
is_portable_mode() only checked if the app was under %PROGRAMFILES% to detect installed copies. Per-user installs (e.g. %LOCALAPPDATA%\Programs\AccessiWeather) are writable and not under Program Files, so they were falsely detected as portable. This caused the updater to download the portable ZIP instead of the installer, leading to broken updates and the loop in bug #2.

Fix: Check for Inno Setup uninstaller (unins*.exe) in the app directory before the Program Files check. This reliably detects installed copies regardless of install location.

4. Local builds missing BUILD_TAG
installer/build.py didn't run generate_version.py or generate_build_info.py before PyInstaller, so local builds always had BUILD_TAG = None. Now auto-generates both, matching CI behavior.

New flags:

  • --nightly — generates nightly-YYYYMMDD build tag automatically
  • --tag TAG — custom build tag

Root Cause Chain

  1. User installs 'just for me' → app goes to %LOCALAPPDATA%\Programs
  2. is_portable_mode() returns True (not in Program Files + writable)
  3. Updater downloads portable ZIP instead of installer
  4. ZIP extracts over installed copy, _build_info.py may not load correctly
  5. build_tag is None → comparison says any nightly is newer → prompt loop

Files Changed

  • src/accessiweather/app.py — Startup update check: display version fix + loop prevention
  • src/accessiweather/ui/main_window.py — Help menu update check: display version fix
  • src/accessiweather/config_utils.py — Portable mode detection: uninstaller check
  • installer/build.py — Auto-generate version + build info before building

Testing

  • All 911 tests passing, lint clean
  • Manually verified: installed copy shows correct nightly date, no startup loop, portable detection correct

Fixes #265

Orinks and others added 6 commits February 5, 2026 18:05
…ConditionAnalyzer (#255)

## Summary
Added 47 comprehensive tests for the WeatherConditionAnalyzer module,
which was previously at 0% coverage.

## Test Coverage
- **Weather codes**: All Open-Meteo weather codes (clear, cloudy, fog,
drizzle, rain, freezing, snow, thunderstorms)
- **Temperature analysis**: Extreme cold to extreme hot thresholds
- **Wind analysis**: Calm to extreme wind conditions
- **Alert handling**: Severity mapping, priority selection, template
override
- **Priority scoring**: Base scores, temperature bonuses, wind bonuses
- **Template selection**: All 7 template types (default, alert,
severe_weather, temperature_extreme, wind_warning, precipitation, fog)
- **Error handling**: Empty data, invalid data with graceful fallback

## Results
- **Tests**: 47 new tests
- **Coverage**: 0% → 98%
- **All lint checks pass**

Closes #254
The update available dialog showed 'Current: 0.4.3' even when running
a nightly build. Now shows the nightly date (e.g. 'Current: 20260205')
when a build tag is present, matching the settings dialog behavior.
The startup auto-update check in app.py had the same display bug
showing '0.4.3' instead of the nightly date.
If a frozen build has no build_tag (e.g. _build_info.py failed to
load) and the update channel is nightly, skip the startup auto-check.
Without a build_tag, the comparison logic assumes any nightly is
newer, causing a prompt loop on every restart.

Users can still check manually via Help > Check for Updates.
is_portable_mode() only checked Program Files to detect installed
copies. Per-user installs (e.g. %LOCALAPPDATA%\Programs) are writable
and not under Program Files, so they were falsely detected as portable.

This caused the updater to download the portable ZIP instead of the
installer for per-user installs.

Fix: check for Inno Setup uninstaller (unins*.exe) in the app
directory before the Program Files check. This reliably detects
installed copies regardless of install location.
@Orinks Orinks changed the title fix/nightly version display fix: nightly update display, infinite loop, and per-user install detection (#265) Feb 8, 2026
Local builds via installer/build.py now automatically run
generate_version.py and generate_build_info.py before PyInstaller,
matching what CI does. This prevents builds with missing BUILD_TAG.

New flags:
  --nightly    Build as nightly (auto-generates nightly-YYYYMMDD tag)
  --tag TAG    Custom build tag (e.g. nightly-20260208)

Usage:
  python installer/build.py --nightly    # Local nightly build
  python installer/build.py              # Stable build (BUILD_TAG=None)
@Orinks Orinks merged commit 9d5cba1 into dev Feb 8, 2026
5 of 6 checks passed
@Orinks Orinks deleted the fix/nightly-version-display branch February 8, 2026 05:21
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.

1 participant