- Add relative path resolution for filesystem-loaded documents in kernel.cpp
- SetDocumentBasePath() tracks document directory for relative resource resolution
- ResolvePath() resolves relative paths like "app.lua" against document base path
- Fix RmlUi context name lookup in sandbox test app (use "default" not "main")
- Add debug logging to timer_manager.cpp to trace timer creation and execution
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use internal files dir instead of external (fixes scoped storage permissions)
- Pass files directory from Android context via JNI instead of hardcoding
- Add exception handling in ScanAppsDirectory to prevent crashes on permission errors
- Use std::error_code overload of fs::exists() to avoid throwing on access denial
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace linear-gradient with solid colors (not supported in RmlUi)
- Replace border shorthand with border-width/border-color properties
- Replace display:grid with flexbox in music quick-access cards
- Remove unsupported transition property
- Fix border-radius: 50% to use 9999px in theme.rcss
- Fix third-party app icon/label sizes to match system apps (72x72px, 16px)
- Replace data-model bindings with static values in settings
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
- 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>
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>
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>
- Remove duplicate sandbox sources from Android (now in core/)
- Update Android CMakeLists to link mosis-core
- Add OpenSSL crypto support for Android
- Update all includes to use core library headers
- Remove duplicate logger from Android (use core logger)
- Add openssl to Android vcpkg dependencies
This removes ~5,500 lines of duplicate code by sharing
the sandbox implementation between desktop and Android.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
- 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>
- 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>
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>
- 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>