Repository navigation
Run a Mona OS 4.0 simulator on the about-badge page - #43
Merged
Merged
Conversation
Replace the about-badge photo with an in-browser BadgeOS simulator that boots the menu and launches the bundled stock apps. Fall back to the badge photo when the browser lacks support or the simulator fails or times out. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1fc6a67b-c720-490b-a2f1-5f3b2cf7362a
Reuse the editor's three.js badge model so the BadgeOS simulator looks like the physical badge. Keep the photo until the model and first frame are ready, and fall back to it when WebGL or the model fails. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1fc6a67b-c720-490b-a2f1-5f3b2cf7362a
Sync launcher and apps from badger/home main, add shared firmware compat shims, zoom toward the screen, and update status text. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1fc6a67b-c720-490b-a2f1-5f3b2cf7362a
…ulator Fix simulator boot broken by CRLF checkout of the staged filesystem; default IMU to upright when no motion data. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1fc6a67b-c720-490b-a2f1-5f3b2cf7362a
…ntrols Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1fc6a67b-c720-490b-a2f1-5f3b2cf7362a
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved app-cleanup, startup timing, and control-accessibility defects affect simulator reliability and usability.
6 open issues
Run app exit hook before HOME navigation · New Allow header and toolbar to wrap on narrow screens · New Pause first-frame watchdog while simulator is hidden · New Support keyboard activation for badge buttons · New Restore sys.path after each menu launch · New Wrap simulator controls in narrow layouts · New
What changed in this PR
Replaces the about-badge photo with a live Mona OS simulator, reusing the editor’s 3D badge and retaining photo fallback.
Changes:
- Adds launcher boot, stock-app loading, motion input, and shared orientation controls.
- Refreshes bundled apps and simulator compatibility behavior.
- Extends runtime tests and documents simulator limitations.
| File | Description |
|---|---|
| tests/fixtures/badge-editor-runtime.mjs | Adds motion, HTTP fixtures, and configurable timeout. |
| tests/badge-touch-motion.test.mjs | Tests motion and touch mappings. |
| tests/badge-os-simulator.test.mjs | Tests launcher and HOME navigation. |
| tests/badge-editor-runtime.test.mjs | Extends firmware compatibility checks. |
| tests/badge-editor-project.test.mjs | Updates bundled app count. |
| src/pages/editor.astro | Adds model toolbar controls. |
| src/pages/about-badge.astro | Embeds the live simulator. |
| src/lib/badge-os-simulator.ts | Loads apps and runs the launcher. |
| src/lib/badge-os-simulator-view.ts | Coordinates boot, input, and fallback. |
| src/lib/badge-motion.ts | Maps browser motion to badge readings. |
| src/lib/badge-editor.ts | Connects motion and orientation controls. |
| src/lib/badge-editor-project.ts | Includes firmware compatibility setup. |
| src/lib/badge-editor-model-controller.ts | Preserves model rotation state. |
| src/components/badge-os-simulator.astro | Defines simulator UI and fallback. |
| scripts/sync-editor-apps.mjs | Bundles launcher sources and stock metadata. |
| public/simulator/filesystem/editor_support.py | Swaps rotated touch directions. |
| public/simulator/filesystem.json | Updates compatibility module size. |
| public/editor-apps/tomato/README.md | Adds timer instructions. |
| public/editor-apps/tennis/README.md | Adds game instructions. |
| public/editor-apps/system/README.md | Documents clock and battery controls. |
| public/editor-apps/snarky_sciuridae/README.md | Adds pet-care instructions. |
| public/editor-apps/snake/README.md | Adds game controls. |
| public/editor-apps/sketchy_sketch/README.md | Adds drawing instructions. |
| public/editor-apps/show/README.md | Documents the light show. |
| public/editor-apps/show/__init__.py | Adds light-show entry point. |
| public/editor-apps/settings/README.md | Documents editable settings. |
| public/editor-apps/sense/README.md | Documents sensor requirements. |
| public/editor-apps/rogue/world.py | Adds world and visibility logic. |
| public/editor-apps/rogue/scrolls.py | Adds scroll effects. |
| public/editor-apps/rogue/save.py | Adds game persistence. |
| public/editor-apps/rogue/rings.py | Adds ring effects. |
| public/editor-apps/rogue/README.md | Adds game instructions. |
| public/editor-apps/rogue/monsters.py | Adds enemies and combat. |
| public/editor-apps/rogue/items.py | Adds inventory item behavior. |
| public/editor-apps/rogue/content.py | Adds game constants. |
| public/editor-apps/pong/README.md | Documents multiplayer requirements. |
| public/editor-apps/plucky_cluck/README.md | Adds game instructions. |
| public/editor-apps/monapet/README.md | Adds pet-care instructions. |
| public/editor-apps/mona_pet/ui.py | Adds pet interface rendering. |
| public/editor-apps/mona_pet/tufty.py | Adds pet state and animation. |
| public/editor-apps/mona_pet/README.md | Documents pet controls. |
| public/editor-apps/mona_pet/match.py | Adds matching minigame. |
| public/editor-apps/mona_pet/icons.py | Adds icon rendering. |
| public/editor-apps/mona_pet/food.py | Adds food selection. |
| public/editor-apps/mona_pet/clock.py | Adds accelerated pet time. |
| public/editor-apps/mona_pet/__init__.py | Adds pet application flow. |
| public/editor-apps/mona_paint/README.md | Documents drawing and tilt controls. |
| public/editor-apps/merge_conflict/README.md | Documents multiplayer controls. |
| public/editor-apps/menu/ui.py | Adds launcher status rendering. |
| public/editor-apps/menu/silhouettes.py | Bundles silhouette geometry. |
| public/editor-apps/menu/opening.py | Adds opening animation. |
| public/editor-apps/menu/mona.py | Adds launcher character rendering. |
| public/editor-apps/menu/gallery.py | Adds launcher photo viewing. |
| public/editor-apps/menu/celebration.py | Adds achievement presentation. |
| public/editor-apps/menu/__init__.py | Adds launcher entry point. |
| public/editor-apps/mass_storage/README.md | Documents USB storage mode. |
| public/editor-apps/life/README.md | Adds simulation instructions. |
| public/editor-apps/life/__init__.py | Expands simulation and painting controls. |
| public/editor-apps/iss/README.md | Adds tracker instructions. |
| public/editor-apps/iss_tracker/README.md | Removes obsolete tracker documentation. |
| public/editor-apps/iss_tracker/__init__.py | Removes obsolete tracker implementation. |
| public/editor-apps/input_test/README.md | Documents input diagnostics. |
| public/editor-apps/hydrate/README.md | Adds hydration-tracking instructions. |
| public/editor-apps/ghost_signal/README.md | Adds game instructions. |
| public/editor-apps/gallery/README.md | Documents image browsing. |
| public/editor-apps/flappy/README.md | Adds game instructions. |
| public/editor-apps/flappy_mona/README.md | Documents game controls. |
| public/editor-apps/flappy_mona/obstacle.py | Adds obstacle behavior. |
| public/editor-apps/flappy_mona/mona.py | Adds player physics and animation. |
| public/editor-apps/flappy_mona/__init__.py | Adds game entry point. |
| public/editor-apps/extend_a_squirrel/README.md | Adds game instructions. |
| public/editor-apps/demos/README.md | Documents graphics demos. |
| public/editor-apps/Copilot/README.md | Documents session-monitor setup. |
| public/editor-apps/Copilot/assets/LICENSE.txt | Includes artwork license. |
| public/editor-apps/contacts/README.md | Documents contact exchange. |
| public/editor-apps/commits/README.md | Adds game controls. |
| public/editor-apps/clock/README.md | Documents clock configuration. |
| public/editor-apps/camera/README.md | Documents camera setup and limitations. |
| public/editor-apps/camera/camera_pairing.py | Adds camera pairing support. |
| public/editor-apps/camera/camera_launcher_icon.py | Adds launcher icon geometry. |
| public/editor-apps/camera/camera_core.py | Adds transport and photo storage. |
| public/editor-apps/camera/assets/NOTICE.txt | Includes asset attribution. |
| public/editor-apps/camera/assets/LICENSE-MDI.txt | Includes icon license. |
| public/editor-apps/camera/assets/camera.svg | Adds camera icon source. |
| public/editor-apps/camera/assets/camera-wireless.svg | Adds wireless icon source. |
| public/editor-apps/brattal/README.md | Adds game instructions. |
| public/editor-apps/bee_amazed/README.md | Adds maze controls. |
| public/editor-apps/badge/README.md | Documents profile configuration. |
| public/editor-apps/30_minutes_to_alpha_centauri/README.md | Adds game instructions. |
| docs/editor.md | Documents simulator behavior and limitations. |
| .gitattributes | Preserves simulator filesystem bytes. |
Review effort: Balanced
Adopt main's Screen/Full toggle ids and styling while keeping Rotate; each page's markup sets the initial view. Use main's sparkle.py (with resume for the menu), keep browser-backed Wi-Fi, and make the first-install test use the catalog size. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1fc6a67b-c720-490b-a2f1-5f3b2cf7362a
- Run the active app's on_exit once when HOME returns to the menu - Restore sys.path after every launch so menu paths don't accumulate - Suspend the first-frame watchdog while the simulator is paused - Support Enter/Space and assistive-technology clicks on badge buttons - Let simulator toolbars wrap on narrow layouts Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1fc6a67b-c720-490b-a2f1-5f3b2cf7362a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


The about-badge page showed a static photo. This replaces it with a live simulator on the editor's 3D badge model. It boots the Universe 2026 Mona OS 4.0 menu and runs the stock apps from badger/home. If the simulator errors, or the browser lacks WebGL or worker support, the page shows the original photo instead.
What's included
Review notes
public/simulator/filesystem.jsonare maintained by hand, so update them when editing files underpublic/simulator/filesystem/.npm run test:editorstill has the same failures it had before this PR (simulator examples, text/vector_text, raycast minimap). The tests added or updated here pass, andnpm run buildsucceeds.