Becoming resident of another country mid year - Selling primary residence

We are filing jointly. We moved to another country to retire in May 2023 and will sell our primary residence in California in the future (let's say in 2026). What are the US federal and California tax implications of moving to another country and be resident of that other country for over 6 months in 2023? For US/California tax purposes, do we have to consider we have “sold” our US primary residence in May 2023? What will the US/California tax implications be for selling our US property in 2026?