French picks the past tense by aspect, not by time. Use the imparfait for what used to happen repeatedly, for description and background scenery, and for an action still in progress; use the passé composé for a single, completed event that moves the story forward — typically the one that interrupts the imparfait.
Examples
- Pendant que je préparais le dîner, les enfants sont rentrés.
- While I was making dinner, the children came home.
- Il faisait nuit et il pleuvait quand le train est arrivé.
- It was dark and it was raining when the train arrived.
- Tous les étés, nous allions à la mer, mais en 2019 nous sommes restés à Paris.
- Every summer we used to go to the sea, but in 2019 we stayed in Paris.
The mistake to avoid
Don't choose the tense from how long the action lasted — a finished, bounded period still takes the passé composé ("j'ai habité deux ans à Lyon", not "j'habitais deux ans à Lyon").
Where this fits in
The imperfect: past habits & descriptions, French B1: Use the imparfait to talk about how things used to be, describe the past, and narrate ongoing actions interrupted by another event.