Ali reported, "On the day of Uhud, I saw two men on the right and left of the Messenger of Allah ﷺ, dressed in white garments. I had never seen them before, nor did I ever see them afterward." He meant Jibreel and Mikail, peace be upon them.
رأيت عن يمين رسول الله ﷺ وعن شماله يوم أحد رجلين عليهما ثياب بياض، ما رأيتهما قبل ولا بعد، يعني جبريل وميكائيل عليهما السلام.
Bukhari narrated it in the Book of Military Expeditions (4054), and Muslim in the Book of Virtues (2306), both through the route of Saad bin Ibrahim, from his father (that is, Ibrahim bin Abdul-Rahman bin Awf), from Saad bin Abu Waqqas, who related it. The wording given is that of Muslim. In Bukhari's wording it reads, "The two of them were fighting for him, wearing white garments, fighting as fiercely as possible." That was after the Prophet ﷺ had been wounded and there were fears for his safety. As for why the angels did not take part in fighting the polytheists, that was because of the polytheists' disobedience to the ruling of Allah, the Exalted, in His saying,"O you who believe, obey Allah and obey the Messenger and those in authority among you" [Nisa 4:59]and so the victory turned into a defeat.