Warning the Disobedient
Allah says;
وقل اعملوا فسيرى الله عملكم ورسوله والمومنون وستردون إلى عالم الغيب والشهادة فينبيكم بما كنتم تعملون
And say "Do deeds! Allah will see your deeds, and (so will) His Messenger and the believers. And you will be brought back to the All-Knower of the unseen and the seen. Then He will inform you of what you used to do.''
Mujahid said that;
this Ayah carries a warning from Allah to those who defy His orders. Their deeds will be shown to Allah, Blessed and Most Honored, and to the Messenger and the believers. This will certainly occur on the Day of Resurrection, just as Allah said,
يوميذ تعرضون ﻻ تخفى منكم خافية
That Day shall you be brought to Judgement, not a secret of you will be hidden. (69:18)
يوم تبلى السرآير
The Day when all the secrets will be examined. (86:9)
and,
وحصل ما فى الصدور
And that which is in the breasts (of men) shall be made known. (100:10)
Allah might also expose some deeds to the people in this life.
Al-Bukhari said that Aishah said,
"If the good deeds of a Muslim person please you, then say,
اعملوا فسيرى الله عملكم ورسوله والمومنون
Do deeds! Allah will see your deeds, and (so will) His Messenger and the believers.''
There is a Hadith that carries a similar meaning.
Imam Ahmad recorded that Anas said that the Messenger of Allah said,
ﻻ عليكم أن تعجبوا بٲحد حتى تنظروا بم يختم له فٳن العامل يعمل زمانا من عمره أو برهة من دهره بعمل صالح لو مات عليه دخل الجنة ثم يتحول فيعمل عمﻼ سييا
وإن العبد ليعمل البرهة من دهره بعمل سيء لو مات عليه دخل النار ثم يتحول فيعمل عمﻼإ صالحا وإذا أراد الله بعبده خيرا استعمله قبل موته
Do not be pleased with someone's deeds until you see what his deeds in the end will be like. Verily, one might work for some time of his life with good deeds, so that if he dies while doing it, he will enter Paradise. However, he changes and commits evil deeds.
one might commit evil deeds for some time in his life, so that if he dies while doing them he will enter the Fire. However, he changes and performs good deeds. If Allah wants the good of a servant He employs him before he dies.
He was asked, "How would Allah employ him, O Allah's
Messenger!'' He said,
يوفقه لعمل صالح ثم يقبضه عليه
He directs him to perform good deeds and takes his life in that condition.
Only Imam Ahmad collected this Hadith