Temporal/conditional idhā introduces a time or condition. Sudden-event idhā introduces an unexpected situation. Identical spelling does not guarantee identical syntax.
Additional example: أَزُورُكَ إِذَا رَجَعَ أَبُوكَ.
I shall visit you when your father returns.
Idhā: future-time adverb; rajaʿa: verb; abūka: subject nominative by wāw and muḍāf.
Book example: خَرَجْتُ فَإِذَا السَّبُعُ وَاقِفٌ.
I went out and suddenly a beast was standing.
Here idhā expresses surprise; al-sabuʿu is subject and wāqifun its predicate.