Skip to content

fix(office): useApplications() returns a hardcoded empty array, so every ATS screen renders zero rows #528

Closed

Description

@thinkclay

packages/scf-core/features/office/applications/hooks/useApplications.ts:45:

/** NOTE: office.listApplications not yet migrated to REST SDK — returns empty list */
export function useApplications(_filters?: ApplicationsListFilters) {
  return { applications: [] as ApplicationsListItem[], isLoading: false, isError: false, error: null, refetch: async () => {} }
}

The filter argument is discarded. This is left over from the tRPC→SDK migration.

Every applications-facing screen in /office renders zero rows today — /office/applications, /office/ats, and /office/ats/metrics all render OfficeApplicationsScreen, which maps over this empty array. The kanban board, the metrics dashboard, and the filters all operate on nothing.

Three other hooks in the same file are the same shape:

  • useSubmitApplication (line 116) — throw new Error('Not implemented')
  • useUpdateApplicationStep (line 130) — same
  • useCalculateScore (line 181) — same (tracked separately; migrations 151/152 define working scoring and auto-rejection functions that are unreachable from the app)

Work

Replace the stub with a real query against the employer-scoped list endpoint. Stop discarding _filters.

Blocked by

The employer-scoped list endpoint (linked issue) — there is nothing to call yet.

Acceptance

  • Seeded Unicorn applications appear on the kanban at /office/applications.
  • Filtering by job and status changes what is returned.

Activity

  1. thinkclay commented on Aug 5, 2026

    @thinkclay
    ContributorAuthor

    Blocked on Scaffald/sdk#13, which adds client.applications.listForOrganization(). The endpoint it calls has landed (#527).

    packages/sdk is a submodule, so this cannot be done in one repo: the SDK PR has to merge first, then the submodule pointer bumps here, then this hook can be unstubbed against a method that exists on main. Committing the client change before then would break typecheck for anyone on the current pointer.

    When unblocked, the work is small but not mechanical — the transform in office-applications-screen.tsx reads ~25 fields that do not exist. Real names to map against: score_total (not application_score), created_at (not applied_at), attachment_metadata (not attachments), and the flat screening fields (current_location, years_experience, …) which are keys inside screening_answers. There is no auto_rejected column at all — the closest signals are rejected_at / reject_reasons / reject_meta.

  2. thinkclay commented on Aug 5, 2026

    @thinkclay
    ContributorAuthor

    Landed in #543 (merged to main as 87e33ef).

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions