🏠 back to Observable

Bug: Changes indicator in notebook listings shows false positives for reverts

So, so sorry for already hitting you with a new bug report. :pleading_face:

My notebook Attraction is shown as having unpublished changes:

The history shows 6 changes since the last published version, followed by a revert. But on the notebook page the publish button is disabled:


Edit: Something looks very wrong. There are way too many notebooks shown as having unpublished changes. The ones I checked all have a revert as the last history entry.
Is there any chance the last published version after a revert didn’t / doesn’t get tracked properly?

Yep, this is a known bug. The unpublished changes indicator in notebook listings currently shows false positives if a notebook has been reverted. We know how to fix it but it hasn’t shipped yet. Thank you for the report.

Thanks, I’ve updated the topic title to better describe the bug.

You’re probably aware, but I’d still like to point out that the History also marks the wrong version as published.

I don’t think I am aware of this issue. Can you provide more detail? (I’ve seen many cases where history correctly shows reverts back to the currently published version.)

If the notebook was reverted the history shows the revision as published to which the revert was made, not the one making the revert:

Examples (all have newer versions than the one reported as published, but a disabled published button - also, I’m pretty certain most if not all were published):

Please note that this also affects the pinned notebook URL at the top of v3 files.

Isn’t that the correct behavior? If you published at 276, made some changes, and then reverted to 276, then 276 is the currently published version. (In other words, reverts are like aliases. You can’t publish a version at a revert—you publish the version you reverted to.)

1 Like

That’s weird. I could have sworn that I always had to republish after a revert (i.e., the publish button was highlighted, and publishing had an effect). Edit: The faulty behavior of the changes indicator makes me think this has been changed recently?

You do have to republish after revert (if you published changes that you want to revert), but when you do so you are republishing at the (old) version you reverted to.

Then my memory must be messing with me. From what I recall (and recall being annoyed by) the workflow always was:

  1. publish a notebook
  2. make some experimental changes
  3. revert changes back to published version
  4. be required to publish again to get rid of blue publish button, even though there are no differences.

¯\_(ツ)_/¯

You don’t need to republish if you’ve reverted back to the currently published version. The blue publish button goes away on revert.

(The blue dot in the listing is not going away currently, which is the bug we’ve been discussing, because it is using the wrong logic to determine whether there are any unpublished changes.)

Yes, I’m fully aware (I even ran through the steps to check the current behavior). What I tried to explain above in response to

was that I had memorized step 4 as being a required step, and I suggested that the behavior might have changed very recently (step 4 no longer being required). But for whatever reason I seem to misremember, so: point taken. :slight_smile:

1 Like

We’ve disabled the needs-republish indicator blue dot for now. We’ll add it back when we’ve fixed the logic to handle reverts.