Where is the code for pinning topics in categories?

The trickiest thing I’ve encountered so far in trying to develop with Discourse is simply finding where the code resides that handles a given view or action. Could be bc I’m new to Ember–or perhaps its the nature of Ember…

In the hopes of understanding this better, and also bc this is something I want to implement: Where is the code that handles pinning topics on the categories page?

I see a categories topic list template here, but I’m struggling to sort out what other template files relate to that view, and where the logic is that controls it (such as by pinning topics).

Any help is appreciated. Thanks.