Follow buttons stop forgetting
Click Follow on someone's profile and their row in Who to follow flips to Following, no reload. The rows, profiles and hover previews now share one answer per person.

You hover an avatar in Who to follow, click through to the profile, and press Follow. Back at the log, you glance at the sidebar. That same row now says Following, and so does the hover preview on their avatar. No refresh, no second click.
Credit goes to xHeaven, who taught every follow control to share one answer per person instead of keeping its own little switch. The sidebar serves three suggestions at a time, and each row, profile button, hover preview, notification and connection list now reads the same store, keyed by user id. The preview flips its label the instant you click and ignores further clicks until the request lands, but writes the shared answer only after the server confirms. Blocking someone drops them out of the list with a 300-millisecond collapse, and a follow the server refuses across a block shows a brief error reading "You can't follow @name." instead of the 403 page.
One catch. The shared answer lives in memory for the tab. Follow someone from your phone or a second tab and this page keeps saying Follow until you reload. Unblocking someone won't put them back in Who to follow either, until the suggestions load fresh.
Key files · #545
- resources/
js/ use-shared-state.tshooks/ - resources/
js/ follow-button.tsxcomponents/ - resources/
js/ who-to-follow.tsxcomponents/ - resources/
js/ user-preview.tsxcomponents/ - resources/
js/ user-safety-menu.tsxcomponents/ - resources/
js/ conversation-actions.tsxcomponents/ chat/ - resources/
js/ show.tsxpages/ log/ - tests/
Unit/ FollowState.test.tsx