Skip to content

refactor(ats): MockApplication is the production domain type for 14 components #536

Closed

Description

@thinkclay

packages/scf-core/features/office/mock-data/ats-mock-data.ts exports MockApplication, which is the production domain type for 14 components:

  • ApplicationsKanbanBoard, CandidateDetailModal, ApplicationStatusChangeModal, ApplicationsFilters, ATSMetricsDashboard, UnionStatusBadge
  • All detail tabs: ApplicationDetailsTab, CandidateProfileTab, ActivityFeedTab, MessagesTab, NotesTab
  • MessageTemplateSelector, MessageTemplatesManager, message-templates.ts, useApplicationStatusChange

office-applications-screen.tsx:63 transforms API rows into MockApplication "for UI compatibility". The mock file cannot be deleted without extracting the type first.

The type is also partly fictional: the comment at line 64 says data comes from v_applications_with_user_profiles, a view that does not exist in any migration, and the transform reads ~25 fields no endpoint returns.

Work

  1. Rename MockApplication → ATSApplication and move it to features/office/applications/types.ts.
  2. Reconcile the field list with what the employer endpoint actually returns — drop or mark optional anything fictional.
  3. Demote ats-mock-data.ts to a test/Storybook fixture that imports the domain type rather than defining it.

Also in scope

Drop the vestigial core.application_status ENUM. Declared in 001_schema.sql:33 with a vocabulary used nowhere (draft, submitted, under_review, interviewing, offer_extended, …). The column is TEXT with a CHECK constraint, so the type is dead and actively misleads anyone reading the schema for the canonical status list.

Acceptance

  • No production component imports from a path containing mock-data.
  • core.application_status no longer exists.

Activity

  1. added
    agent-ready
    on Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ATSDXagent-readypriority: lowtype: frontend

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions