I don't know about non-dual intent visas such as the TN, but IIRC, for dual intent and immigrant visas, your passport MUST be valid for at least 6 months after the date your visa is added to your passport. If your current
TN expires in May and your passport expires in July, you may well need to renew it before the TN expires.
There are new rules for Canadians living in the US to renew, check out the Passport Canada website for full details:
Simplified Passport Renewal for Canadians in U.S. / Renouvellement de passport simplifié pour Canadiens aux É-U
From Connect2Canada / Lien Canada
Today at 11:43am
Canadians living in the United States will now be able to apply for a Canadian passport by mail using the new, simplified passport renewal process. The process allows eligible applicants to apply using a shorter application form, without a guarantor, and without submitting proof of Canadian citizenship and supporting identification. Renewal applications are, however, subject to all current security verifications. The applicant must provide a completed form, including the current fee, two new photos, and their most recent passport.
In widening the eligibility for the simplified renewal process, Passport Canada aims to improve accessibility to Canadian passport services and increase client satisfaction.
A full list of eligibility requirements and the new form are available at
www.passportcanada.gc.ca.