From 46b950baf27a6e4d12bca22da6ae19a4873df464 Mon Sep 17 00:00:00 2001 From: Scott Pouliot Date: Wed, 13 May 2026 21:16:34 -0400 Subject: [PATCH] Kiosk intake: 45-second inactivity reset to Welcome screen _KioskLayout inactivity timer now reads ViewBag.InactivityTimeoutMs (defaults to 5 min). PopulateKioskViewBagFromSession sets it to 45 s on every intake step so an abandoned form auto-returns to the waiting screen. Welcome screen and Confirmation page are unaffected. Co-Authored-By: Claude Sonnet 4.6 --- src/PowderCoating.Web/Controllers/KioskController.cs | 4 ++++ src/PowderCoating.Web/Views/Shared/_KioskLayout.cshtml | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/PowderCoating.Web/Controllers/KioskController.cs b/src/PowderCoating.Web/Controllers/KioskController.cs index 31689f9..4419330 100644 --- a/src/PowderCoating.Web/Controllers/KioskController.cs +++ b/src/PowderCoating.Web/Controllers/KioskController.cs @@ -717,5 +717,9 @@ public class KioskController : Controller ViewBag.SessionToken = session.SessionToken; ViewBag.SessionType = session.SessionType; + + // Reset to Welcome screen after 45 s of inactivity on any intake step. + // The Welcome screen itself stays on indefinitely (no timeout override there). + ViewBag.InactivityTimeoutMs = 45_000; } } diff --git a/src/PowderCoating.Web/Views/Shared/_KioskLayout.cshtml b/src/PowderCoating.Web/Views/Shared/_KioskLayout.cshtml index 729ba05..e7a95e0 100644 --- a/src/PowderCoating.Web/Views/Shared/_KioskLayout.cshtml +++ b/src/PowderCoating.Web/Views/Shared/_KioskLayout.cshtml @@ -59,16 +59,19 @@ -@* Inactivity timer — redirect to Welcome after 5 minutes of no input *@ +@* Inactivity timer — redirect to Welcome when idle too long. + Intake steps set ViewBag.InactivityTimeoutMs = 45000 (45 s). + Welcome screen keeps the default 5-minute timeout. *@ @{ bool showInactivityTimer = (bool)(ViewBag.ShowInactivityTimer ?? true); string welcomeUrl = ViewBag.WelcomeUrl as string ?? "/Kiosk/Welcome"; + int inactivityMs = ViewBag.InactivityTimeoutMs as int? ?? (5 * 60 * 1000); } @if (showInactivityTimer) {