You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] PermissionViewer: Discord start/restart/reload causes formatting problem #844
Which plugin/theme is this about?
PermissionViewer v1.0.1
Describe the Bug
On Discord start/restart and reload the formatting of permissions looks weird. When you reactivate the plugin after starting/restarting or reloading, it is shown correctly.
To Reproduce
Start discord with the PermissionViewer plugin activated, click on a user and look at the user pop-out.
Expected Behavior
The formatting should be correct on start/restart/reload.
Screenshots
Discord Version
Stable 559653 (3c20cde)
Additional Context
Problem #839 was closed but the formatting issue still exists
I was able to reproduce this as a cold-boot timing issue.
On Discord startup/reload, PermissionsViewer builds/caches the popout permission HTML before Discord has loaded the user-popout role pill class module. That leaves the generated popout markup with missing/stale Discord class names, so the permission pills render warped.
Disabling and re-enabling the plugin fixes it because Discord has already rendered user popouts/roles by then, so the role classes are available.
A cleaner fix is to avoid caching the popout templates in onStart(). Instead:
resolve the popout role classes when a user popout is actually rendered
wait/retry briefly only until the structural role classes are present
optionally copy class names from the live popout role DOM when available
cache the first valid template set after Discord has loaded the real classes
strip unresolved optional template placeholders so {{...}} tokens cannot leak into the DOM
The important classes are the structural role pill ones like role and roleCircle; optional typography/container classes should not block rendering.
Activity
[-][Bug] PermissionViewer: Restart/Reload Causes de-formatting problem[/-][+][Bug] PermissionViewer: Discord start/restart/reload causes formatting problem[/+]XxUnkn0wnxX commentedon Jun 14, 2026
I was able to reproduce this as a cold-boot timing issue.
On Discord startup/reload,
PermissionsViewerbuilds/caches the popout permission HTML before Discord has loaded the user-popout role pill class module. That leaves the generated popout markup with missing/stale Discord class names, so the permission pills render warped.Disabling and re-enabling the plugin fixes it because Discord has already rendered user popouts/roles by then, so the role classes are available.
A cleaner fix is to avoid caching the popout templates in
onStart(). Instead:{{...}}tokens cannot leak into the DOMThe important classes are the structural role pill ones like
roleandroleCircle; optional typography/container classes should not block rendering.