[#844] Dashboard: show all AI agents owned by connected wallet#849
[#844] Dashboard: show all AI agents owned by connected wallet#849realproject7 merged 4 commits intomainfrom
Conversation
Rewrite AgentDashboard to enumerate all ERC-8004 agent NFTs owned by the connected wallet using balanceOf + tokenOfOwnerByIndex (batched via useReadContracts). For each agent, fetch agentURI and getAgentWallet to display name, wallet, and OWS/Direct badge. Show activity cards with storyline counts for each agent. Aggregate stats shown when multiple agents exist. Handle empty state for no owned agents. Also detect if connected wallet is itself an agent wallet (not owner). Bump to v0.1.16. Fixes #844 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 multi-agent ownership work is headed in the right direction, but this revision does not meet issue #844 yet. The dashboard still omits royalties entirely, and the per-agent storyline attribution breaks down for agents that do not have a distinct bound agent wallet.
Findings
- [high] Royalties are missing from both the per-agent cards and the aggregate stats, which leaves the dashboard short of the issue's required activity summary.
- File:
src/components/AgentDashboard.tsx:172 - Suggestion: fetch and render total royalties per agent, then include an aggregate royalties total alongside the story count.
- File:
- [medium] For any owned agent whose
getAgentWallet()is unset, the dashboard falls back to the connected owner address for that card. If one wallet owns multiple such agents, each card will point at the same writer address and show the same storyline set, so the per-agent activity summaries are incorrect.- File:
src/components/AgentDashboard.tsx:120 - Suggestion: merge in DB-backed agent identity or otherwise avoid using the same owner address as the writer key for every unbound agent card.
- File:
Decision
Requesting changes because the current UI still misses required royalties data and can misattribute storylines across multiple owned agents.
Fetch getRoyaltyInfo from MCV2_Bond for each agent's writer address. Show total PLOT earned (unclaimed + claimed) per agent card and in the aggregate stats bar for multi-agent view. 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: REQUEST CHANGES
Summary
The royalty data is now present, which fixes one of my earlier blockers. But the dashboard still cannot attribute activity correctly for multiple owned agents when they do not each have a distinct bound writer wallet.
Findings
- [high] The dashboard still uses the connected owner wallet as the fallback writer key for every owned agent whose
getAgentWallet()is unset. That means multiple such agents can render the same storyline list and the same royalty totals on multiple cards, so the per-agent activity summaries are incorrect.- File:
src/components/AgentDashboard.tsx:123 - Suggestion: merge DB-backed agent identity as the issue requests, or otherwise avoid treating the same owner address as the writer address for every unbound owned agent.
- File:
Decision
Requesting changes because the current revision can still misattribute stories and royalties across multiple owned agents, so issue #844 is not fully complete yet.
Unbound agents now show "No wallet bound — complete binding in the Manage tab" instead of silently falling back to owner address. Storylines and royalties only shown for agents with bound wallets. PLOT token decimals fetched dynamically via on-chain decimals() call. 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: REQUEST CHANGES
Summary
The owner-address duplication bug is fixed, and the royalty formatting update looks good. But this revision now regresses the normal direct-registration path by hiding activity for agents whose default writer wallet is still the connected owner wallet.
Findings
- [high] The dashboard now only fetches storylines and royalties for explicit
getAgentWallet()values and showsNo wallet boundfor every owned agent where that call returns zero. That breaks directly registered agents, because the registration flow explicitly says the connected wallet is the default agent wallet until the user optionally binds a different one. Those direct agents will now show no activity even though they should still use the owner wallet.- File:
src/components/AgentDashboard.tsx:122 - Suggestion: preserve owner-wallet activity for direct agents, while still avoiding the old duplicate-fallback problem for OWS/unbound cases.
- File:
Decision
Requesting changes because issue #844 must work for directly registered agents as well as OWS-bound agents, and this head now hides activity for the direct-agent default path.
Direct agents implicitly use the owner wallet as their agent wallet, so fall back to owner address for storyline/royalty lookups. Only OWS agents without explicit binding show "No wallet bound" message. 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 latest revision resolves the remaining dashboard attribution issues. Direct agents now use the owner wallet for activity lookups, while unbound OWS agents no longer fall back to that same address, so the multi-agent view now handles both registration paths coherently.
Findings
- None.
Decision
Approving. The dashboard now lists owned agents, shows per-agent activity where it is valid to do so, preserves the empty-state and aggregate stats work, and includes royalty totals with token decimals read on-chain.
Summary
balanceOf+tokenOfOwnerByIndex(batched withuseReadContracts)Test plan
Fixes #844
🤖 Generated with Claude Code