Skip to content

feat(ats): wire interview scheduling to real slots, availability and bookings #540

Closed

Description

@thinkclay

packages/scf-core/features/office/scheduling/CalendarSchedulingScreen.tsx (route /office/ats/scheduling) has no data hooks — it renders MOCK_CONNECTIONS, MOCK_AVAILABILITY, MOCK_SLOTS, MOCK_LINKS directly (lines 90–108).

This is the follow-up to the issue that labels the screen as sample data. That one removes the risk of it being mistaken for real; this one removes the mock.

The backing infrastructure already exists and is unused

  • Migration 146_ats_multi_location_scheduling.sql created core.interview_slots, core.interview_availability, core.interview_bookings
  • packages/supabase/functions/api/routes/scheduling.ts exists
  • packages/sdk/src/resources/scheduling.ts exists
  • Migration 335_scheduling_grants.sql fixed the table grants

Reference implementation

SelfScheduleScreen.tsx in the same directory does this correctly — real useSchedulingLink / useBookSlotMutation, with an explicit live flag that falls back to mock for preview and documents the fallback in a comment (line 145). Follow that pattern.

Work

  1. Wire calendar connections, availability windows, interview slots, and scheduling links to the scheduling SDK resource.
  2. Make the "add slot" and "create link" modals write through.
  3. Delete the MOCK_ constants and the sample-data label.

Depends on

Nothing hard, but most useful once the employer read path lands and there are real candidates to schedule against.

Acceptance

  • All four panels read from the database.
  • Creating a slot and a scheduling link persists and survives reload.
  • No MOCK_ constants remain in the file.

Activity

  1. thinkclay commented on Aug 11, 2026

    @thinkclay
    ContributorAuthor

    Closed by #562, but not against the acceptance criteria as written — worth stating precisely rather than leaving it implied.

    Done: interview slots and self-scheduling links read from /v1/employer/scheduling (#561), both modals write through and persist, and MOCK_SLOTS / MOCK_LINKS are gone. The write paths were the substance of this issue: "Propose Time" and "Create Link" previously opened forms whose submit button only closed the modal, so a user could believe they had scheduled an interview with a candidate who would never hear about it.

    Not done: calendar connections and availability windows. MOCK_CONNECTIONS and MOCK_AVAILABILITY remain, so "all four panels read from the database" is not met. That half moved to #563, because it is not a missing endpoint — core.calendar_connections stores access_token_encrypted / refresh_token_encrypted / provider_account_id, which means an OAuth integration with Google and Microsoft, and availability windows only mean something once something generates slots from them.

    The sample-data label narrowed rather than disappearing: USES_SAMPLE_DATA became CALENDAR_USES_SAMPLE_DATA, and the notice moved from the whole screen onto the Calendar Connections tab. Deleting it is the last step of #563, not of this issue.

    Two bugs surfaced while wiring, both fixed in #562:

    • The link row rendered schedule.scaffald.com/<token> — a host that does not exist. The real route is /schedule/[token], so every link copied from this screen was dead.
    • Link status read is_active alone. That flag is the employer's kill switch, not the clock, so a link past expires_at still showed "Active".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions