Skip to content

Wire ReputationDisplay into MarketplaceCard listings using seller analytics #680

Description

@1nonlypiece

📌 Description

src/components/ReputationDisplay.tsx renders a seller's score, track record,
and success rate, but it is not surfaced on src/components/MarketplaceCard.tsx
where a buyer actually evaluates a listing. Buyers currently see protocol, APY,
and risk badges with no seller-trust context.

This issue integrates ReputationDisplay into each marketplace listing card so
buyers can judge counterparty reliability before opening preflight.

Goal: make seller reputation a first-class, glanceable signal at the point
of purchase.

🎯 Requirements and Context

  • Pull reputation values from the listing payload returned by
    /api/marketplace/listings (extend the DTO mapping in
    src/lib/backend/services/marketplace.ts read path only as needed for shape,
    no contract changes).
  • Render a compact reputation summary on the card; expand to the full
    ReputationDisplay inside CommitmentDetailsModal.tsx quick-view.
  • Gracefully handle listings with no reputation data (new sellers): show a
    neutral "New seller" state, not a zero score.
  • Keep card layout responsive and avoid layout shift on slow data.

🛠️ Suggested Execution

1. Fork the repo and create a branch

git checkout -b feature/marketplace-card-reputation

2. Implement changes

  • Edit src/components/MarketplaceCard.tsx to render a compact reputation chip.
  • Edit src/components/modals/CommitmentDetailsModal.tsx to embed the full
    ReputationDisplay.
  • Add src/components/__tests__/MarketplaceCardReputation.test.tsx (RTL).
  • Add docs/MARKETPLACE_REPUTATION.md describing the data contract and the
    "new seller" fallback.

3. Test and commit

  • Run the repo test suite: pnpm test
  • Cover edge cases: missing reputation, score boundaries (74/75/89/90), and the
    new-seller neutral state.

Example commit message

feat: surface seller reputation on marketplace cards and quick-view

✅ Guidelines

  • Minimum 95% test coverage on new/changed lines.
  • Clear, reviewer-friendly documentation.
  • Timeframe: 96 hours.

🏷️ Labels

type-feature · area-frontend · MAYBE REWARDED · GRANTFOX OSS ·
OFFICIAL CAMPAIGN

💬 Community & Support

  • Join the CommitLabs contributor Discord to coordinate and get unblocked fast:
    https://discord.gg/WV7tdYkJk
  • Please introduce yourself before you start so we can avoid duplicate work.

Metadata

Metadata

Assignees

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions