fix(web): force remount KG entity detail dialog on entity change

Add key={viewEntity?.id} to prevent stale relations/traversal data
when switching between entities without closing the dialog.
This commit is contained in:
viettranx committed 2026-04-02 15:01:20 +07:00
1 parent 19d8faf28f
commit 9c92dead74
1 file changed
+1
@@ -199,6 +199,7 @@ export function KGEntitiesTab({ agentId, userId }: KGEntitiesTabProps) {
{/* Entity detail dialog */}
<KGEntityDetailDialog
key={viewEntity?.id}
open={!!viewEntity}
onOpenChange={(open) => !open && setViewEntity(null)}
agentId={agentId}