fix(desktop): the show's receiver gets the selected project's OSC target - #111
Merged
Conversation
The receiver reads BEYOND_HOST/FB4_HOST/ROUTING_CONFIG from process.env only, which the desktop app never set: paint reached the brain over the WebSocket and nothing reached BEYOND, while the OSC debugger (which reads the store directly) drove the lasers fine. Share the CLI's config-to-env projection from @wavegrid/layout, apply it before starting the in-process receiver, and reset config-derived keys per start so a project switch cannot keep firing at the previous project's target. Surface the receiver's outputs so a console-only show says so instead of looking healthy.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Starting a show from the desktop app painted fine over the WebSocket but drove nothing, while Advanced → OSC controlled the lasers. Cause:
startReceiverpicks its outputs fromprocess.env(BEYOND_HOST/FB4_HOST/ROUTING_CONFIG), never from theResolvedConfigit is handed — and the desktop app only set state/log/device vars, so the receiver came up withConsoleOutputalone and reported no error.The config→env projection that the CLI already had (
configEnvMap) moves into@wavegrid/layoutnext to the loader that parses it back, and the desktop app applies it before starting the receiver:resetConfigEnv(config, ambient)rather thanapplyConfigToEnv, because the Electron process outlives project switches: for every config-derived key it restores the operator's process-start value if there was one, else the new project's value, else deletes it — so a console-only project can't keep firing at the previous project's BEYOND host.resolveProjectConfig()loads against a snapshot of the ambient env taken at module load for the same reason.Projects that configure
osc.routing(a spec, not a file) now get a per-device routing file generated into the project's state dir andROUTING_CONFIGpointed at it; an invalid spec throws with the validation problems instead of silently leaving the show targetless.So a dark rig is visible rather than inferred,
ReceiverHandlenow exposes the labels it already logs, and the UI reads them:Show screen warns "Console only — no OSC output" in that case; Advanced → OSC additionally warns when the project you're debugging isn't the project the running show is driving, so the debugger and the show path can no longer disagree without saying so.
Link to Devin session: https://app.devin.ai/sessions/ec43152136134467a853ec0bbf783ea9
Requested by: @pyramation