Skip to content

fix(control): keep OSC input up across config pushes, repair the OSCQuery tree - #741

Merged
CaYatur merged 1 commit into
mainfrom
fix/osc-release-blockers
Oct 12, 2026
Merged

CaYatur merged 1 commit into
mainfrom
fix/osc-release-blockers

Conversation

@CaYatur

@CaYatur CaYatur commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Pre-release review of the OSC work merged since #729 (#733, #735–#740). Everything below was measured on an isolated copy (temporary userData; lights, MCP and stream off) with a UDP sender, an HTTP client and an mDNS listener.

Restart on every config push

  • applyIncomingConfig calls syncOscServer() on every push. That includes slider drags and the push the panel makes after each incoming OSC message.

  • The rewritten osc-server.start() and osc-query.start() always tear down and rebuild. Every push rebound the UDP v4 and v6 sockets, restarted the OSCQuery HTTP server and re-announced mDNS.

  • Results over 30 pushes:

    before after
    Message counter stuck at 0 climbs (140 → 170)
    OSCQuery GETs answered 27/30 (3 refused) 30/30
    mDNS announcements 10 0
  • syncOscServer now keys on the UDP and OSCQuery ports. Prefix and mappings are read live and need no restart. A port that failed to bind is not retried on every push; the panel's osc:sync (port field, toggle) forces a restart.

OSCQuery tree lost 12 of 51 addresses

  • The /visualizer and /background value leaves overwrote the branches of the same name. All visualizer and background sliders were missing, and GET /cayadev/visualizer/glow returned 404.
  • A node now keeps both its value and its contents, which OSCQuery allows.

GET /constructor threw in the main process

  • Any inherited name resolved to a function and JSON.stringify returned undefined. Buffer.byteLength then threw; the fault guard logged it and the request hung.
  • The server listens on 0.0.0.0, so any LAN host could trigger this.
  • Lookups now use own properties, and an unserialisable body answers 404.
  • 100k random and truncated datagrams through osc-mdns answer/questions and parsePacket threw nothing.

Master opacity on a transparent background

  • The black veil darkened the desktop or OBS behind the window. On a transparent background the page itself now fades.
  • Measured: opaque background, master 0.5 → veil 0.5. Transparent background, master 0.5 → veil 0, body opacity 0.5.
  • Applying a scene keeps master: 0.3 stayed 0.3.

Preview double render

  • drawOnce ran a full stack render on every setConfig while the rAF loop was also drawing. It now draws only when the loop is paused, which is the case it was added for.

Docs

  • Levels, the spectrum, analysis and hits are measured by an open output: a screen, the floating window or Spout/Syphon.
  • With only the panel open, /level was 0/s and the clock about 15/s. With a screen open, /level and /spectrum were about 22/s.
  • This is now stated in the panel (with EN) and in both READMEs.

Tests: tests/osc-release-review.test.js has 7 tests. All 7 fail on main and pass here. Full suite 2993/2993; smoke PASS with the userData checksum unchanged.

Refs #695

…uery tree

- Every config push (slider drags, and the push after each incoming OSC
  message) restarted the UDP listeners, the OSCQuery HTTP server and the mDNS
  announcement. Measured on an isolated copy: the message counter reset to 0
  on every push, 3 of 30 OSCQuery requests were refused during 30 pushes and
  10 mDNS announcements went out. syncOscServer now keys on the UDP and
  OSCQuery ports; the panel's explicit sync still forces a restart. After:
  counter climbs, 30/30 requests answered, no announcements.
- The /visualizer and /background leaves overwrote the branches of the same
  name, so 12 of 51 OSCQuery addresses were missing (visualizer and
  background sliders, GET /cayadev/visualizer/glow returned 404). A node now
  keeps both its value and its contents.
- GET /constructor (any inherited name) resolved to a function, could not be
  serialised and threw in the main process; the request hung. Lookups use
  own properties and an unserialisable body answers 404.
- Master opacity laid a black veil over transparent windows. On a
  transparent background the page itself now fades.
- The preview drew an extra frame on every config change while its loop was
  already drawing; drawOnce now only runs when the loop is paused.
- Panel and README note that levels, hits and analysis need an open output.

Refs #695

Co-authored-by: caganturgut <271973834+caganturgut@users.noreply.github.com>
@cayadraft

cayadraft Bot commented Oct 12, 2026

Copy link
Copy Markdown

@CaYatur

CaYaDraft — pull request

Summary
fix(control): keep OSC input up across config pushes, repair the OSCQuery tree

Files
README.md (modified, +7/-5)
@@ -17,7 +17,7 @@ layers and 40 GPU effects, an OBS overlay, Spout / Syphon, **project
Downloads
License: MIT
[![Platform](https://img.shields.io/badge/platform-Windows%20%…

README.tr.md (modified, +6/-3)
@@ -18,7 +18,7 @@ destesi**, ve MCP üzerinden yapay zekâ kontrolü.
İndirme
Lisans: MIT
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-111997.sv…

ROADMAP.md (modified, +2/-2)
@@ -129,9 +129,9 @@ npm test
npm start -- --smoke


-- **2986 unit tests, all passing** on `main`. 703 of those shipped in v3.1.0;
+- **2993 unit tests, all passing** on `main`. 703 of those shipped in v3.1.0;
  105 came with v3.1.1; 163 came with v3.1.2; 157 came with v3.1.3 — 1128 at
-  that tag — 469 more with v3.1.4, most of them from the MilkDrop work, and 1103
+  that tag — 469 more…

src/admin/control.js (modified, +1/-0)
@@ -913,6 +913,7 @@
      class: 'studio-note',
      text: 'Ek hedefler satır satır: 10.0.0.8:9001 ya da [::1]:9001. Pozitif gecikme saati geri alır; hoparlör geç kalıyorsa ışık onu bekler.',
    }));
+    nodes.push(el('div', { class: 'studio-note', text: 'Seviye, tayf ve vuruşları açık bir çıkış ölçer: ekran, yüzen pencere ya da Spout/Syphon. Yalnız panel açıkken saat ve gösteri durumu gide…

src/admin/preview.js (modified, +4/-0)
@@ -240,7 +240,11 @@
    }
  }

+  /* Duraklatılmış önizlemede tek kare: yeni kapak ya da ayar görünsün.
+     Döngü çalışıyorsa bir sonraki karesi zaten çizer; burada çizmek
+     kaydırıcı sürüklerken kareyi ikiye katlıyordu. */
  function drawOnce() {
+    if (raf && !paused && !document.hidden) return;
    const now = performance.now();
    renderFrame(now, 0.016, now / 1000);
  }

src/main/main.js (modified, +24/-4)
@@ -3255,6 +3255,14 @@ function syncOpenRgb(opts) {

let oscInGen = 0;
let lastOscInStatus = null;
+/* Çalışan dinleyicinin anahtarı (UDP portu ve OSCQuery portu) ve süren
+   açılış. applyIncomingConfig her ayar gönderiminde buraya geliyor: kaydırıcı
+   sürüklerken ve her gelen OSC iletis…

**Note**
The local model is unavailable, so this is only the title and file list.

---
Stopping here. I will not merge, push, or change this pull request until you ask.

`/caya explain` describes the diff. `/caya plan` previews the next edit. `/caya revise` adds a commit.

<!-- cayadraft -->

@CaYatur
CaYatur merged commit 66449f0 into main Oct 12, 2026
5 checks passed
@CaYatur
CaYatur deleted the fix/osc-release-blockers branch October 12, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant