With an expired US visa, you will not need a UK DATV to transit Heathrow if and only if it's been less than 6 months since you last entered the US, and it is up to the airline to check that you comply with this requirement. Since you're not switching flights, you definitely won't clear immigration, though there are still rules for airside transit (not involving UK immigration)
An I-797 extension letter in and of itself will not do for a visa holder, only for a permanent resident (green card holder).
A Manual from the Home office states:
Expired I-551 Green Cards issued after 21 April 1998 can be accepted if the passenger also has a valid I-797 letter authorising the extension of the card
DATV nationals may TWOV airside if they satisfy the three conditions set out above at 2.6 and have one of the exemption documents listed in section 2.5 OR one of the additional exemption documents listed below:
When the passenger has a valid visa for USA, Australia, Canada, New Zealand
When the passenger is travelling from Australia, Canada, New Zealand or the United States of America and has a valid ticket to travel through the UK not more than six months after he entered one of these countries with a valid visa.
Furthermore, Timatic, a database used by Airlines, states:
Passengers may make a landside transit if traveling from Australia, Canada, New Zealand or USA, provided transiting the United Kingdom less than 6 months after the date they last entered Australia, Canada, New Zealand or USA with a valid visa for the respective country, even though the visa may have expired at the time of transit through the United Kingdom.
As such, the I-797 is useless to you, because you're an H1B visa holder and not a green card holder.
Consequently, if you last entered the US less than 6 months ago, you will not need a UK DATV. Otherwise, you will need a UK DATV