Display Farcaster identity: nav, comments, story cards#256
Display Farcaster identity: nav, comments, story cards#256realproject7 merged 3 commits intomainfrom
Conversation
- Add FarcasterAvatar component: reusable address → avatar + @username - Add useConnectedIdentity hook: resolves connected wallet's FC identity - ConnectWallet: show FC avatar + @username in nav bar - CommentSection: show FC identity for commenters - StoryCard: show FC identity for story writers - Falls back to truncated address when no FC account is linked Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
APPROVE — with two non-blocking observations.
1. Missing .catch() on server action promises (non-blocking)
Both FarcasterAvatar.tsx:29 and useConnectedIdentity.ts:27 call getFarcasterProfile(address).then(...) without a .catch(). If the server action rejects (e.g., network error to the server), this produces an unhandled promise rejection. The underlying lookupByAddress catches internally, so this is unlikely in practice, but a .catch(() => null) on both would be strictly correct.
2. Brief flash of truncated address (non-blocking)
FarcasterAvatar renders the truncated address immediately while the server action resolves, then swaps to FC identity. This is a standard loading-state tradeoff and acceptable — just noting it in case a skeleton/shimmer is preferred later.
What looks good:
- Clean separation:
useConnectedIdentityfor the nav bar (tied touseAccount),FarcasterAvatarfor arbitrary addresses (comments) farcaster.comURL in the link (not warpcast.com) — correct per current branding- StoryCard correctly reuses existing
WriterIdentityClientinstead of duplicating - Cancellation via
cancelledflag in both effects prevents state updates after unmount - Fallback to truncated address is consistent across all three surfaces
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The new Farcaster identity surfaces match the issue scope, but the story-card change introduces invalid nested links and conflicting click targets.
Findings
- [medium]
StoryCardwraps the entire card in NextLink, and this PR replaces the plain writer text withWriterIdentityClient, which itself renders an external<a href="https://farcaster.com/...">. That creates an anchor inside an anchor, which is invalid HTML and can break click behavior on the cards.- File:
src/components/StoryCard.tsx:44 - Suggestion: Render a non-link variant inside story cards, or make
WriterIdentityClientsupport a non-interactive mode for already-linked containers.
- File:
Decision
Request changes. The new identity display is otherwise on the right track, but the nested-anchor regression should be fixed before merge.
WriterIdentityClient and FarcasterAvatar now accept linkProfile={false}
to render plain text instead of an anchor. StoryCard passes false since
it's already wrapped in a Next Link. Addresses T2a review on PR #256.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The follow-up patch fixes the story-card nested-anchor regression by adding a non-link rendering mode for identity components. The Farcaster identity rollout remains aligned with issue #255.
Findings
- [info] No blocking issues found in the updated patch.
Decision
Approve. linkProfile={false} removes the invalid anchor nesting inside story cards while preserving linked identity displays in comments and other standalone contexts. CI was still pending when reviewed.
Restructure useConnectedIdentity to derive loading state from resolvedFor comparison instead of calling setLoading synchronously in the effect body. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
FarcasterAvatarcomponent — reusable address → avatar +@usernamewith link tofarcaster.com/{username}, falls back to truncated addressuseConnectedIdentityhook — resolves connected wallet's FC identity viagetFarcasterProfileserver actionConnectWallet— nav bar shows FC avatar +@usernamewhen wallet has linked FC accountCommentSection— commenter addresses replaced withFarcasterAvatarStoryCard— writer addresses replaced withWriterIdentityClientWriterIdentityClienton story pages unchangedFixes #255
Test plan
@usernamewhen connected wallet has linked FC accountWriterIdentityClienton story pages still works correctlynpm run typecheckpasses🤖 Generated with Claude Code