past verb + ところだった= Major difference from るところだった?


おや もう到着ですか

空想を楽しんでいたところだったのに

How does たところだった here work?

I understand

るところだった is "I almost did x" but how does it work with the past version then?

<https://nihongonosensei.net/?p=12827>

This site seems to suggest it's also used for past, however all examples of
ところだった reference the non past version.

Is he still saying "I was almost enjoying the daydream" here too?




The plain use of ～る・～たところだ・だった ignoring it's use with conditionals for the
moment, is simply a means of setting the relative time of an event.

するところだ 'is about to [just going to] do'

するところだった 'was about to [just going to] do'

したところだ 'has just done'

したところだった 'had just done'

Extending this to the example with 楽しんでいたところ, 'I had just been enjoying a
daydream'.

The sense of 'almost' that you mention comes especially with sentences
introduced with もうそこし・ちょっとで:

もう少しで行かないところだった "I almost didn't go"

As per the link in sundowner's comment, it can also be used in counterfactual
conditionals.

