[bug-004] Greeting picks up displayName once profile loads
The InitialView greeting was being baked at mount via
`useState(() => getRandomGreeting(username))`, so if the user profile was
still loading at that moment, `username` fell back to the email-split
("nick.whitehouse") and stayed that way for the whole mount even after
displayName ("Nick") arrived.
Fix: pick the template index once at mount (so the greeting doesn't
reshuffle on re-render), but substitute the name at render-time so it
updates when displayName loads. Adds two helpers to greetings.ts:
pickGreetingIndex() + renderGreeting(index, name).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| Repository | nwhitehouse/mike |
|---|---|
| Author | Nick Whitehouse <nick.whitehouse@mccarthyfinch.com> |
| Authored | |
| Parents | a4adcbf3 |
| Stats | 2 files changed , +19 , -4 |
| Part of | Greeting picks up displayName once profile loads |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-3fd35b4e.md
from inside the repo you want the change in.