Hide non-display roles in chat, and fix live role updates - #1652
Merged
Merged
Conversation
The role tag next to a name in chat wasn't checking the Display Role permission at all, so separator/organizational roles showed up there even though they're already hidden everywhere else. Chat still falls back to the default role so there's always something to show. While in there, fixed two related realtime gaps: editing a role's own permissions/color didn't update anyone already looking at a member with that role (member list or chat) until a full reload, and giving/removing someone a role didn't move them between member list sections either - both now update live.
SigmaTel71
approved these changes
Aug 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1479. Rather than adding a new setting, this reuses the existing "Display Role" permission that role admins can already toggle per role. The chat window's role tag next to a username was pulling from a member's raw highest-authority role, completely ignoring that permission — so a separator/organizational role with Display Role turned off would still show up beside people's names in chat, even though it's already correctly hidden in the member list.
While tracking this down, found and fixed two related realtime gaps in the same area: editing a role's own permissions or color (e.g. toggling Display Role) didn't update anyone already looking at a member with that role until a full client reload, and giving or removing someone's role didn't move them between member list sections either — both now update instantly.
Changes
GetAuthorRoleTag()/GetAuthorColor()inMessageComponent.razornow go through aGetChatDisplayedRole()helper that skips roles without the Display Role permission, same as the member list already does, falling back to the default (@everyone) role so chat always shows somethingUserInfoComponent.razorandMessageComponent.razorboth now subscribe to role updates (Planet.Roles.Changed) and recompute a member's shown color/tag live when a role they hold has its permissions or color editedMemberListComponent.razorhad aDetermineDisplayedRole(member)method that already did the work of moving a member between role sections, but nothing ever called it — the handler for a member's role change was a literal// TODOstub. Wired it up so gaining/losing a role now re-buckets the member list live instead of requiring a rejoinTest plan