The visit was full of friendly overtures, orchestrated pageantry, business dealmaking, and headline-grabbing sideshows.