Skip to content

Fix Milestone type inconsistencies (name/title, status/reviewStatus) #525

Description

@0xdevcollins

Problem

The `Milestone` type has field naming inconsistencies that cause confusion and potential bugs.

Issues

1. `name` vs `title`

  • `Milestone` type has both `name` and `title` fields
  • Components use them inconsistently
  • Contract uses `description`, backend uses `title`, frontend type has both

2. `status` vs `reviewStatus`

  • Some components access `milestone.status`
  • Others access `milestone.reviewStatus`
  • API returns `reviewStatus` but component code sometimes maps it to `status`

3. Missing proof-of-work fields

  • `MilestoneSubmissionModal` uses `proofOfWorkLinks` and `proofOfWorkFiles`
  • These fields are not defined in the `Milestone` TypeScript type
  • No `transactionHash` field for individual contributions in `Contributor` type

Expected Fix

  1. Audit `Milestone` type against API response shape (add missing fields, remove duplicates)
  2. Choose canonical field names and update all component references
  3. Add `proofOfWorkLinks`, `proofOfWorkFiles`, `submissionNotes` to Milestone type
  4. Add `transactionHash` to `Contributor` type if returned by API

Acceptance Criteria

  • Single canonical field name for each concept
  • All components reference the correct fields
  • TypeScript compiler catches any remaining mismatches
  • No runtime `undefined` from accessing wrong field name

Priority

Medium — Causes confusion and potential silent bugs.

Labels

crowdfunding, types, tech-debt

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions