Commit Graph
3 Commits
Author SHA1 Message Date
Claude 946fef2200 Fix: Manual swipe now counts as interaction for inactivity prompt
CRITICAL FIX: Manual swipes to 0-time pages now trigger inactivity prompts.

The problem:
- User swipes to a 0-time (manual) page but doesn't touch it
- userInteractedWithCurrentSite stays false
- No inactivity prompt ever appears
- Kiosk stuck on that page forever

The fix:
- Manual swipe now explicitly sets userInteractedWithCurrentSite=true
- Swipe counts as engagement with the new page
- After inactivity timeout, prompt appears even if user never touched page
- Ensures "Return to Rotation" mechanism works on ALL pages

Complete flow now works as designed:
1. Normal rotation with duration > 0 sites
2. User interacts with ANY site → rotation pauses
3. After 2min inactivity → prompt appears
   - "Return to Rotation" → returns to home, resumes rotation
   - "I'm still here" → waits another 2min, prompt again
   - Time extension (5/15/30/60 min) → waits that long, prompt again
   - No response (15 sec) → auto-returns to rotation
4. User swipes to new page → counts as interaction, rotation resumes
5. Media playing → blocks all rotation and prompts (30s grace period)
6. Display schedule → screen blanks, app keeps running
7. Password/lockout → takes precedence on boot/resume/timeout

Technical changes:
- Lines 4072-4075: Set userInteractedWithCurrentSite=true in nextTab()
- Lines 4097-4100: Set userInteractedWithCurrentSite=true in prevTab()
- Ensures inactivity logic works even on untouched 0-time pages

This completes the comprehensive rotation/inactivity system.
2025-11-17 16:19:30 +00:00
Claude f1c560a566 Fix manual swipe behavior to resume rotation
CRITICAL FIX: Manual swipes now properly resume rotation instead of keeping it paused.

The issue:
- User interacts with page A → rotation pauses
- User swipes to page B → rotation should resume, but was staying paused
- This was because manualNavigationMode stayed true

The fix:
- nextTab() and prevTab() now set manualNavigationMode=false AFTER markActivity
- This overrides the manualNavigationMode=true set by markActivity
- Manual swipes are navigation, not content interaction
- Rotation will now resume on the new page (if it has duration > 0)

Complete flow now:
1. User touches page → manualNavigationMode=true → rotation pauses
2. After 2min idle → prompt appears with options:
   - "Return to Rotation" → manualNavigationMode=false → rotation resumes
   - "I'm still here" → manualNavigationMode stays true → rotation stays paused
   - Time extension → rotation paused during extension, prompt reappears when expires
   - No response (15sec) → auto-returns to rotation
3. User swipes to new page → manualNavigationMode=false → rotation resumes

Technical changes:
- Lines 4054-4072: Reordered nextTab() to set manualNavigationMode=false AFTER markActivity
- Lines 4074-4092: Reordered prevTab() to set manualNavigationMode=false AFTER markActivity
- Time extensions still cleared on manual swipe (correct behavior)
2025-11-17 13:21:19 +00:00
Claude a3bf3ec8d1 Release v0.9.10: Fix rotation logic and user interaction handling
This release fixes critical issues with rotation behavior and user interaction:

ROTATION LOGIC FIXES:
- Rotation now properly pauses when user interacts with any URL
- Added manualNavigationMode check to rotation logic
- User interaction (touch, scroll, type) sets manualNavigationMode=true
- "Return to Rotation" button resets manualNavigationMode=false
- Prevents unwanted auto-rotation when user is actively using content

USER INTERACTION IMPROVEMENTS:
- markActivity() now sets manualNavigationMode=true for actual user interaction
- Differentiates between content interaction and prompt responses
- Time extensions continue to be honored during user interaction
- Inactivity prompt closes when user interacts with content

EDGE CASE HANDLING:
- Fixed return to rotation when home URL exists but all URLs have 0 time
- Return to home URL still works even with no rotation configured
- Inactivity prompt properly fires on home URL in no-rotation scenario

PASSWORD/LOCKOUT PRECEDENCE:
- Verified password prompt blocks all interaction on boot
- Lockout properly blocks rotation and prompts
- System resume, screen lock trigger password protection correctly

Technical changes:
- Line 3913: Added !manualNavigationMode check to rotation condition
- Lines 3647-3651: Set manualNavigationMode on user content interaction
- Line 4086-4090: Enhanced returnToHome() documentation for no-rotation case
- Updated VERSION constants and release notes

All existing functionality preserved including:
- Time extensions honored
- Manual tab switching clears extensions
- Prompt only appears on interacted sites
- Password takes precedence on boot/resume/lockout
2025-11-17 13:03:21 +00:00