From 0af83fd8bb378d8c0878e45aa3b54694da876e11 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 19 Nov 2025 20:49:12 +0000 Subject: [PATCH 1/3] Add diagnostic script for pause button troubleshooting --- check_pause_button.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 check_pause_button.sh diff --git a/check_pause_button.sh b/check_pause_button.sh new file mode 100755 index 0000000..307fee0 --- /dev/null +++ b/check_pause_button.sh @@ -0,0 +1,26 @@ +#!/bin/bash +echo "=== Checking Pause Button Deployment ===" +echo +echo "1. Checking if pause-dialog.html exists:" +ls -lh /home/kiosk/kiosk-app/pause-dialog.html 2>&1 +echo +echo "2. Checking if preload.js has pause button code:" +grep -c "pauseButton" /home/kiosk/kiosk-app/preload.js +echo +echo "3. Checking if main.js has showPauseDialog:" +grep -c "showPauseDialog" /home/kiosk/kiosk-app/main.js +echo +echo "4. Checking recent electron logs for PAUSE-BTN messages:" +tail -100 /home/kiosk/electron.log | grep "PAUSE-BTN" | tail -20 +echo +echo "5. Checking recent electron logs for pause-button-visibility:" +tail -100 /home/kiosk/electron.log | grep "pause-button-visibility" | tail -20 +echo +echo "6. Checking what sites are configured:" +cat /home/kiosk/kiosk-app/config.json | jq '.tabs[] | {url: .url, duration: .duration}' 2>/dev/null || echo "Config check failed" +echo +echo "=== Instructions ===" +echo "If pause-dialog.html is missing, the installer didn't run properly" +echo "If grep counts are 0, the files weren't updated" +echo "If no PAUSE-BTN logs appear, the button logic isn't running" +echo "Check that at least one site has duration > 0" From efeae325cd796257b8bf288454fd4349eac69d5f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 19 Nov 2025 20:54:20 +0000 Subject: [PATCH 2/3] Fix VERSION constant to 0.9.2 in main.js --- install_kiosk_0.9.2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_kiosk_0.9.2.sh b/install_kiosk_0.9.2.sh index 6bb8196..87f64c3 100644 --- a/install_kiosk_0.9.2.sh +++ b/install_kiosk_0.9.2.sh @@ -3315,7 +3315,7 @@ const path=require('path'); const os=require('os'); const CONFIG_FILE=path.join(__dirname,'config.json'); -const VERSION='0.9.0'; +const VERSION='0.9.2'; let mainWindow,views=[],hiddenViews=[],tabs=[],currentIndex=0,showingHidden=false; let pinWindow=null,promptWindow=null,pauseWindow=null,htmlKeyboardWindow=null; From cd0bedf9d4804b34c62705ec852787917033476b Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 19 Nov 2025 22:30:35 +0000 Subject: [PATCH 3/3] Fix pause button: resend visibility on page load The pause button wasn't appearing because preload.js variables were being reset when pages reloaded/navigated, but the visibility message was only sent once in attachView(). Now sends pause-button-visibility on EVERY page load (did-finish-load event) to ensure the button state persists across page reloads and navigation. --- install_kiosk_0.9.2.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install_kiosk_0.9.2.sh b/install_kiosk_0.9.2.sh index 87f64c3..fe92020 100644 --- a/install_kiosk_0.9.2.sh +++ b/install_kiosk_0.9.2.sh @@ -4202,6 +4202,12 @@ function createWindow(){ },true); }); `).catch(()=>{}); + + // Send pause button visibility on every page load to handle reloads + const siteDuration=parseInt(t.duration)||0; + const shouldShow=siteDuration>0; + view.webContents.send('pause-button-visibility',shouldShow); + console.log('[MAIN] Page loaded - resending pause-button-visibility: '+shouldShow+' for '+t.url); }); const isHidden=parseInt(t.duration)===-1;