fix(evolve): invalid state after logout - #626
Conversation
If using any nixmac-hosted model, if you log out then try to evolve, it errors due to you no longer being authenticated and therefore unable to use the provider.
🎨 Storybook previewUpdated for 9261d51
|
📋 PR Overview
🔬 Coverage
|
| .status() | ||
| .then((status) => { | ||
| if (!cancelled && shouldPromptForHostedModelAuth(preferences, status)) { | ||
| nav.openSettings("ai-models", "hosted-auth"); |
There was a problem hiding this comment.
Warning
The hook calls client.account.status() directly via oRPC to fetch auth state, rather than reading it through a viewmodel sync module. The documented constraint is explicit: "Backend state must reach the UI through exactly one path: the viewmodel/.ts sync modules." Auth status (signedIn) is not surfaced anywhere in apps/native/src/viewmodel/, so this PR introduces a second, undeclared path for backend state to reach the UI — exactly what the architectural rule prohibits.

If using any nixmac-hosted model, if you log out then try to evolve, it
errors due to you no longer being authenticated and therefore unable to
use the provider.