I was watching TV when Yumi came over.

Literal

Yumi [subject-が] come-[past-た] time I [topic-は] TV [object-を] watch-[past-progressive-ていた].

A clean 'when' construction using [verb-た]とき. Note the subject marking inside the subordinate clause is が ('Yumi が came'), while the main clause topic is marked with は ('I は was watching'). This is the standard Japanese subject/topic split in complex sentences.