21 Commits

Author SHA1 Message Date
cbc03c0674 fix scroll direction: use RmlUi native touch API
Switch from mouse event emulation to RmlUi's native touch API
(ProcessTouchStart/Move/End) for natural scrolling behavior.

When dragging on scrollable content, the content now follows
the finger/cursor direction instead of scrolling in reverse.

- Designer: Use touch API when left mouse button is pressed
- Android kernel: Use touch API for all touch events
2026-01-20 20:30:08 +01:00
41fc6fdd86 fix simulator mode to use shell.rml instead of deleted home.rml 2026-01-20 10:39:27 +01:00
2db7eea9f1 add shell architecture with persistent status bar, nav bar, and content fragments 2026-01-20 10:09:47 +01:00
1f91d7508e add base-apps with manifests, layout system, and testing documentation
- Rename test-apps to base-apps with proper manifest.json for each app
- Add is_system_app flag to app discovery and Lua API
- Fix icon path resolution for /system/icons/ paths
- Add layout.lua and layout.rcss for reusable UI components
- Update home screen to dynamically load all apps from manifests
- Update all app RML files to use layout components
- Comprehensive testing framework documentation with JSON action format
- Add tests/ directory structure for automated UI testing
2026-01-20 09:14:05 +01:00
5de087e8e0 fix document global for external Lua scripts in designer and Android 2026-01-19 22:51:19 +01:00
76d97e202b fix settings layout for RmlUi 6.2: toggle positioning and flexbox sizing 2026-01-19 19:53:29 +01:00
6b611b1d09 Fix icon loading for third-party apps with file:// URL scheme
- Add file:// URL handling to AssetFilesInterface in kernel.cpp
- Update home.lua to use file:// prefix for absolute filesystem paths
- Add file:// URL handling to desktop file interface for consistency

This fixes RmlUi stripping the leading slash from absolute paths
when resolving img src URLs relative to the document base.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 17:01:31 +01:00
cb86d52705 Add sandbox API integration for RmlUi Lua state
- Register sandbox APIs (timer, JSON, crypto, VFS) into RmlUi's Lua state
- Add switchAppSandbox() function for context switching between apps
- Update goHome() to reset sandbox context when returning home
- Fix icon loading for third-party apps (handle full paths vs relative)
- Mirror changes between Android service (kernel.cpp) and desktop designer

This enables third-party apps to use sandbox APIs when running in RmlUi.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 15:49:35 +01:00
ea44f0bba4 Add simulator mode with app discovery and mosis.apps API
Simulator mode (--simulator flag):
- Starts from main home.rml instead of separate simulator home
- Discovers apps from test-apps folder automatically
- Shows discovered apps in home screen grid

mosis.apps API for Lua:
- getInstalled() returns array of discovered apps
- launch(package_id) starts an app with its own sandbox

goHome improvements:
- Uses g_main_assets_path to find home.rml correctly
- Works when running test apps directly
- Properly clears current app state

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 15:01:40 +01:00
984e8715d7 Fix desktop designer click handling and add goHome API
Designer click handling:
- Fix DPI scaling in MouseButtonCallback and CursorPosCallback
- Scale coordinates from window space to framebuffer/RmlUi context
- Remove window resizing in ResizeToPhone (caused DPI mismatches)

Test framework:
- Fix SendMouseDown to use MOUSEEVENTF_MOVE before button down
- Remove double-scaling in ScaleToPhysical (WindowController handles it)
- All 5 UI navigation tests now pass

Kernel API:
- Add goHome() Lua function to return to home screen
- Stops any running third-party apps before navigating

Test app:
- Update sandbox-test to use goHome() instead of goBack()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 14:52:15 +01:00
33841516f1 extract shared mosis-core library from sandbox APIs
Create core/ directory with platform-agnostic sandbox components:
- Timer manager, JSON API, Crypto API, Virtual FS
- Lua sandbox, Permission gate, Audit log, Rate limiter
- Platform abstraction interfaces (IAssetInterface, IFilesystemInterface)
- Platform-agnostic logger with Android/Desktop implementations

Update designer to link against mosis-core library instead of
including sandbox sources directly.

This is the foundation for unifying the Android service and
desktop designer to share the same codebase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 11:57:10 +01:00
f41eda6f62 add simulator mode to desktop designer for testing apps
- Add --simulator flag to launch home screen showing discovered apps
- Create app discovery system to scan test-apps/ directory
- Build simulator home screen with dark phone-like UI
- Add Lua API: simulator.launchApp, simulator.goHome, simulator.getApps
- ESC key returns to home when inside an app
- Apps displayed with icons in grid layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 11:16:01 +01:00
02db0d849c add --screenshot-after option and fix test app document access
- Add --screenshot-after CLI option to capture screenshot after playback
- Fix sandbox test app to cache document reference for onclick handlers
- Add getDocument() helper that works with RmlUi Lua proxy objects

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 10:36:14 +01:00
a583ef64a1 fix action player wait actions to properly delay playback finish
Wait actions now extend the minimum finish time based on their
timestamp + duration, ensuring timers and other async operations
have time to complete before playback ends and screenshot is taken.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 10:35:44 +01:00
8432bbb986 add sandbox support to desktop designer, fix mouse coordinates and UI issues
- Add DesktopSandbox class that integrates timer, JSON, crypto, and VirtualFS APIs
- Fix mouse coordinate handling: GLFW reports window coordinates, not physical pixels
- Fix font path resolution to search multiple locations for test apps
- Fix screenshot capture timing (capture before buffer swap)
- Fix test app CSS: use border-width instead of border:none, add display:block
- Fix test app Lua: add document nil checks, use HTML entities for symbols
- Update hot_reload to reset sandbox state on reload

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 10:22:32 +01:00
baa77d4c95 complete milestone 1 2026-01-16 22:17:12 +01:00
8de36aa975 finish the testing framework 2026-01-16 20:15:34 +01:00
2e097e4e54 add testing and plan milestones 2026-01-16 19:50:59 +01:00
25b0603913 more on testing framework 2026-01-16 17:11:51 +01:00
a35c222570 save state 2026-01-16 16:34:32 +01:00
c8ee7defe8 work in progress 2026-01-16 12:43:06 +01:00