I got the visa somewhere around in may 2015 from company "S" till June 2018. My i94 is also expiring on June 2018.

Then i switched the company from "S" to "C" and i got the i797 till December 2018.

my question is do i need to leave the country before june because my i-94(which is stamped on my passport) or i can stay till December 2018?

Another thing, My wife who is on H4, She went to India last year(May 2017), but she forget to show the latest i-797 copy so she again got the i-94 till June 2018(Which was before when i was in company "S"). Do she need to leave the country?

Please suggest.