Digging into Git history, these dependencies were introduced recently, in c03ec9e by @matmarex. Couldn’t the styles (and scripts and MediaWiki messages) be loaded only when the user actually clicks the toggle link (which happens very rarely compared to the page loads that include the ext.flaggedRevs.advanced module)? Instead of showing an incomplete diff with a spinner while loading the actual diff, it could show just a spinner while the actual diff and the necessary ResourceLoader modules and MediaWiki messages are loading.
That was in
AugustSeptember and did not cause issues at the time. The problematic styles were added in a3f03245 in October.
I know that your commit didn’t directly/immediately cause the display issue, I just realized that it causes unnecessary styles to be loaded – it makes readers load diff styles, which they likely won’t ever see applied, so not only do they have extra CSS to be processed, they also have to load them from the server (for the first time), as it wouldn’t appear in the client-side cache otherwise.
Sure, they could.
Should I create a new task for that?
Yeah, if you think that needs to be changed, please do.