Skip to content

Split components/bounty-detail/bounty-detail-submissions-card.tsx (411 lines) into smaller components #295

Description

@Benjtalkshow

components/bounty-detail/bounty-detail-submissions-card.tsx has grown to 411 lines and is now the largest component file in the bounty surface. It mixes:

  • The card shell and header
  • Per-submission row rendering with inline reviewer actions
  • The review/approve/decline dialogs
  • The IPFS link rendering and copy-to-clipboard helpers
  • Status pills and tier badges

This makes it a constant merge-conflict surface and hard to reason about.

What to do

Split into per-responsibility files under components/bounty-detail/submissions/:

  • submissions-card.tsx — the outer card shell, header, empty state, fetches and maps over submissions
  • submission-row.tsx — single submission row with status pill, IPFS link, reviewer action buttons
  • submission-review-dialogs.tsx — the approve/decline/request-revisions dialog wrappers (if they live in this file today)
  • submission-helpers.ts — pure helpers like IPFS URL formatting, tier color mapping

Keep bounty-detail-submissions-card.tsx as a thin barrel re-export so callers don't break. Run pnpm tsc --noEmit and pnpm lint after each split.

Acceptance criteria

  • No single file over 250 lines under components/bounty-detail/submissions/
  • bounty-detail-submissions-card.tsx becomes a barrel or a thin shell that composes the new components
  • All existing imports still resolve
  • pnpm tsc --noEmit and pnpm lint pass
  • No visual or behavioral change in the submissions card

Files

  • components/bounty-detail/bounty-detail-submissions-card.tsx
  • components/bounty-detail/submissions/ (new directory)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions