feat(desktop): Join a brain — receiver-only mode pointed at a remote wavegrid server - #132
Merged
Merged
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Review complete. No blocking issues — approved ✅; 1 nitpick below. 🧹 Nitpicks (1) — 🟢 1 low
PR #132 introduces a brain/receiver role split that lets an instance run as a receiver and join a remote brain, plus receiver-only server skip paths, editable receiver server config, and consolidated secrets/env config handling.
The one kept review finding is a low-severity UI validation gap where a malformed hostless brain URL silently no-ops instead of surfacing an error. Reviewed commit: ea220a0 |
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
A venue laptop can now run the desktop app as only a receiver dialing a remote brain (
ws://orwss://), keeping the Output/OSC editor, OSC debugger and Status/doctor screens. One new optional config key drives everything:How an operator uses it
wss://grace.hipzap.com(or press Use on a scanned LAN brain) → Save / Join. Clearing with Use local brain returns to whole-brain mode.wavegrid projects export --include-secrets/ Desktop Projects → Export) orwavegrid projects secrets set receiverKey(new command). Importing without secrets also means the embedded artist UI shows the brain's login screen (the desktop signs in with the project'sjwtSecret).receiver-only → <url>; doctor probes the remote brain.What changed underneath
configEnvMap:SIMULATOR_URL = receiver.server || ws://localhost:<port>;envLayerreadsSIMULATOR_URLback. NewparseBrainUrl()(validates/normalises) andbrainHttpOrigin()(wss://h→https://h).brain.ts start(): whenreceiver.serveris set →applyReceiverEnv+startReceiveronly,server: null,url = brainHttpOrigin(remote)so the existing laser-view load/embeddedUrlpath points at the remote UI.BrainStatusgainsrole: 'brain' | 'receiver' | nullandremoteUrl;lanUrlsempty,runningBind()/sendToBrain()no-op without a local server.startLocalReceiver/stopLocalReceiver(Restart) work unchanged.wavegrid receiver: precedence--server>receiver.server> mDNS > election > localhost, via a pureresolveUpstream(flag, configured, discover)seam (tested) — an operator who explicitly joined a remote brain is not hijacked by a stray LAN brain, and discovery is skipped entirely when a remote is configured.projects config set receiver.server <url|''>andprojects secrets set <name> [value](password prompt when omitted; newstore.setSecret).@wavegrid/doctor collectDiagnostics: defaults the probed URL toreceiver.server; TCP probe port defaults to 443/80 forwss/wswithout an explicit port.@wavegrid/receiver:?key=composition extracted toupstreamUrl()(tested withwss://);WebSocketInputuntouched —wshandles TLS.cannonmessage format untouched. Tests added in layout, cli, receiver, desktop.Headless Electron verification
Desktop app joined a real CLI brain (
wavegrid serveron :3555, same project) — one receiver connected, port 3000 left unbound, embedded laser UI loaded from the remote origin; Use local brain restarted the local server on :3000.http://foocannot be saved. Not exercised: externalwss:///TLS, scanned-brain Use, physical OSC output.Link to Devin session: https://app.devin.ai/sessions/7d5636b49920476f9207ea9f35045bd1
Open in Devin Desktop: https://app.devin.ai/desktop/session/7d5636b49920476f9207ea9f35045bd1?variant=devin
Requested by: @pyramation