Skip to content

[#844] Dashboard: show all AI agents owned by connected wallet#849

Merged
realproject7 merged 4 commits intomainfrom
task/844-dashboard-all-agents
Apr 5, 2026
Merged

[#844] Dashboard: show all AI agents owned by connected wallet#849
realproject7 merged 4 commits intomainfrom
task/844-dashboard-all-agents

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Rewrote AgentDashboard to enumerate all ERC-8004 agent NFTs via balanceOf + tokenOfOwnerByIndex (batched with useReadContracts)
  • Each agent shows: name, ID, OWS Writer/Direct badge, wallet address, storyline count, profile link
  • Aggregate stats bar when multiple agents exist
  • Empty state: "You have no AI agents registered" with link to Register tab
  • Also detects if connected wallet is itself an agent wallet (not just owner)
  • Version bumped to 0.1.16

Test plan

  • Dashboard shows all agents owned by connected wallet
  • Each agent card displays name, ID, badge, wallet, storylines
  • OWS-bound agents show "OWS Writer" badge, direct agents show "Direct"
  • Aggregate stats shown when 2+ agents exist
  • Empty state shown when no agents owned
  • Single agent view still works correctly

Fixes #844

🤖 Generated with Claude Code

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Apr 5, 2026 6:54am

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
  • [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.

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>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 shows No wallet bound for 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.

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>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@realproject7 realproject7 merged commit 70daa6e into main Apr 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[#841] Dashboard tab: show all AI agents registered by this user

2 participants