Skip to content

Epic 43 — Match Lifecycle & In-System Casting

Reworks: Epic 14 (Casting Submission — already flagged [[Casting Submission — Redesign]] as "to be redesigned, not restored as-is") and Epic 36 dashboards. Builds on Epic 42's Match. Decision (user, 2026-06-16): After a match — producers get a per-job match list where they can reject (undo match), request in-system casting (if configured), mark as casted (outside the system), mark hired, and message the talent. Talents get a matches list on a jobs page where they can reject (undo), see requested castings (and start the in-system casting here, only if requested), and message the producer.

Status (2026-06-17): 🟡 Backend lifecycle done + committed (e12c313); frontend + casting-capture pending. Done: rejectMatch (either party), markMatchCasted, markMatchHired (releases referral bounty), requestMatchCasting (gated by new CASTING flag, default OFF) + the full pet mirror (rejectPetMatch/markPetMatchCasted/markPetMatchHired/requestPetMatchCasting, no bounty release); MATCH_STATUS_CHANGE notification to the counterpart. Pending: the FE match-management UIs (BE-/FE-MATCHLIFE) and the full in-system casting CAPTURE (BE-MATCHLIFE-002) — this ships the casting request status only; wiring CastingMap/CastingSubmission to a Match (the inert Epic 14 tables are Application-coupled) + the submit/review flow is the remaining redesign.

Why: A Match needs a lifecycle and the two management surfaces. "Request in-system casting" revives the inert Casting tables (CastingMap/CastingStep/CastingSubmission/CastingStepResponse) in a redesigned, minimal form scoped to a match — not a restore of the removed Epic 14 build. Messaging from a match links to Epic 44 (paid messaging).

Architecture: Extend Match.status to ACTIVE | REJECTED | CASTING_REQUESTED | CASTED_EXTERNAL | HIRED. Producer/talent mutations transition it; each transition fires a notification. "Request casting" creates a per-match CastingMap (from the producer's optional per-job template) + a CastingSubmission in REQUESTED; the talent completes it from their match view. Gate the in-system casting flow behind a CASTING feature flag (off by default) and keep the heavy assembly/transcription/summarisation pipeline out of scope (future) — v1 is request → talent submits responses → producer reviews. Mark hired can release a linked bounty (Epic 21 releaseBountyForHiredApplication → match equivalent).

BE-MATCHLIFE-001 — Match lifecycle states + transitions

Files:

  • Edit: castyou-backend/prisma/schema.prisma — add Match.status enum values + castingSubmissionId?, resolvedAt?. Requires prisma migrate.
  • Create/Edit: castyou-backend/src/services/match/index.ts + resolvers — rejectMatch(matchId) (either party → REJECTED/undo), markCasted(matchId) (producer → CASTED_EXTERNAL), markHired(matchId) (producer → HIRED, release linked bounty if any), requestCasting(matchId) (producer, see next ticket). Notifications for each ([[Notifications vs Messages]]).

Acceptance criteria: Each transition is authorized to the correct party, persists, notifies the counterpart, and markHired releases a linked bounty.

BE-MATCHLIFE-002 — In-system casting from a match (redesigned Epic 14, flag-gated)

SUPERSEDED by Epic 49 — On-System Casting (2026-06-29). The casting request status shipped here (requestMatchCasting, CASTING flag) stays; the full capture/submit/review build moved to Epic 49 with an expanded design (AI triage, mixed-media answers, save-&-resume, producer stitched-video export). Do not build this ticket — build Epic 49.

Files:

  • Add: CASTING flag to src/services/featureFlags/index.ts FEATURE_FLAGS + seed.ts FLAG_DEFAULTS (default off). (Done — flag exists.)
  • Create: castyou-backend/src/services/casting/* (minimal) → see Epic 49 BE-CASTING49-002.

Acceptance criteria: (See Epic 49.) The flag + the CASTING_REQUESTED status transition are the only parts delivered under Epic 43.

FE-MATCHLIFE-001 — Producer matches-inside-job UI

Files:

  • Create: per-job Matches panel/page — list matched talents with actions: reject/undo, request casting (flag-gated), mark casted, mark hired, message (→ Epic 44). DS components + i18n + pageTitles.

Acceptance criteria: Producer manages a job's matches end-to-end from one surface; all actions reflect server state after reload.

FE-MATCHLIFE-002 — Talent matches page

Files:

  • Create: talent Matches page (replaces MyApplicationsPage) — list matches per job, reject/undo, see + start requested castings (flag-gated), message producer.

Acceptance criteria: Talent sees their matches, can undo, can start a requested casting, and can message the producer.

TEST-MATCHLIFE-001 — Lifecycle + casting coverage

Acceptance criteria: Status transitions, authorization, notifications, bounty release on hire, and the flag-gated casting request/submit flow are tested.