Commit 676d28f
p5: make the account menu reachable, and stop it calling the API signed out
Two defects, both found by running the thing rather than reading it.
The avatar was invisible in --preview-ui and I could not see why from the
code. A temporary log said it plainly: signedIn=true, then signedIn=false
a millisecond later. EnterPreviewUi revealed the avatar and the very next
auth push hid it again, so the ONE surface that is signed-in-only was the
one surface preview could not show — which is exactly what preview exists
for. ApplyAuthState already pins the home view with `showHome = loggedIn
|| previewUi_` and then passed raw `loggedIn` here; it now passes
`showHome`, and EnterPreviewUi stops poking at it. The identity itself
still comes from the jwt and is empty in preview, so nothing is
fabricated: the menu shows "Guest", Share and Sign out, and NOT "Create
account", because preview genuinely has no guest session.
The referral share guarded on apiReady(). That is api_.has_value(), set
at SDK INIT and true with no session at all — so the moment preview could
reach this menu, opening Share would have fired an unauthenticated
getNetworkReferralCode at the production API from whatever machine this
is. It guards on IsLoggedIn() now, which reads the stored client jwt.
Verified at the socket, not in the source: invoked Account then Share
URnetwork in --preview-ui and watched Get-NetTCPConnection for the pid.
Zero remote connections before or after, against 59 established
connections visible elsewhere on the box in the same instant — so the
measurement can see traffic, and there was none.
Also: the avatar button had no accessible name. Its content is an image,
so like the two terms checkboxes it did not appear in the UIA tree at
all — nothing announced the control that opens the account menu. It is
named for the destination it opens.
UIA confirms the open menu: MenuItem "Guest", MenuItem "Share
URnetwork", MenuItem "Sign out". The share's clipboard write and its
snackbar need a real session and are unverified.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PT7KcWCPKfFwQUc7SM3oZY1 parent 63efd2b commit 676d28f
3 files changed
Lines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
614 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
615 | 620 | | |
616 | 621 | | |
617 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
1137 | 1138 | | |
1138 | 1139 | | |
1139 | 1140 | | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
1140 | 1145 | | |
1141 | 1146 | | |
1142 | 1147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
397 | | - | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
398 | 403 | | |
399 | 404 | | |
400 | 405 | | |
| |||
0 commit comments