Skip to content

fix(bounties): file upload, profile links, clearer claim copy#117

Merged
r4topunk merged 5 commits into
mainfrom
fix/bounties-claim-ux
Jun 9, 2026
Merged

fix(bounties): file upload, profile links, clearer claim copy#117
r4topunk merged 5 commits into
mainfrom
fix/bounties-claim-ux

Conversation

@r4topunk

@r4topunk r4topunk commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bounty claim flow now supports direct file upload (video/image) via Pinata — no more pasting a media URL
  • Bounty/claim authors link to their on-site member profile (/members/{address}) instead of Basescan
  • Cleaned up confusing claim copy ("Envie sua Prova" → "Enviar prova") and localized the MediaEmbed fallback link

Changes

  • src/components/bounties/ClaimBountyModal.tsx — file <input> + /api/pinata/upload integration (500MB video / 100MB image limit), upload state, uploaded-file chip with remove, fallback URL input
  • src/components/bounties/BountyDetailView.tsx — drop Basescan onAddressClick/customExplorerUrl overrides on issuer + claim author; AddressDisplay default routes to member profile. Removed now-unused getExplorerUrl import
  • src/components/bounties/MediaEmbed.tsx — localize the hardcoded "View media" fallback link via detail.viewMedia
  • messages/{pt-br,en}/bounties.json — reworded detail.submitYourProof / detail.proofDescription / claimModal.title; added upload UI keys

Addresses

  1. Content link not showing → media link now localized; upload ensures claim.url gets populated
  2. Strange copy → reworded titles/description
  3. Clicking a bounty author → goes to member profile, not Basescan
  4. Upload without requiring a video link → file upload added

Test plan

  • Open a bounty detail page, click "Enviar prova"
  • Upload a video file — confirm it uploads and the chip shows the filename; submit and verify it embeds in the claim
  • Alternatively paste a media URL — confirm it still works
  • Click a bounty issuer / claim author — confirm navigation to /members/{address}
  • Verify copy in both PT-BR and EN locales

Generated with Claude Code

- Add direct file upload (video/image) to the claim modal via Pinata,
  so users no longer need to paste a media URL
- Link bounty/claim authors to their on-site member profile instead of
  Basescan
- Localize the MediaEmbed fallback "View media" link (was hardcoded EN)
- Reword "Envie sua Prova" / proof description for clearer PT-BR/EN copy

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
gnars-shadcn Ready Ready Preview, Comment Jun 9, 2026 12:28pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hackertestdao Ignored Ignored Jun 9, 2026 12:28pm

Request Review

r4topunk and others added 4 commits June 8, 2026 20:11
The claim modal cancel button rendered the raw key "bounties.cta.cancel"
because the key was absent from both locale files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Audit fixes against the verified PoidhV3 source:

P1 — UI showed actions the contract rejects:
- Submit-for-Vote now issuer-only (contract: submitClaimForVote reverts
  WrongCaller for non-issuers); shown only when the open bounty had an
  external contributor.
- Vote Yes/No now gated to active contributors excluding the issuer (who
  auto-votes YES at submit); non-participants reverted NotActiveParticipant.
  Resolve stays permissionless.

P2 — correctness:
- Fix `bounties` getter ABI: was missing `id` and had wrong field order/types
  vs the on-chain struct (latent decode bug).
- Block bounty creation when not signing as an EOA — createSoloBounty/
  createOpenBounty require msg.sender == tx.origin, so smart-account signers
  always revert. Adds a warning banner + disables submit (distinct copy for
  in-app vs external wallets in SA mode).
- Filter withdrawn (address(0)) slots out of the contributors list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Rename createClaim's 4th ABI param imageUri -> uri to match the PoidhV3
  contract (cosmetic; encoding is positional).
- Remove dead POIDH_ERROR_MESSAGES key IssuerCannotWithdrawFromOpenBounty
  (no such error exists on-chain).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Real Gnars claim data shows most video bounties store a thumbnail image in
claim.url and the actual clip as a social link in the description. So:

- Detect YouTube/Vimeo links (in claim.url or the description) and render an
  inline iframe player — the real clip instead of a bare text link.
- When claim.url is empty, fall back to the first direct image/video link
  found in the description.
- Strip any URL rendered as media from the description text to avoid showing
  it twice.

Validated against 108 live Gnars claims: 4 now embed a YouTube player, 98
keep their image preview; the rest are non-embeddable social links (kept as
links) or text-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@r4topunk r4topunk merged commit 81992ba into main Jun 9, 2026
4 checks passed
@r4topunk r4topunk deleted the fix/bounties-claim-ux branch June 9, 2026 12:41
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.

1 participant