Skip to content

[booking][P2 MEDIUM] No no-show automation: SCHEDULED appointments never auto-close on absent attendance, no NO_SHOW state, no money/credit reconciliation (revives #471) #1493

Description

@teetangh

Summary

There is no no-show automation in the product. A consultee who books a paid/approved session and never attends leaves the appointment in a SCHEDULED state forever — no automatic NO_SHOW/COMPLETED-with-marker transition, no consultant/consultee flag, no earned/credit reconciliation, no follow-up workflow.

The prior tracking issue #471 ("No-show detection and handling system") is closed without a shipping implementation; this re-opens the gap as a concrete requirement set.

Current state (verified)

  • AppointmentStatus enum (prisma/schema.prisma:3677-3688): PENDING, APPROVED, APPROVED_PENDING_PAYMENT, SCHEDULED, COMPLETED, REJECTED, CANCELLED, EXPIREDno NO_SHOW state.
  • Stream/call-presence code (lib/stream/call-presence.ts, lib/stream/session-handlers.ts, lib/stream/webhook-events.ts) has no-show signals (connection state, attendance metadata) but nothing closes the booking or reconciles it.
  • No cron/job sweeps SCHEDULED appointments against session attendance to mark no-shows.

The gap

  1. No state machine edge for no-show: a session that starts and ends with the consultee absent is indistinguishable from a normal completed session at the data layer.
  2. No auto-close: no sweep that marks an elapsed SCHEDULED appointment as no-show when attendance is absent (and with recording presence, a no-show, or a served-vs-not determination).
  3. No money/credit reconciliation: depends on the refund/credit design — whether a no-show refunds, forfeits, or consumes the credit; must be decided and wired (see [Big Pickle][finance] Overall Verdict on the Financial Subsystem (HLD + LLD) — 40-issue backlog, scheduler concurrency gap, HLD drift #1421 finance verdict, refund-hardening issues).
  4. No consultant-facing surface: consultant dashboard has no "did they show?" confirm/flag, so no-show data never enters the loop (matches [RESILIENCE] No-show detection and handling system #471 intent).

Recommended approach

  • Decide the money model for no-show (tied to refund/cancellation policy work).
  • Add a NO_SHOW appointment state and a sweep (mirroring expire-reschedule-proposals / expire-stale-requests cron patterns) that moves elapsed SCHEDULED appointments to a no-show terminal state when session attendance is empty.
  • Surface a consultant "confirm attended / mark no-show" action in the consultant UI (dashboard), defaulted to auto on elapsed-session + no presence.
  • Denormalize any attendance/no-show marker per the schema directive (typed field, not JSON).

Files

  • prisma/schema.prisma:3677-3688AppointmentStatus (no NO_SHOW)
  • lib/stream/call-presence.ts, lib/stream/session-handlers.ts, lib/stream/webhook-events.ts — attendance/presence signals (raw, unconsumed for no-show)
  • jobs/appointments/*, scripts/appointments/* — existing cron patterns to mirror

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bookingBooking, scheduling, slots, reschedule, cancellationcron jobsdashboardDashboard IA, tabs, semantics, UX across all roleslaunch: post-mvpFirst 90 days after launch — coverage, polish, operational maturity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions