All it would need to do to fix the bug and add the feature would be to check whether the id is a proposal root and if not omit the 'revision-root' tag and potentially turn the 'reply' into a 'mention'.