See PHI590. This is because PhabricatorPolicyQuery::getDefaultPolicyForObject() returns null for Phriction documents, so PHUIHeaderView can't decide if the current object policy is different from the default.
Digging deeper into the code, it looks like this happens because PhabricatorApplication->getDefaultObjectTypePolicyMap() only fetches an application's custom capabilities, of which Phriction has none.
I'm gonna guess the fix here is either:
- add a "Default View" capability to the Phriction application (which wouldn't change this behavior for all the other applications that don't define custom capabilities)
- decide that this is a bug, and make getDefaultObjectTypePolicyMap() also include the default CAN_VIEW and CAN_EDIT capabilities. I have no idea what the ramifications of that would be.