Unfortunately I don’t know where to find the documentation for the javascript code, I’ve always just reached for the Programming Phoenix book. Hopefully someone can enlighten us both.
It is all in the phoenix javascript file at the top, decently documented.
In the next Phoenix version it will be documented in the main phoenix docs too!
But yes, returning a :reply instead of :noreply is the way to do it. The javascript API lets you listen for responses to a given message as well (something like channel.push(...).on("ok", fn).on("error", fn).on("timeout", fn) or something like that, all documented in the javascript file.