Skip to content

fix(#960): wrap app_goto_target coordinates in array#962

Merged
copystring merged 1 commit into
mainfrom
fix/issue-960
Dec 13, 2025
Merged

fix(#960): wrap app_goto_target coordinates in array#962
copystring merged 1 commit into
mainfrom
fix/issue-960

Conversation

@copystring
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/lib/socketHandler.ts
Comment on lines 189 to +192
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]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@copystring copystring merged commit 8d2b8de into main Dec 13, 2025
8 checks passed
@copystring copystring deleted the fix/issue-960 branch December 13, 2025 22:20
copystring added a commit that referenced this pull request Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant