Commit Graph

9 Commits

Author SHA1 Message Date
spirit cef6ab1c6a feat: Add local SQLite analytics tracking
CI / build (push) Has been cancelled
CI / lint (push) Has been cancelled
- AnalyticsEvent: Data class for tracked events
- AnalyticsDao: Room DAO with CRUD operations
- AnalyticsDatabase: Room database singleton
- AnalyticsManager: High-level API for logging events
- Unit tests for AnalyticsEvent

Event types: page_view, session_start, session_end,
idle_reset, admin_access, config_sync, signage_rotate

Supports JSON/CSV export for admin panel integration.
2026-02-03 20:52:10 +00:00
spirit 4f33255417 feat: Add digital signage mode (URL rotation)
CI / build (push) Has been cancelled
CI / lint (push) Has been cancelled
- SignageManager.kt: Handles URL rotation with configurable interval
- Admin UI: Toggle, URL list (one per line), interval setting
- SignageManagerTest.kt: 9 unit tests for rotation logic

Features:
- Enable/disable signage mode
- Configure list of URLs to rotate
- Set rotation interval (min 5 seconds)
- Pauses on user interaction (resumes after 1 min)
- Resets to first URL on idle timeout

Note: MainActivity integration pending
2026-02-03 19:53:54 +00:00
spirit d1a637e8e4 feat: Add PIN hashing with SHA-256 + salt
CI / build (push) Has been cancelled
CI / lint (push) Has been cancelled
Security improvement: PINs are now stored as salted SHA-256 hashes
instead of plain text.

- PinSecurity.kt: Hash/verify utilities with salt
- AdminActivity: Uses hashed PINs for storage and verification
- Backward compatible: verifies against legacy plain text PINs
- PIN field shows placeholder when hashed (enter new to change)
- PinSecurityTest.kt: Unit tests for hashing logic

Format: 'base64salt:base64hash' stored in DataStore
2026-02-03 19:51:44 +00:00
spirit 8359c1d5ee fix: Add View parameter to onAdminAreaTap
CI / build (push) Has been cancelled
CI / lint (push) Has been cancelled
XML onClick handlers require a View parameter. Missing parameter
was causing crash when triple-tapping admin area.

Fixes admin settings access crash on tap.
2026-02-03 18:24:16 +00:00
spirit 95036915f6 feat: Add loading progress indicator
CI / build (push) Has been cancelled
CI / lint (push) Has been cancelled
- ProgressBar in activity_main.xml (top of screen)
- LoadingProgress.kt utility with WebChromeClient
- Shows during page load, hides on complete
- Smooth UX with slight hide delay

Integration: webView.setupProgressBar(binding.progressBar)
2026-02-03 15:17:27 +00:00
spirit 3c0c31fe67 feat: Add network error handling
CI / build (push) Has been cancelled
CI / lint (push) Has been cancelled
- error.html: User-friendly error page with retry button
- ErrorHandler.kt: Utility for handling WebView errors
- ErrorHandlerTest.kt: Unit tests for error handling

Shows friendly error page on network failures instead of blank/broken page.
Includes error code display and one-tap retry.
2026-02-03 15:16:14 +00:00
spirit 68a486cf9b test: Add comprehensive unit tests
- IdleTimerTest.kt: 6 tests for timeout calculations
- ConfigValidationTest.kt: 16 tests for config validation
  - Homepage URL validation
  - Admin PIN validation (4-8 digits)
  - Whitelist parsing and normalization
- Updated IMPROVEMENTS.md with test coverage

Total unit tests: 29
2026-02-03 15:13:23 +00:00
pluto 4f2430d354 fix(security): Whitelist bypass vulnerability
- Fixed URL whitelist to use proper domain boundary matching
- Added WhitelistTest.kt with 6 test cases
- Added IMPROVEMENTS.md with code review notes

Security fix identified by Spirit 👻
Co-authored-by: Spirit <spirit@hobbs.farm>
Co-authored-by: Margaret <margaret@hobbs.farm>
2026-02-03 09:11:06 -06:00
pluto 6dc1a73d2e feat: MVP implementation - Kiosk Browser
- Fullscreen WebView with immersive mode
- URL whitelist system
- Admin PIN-protected settings
- Boot receiver for auto-launch
- Idle timeout with homepage reset
- Lock Task Mode support
- Material Design 3 UI

Team: Pluto (coordinator), Margaret, Spirit
2026-02-03 09:09:20 -06:00