“With all due respect, I don’t get confused,” Nikki Haley, the United Nations ambassador , memorably once snapped to a reporter , after a senior — and, unsurprisingly, male — White House official attributed a tough position she’d announced on sanctioning Russia to “momentary confusion.”

While Ms. Haley might not have gotten confused herself, she could at times present a confusing picture. She could talk as bluntly as the president himself about the failings of the United Nations system, and yet, more quietly, she proved a practitioner of multilateral diplomacy.

In an administration that prizes lock-step loyalty, Ms. Haley managed to hold to at least some of her own priorities, and as a result she appears to be that rarest of Trump appointees: one who can exit the administration with her dignity largely intact. She announced on Tuesday that she would step down at the end of the year.