Fix #1214: workspace refresh on profile switch and #1212: OAuth provider detection#1221
Fix #1214: workspace refresh on profile switch and #1212: OAuth provider detection#1221bergeouss wants to merge 2 commits intonesquena:masterfrom
Conversation
…s empty
Add loadDir('.') call in switchToProfile() Case B so the workspace file
tree panel reflects the new profile's workspace instead of showing stale
files from the previous profile.
Fix nesquena#1212: detect OAuth providers not in hardcoded set
Expand _OAUTH_PROVIDERS with copilot-acp and qwen-oauth.
Add fallback in get_providers() that checks hermes auth live status
for providers that have no API key and are not in the hardcoded set
(e.g. Anthropic connected via OAuth), so the Providers tab shows
them as configured.
|
Thanks for the double-fix PR, @bergeouss! Both issues are clearly described and the approach looks sound. #1214 (workspace refresh): Adding #1212 (OAuth provider detection): Expanding The 85-test pass with JS syntax and Python compile checks is a solid baseline. A few things to verify before merge:
Overall this looks clean and well-scoped. Thanks for tackling two open issues in one PR! |
Avoids unnecessary latency on the Settings page by restricting the OAuth auth-status fallback to providers that are not in _PROVIDER_ENV_VAR. Review feedback (PR nesquena#1221): the get_auth_status() call in the else branch was firing for every unconfigured API-key provider (openai, anthropic, etc.), adding a network round-trip per provider. Now it only runs for providers that are not known API-key providers (custom/OAuth-capable providers).
Review Feedback Addressed
🤖 AI-assisted via Hermes Agent |
|
Thanks for addressing the review feedback, @bergeouss! The two questions from the last review are both answered cleanly: Issue (1) — OAuth fallback latency: The Issue (2) — Both answers are clear and the PR description is self-documenting. This looks ready for maintainer review and merge. 🎉 |
|
Merged in v0.50.237 via #1243. Thank you @bergeouss! 🎉 |
Avoids unnecessary latency on the Settings page by restricting the OAuth auth-status fallback to providers that are not in _PROVIDER_ENV_VAR. Review feedback (PR nesquena#1221): the get_auth_status() call in the else branch was firing for every unconfigured API-key provider (openai, anthropic, etc.), adding a network round-trip per provider. Now it only runs for providers that are not known API-key providers (custom/OAuth-capable providers).
Avoids unnecessary latency on the Settings page by restricting the OAuth auth-status fallback to providers that are not in _PROVIDER_ENV_VAR. Review feedback (PR nesquena#1221): the get_auth_status() call in the else branch was firing for every unconfigured API-key provider (openai, anthropic, etc.), adding a network round-trip per provider. Now it only runs for providers that are not known API-key providers (custom/OAuth-capable providers).
Summary
Two small fixes for recent bugs:
#1214 - Workspace panel stale after profile switch (empty session)
When switching profiles on a session with no messages yet, the workspace file tree panel kept showing files from the previous profile workspace.
Fix: Added loadDir('.') call in switchToProfile() Case B (S.messages.length === 0) so the workspace panel refreshes to show the new profile files.
#1212 - OAuth providers show as unconfigured in Settings
Some OAuth/token-based providers were missing from the hardcoded _OAUTH_PROVIDERS set (copilot-acp, qwen-oauth). More importantly, providers authenticated via hermes auth (e.g. Anthropic via OAuth) that are not in the set were never detected.
Fix:
Test results
85 passed - provider + profile switch tests
JS syntax check: OK
Python compile: OK