Moin reported a regression where diff comparisons between post revisions become invisible if an intermediate revision is hidden. Previously, users could view a consolidated diff between the last visible revision and the current public version. The current behavior prevents this, significantly hindering the review of edits in documentation and wiki topics, especially when revisions are automatically hidden due to settings like hide email address taken or hidden tags. Moin emphasized that showing diffs between public revisions does not leak sensitive information contained solely within the hidden revisions, as the public content itself remains visible.
stefanhn and sam debated the security implications. sam explained that hiding revisions is often treated as a security measure to prevent leakage of specific data (e.g., a password or name) that might appear in adjacent diffs or later versions. To ensure absolute security, the system was changed to hide diffs entirely when any revision in the history chain is hidden. This “atomic” approach guarantees that no hidden information is leaked, even if it requires complex logic to determine exactly which diffs are safe to show. stefanhn argued this was a misunderstanding of the original feature, which was intended for cosmetic history cleanup rather than strict security, and that the new behavior makes edit history unusable for moderators and editors.
Following the discussion, a fix was proposed. meta-bot submitted PR #46846, which restores the ability to view a diff between the last accessible revision and the current public revision. The update ensures that hidden intermediate revisions and their specific edit reasons remain excluded from the view, maintaining security guarantees, while allowing users to see aggregate changes between public states. This addresses the usability regression for document editors while preserving the security benefits of hiding sensitive content.
On some posts, the edit history is not as helpful as it used to be because changes aren’t shown. (This might be different for users with extended permissions here on Meta; in that case, logging out or using a test user might help to reproduce the issue.)
I think the problem is caused by hidden revisions. Previously, this didn’t result in the broken state where I cannot get any information about the change. Instead, I saw a diff between two revisions that were not hidden. That wasn’t always ideal because it looked like someone added something that was actually added by someone else whose revision was hidden. But at least it was possible to tell what had changed recently.
I only have a quite old screenshot showing how this used to look:
This is the combined view of my and Hugh’s edit on Moving posts to a new or existing topic. I took it because I was confused that my edit wasn’t visible. It is visible now because JammyDodger fixed that back then.
The information is still public. I could still compare the current version of the post to the prior version I can see in the history, but I need to copy it and use a separate tool for that now. Is it possible to show the diff between unhidden revisions again? Maybe all editors could be shown if the information about who edited the post is not covered by hiding the revision - it’s currently shown, while it wasn’t before.
Especially here on Meta, where hidden tags often trigger an edit to be hidden without staff manually hiding it, I miss being able to easily see what has changed.
I think often you don’t hide those revisions intentionally, but it just happens. For example, I recently edited Homepage Feature, and I cannot see what I did, but I doubt anyone of you decided to hide my edit right when I did it.
At the same time, I can see revision 11 and the current version to get the diff that was shown to me before the behavior was changed. I still don’t really understand why it’s a problem to show the diff between v11 and v14, as you used to, when I can use another tool to get that.
As I said, I understand why the consolidated diff was a little confusing. But even though it, for example, combined 2 edits, it helped to tell me which parts might have changed. That’s why I miss seeing a diff between the public revisions -any changes from the hidden revision that are still in the public topic are public anyways.
I would appreciate it if we didn’t close the topic. Showing the reason why it’s not shown doesn’t solve the missing ability to get an overview of what has changed.
Hi, I’m only now noticing this now – I guess I haven’t done the “role play as a user with fewer permissions” thing often enough in our forum – but this seems to be a significant UI regression,[1] and also I’m having a very hard time understanding why the diffs were ever made invisible in the first place!
Has this all started just as a fencepost problem, and with a dumb false security issue that never was an issue in the first place!? The commit I linked above introduces a logic called “suppress_hidden_diffs”. But diffs were never meant to be hidden, were there? The UI is for hiding revisions (which are the fence posts, not the fences; i.e. the historical states, not the diffs between them).
I used to commonly use hidden revisions also just to clean up edit histories; e.g. to incorporate a later typo fix with the previous one; or to do a revert and remove two history entries to make it disappear from history
this is particularly annyoing as it retroactively (majorly) changes how all existing and hand-tested cases of making edit histories look nice are displayed ↩︎
LLMs are great at finding edge cases and in this case we were treating hiding diffs as a security feature, not as a cosmetic feature. So edge cases were found and edge cases fixed.
I think that if your intent was for turning off edit_history_visible_to_public just to be a cosmetic thing I would recommend just leaving it on, cosmetics can be done in a theme component if we must.
The previous version of my message maybe got a bit long and ranty.. (click to see it anyway)
I find the new behavior weird for security-motivated removals, too, though.
The previous behavior was completely adequate. Just hide all the revisions that contain the security sensitive information. Leave those that are fine. The diffs that users would be shown then would only be based on those revisions that are still visible.
Perhaps the only thing that was missing was a more intuitive UI, for instance an easy way to view an edit history as-if you weren’t permitted to see hidden entries. (Perhaps a “reveal hidden revisions” button. Similar to deleted content where it’s also obvious what less priviledged users can and cannot see.)
This change just takes away so much control now. Touch anything and half of your entire edit history is semi-invisible now. (I’d also call this - remarkably - a result that’s now much harder to ever intuitively understand. On top of that, there’s also an added “unlisted” option now, which makes it even harder to ever understand how to properly hide something and what exactly is or isn’t hidden.)
The only up side may be that it’s easier to hide something by doing the conceptually wrong thing now. Which is also a downside, because that becomes an argument against ever reverting this change
So I would stand on my interpretation that this can have been a misunderstanding of what security was supposed to be offered in the first place; if a human can make fencepost errors, an LLM can, too.
LLMs are great at finding edge cases
but they can also make up edge cases. False bug reports from LLMs are extremely common.
On the other hand, if this was some deliberate decision and change - and addressing any real concerns - it would be nice to be able to understand what the exact broken behavior was.
Is there any way to at least find out more on that at least? If I’m going to have edit histories broken for ever now for “security” reasony, then I’d at least want to understand for what purpose…
## Source
- Patch Triage: https://patch.discourse.org/patch-triage/965
- Original commit:
but this “patch-triage” link - if there was any additional info to be found there - seems to be access protected, so it looks like it won’t help me either.
Thank you for coming in to reply here @sam. TL;DR: I still feel strongly like the wrong things may have been “fixed” here but have little information & context: is there any way to find out any additional details about what the supposed security issue was meant to be in the first place?
Going by the commit and Advisory I’ve linked before, I only have a very minimal summary of
Post revision that should be hidden to regular users can be leaked through visible diffs on adjacent revisions
to work with here.
(I had also done a longer session with ChatGPT Pro on this before my reply yesterday, to make sure I’m not missing anything obvious from my practical experience of how the implementation used to work; but it wasn’t able to point out more context, nor did it give me any better explanations for the change, either.)
If an admin wants to hide fact “Jane was here”, it needs to be hidden from multiple unrelated revisions.
Edit 2 discloses it even though it does not touch the text. Edit 3 discloses it event though it just deletes the text.
Edit 4 discloses nothing, but figuring that out is very complicated.
So we hide all of them.
We went with an atomic rule here, and it sucks usability wise but does provide gurantees that nobody finds out Jane was here. This can be an issue if Edit 2 for example was a password, there is some legitimacy here.
I think the fundamental issue here is that your community interpreted the feature as a simple “make UX less annoying to navigate when digging through edits” and some other communities treat it as “oh no … disaster, bad info in edit… get rid of revision remove password from post”
I don’t think there is an easy winning approach here. Doing a hunk based provenance walk of the history is going to be very complicated and also undesirable anyway for your use case.
I think a hidden revision hid further revisions for years. I remember discussing that with JammyDodger 2.5 years ago. Though we didn’t understand why so many revisions on Documentation were hidden back then. I wish there was a better solution than hiding every edit for the next few years, just because one had to be hidden in the past. It would be great if staff would mark a revision as ‘clean’ to stop further revisions from being hidden automatically. It makes editing wikis more complicated.
But this is not what I was reporting here. What changed recently is that users can no longer see the diff between the last version they are allowed to see and the current version, which is public anyway.
Let’s add a step to your example:
As a user, I can still see the diff between original and edit 1, because that revision isn’t hidden. Before the change earlier this year, the other diff I could see was edit 1 compared to the current, public version of the post. I can still do that by copying edit 1 from the revision diff, copying the public version of the post, and putting both in a comparison tool, but I can no longer see it right in Discourse.
There is no potentially sensitive information involved. Neither the public edit nor the public version contains it.
This is what I would like to see again:
version x
version x+1
Bob is here
Bob was here
This used to work until summer, and of course it only showed the resulting diff, which made it more difficult to spot the most recent change, but I had an idea of which sections might have changed without using external tools.
I think it was easier when hidden edits were just skipped for normal users. Showing them just removes a diff that was helpful and leaks the edit reason that used to be hidden. It could contain sensitive data too.
Is there any chance for someone the take a look at the docs here on Meta and unlock revisions where possible? I don’t think there is a reason to hide the recent edits for example in Searching for content effectively. This affects many docs/wikis on Meta
They don’t. It just happens, probably because an earlier revision was hidden. I don’t think anyone chose to hide my edit on Homepage Feature. It was hidden right after I saved it. This happens in many topics here. I think James created an internal topic about 2.5 years ago. Back then, I thought it might be related to hidden tags. Now I assume it’s because you hide every revision after one was hidden, because
Oh, I think I’m starting to understand of the UI issue(s) here. I tend to use the side-by-side view for edits most of the time anyway, so for me a case like this would have been as simple as just clicking through the history, and clicking the hide button on every page where “Jane” is visible on the left hand side of the screen.
For comparison: If I need to delete a reply in a thread, I click on the reply and delete it, I don’t expect (nor want) it to also delete all other replies (or the whole thread) [note that this even has safety implications is someone quoted the deleted comment in-thread, or from elsewhere].
It works fine because the UI is designed such that it’s immediately obvious what a public user will see.
To be fair, I also - if I recall correctly - thought of the edit history more as a sequence of patches at first. But if you press the “revert to revision N” button once, it quickly becomes clear the underlying model is about the states, not the diffs. (E.g. reverting won’t undo just the diff merged onto the latest state.)
It’s not a simple black and white. Hiding revisions is only something mods can do (and we have few mods). I did use the feature to get rid of private information someone shared, too.
They are still skipped from what I can tell. All changes just added more and more stuff that’s also hidden in addition to fully skipping the hidden edit.
Like taking the example here of
Original: Bob
Edit 1: Jane was here
Edit 2: Jane was here, John was here
Edit 3: John was here
Edit 4: Bob was here
With everything visible that displays as 4 edits:
[authora,reasonz,timestamp1] Bob → Jane was here
[authorb,reasony,timestamp2] Jane was here → Jane was here, John was here | (A)
[authorc,reasonx,timestamp3] Jane was here, John was here → John was here | (B)
[authord,reasonw,timestamp4] John was here → Bob was here
Each arrow pair representing a side-by-side / diff.
If you were to click “hide” on only the second one [I’ve marked (A)] that used to just hide the left-hand-side “Jane was here” version of the post (and make it look as if the previous edit had incorporated that same change with it[1], and thus the view to unprivileged users into looking like this:
[after hiding one “Jane” revisions (A)]
[authora,reasonz,timestamp1] Bob → Jane was here, John was here
[authorc,reasonx,timestamp3] Jane was here, John was here → John was here | (B)
[authord,reasonw,timestamp4] John was here → Bob was here
You would also have had to click hide for the edit marked I’ve marked (B) to instead get
[after hiding both “Jane” revisions (A), (B)]
[authora,reasonz,timestamp1] Bob → John was here
[authord,reasonw,timestamp4] John was here → Bob was here
Besides UI shortcomings that moderators / people with the right to see hidden revisions don’t get any preview of how things look like for the public, if I was to look for any missing flexibility here, it might be the attribution. Above, authora for reason z at timestamp 1 is being attributed for larger and larger diffs; and there might be cases where you want to instead indicate that the majority of this change wasn’t by that author (though personally I haven’t yet run into such cases, actually; it usually made the most sense exactly the way it was).
Then, apparently in June this year the logic changed to additionally hide “adjacent” diffs whatever “adjacent” was supposed to mean.
I haven’t tested this detail but I trust a ChatGPT analysis of the ruby code logic, since it also described the old logic I’m familiar with, and the current logic I can easily test correctly to me. So in that change would have made things look like this instead, in both scenarios:
June - November
[after hiding one “Jane” revisions (A)]
[authora,reasonz,timestamp1] hidden
[authorc,reasonx,timestamp3] hidden | (B)
[authord,reasonw,timestamp4] John was here → Bob was here
[after hiding both “Jane” revisions (A), (B)]
[authora,reasonz,timestamp1] hidden
[authord,reasonw,timestamp4] hidden
Where “hidden” was initially blank, and later filled in by some placeholder message.
Note that this hides a lot of extra things now. The hidden edits are still fully skipped. While hiding the revision Jane was here, John was here itsels used to just make it become one larger diff directly from Bob to Jane was here, John was here, it now also hides this larger diff, as well as the next diff after it.
Notably in this case, this also results in the initial state Bob being completely invisible for no good reason. (If there was any previous edit you could still see it in the diff there, but there isn’t in this case.
In November (this month), another change was made to also hide all future revisions after any hidden revision, so it became
[after hiding one “Jane” revisions (A)]
[authora,reasonz,timestamp1] hidden
[authorc,reasonx,timestamp3] hidden | (B)
[authord,reasonw,timestamp4] hidden
[after hiding both “Jane” revisions (A), (B)]
[authora,reasonz,timestamp1] hidden
[authord,reasonw,timestamp4] hidden
Edit: If you want even more useful comparisons - GitHub supports deleting revisions from history, too. It works on exactly the same granularity as Discourse used to work before June; if you select one revision (i.e. historical state) and that is what is removed.
It works different in that it doesn’t make the fact that something was deleted invisible, it works differently in that it doesn’t present things in a different manner to the person who has the right to delete edit entries and anyone else. (This is helped by the fact that these really are deleted - also no undo.) It works different in that it lists initial creation as a separate edit entry. It shows inline-diffs as the default, not side-by-side. If you delete an edit, it deletes the revision on the right-hand-side of that edit not left-hand-side (though given the diffs are inline, there is no left and right).
It works the same as Discourse used to work in that it doesn’t hide any diffs just one revision (i.e. state). It skips the deleted revision and produces a larger combined diff on the adjacent edit. It works different from how Discourse used to work in that it incorporates this diff with the (chronologically) subsequent edit (in GitHub’s the reverse-chronological listing of edits that lies above the deleted edit).
Edit2: To add some judgement, not just facts: I think that Discourse's pre-June-2026 choices here, compared to GitHub, have some (minor but) real advantages.
Of course the ability to unhide is nice and consistent (corresponding well to the ability to undelete replies as well).
Making it so that hiding a revision in a diff-based edit history view applies to making invisible the left-hand-side state allows things to be way more uniform, every edit looks the same including the first and the last. When Discourse shows N pages of edits, GitHub shows N+1; the first edit is post-creation, and it shows an all-green diff.[2] The last edit is the edit going towards the current state. Given how GitHub’s ui deletes a revision corresponding to the new state of the diff UI will reject using the delete button on the latest edit (for obvious reasons, you can hardly hide the current state).[3] Moreover the option to hide a revision was talking about hiding the very same historical state as the button to revert to a revision was discussion for reverting to, that’s also a plus in consistency.[4]
The main thing GitHub really does manages to do vastly and objectively better is to show a user who hides something, accurately, what the thing is that they’ve actually hidden (i.e. what the things is that a user without their same permissions will see).
In my humble opinion, if we could turn back time all the changes since June should be reverted; the data model / backend side from then seems to have been perfectly reasonable[5] and the real UI shortcomings should just be frontend fixes.[6]
Unfortunately, the change is 4 months old, so there might be users since then that want to rely on that what was hidden stays hidden - at least as far as messages newer than the time of upgrade are concerned. Also there was added an “unlist” feature which I have yet to understand the full purpose of TBH.[7] And if you don’t want to revert this “unlist” feature along with everything else, a “simple” revert of the commits in question won’t do it.
if there was no previous edit, it means it looked as if the content was always part of the original post
another great analogy was that that the hidden edit ends up being more or less equivalent to as if it had been a quick fix by the same author as the previous edit but with more delay than needed, to skip creation of a new separate edit ↩︎
Makes sense if your analogy is rather a chain of commits though, because the first commit will always show the files being first added. ↩︎
This really all makes sense for that platform though if you take commits as the assumed familiarity bases on GitHub. A commit is also displayed with a diff towards that commit. Even the reverse-chronological, vertical listing is analogous to commits on GitHub!
It’s okay to be different though. The commit analogy ignores the fact that there’s also a current version of the post, which displays an author as well (incidentally, that’s the latest version with the earliest author. I can even see how these being from opposite ends can motivate the whole set of associations being shifted by one.) ↩︎
And also a feature that comments on GitHub simply don’t have. ↩︎
though I don’t have any old instance running, so I can’t actually test edge cases to be 100% certain ↩︎
I can easily envision a simple design here that would fix all potentail confusion immediately. ↩︎
By the way, that was the main reason I looked into all this. To understand the “unlist” feature and what it does. Only to discover that the hide feature was utterly broken in ways that I cannot even understand it properly anymore. ↩︎
Here is the focused fix, with the same synthetic topic viewed anonymously before and after: five saved versions (1–5), with revision 3 hidden.
Before: the latest history entry only explains why the historical edit cannot be shown.
After: that protection remains, with a separately labelled comparison from the last accessible body (version 2) to the current public body (version 5). It shows “Bob is here” → “Bob was here” and the public troubleshooting addition. This is an aggregate comparison, not attribution of every change to the latest editor.
Hidden intermediate bodies and the hidden edit reason remain excluded. The navigation count is four because the hidden revision is excluded, although five versions were saved. Inline, side-by-side and raw views are supported.
Tests: 450 RSpec examples and 19 QUnit tests passed, along with changed-file lint and the actual app build.