Hi, The sentence She asked me what I had been doing when she saw me is OK. The clause when she saw me is an adverbial of time qualifying the verb had been doing so tere is no need to change it into when she had seen me .
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.