I have this question of etiquette. I was wondering if at the end of a discussion in the comment section a question, once my doubt has been clarified, should I add a final comment thanking the person who took the time, or if that is not in tune with the site's etiquette.
We commonly edit out "thanks" from the body of a question (see revision history on this Q). In the question, we want to get as quickly as possible to—and through—the relevant information.
On the other hand, at the end of a comment thread, or after an answer, "thanks" is more tolerated.