From f16dd4aa22b76e70bb92380b139dc3044893fe52 Mon Sep 17 00:00:00 2001 From: Sean O'Connor Date: Wed, 1 Apr 2026 19:30:51 -0400 Subject: [PATCH] fix: handle namespaced action IDs in animation execution --- src/server/services/robot-communication.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/server/services/robot-communication.ts b/src/server/services/robot-communication.ts index 5f21c64..9617c87 100755 --- a/src/server/services/robot-communication.ts +++ b/src/server/services/robot-communication.ts @@ -218,15 +218,19 @@ export class RobotCommunicationService extends EventEmitter { ): void { const { implementation, parameters, actionId: actionType } = action; - // Use SSH for play_animation actions - if (actionType.startsWith("play_animation_")) { - this.executeAnimationViaSSH(actionType).then(() => { + // Use SSH for play_animation actions (check both namespaced and non-namespaced) + const baseActionId = actionType.includes(".") + ? actionType.split(".").pop() + : actionType; + + if (baseActionId?.startsWith("play_animation_")) { + this.executeAnimationViaSSH(baseActionId).then(() => { this.completeAction(actionId, { success: true, duration: Date.now() - (this.pendingActions.get(actionId)?.startTime || Date.now()), - data: { method: "ssh", action: actionType }, + data: { method: "ssh", action: baseActionId }, }); }).catch((error) => { this.pendingActions.get(actionId)?.reject(error);