Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
42da921
Add AI weather explanations spec
Orinks Dec 8, 2025
6713fe5
feat: Implement AI weather explanations with OpenRouter integration
Orinks Dec 11, 2025
353b9dd
feat: integrate AI explanation button into weather display
Orinks Dec 11, 2025
83d71e2
fix: require OpenRouter API key for all requests including free models
Orinks Dec 11, 2025
f4cb91f
feat: add OpenRouter API key validation button
Orinks Dec 11, 2025
fe3f466
fix: use /api/v1/key endpoint for OpenRouter API key validation
Orinks Dec 11, 2025
0025553
fix: add openrouter_api_key to secure storage
Orinks Dec 11, 2025
30156bd
fix: apply AI settings to UI when settings dialog opens
Orinks Dec 11, 2025
4dca945
Fix: Explicitly pass API keys to update_settings in settings dialog
Orinks Dec 11, 2025
c365eef
Improve AI explanation error messages to include API response details
Orinks Dec 11, 2025
2c0bef9
Fix explanation dialog text not displaying
Orinks Dec 11, 2025
9da9601
Add detailed logging to diagnose empty explanation text issue
Orinks Dec 11, 2025
92c679e
Fix logging to write to ~/AccessiWeather_logs instead of cwd
Orinks Dec 11, 2025
453e753
Save logs to config_dir/logs instead of home directory
Orinks Dec 11, 2025
76aa745
Fix OpenRouter API: use reliable free models and increase max_tokens
Orinks Dec 11, 2025
107ebbe
Add Explain button to Area Forecast Discussion dialog
Orinks Dec 11, 2025
e1e094c
Include forecast data in weather explanation context
Orinks Dec 11, 2025
54d7511
Merge dev into feature/ai-weather-explanations, resolve conflicts
Orinks Dec 11, 2025
d08c50d
Fix SIM108 linting error - use ternary operator instead of if-else block
Orinks Dec 11, 2025
69ff2fe
feat(docs): Add complete project documentation suite
Orinks Dec 11, 2025
431b2e7
Add comprehensive tests for AI weather explanations feature
Orinks Dec 12, 2025
5ea4898
Improve LoadingDialog with ActivityIndicator
Orinks Dec 12, 2025
2290aa7
Add cancel button to LoadingDialog and clean up debug logging
Orinks Dec 12, 2025
47f1b23
Use built-in error dialogs, expand steering guide, update spec requir…
Orinks Dec 12, 2025
14b6051
Add initial accessibility focus to LoadingDialog
Orinks Dec 12, 2025
300f1b9
Fix AI explanations: update to working free models, add local time co…
Orinks Dec 12, 2025
49f2aa6
feat: Add AI prompt customization support (tasks 1-3)
Orinks Dec 12, 2025
03fad28
feat: Add prompt customization UI and wiring (tasks 4-6)
Orinks Dec 12, 2025
5e32e4b
docs: Update tasks.md to reflect completed implementation
Orinks Dec 12, 2025
6868f02
fix: Update AI explainer tests for new model name and proper mocking
Orinks Dec 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix: Explicitly pass API keys to update_settings in settings dialog
The to_dict() method on AppSettings excludes secure keys (API keys) for
security reasons. This meant that when _on_ok called update_settings with
**new_settings.to_dict(), the API keys were never passed and thus never
saved to secure storage.

Fixed by explicitly adding visual_crossing_api_key and openrouter_api_key
to the settings dict before calling update_settings.

Also updated test_secure_storage_integration to expect 5 secure key loads
instead of 4 (added openrouter_api_key).
  • Loading branch information
Orinks committed Dec 11, 2025
commit 4dca9459b1a3dac40dfe1e0d616d812218e47fef
7 changes: 6 additions & 1 deletion src/accessiweather/dialogs/settings_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,12 @@ async def _on_ok(self, widget):
old_startup_enabled = self.config_manager.get_settings().startup_enabled

# Update configuration
success = self.config_manager.update_settings(**new_settings.to_dict())
# Note: to_dict() excludes secure keys (API keys) so we must pass them explicitly
settings_dict = new_settings.to_dict()
# Add secure keys that are excluded from to_dict() for security
settings_dict["visual_crossing_api_key"] = new_settings.visual_crossing_api_key
settings_dict["openrouter_api_key"] = new_settings.openrouter_api_key
success = self.config_manager.update_settings(**settings_dict)

# Handle startup setting changes
if success:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_secure_storage_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def test_secure_storage_migration(mock_app, mock_keyring):
manager.load_config()

# Verify keyring get_password was called to load secure keys
# (visual_crossing_api_key, github_app_id, github_app_private_key, github_app_installation_id)
assert mock_keyring.get_password.call_count == 4
# (visual_crossing_api_key, openrouter_api_key, github_app_id, github_app_private_key, github_app_installation_id)
assert mock_keyring.get_password.call_count == 5
# No set_password calls during load
assert mock_keyring.set_password.call_count == 0

Expand Down