Skip to content

Commit 3e4b142

Browse files
committed
remove debug logging and template request handling
1 parent 5e9bd01 commit 3e4b142

1 file changed

Lines changed: 0 additions & 37 deletions

File tree

frontend/src/ts/kiosk.ts

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -137,21 +137,6 @@ async function init(): Promise<void> {
137137
const MILLISECONDS_PER_SECOND = 1000;
138138
const TIMEOUT_GRACE_FACTOR = 3;
139139

140-
document.body.addEventListener(
141-
"htmx:afterRequest",
142-
((e: Event) => {
143-
const detail = (e as any).detail;
144-
const path = detail?.pathInfo?.requestPath;
145-
const status = detail?.xhr?.status;
146-
147-
console.debug("[DEBUG] htmx:afterRequest", {
148-
path,
149-
status,
150-
successful: detail?.successful,
151-
});
152-
}) as EventListener,
153-
);
154-
155140
if (kioskData.httpTimeout <= 0) {
156141
htmx.config.timeout = 0;
157142
} else {
@@ -309,9 +294,6 @@ function addEventListeners(): void {
309294
htmx.on("htmx:afterRequest", (e: HTMXEvent) => {
310295
const path = e.detail?.pathInfo?.requestPath || "";
311296

312-
// Debug so we can see exactly when this runs
313-
console.debug("[DEBUG] kiosk polling afterRequest", { path });
314-
315297
// Only restart polling for asset endpoints (new slide)
316298
if (path.startsWith("/asset/")) {
317299
startPolling();
@@ -447,8 +429,6 @@ async function cleanupFrames(): Promise<void> {
447429
function setRequestLock(e: HTMXEvent): void {
448430
const path = e.detail?.pathInfo?.requestPath || "";
449431

450-
console.debug("[DEBUG] setRequestLock for asset request", { path });
451-
452432
// Only lock and pause polling for asset requests (new slide)
453433
if (!path.startsWith("/asset/")) {
454434
return;
@@ -479,22 +459,6 @@ function releaseRequestLock(): void {
479459
requestInFlight = false;
480460
}
481461

482-
/**
483-
* Only starts polling for asset events after a request completes
484-
* @description Request event handling function that:
485-
* - Starts polling only if there is an asset change event
486-
* - Ignores polling events due to live photo failures
487-
*/
488-
function afterRequest(e: HTMXEvent): void {
489-
const path = e.detail?.pathInfo?.requestPath || "";
490-
491-
// Only restart polling for asset endpoints
492-
if (path.startsWith("/asset/")) {
493-
startPolling();
494-
}
495-
496-
}
497-
498462
/**
499463
* Checks if there are enough history entries to navigate back
500464
* @param {HTMXEvent} e Event object for the history navigation request
@@ -605,5 +569,4 @@ export {
605569
clientData,
606570
videoHandler,
607571
sleepMode,
608-
afterRequest,
609572
};

0 commit comments

Comments
 (0)