fix(#960): wrap app_goto_target coordinates in array#962
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const handler = this.adapter.deviceFeatureHandlers.get(duid); | ||
| if (!handler) throw new Error(`No handler for DUID ${duid}`); | ||
|
|
||
| await this.adapter.requestsHandler.command(handler, duid, "app_goto_target", points); | ||
| await this.adapter.requestsHandler.command(handler, duid, "app_goto_target", [points]); |
There was a problem hiding this comment.
Avoid nesting goto target coordinates
The socket handler now wraps the validated [x,y] coordinates in another array before sending the command, so requestsHandler will emit [[x,y]] for app_goto_target calls coming from the websocket/map UI. The other call path for this command in src/main.ts (lines 259‑265) forwards the parsed JSON directly and documents the expected format as "[x,y]", so the backend and devices still expect a flat array. This inconsistency means goto commands sent via the socket now use a different shape and will be rejected while the state-based path still works. Please keep the payload shape consistent with the documented flat [x,y] format or update all callers/protocol handling together.
Useful? React with 👍 / 👎.
This reverts commit 8d2b8de.
No description provided.