The feed doesn't say "Empty" before its persona is known

On opening, the feed showed "Empty" until the session had been read and a persona chosen, then loaded: a flash of a
wrong answer on every start (and the end-to-end sign-in took it for a loaded feed). CascadingState says once the session
has been read (IsSessionLoaded), and until then a feed with no persona yet is loading; a login without any persona still
gets its empty feed. The persona-switch test waits for the sibling's home read with another token than the first
persona's, instead of any home read after the switch was asked for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-07 00:20:56 +02:00
1 parent 18331531b8
commit 47ff60f57b
3 files changed
+24 -7

No files matched your search

+5
View File
@@ -27,6 +27,8 @@
public PublicCacheData PublicCacheData { get; private set; } = new();
/// <summary>Whether a root is signed in (its JWT is still valid).</summary>
public bool IsSignedIn { get; private set; }
/// <summary>The session has been read once: from then on a null PersonaId means the login has no persona, not "not yet".</summary>
public bool IsSessionLoaded { get; private set; }
/// <summary>The root's login name, shown to its owner only.</summary>
public string RootUserName { get; private set; }
/// <summary>The root's personas.</summary>
@@ -93,6 +95,7 @@
if (!IsSignedIn)
{
ClearSession();
IsSessionLoaded = true;
StateHasChanged();
return;
}
@@ -105,10 +108,12 @@
{
PersonaId = null;
Persona = null;
IsSessionLoaded = true;
StateHasChanged();
return;
}
IsSessionLoaded = true;
await SwitchPersona(personaId, cancellationToken);
}