feat: browser simulator served by the controller, desktop build, browser bridge

- led-simulator: the rig runs the C++ led-driver as WebAssembly (sim-driver/),
  one single-threaded worker per bar, no cross-origin isolation needed. Rooms
  (one JSON per room) with an on-page editor, and a pattern gallery. The
  Python server, Pyodide boot and ring buffer are removed.
- sim-controller sim_rig.c: serves /sim/ from an embedded pack, the page's
  WebSocket and the rooms/flash API. The desktop build embeds it too.
- bridge.c: a "browser" bridge kind that carries ESP-NOW frames to the page;
  devices announced through it are marked sim.
- UI: Simulator in the Menu, split view with resize and pop-out, swipe
  between controller and rig on phones; SIM/REAL badges in Devices.
- Fades: preset pushes and Wi-Fi driver bodies always carry fade and
  beat_time, so "off" no longer inherits an earlier fade.
- Also the sequences-v2 work in progress: desktop port, bridge firmware,
  serial bridge, Wi-Fi drivers, sequence timeline, audio and API changes.
- led-driver: ESP-NOW link, beat sync, control messages, sim hooks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-11-16 19:32:46 +13:00
1 parent 698c1463c0
commit 581b751904
506 files changed
+42336 -3599

No files matched your search

+84
View File
@@ -167,3 +167,87 @@ button.link {
.drawer { width: auto; border-left: none; border-top: 1px solid var(--line); max-height: 50vh; }
.actions { margin-left: 0; }
}
/* ---- rooms and the editor ---- */
.room-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.edit-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.edit-tools[hidden] { display: none; }
.field-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.muted { color: var(--muted); }
select, input {
font: inherit;
color: var(--text);
background: var(--panel-2);
border: 1px solid var(--line);
border-radius: 6px;
padding: 4px 7px;
min-width: 0;
}
input:focus, select:focus { outline: 2px solid #34465f; outline-offset: 0; }
a.button {
display: inline-block;
text-decoration: none;
color: var(--text);
border: 1px solid var(--line);
background: var(--panel-2);
border-radius: 6px;
padding: 5px 11px;
}
a.button:hover { background: #232730; }
button.danger { background: #3a1d22; border-color: #5c2a31; color: #ffd6d6; }
button.danger:hover:not(:disabled) { background: #4a242b; }
.edit-hint {
display: none;
padding: 6px 16px;
background: #1d2a3a;
color: #d6e8ff;
border-bottom: 1px solid #2a405c;
}
body.editing .edit-hint { display: block; }
.note { margin: 0; color: var(--warn); }
.edit-form {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px 10px;
padding: 10px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-2);
}
.edit-form[hidden] { display: none; }
.edit-form label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
.edit-form label:first-child, .edit-form label:nth-child(2) { grid-column: 1 / -1; }
.edit-form button { grid-column: 1 / -1; justify-self: start; }
dialog {
color: var(--text);
background: var(--panel);
border: 1px solid var(--line);
border-radius: 10px;
padding: 16px 18px;
width: min(560px, calc(100vw - 32px));
}
dialog::backdrop { background: rgba(0, 0, 0, .55); }
dialog h2 { margin: 0 0 12px; font-size: 15px; }
dialog form, dialog { display: flex; flex-direction: column; gap: 10px; }
dialog:not([open]) { display: none; }
dialog label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
dialog label.check { flex-direction: row; align-items: center; gap: 6px; }
.dialog-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 6px; }
.error { color: var(--bad); margin: 0; min-height: 1em; }
table.defs { width: 100%; border-collapse: collapse; }
table.defs th { text-align: left; color: var(--muted); font-weight: normal; padding: 4px; }
table.defs td { padding: 4px; }
table.defs input { width: 100%; }
.drawer-body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.drawer-body[hidden] { display: none; }
.drawer-empty { margin: 0; color: var(--muted); }
.drawer-empty[hidden] { display: none; }
.drawer-empty code { color: var(--text); }
/* In the controller's split view (an iframe beside it) */
body.embedded .not-embedded { display: none; }