Skip to content

Commit ad8ad2d

Browse files
bwhitmanclaude
andauthored
web: vendor webmidi locally to fix editor/run page hang (amyboard + tulip web) (#1064)
* amyboardweb: vendor webmidi locally to fix editor page hang The editor loaded webmidi.js as a render-blocking <script src> pointing at cdn.jsdelivr.net/npm/webmidi@latest. When jsdelivr's @latest/ranged version resolution for that package stalls, the synchronous script blocks the browser from rendering the rest of /editor/, so the page hangs (the marketing site is unaffected because it doesn't load webmidi). Self-host webmidi v3.1.16 (the version @latest currently resolves to) under static/vendor/, matching the existing vendor/qwerty-hancock.min.js pattern, and reference the local copy. This removes the third-party render-blocking dependency and pins the version so a future @latest change can't stall or break the editor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * tulip/web: vendor webmidi locally too (same editor-hang fix) Tulip Web's /run/ page had the same render-blocking cdn.jsdelivr.net/npm/webmidi@latest <script> that hangs the page when jsdelivr's @latest resolution stalls. Self-host webmidi v3.1.16 alongside the other flat static JS (tree.js, spss.js, mini-coi.js) — build.sh's `cp static/*` is non-recursive, so it goes in static/ root rather than a vendor/ subdir — and reference it via the same-origin <base href="/run/">. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6d7b3f9 commit ad8ad2d

4 files changed

Lines changed: 23268 additions & 2 deletions

File tree

tulip/amyboardweb/static/editor/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<script src="editor_knobs.js"></script>
5454
<script src="./mini-coi.js" scope="./"></script>
5555
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
56-
<script src="https://cdn.jsdelivr.net/npm/webmidi@latest/dist/iife/webmidi.iife.js"></script>
56+
<script src="vendor/webmidi.iife.js"></script>
5757
<script src="vendor/qwerty-hancock.min.js"></script>
5858
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/codemirror.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
5959
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/mode/python/python.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

0 commit comments

Comments
 (0)