Repository navigation
Description
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(defaulttrue, to match current always-on behavior for existing installs)kot_printing_enabled(defaulttrue, 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
/kdsWebSocket upgrade (main/services/kds.ts, wired inmain/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
- 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?
- Exact HTTP status for disabled KDS endpoints (see above).
- Does disabling KDS mid-operation need any migration/cleanup (e.g. invalidate outstanding
kds_pairing_tokens)? - 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
Add settings toggle for KDS vs. Printer/KOT workflow (#133)
itsbkm commentedon Jul 21, 2026
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.
docs: refresh README against current Electron/roadmap/feature state