From edeb5491620d2e4d59d90b3f015071487dd43968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=B3=AF=20=F0=9F=90=B1?= Date: Mon, 13 Apr 2026 17:00:29 +0800 Subject: [PATCH] fix(board): use plain number refs in event payloads OGraph Engine expects ref fields (subject, assignee) as plain numbers, not {ref: N} objects. The old format caused 500 errors on event emit. --- packages/board/src/api/ograph-client.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/board/src/api/ograph-client.ts b/packages/board/src/api/ograph-client.ts index c2e60c9..ff2ea4c 100644 --- a/packages/board/src/api/ograph-client.ts +++ b/packages/board/src/api/ograph-client.ts @@ -132,7 +132,7 @@ export class OGraphClient implements TaskAPI { body: JSON.stringify({ type: "task_created", payload: { - subject: { ref: obj.id }, + subject: obj.id, title: data.title, priority: data.priority ?? "p2", ...(data.description ? { description: data.description } : {}), @@ -147,8 +147,8 @@ export class OGraphClient implements TaskAPI { body: JSON.stringify({ type: "task_assigned", payload: { - subject: { ref: obj.id }, - assignee: { ref: data.assigneeId }, + subject: obj.id, + assignee: data.assigneeId, }, }), }) @@ -162,7 +162,7 @@ export class OGraphClient implements TaskAPI { body: JSON.stringify({ type: "task_status_changed", payload: { - subject: { ref: obj.id }, + subject: obj.id, status, }, }), @@ -194,7 +194,7 @@ export class OGraphClient implements TaskAPI { body: JSON.stringify({ type: "task_status_changed", payload: { - subject: { ref: id }, + subject: id, status: data.status, }, }), @@ -209,8 +209,8 @@ export class OGraphClient implements TaskAPI { body: JSON.stringify({ type: "task_assigned", payload: { - subject: { ref: id }, - assignee: data.assigneeId ? { ref: data.assigneeId } : null, + subject: id, + assignee: data.assigneeId ?? null, }, }), }) @@ -241,7 +241,7 @@ export class OGraphClient implements TaskAPI { body: JSON.stringify({ type: "task_status_changed", payload: { - subject: { ref: _id }, + subject: _id, status: "done", }, }), @@ -254,7 +254,7 @@ export class OGraphClient implements TaskAPI { body: JSON.stringify({ type: "task_status_changed", payload: { - subject: { ref: id }, + subject: id, status, }, }),