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)
components/bounty-detail/bounty-detail-submissions-card.tsxhas grown to 411 lines and is now the largest component file in the bounty surface. It mixes: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 submissionssubmission-row.tsx— single submission row with status pill, IPFS link, reviewer action buttonssubmission-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 mappingKeep
bounty-detail-submissions-card.tsxas a thin barrel re-export so callers don't break. Runpnpm tsc --noEmitandpnpm lintafter each split.Acceptance criteria
components/bounty-detail/submissions/bounty-detail-submissions-card.tsxbecomes a barrel or a thin shell that composes the new componentspnpm tsc --noEmitandpnpm lintpassFiles
components/bounty-detail/bounty-detail-submissions-card.tsxcomponents/bounty-detail/submissions/(new directory)