How to file jointly when wife doesn't live with me?

I got married in Jan 2021 in India and because of Covid my wife didn't come to USA till Jan 2022. Now I am filing taxes for year 2021 and I am filing jointly. But since my wife never stayed in the same state/country as me for the whole last year, she does not pass the residency test.

I am not sure what status I should be legally filing in for?

She is on H4 dependent Visa, and I am on H1B Visa.

 

There is another issue. She does not have a SSN or an ITIN. She applied for her EAD and SSN but that hasn't arrived yet.

 

I got this question asked in TurboTax,

Tell us the state(s) your spouse lived in

My spouse's state of residence (on December 31, 2021)

Date your spouse became a resident of Foreign or U.S. Possession