Not sure if this is the best place to put this, but hopefully it helps the next guy who tries to figure this out.
By “mark activity”, I think a lot of devs think of this like when you click on the Prosemirror editor Atlassian has setup for Jira, and the buttons are highlighted depending on what marks are currently active.
For example, if I have a bullet-list item that has bolded text and the caret cursor is currently there, then the menu-bar would look like this:

At the same time, notice how the text type can only be set to “Normal text”, because you can’t have a heading inside a bullet list. This is what the:
let active = command(this.editorView.state, null, this.editorView);
line does. If you’re not allowed to use that mark (or its already been added to the selection), then it will return false. Indeed this is what @marijn refers to when he says to look at how toggleMarks
is implemented internally:
/// ...
/// Will return `false` when the current selection
/// doesn't support that mark. This will remove the mark if any marks
/// of that type exist in the selection, or add it otherwise.
/// ...
I think that’s the distinction that’s confusing people (it confused me, but thankfully I’ve become aware).
You can confirm this to be the case as well for the editor menu example, as when you bold some text and move the cursor in-between the bolded text, nothing happens to the menu bar:
https://prosemirror.net/examples/menu/
Hope this helps someone. Liberty speed your step.