Based on your post --(1) while your visa H-1B exists, because you have left the USA for at least a year -- it is no longer valid -- thus for 2018 you would be Non-Resident Alien. (2) if you are permanent resident of Canada, living in Canada , working from home in Canada , your income ( even if paid by an US entity ) does not come under US taxation. Absent some income from US sources ( like rental property, business income, investment income, capital gains etc. ), there is no need for you to file a US return.
What am I missing here?
my understanding and IRS advised me these very vaguely back in 2017 -
Under NAFTA, Canada will get a credit of my taxes once i file with IRS and CRA.
My understanding would be that a Non-Resident Alien, on leaving USA, is effectively surrendering the visa and therefore not any longer valid. Also the income is taxed based on residence i.e. Canada will tax all incomes based on whwre the work is done i.e. irrespective of the ultimate source of income, Canada will tax you on your world income -- the fact that it is coming from a US source is not important. Therefore I am not sure why you are choosing to file a USA 1040/1040-NR because from US perspective active income ( wages ) must be for work done in the USA --- if an USA company has a remote worker ( a Non-Resident Alien ) in South Africa -- he/she has no USA sourced / connected income in the USA and tgherefore does not pay any US taxes.
Also for tax purposes it is the Tax treaty between US and Canada that is in force and generally not NAFTA/USAMC treaty.
Suggest you consult a Canadian Tax professional