When Imam ʿAli (a) was struck by the sword of the accursed Ibn Muljam, was he leading the people in the congregational obligatory prayer, or was he performing the night supererogatory prayers, as some say?

In the Name of Allah, the All-beneficent, the All-merciful
According to the historical reports, Imam ʿAli (a) performed the night prayer in the house of Umm Kulthum; indeed, after he took a nap and saw a dream, he rose and continued his night vigil. He had told his daughter Umm Kulthum to watch for the dawn so that she could inform him of it. After the dawn appeared and drew near, the Imam headed to the mosque. Some sources relate that he performed some litanies (awrad) and post-prayer devotions (taʿqibat), then climbed the minaret and called the adhan, so that the people in Kufa heard him.
Then, after he had woken those sleeping in the mosque, he began the prayer—which was, as it appears, the supererogatory prayer of dawn (nafilat al-fajr), and was not the obligatory prayer—and in this state the accursed Ibn Muljam seized the opportunity and struck the Imam with the sword while he was in that prayer of his.
Then, after Imam al-Hasan (a) came, he led the people in the obligatory prayer in congregation.
Sayed Mahmoud Al-Mosawi