Repository navigation
Machine: install the Digitone II page's build over USB MIDI (piece 3) - #1819
prodbysmolec wants to merge 18 commits into
Conversation
UsbUpgradePanel sends the verified build with os-upgrade.ts over Web MIDI after the same risk and recovery ticks as a download; the unit asks UPGRADE OS NOW? and only YES there installs it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The kit's build result names its device ("Digitone II"), so fitBuilt passed the site's build through unpacked: the
unit then refused it at about 98 %, seen on a unit from the page. It now looks the limit up by name too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
|
The USB upload can start after the user has left the build page. If the browser's MIDI permission prompt is still open when the panel unmounts or the selected build changes, Please tie the pending permission request and transfer to the selected build, release the MIDI listener on cancellation, and check that the build is still current before sending. A browser test that changes builds while permission is pending should see zero sends for the old build. The routing conflicts and usage decision are tracked on #1812. |
…nto machine/digitone-ii-usb-flash
…' into machine/digitone-ii-usb-flash
The panel's send waited for the browser's MIDI permission and then sent the old image even after the person had left the page or chosen another build, and the running flag lived in the old panel. Now each send carries an AbortSignal tied to the build's SHA-256: choosing another build or unmounting aborts it, a permission granted after that sends nothing, a transfer under way stops before its next message and gives the MIDI listener back, and a send is refused unless its build is the one shown. One run at a time on the page: a newer panel's send waits for the old run to end. A jsdom test changes builds and unmounts while permission is pending and sees zero sends for the old build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tate in an effect Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, fixed in 2d960b1 (and a lint follow-up):
Merged the updated #1812 and #1762 (this branch builds on both), |
|
The cancellation tests pass, and changing builds stops sends for the previous image. I found one more case in the panel. I started a send for A, chose B while MIDI permission was pending, let the cancelled request finish and selected A again. Zero messages went out, but A showed “Looking for the Digitone II” with Send disabled. The hook still holds A’s cancelled One evidence detail to reconcile while you’re here. This PR’s edge-case table says NO was checked with #1762. Both verification records say NO wasn’t tried. Please link the run if it happened, or update that row to say it’s still open. |
…chine/digitone-ii-usb-flash
…hen its build comes back (A, B, A) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Both done in e386ec5, after merging
|
|
Thanks. A → B → A now comes back idle, and the NO row matches both records. Before this goes into
After that, mark it ready. |
…_UPGRADE_ENABLED, off), apart from downloads Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chine/digitone-ii-usb-flash
|
Points 1 and 3 are done in 1e2510f (then merged
|
|
Hey @prodbysmolec! Jannik suggested I look into porting your DN2 USB link and runtime loader to the DT2. Have you started anything on the DT2 side yet? Just want to make sure we're not stepping on each other's toes. |
|
Hey @karigardarsson - no he hasn't you can go ahead! :) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What was wrong or hard: Piece 3 of the Digitone II goal: the page builds the Digitone II base, but installing it still needed Elektron Transfer. The OS upgrade sender (Improvement: send an Elektron OS upgrade over USB MIDI from the site's engine #1762, merged) had run on a unit only from a host script, never from the browser.
What this changes:
UsbUpgradePanelunder a verified build, for the machines inUSB_UPGRADE_MACHINES.It is offered only once the owner turns it on:
USB_UPGRADE_ENABLEDinprotocol.ts, off for every machine, apart from downloads (DIGI_DOWNLOADS_ENABLED). So nothing changes on the page until then.Once on, it asks for the same risk and recovery ticks as a download.
useUsbUpgradethen:os-upgrade.tsand shows its progress;Nothing presses anything on the unit.
A run belongs to its build: choosing another build or leaving the page cancels it, a pending MIDI permission included, and only one run goes at a time on the page.
The goal row, a verification record and a changelog entry. The
fitBuiltfix found on the unit now comes through Fix: fit a Digitone II build by the device name the kit gives #1822 on the base branch.How I checked it: browser tests against simulated Web MIDI ports that answer as the stock OS:
npm run checkpasses againstbase/digitone-ii-next.Tested on a unit: base 7a60d82e built on the page alone (2.0a) from my Digitone II's stock 1.12 and sent from the page in Chromium over USB, 19 November: upload complete in 6.5 s, YES on the unit, and it booted normally without the marker (record). That was before
useUsbUpgradewas rewritten for cancellation. Still to run on this head: one send answered with YES and one with NO, with the image's SHA-256 in the record. Then this PR goes ready.Edge cases
useUsbUpgrade.test.tsusbUpgradeEnabledis false for every machine untilUSB_UPGRADE_ENABLEDsays otherwiseUsbUpgradePanel.test.tswith the real panel🤖 Generated with Claude Code