"Messages by channel" user stats includes private modmail threads
Is this desired behaviour?

Nope, but there isn't anything we can really do about it right now. It would be fixed by #699. (See also #850.)
I might work on that then. Is there an existing list of designations that we'd like for categories?
The ones that make sense to me to be able to apply to categories are Unmoderated, CountsTowardsParticipation, and IgnoredFromStarboard
Revisiting this, I've had a few ideas on how to implement a fix and tidy up the stats overall:
- Create a
ChannelFlags/CategoryFlagstype(s) that work similar to how @patrickklaeren implemented them in Accord (I really don't feel like designation is the right term for this functionality). We could go with either inclusive or exclusive default behaviour, that is either collect stats for all channels and then filter out withChanneFlags.IgnoredFromStatsor only selectively include from channels withChannelFlags.IncludedInStats. - As for threads showing up in stats, it maybe makes sense to aggregate those under their parent channel. For forum channels, they could show under a single stat, e.g.
help (forum)
Any thoughts/input before I delve more into the specific behaviour of the flags?
Additional: Probably a good idea to move the "flaggy" designations Unmoderated, CountsTowardsParticipation, and IgnoreFromStarboard to the new flags enums as part of this fix.
Also relevant to this are #699 and #850
Would Channel Flags be functionally identical to Channel Designations internally, just a more accurate name and maybe better UI? If so, I'm not opposed to just renaming Channel (and Role) Designations to Flags.
I agree about threads. For stats, participation in the forum channel in aggregate is really the stat we care about.
No, there should be a distinct difference.
Designations designate a channel for a dedicated purpose, i.e. the promotion log or starboard - the primary reason for that channel existing.
Flags are more implicit, they'll alter the behaviour of commands or processes in the background - the channel still exists for another reason, i.e. general chat or the help forum.
Does that make sense? I'm struggling to vocalise exactly what I mean, so if it doesn't let me know and I'll try to elaborate a bit more.
I'm not sure I understand the benefit of splitting the concepts. A designation is as much a flag as a flag is a designation? Designation is an established concept that can be refactored to be more lean here.