Skip to content

Enhancement: Settings toggle for KDS vs. Printer/KOT workflow #133

Closed

Description

@itsbkm

Summary

Not every business running FloCafe uses both a Kitchen Display System (KDS) and a physical KOT ticket printer. Right now the app behaves as if every install has both: KDS endpoints are always reachable, and a manual "Print KOT" action is always available regardless of whether the business actually owns/uses a receipt printer. Add a Settings toggle so an owner can declare which kitchen workflow(s) they actually use, and have the backend/frontend respect that choice instead of exposing both unconditionally.

Proposed settings

Two independent boolean settings (a business could plausibly run both, or just one):

  • kds_enabled (default true, to match current always-on behavior for existing installs)
  • kot_printing_enabled (default true, same reasoning)

Follows the existing settings convention (main/routes/settings.ts — same pattern as loyalty_enabled/cloud_sync_enabled: stored as a string 'true'/'false' in the settings table, added to ALLOWED_WILDCARD_KEYS, exposed via GET/PATCH /api/settings).

Behavior when kds_enabled = false

KDS-related endpoints should stop being exposed rather than just being hidden in the UI — a stale or misconfigured KDS device on the LAN shouldn't be able to keep pulling kitchen data for a business that doesn't use one. Endpoints affected:

  • GET /api/kds/orders, GET /api/kds/display, GET /api/kds/pairing, POST /api/kds/pairing, PATCH /api/kds/items/:id/status (main/routes/kds.ts)
  • GET /api/kitchen/orders (main/routes/kitchen.ts)
  • GET /api/kds-info (main/routes/kds-info.ts)
  • The /kds WebSocket upgrade (main/services/kds.ts, wired in main/server.ts)
  • Frontend: hide the KDS nav entry, /kds, /kds-standalone, and the KDS pairing UI in Settings when disabled.

Open question: should these return 404 (pretend the feature doesn't exist) or a 403/501 with a clear "KDS is disabled" message? I'd lean 404 for the WebSocket/pairing endpoints (less to probe) and a clear error for the authenticated REST endpoints, but that's a product call.

Behavior when kot_printing_enabled = false

No KOT print command should ever be sent — not automatically, not manually. This is a different, coarser toggle than the existing auto_print_kot setting, which only controls whether printing happens automatically on order placement (frontend/src/app/(dashboard)/pos/page.tsx:63-73, printKotIfEnabled) — today, even with auto_print_kot off, a manual "Print KOT" action is still available. With kot_printing_enabled = false, KOT printing should be off entirely: printKotIfEnabled should no-op regardless of auto_print_kot, and any manual "Print KOT" button/action should be hidden or disabled.

Open questions for whoever picks this up

  1. Can both be disabled at once? If so, how do items ever progress through the kitchen workflow (pending → preparing → ready) — is that acceptable for a business that just marks whole orders served at the counter, or should the UI warn/require at least one to be on?
  2. Exact HTTP status for disabled KDS endpoints (see above).
  3. Does disabling KDS mid-operation need any migration/cleanup (e.g. invalidate outstanding kds_pairing_tokens)?
  4. Where does this toggle live in Settings — likely alongside the existing Printer settings tab and/or a new "Kitchen Workflow" section.

Non-goals for this issue

This issue is a proposal only — no implementation. Please weigh in on the open questions above before it's built.

Activity

  1. added
    enhancement
    on Jul 20, 2026
  2. itsbkm commented on Jul 21, 2026

    @itsbkm
    ContributorAuthor

    Implemented in 1259fdc — kds_enabled/kot_printing_enabled settings, endpoint gating (404 for WS/pairing, 403 for authenticated REST), pairing token invalidation on disable, and frontend nav/route/button gating. Both toggles can be off simultaneously with an informational note. See specs/DatabaseMigrations.md (local) and the commit message for the design decisions made.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions