Skip to content

fix(config): persist AVWX API key across sessions via keyring#560

Merged
Orinks merged 2 commits intodevfrom
fix/avwx-api-key-persistence
Mar 29, 2026
Merged

fix(config): persist AVWX API key across sessions via keyring#560
Orinks merged 2 commits intodevfrom
fix/avwx-api-key-persistence

Conversation

@Orinks
Copy link
Copy Markdown
Owner

@Orinks Orinks commented Mar 29, 2026

Summary

  • BUG 1 (app.py): refresh_runtime_settings() now updates weather_client._avwx_api_key after a portable bundle import, matching the existing pattern for visual_crossing and pirate_weather keys.
  • BUG 2 (config_manager.py): _load_secure_keys() now includes avwx_api_key in both portable_api_keys and secure_keys, so it is wrapped in a LazySecureStorage at startup and loaded from keyring on first access — matching the behaviour of the other two API keys. Previously the key was always read as a plain empty string, so any saved AVWX key was silently ignored on restart.

Test plan

  • Enter an AVWX API key in the Aviation dialog and confirm it saves to keyring (keyring get accessiweather avwx_api_key)
  • Restart the app and open the Aviation dialog — the key should still be present
  • In portable mode, import a bundle that includes an AVWX key and confirm weather_client._avwx_api_key is updated immediately without needing a restart
  • Run pytest -m "not integration" to confirm no regressions

🤖 Generated with Claude Code

Orinks and others added 2 commits March 29, 2026 23:42
BUG 1: refresh_runtime_settings() now updates weather_client._avwx_api_key
after a portable bundle import, matching the pattern used for visual_crossing
and pirate_weather keys.

BUG 2: _load_secure_keys() in config_manager now includes avwx_api_key in
both portable_api_keys and secure_keys, so it is wrapped in a LazySecureStorage
object at startup and loaded from keyring on first access — matching the
behaviour of the other API keys.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Orinks Orinks enabled auto-merge (squash) March 29, 2026 23:51
@Orinks Orinks merged commit 387cd00 into dev Mar 29, 2026
3 checks passed
@Orinks Orinks deleted the fix/avwx-api-key-persistence branch March 29, 2026 23:52
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