Add emulator reboot button and install-failure reboot prompt#53
Conversation
Frontend: - SharedPebble.reboot(): disconnect(true) then getPebble(kind) — reuses existing launch/connect flow instead of a dedicated reboot endpoint - QEmu: removed reboot() method (not needed with simplified flow) - Emulator config popover: added yellow 'Reboot' button next to 'Shut down' with margin-top to form a second row - Install failure modal: new #emulator-reboot-prompt with 'Reboot & Retry' button that reboots emulator and re-installs the app - pebble.js: reboot saves connection type, disconnects, then reconnects Backend: - Removed /qemu/<uuid>/reboot endpoint from controller (no longer needed) - Removed reboot_emulator Django view and URL route (no longer needed) Tests: - test_emulator_reboot.py: tests for the launch endpoint used by reboot flow - test_controller.py: tests for kill and launch endpoints
| libsdl2-dev libpixman-1-dev libglib2.0-dev \ | ||
| libpcre2-dev libffi-dev zlib1g-dev \ | ||
| nettle-dev \ | ||
| libpng-dev nettle-dev \ |
There was a problem hiding this comment.
Container build was failing for some reason and I'm unsure why.... Maybe something isn't pinned to a specific version and it got updated and the new version has a new requirement?
|
Just noticed there were no JS unit tests so i added vitest and then added that to the pipeline. I also added code coverage stats. |
- Extract CompileReboot into its own compile-reboot.js module
- Refactor showRebootPrompt to accept a rebootModal parameter (DI)
- Pass $('#emulator-reboot-prompt') from compile.js call site
- Rewrite tests to load compile-reboot.js via vm.runInNewContext
- Remove pebble.test.js (tested copies, not real code)
- Add script tags for compile-reboot.js in run.html and project.html
- Convert compile-reboot.js to ES module exports for testability - Guard global CloudPebble assignment for browser compatibility - Add type=module to script tags in run.html and project.html - Rewrite tests to use direct ES imports instead of vm.runInNewContext - Add @vitest/coverage-v8 with cobertura reporter for CI - Add irongut/CodeCoverageSummary and sticky-pull-request-comment actions for PR coverage comments and job summaries - Coverage: 71% statements, 100% functions, 87.5% branches on compile-reboot.js
- Add coverage==7.8.0 to requirements.txt - Add .coveragerc configured for Docker container paths - Run Django tests with 'coverage run manage.py test' - Generate cobertura XML and post coverage summary to PR comments and job summary using irongut/CodeCoverageSummary
|
@jmsunseri in general this looks good to me but could you clean up the commits a bit? there are commits adding then reverting something right next to eachother i.e. :) |
|
Won't it all squash into one merge commit?
Sincerely,
Justin Sunseri
…On Tue, May 12, 2026, 6:30 PM Joshua Jun ***@***.***> wrote:
*jplexer* left a comment (coredevices/cloudpebble#53)
<#53 (comment)>
@jmsunseri <https://github.com/jmsunseri> in general this looks good to
me but could you clean up the commits a bit? there are commits adding then
reverting something right next to eachother i.e. :)
—
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGEPF4XKR6WR4RTLSW3FEL42L4OHAVCNFSM6AAAAACYW6KUK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DIMRZGYYDCNZXGQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
usually we do merge commits or rebase and merge |
I think that's my point this ends up being a merge commit. Because i was working on a branch in my own forked repo this will all merge as one commit in your repo. See how in my other pull request #46 it's two commits in my branch but only one in the core devices repo. |
…to project.html - Bind SharedPebble.reboot to SharedPebble when passing as callback to showRebootPrompt, preventing TypeError on this.disconnect - Add #emulator-reboot-prompt modal to project.html (was only in run.html), so install errors show the reboot prompt instead of silently swallowing the error
|
@jplexer I asked for a review from Devin and it found a pair of potential bugs. I have pushed a couple updates but I need to test more. |
|
It seems like the fixes were for a code path i haven't been able to test manually because i was unable to force an install failure locally. |
|
@ericmigi can we get this merged? |
|
test failing - is the test broken? |
The reason for the failing tests is because the coverage report github action doesn't have permission to add comments to this github repo for security purposes. This will look like this once merged see above #53 (comment) |

Summary
SharedPebble.reboot()(disconnect + getPebble with saved connection type) — reuses the existing launch/connect flow with no new backend endpoint.I was unable to reproduce the issue where the install would fail locally. The reboot was only tested via the button in the emulator config window.
Files changed
cloudpebble/ide/static/ide/js/pebble.jsSharedPebble.reboot()— disconnect + getPebblecloudpebble/ide/static/ide/js/emulator.jsdoReboothandlercloudpebble/ide/static/ide/js/compile.jsshow_reboot_prompt()+ catch handler on install failurescloudpebble/ide/static/ide/js/qemu.jsmToken.substr()guardcloudpebble/ide/templates/ide/run.html#emulator-reboot-promptmodal HTMLcloudpebble/ide/tests/test_emulator_reboot.pycloudpebble-qemu-controller/test_controller.py