Thank you so much for your explanations.
I see the tenses in these examples are different, and I find it confusing. Shouldn't 'is' work with 'done'?
The only good thing he has done for his village was to help build the bridge.
The only good thing he has done for his village is to help build the bridge.
Is works here because of
has (both present tense).
Two times are implicit in the context: the one time he did a good thing, and now, when he has done only that one good thing.
That one thing the only good thing he did, and it still the only good thing he has done because he has done anything good since then.
He n't done anything good except for one time: that time when he build the bridge.
Logically, building the bridge was doing something, but built the bridge is not doing anything, so I find the following sentence B more logical than A:
A.
The only good thing he has done is that/
when he has helped build the bridge.
B.
The only good thing he has done is that/
when he helped build the bridge.
And
was can work because it agrees with
helped:
C.
The only good thing he has done was that/
when he helped build the bridge.
Using
when makes the purpose for
was clearer, but using
that does not make
was wrong.
If we remove the tense from
helped by replacing
that he helped with
to help,
was has the additional purpose of supplying the correct implicit time to the infinitive, to avoid "to helped", which works in its way but, like sentence A, is less logical.