refactor(web/config): separate shared config from web-only block + version it#266
Open
ryanontheinside wants to merge 1 commit into
Open
refactor(web/config): separate shared config from web-only block + version it#266ryanontheinside wants to merge 1 commit into
ryanontheinside wants to merge 1 commit into
Conversation
…rsion it
config.json mixed engine/generation intent with this demo's UI settings and
had no schema version. Split it so the config object is portable across
frontends (web demo, VST, Ableton M4L, MCP/headless):
- Add top-level `version` to tag the shared schema.
- Shared (top-level): engine, prompts, controls, channel_ranges, seed,
swap_source_mode. channel_ranges stays shared because per-channel
{min,max,reverse} is a control-surface contract a native plugin's knob
layout would also honor, not web chrome.
- `web` block (browser-demo-only): effects, audio (LUFS), reset_seconds,
denoise_session_gate, restart_song_on_swap. Named `web` rather than `ui`
since every frontend has a UI; other frontends ignore this block.
- normalizeConfigShape() lifts a pre-`web` flat config into the new shape on
load/import, so older config.json files and exported sounds keep working.
Updated all consumers (useRenderLoop, useFixtureSwap, useStartSession,
PerformanceShell) and the type/merge/apply/capture paths in lib/config.ts.
typecheck clean; 47 unit tests pass. (replay tier has a pre-existing failure
on main, unrelated to this change.)
This was referenced Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Splits the rtmg web demo's
config.jsoninto a portable shared config object and a browser-demo-onlywebblock, and adds aversionfield.version,engine,prompts,controls,channel_ranges,seed,swap_source_mode— engine/generation intent plus the control surface that any frontend driving DEMON consumes.webblock:effects,audio(LUFS),reset_seconds,denoise_session_gate,restart_song_on_swap— browser-demo presentation/playback. Namedwebrather thanuibecause every frontend (VST, M4L, browser) has a UI; other frontends read the shared fields and keep their own equivalent of this block.channel_rangesstays shared: per-channel{min,max,reverse}is a control-surface contract a native plugin's knob layout would honor, not web chrome.normalizeConfigShape()lifts pre-webflat configs into the new shape on load/import, so olderconfig.jsonfiles and exported sounds keep working.Why
config.jsonmixed engine/generation intent with this demo's UI settings and had no schema version. The goal is one config object sharable across frontends (web demo, VST, Ableton M4L, MCP/headless).Tests
tsc --noEmitcleanmain(stale telemetry fields in canonical fixtures), unrelated to this change.Companion
Mirrored in the public demo: daydreamlive/demon-public-demo#357