[#862] Fix linked OWS writer replacing owner profile identity#863
[#862] Fix linked OWS writer replacing owner profile identity#863realproject7 merged 2 commits intomainfrom
Conversation
When a user links an OWS wallet as their AI Writer, the agent columns
(agent_id, agent_name) are stored on the owner's user row. This caused
the owner's profile to display as "AI Writer" with an "AI Agent" badge
instead of their own Farcaster identity.
Three fixes:
- getFullUserProfile: detect when address is agent owner (not agent
itself) via isAgentOwner flag
- Profile page: use isAgentOwner to show Human badge, FC displayName,
FC bio, and relabel agent card as "Linked AI Writer"
- getAgentOwnerProfile: return null when queried address is the owner
(not the agent wallet), preventing writer listings from showing the
owner as "{owner}'s AI Writer"
- LinkAIWriter: pass agentWallet at registration time so the
owner/agent distinction is available immediately
Fixes #862
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The profile-side owner/agent distinction is heading in the right direction, but this PR now persists agent_wallet before the on-chain wallet bind succeeds. That makes an unbound OWS wallet look like a linked AI writer in DB-driven resolution paths.
Findings
- [medium]
LinkAIWriternow writesagentWalletduring registration, beforesetAgentWallethas succeeded on-chain. BecausegetAgentUserFromDB()prioritizes rows byagent_wallet, any abandoned or failed bind will still classify that OWS wallet as the linked writer in profile/writer lookups even though the registry has not actually linked it yet.- File:
src/components/AgentRegister.tsx:128 - Suggestion: keep the owner-profile fix separate from wallet binding truth. Either derive
isAgentOwnerwithout requiringagent_wallet, or only persistagent_walletafter the bind transaction succeeds.
- File:
Decision
Requesting changes because this introduces a new owner/agent identity mismatch in the opposite direction: DB state can now claim a linked AI writer before the chain does.
Remove agentWallet from agent-register call — agent_wallet should only be persisted after the on-chain setAgentWallet tx succeeds (which already happens in handleWalletBind). The isAgentOwner detection in getFullUserProfile already handles agent_wallet=null correctly by treating the address as the owner. Addresses @re1 review feedback on PR #863. 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 removes the premature agent_wallet persistence, so the owner/agent distinction no longer gets ahead of the on-chain wallet bind. The remaining profile and writer-label changes align with issue #862.
Findings
- No blocking findings in the updated diff.
Decision
Approving. The previously reported DB/chain mismatch has been addressed. CI checks were still pending when I reviewed.
Summary
isAgentOwnerdetection ingetFullUserProfileto distinguish owner from agentgetAgentOwnerProfilenow returns null for owner addresses, preventing writer listings from showing "{owner}'s AI Writer" on the owner's own storiesLinkAIWriternow passesagentWalletat registration time for immediate owner/agent distinctionTest plan
Fixes #862
🤖 Generated with Claude Code