My phone flips between the local API (home — dev build pointed at mac-mini.local:3001) and prod (away — prod build on api.lucidity.my) using the in-app Dev/Prod switch. That works for the phone. The problem is the daemon's room is a separate static config (~/.lucidity/config.json apiUrl) that doesn't follow the switch — so every time I move between home and away, the phone and daemon end up in different rooms and the phone shows a permanent "Your Mac is offline" until I manually repoint the daemon and restart it.
Caught this red-handed with the new room diagnostics panel: phone on mac-mini.local:3001 reporting presence daemon=false, while the daemon was still dialing prod. The socket was healthy the whole time — there was just nobody home in that room.
The clean fix is to let the daemon hold connections to more than one room at once — e.g. always dial prod, and also dial the local API whenever it's reachable — so whichever room my phone lands in, the Mac is already there. Then the away→home transition just works and there's no manual daemon step. It's a contained change to the daemon's room client: dial a list of URLs instead of one, each with its own reconnect loop (roomUrl/startRoomClient in apps/daemon/src/room/client.ts), and de-dupe the harness dispatch so the same request can't be served twice if both rooms ever carry it.
A lighter alternative would be a tiny lucidity home / lucidity away command that flips the config and restarts the daemon — but dual-dial removes the step entirely, which is what I actually want.
My phone flips between the local API (home — dev build pointed at
mac-mini.local:3001) and prod (away — prod build onapi.lucidity.my) using the in-app Dev/Prod switch. That works for the phone. The problem is the daemon's room is a separate static config (~/.lucidity/config.jsonapiUrl) that doesn't follow the switch — so every time I move between home and away, the phone and daemon end up in different rooms and the phone shows a permanent "Your Mac is offline" until I manually repoint the daemon and restart it.Caught this red-handed with the new room diagnostics panel: phone on
mac-mini.local:3001reportingpresence daemon=false, while the daemon was still dialing prod. The socket was healthy the whole time — there was just nobody home in that room.The clean fix is to let the daemon hold connections to more than one room at once — e.g. always dial prod, and also dial the local API whenever it's reachable — so whichever room my phone lands in, the Mac is already there. Then the away→home transition just works and there's no manual daemon step. It's a contained change to the daemon's room client: dial a list of URLs instead of one, each with its own reconnect loop (
roomUrl/startRoomClientinapps/daemon/src/room/client.ts), and de-dupe the harness dispatch so the same request can't be served twice if both rooms ever carry it.A lighter alternative would be a tiny
lucidity home/lucidity awaycommand that flips the config and restarts the daemon — but dual-dial removes the step entirely, which is what I actually want.