Bug: Published suggestion always reported as having changes

The notebook Prim’s Algorithm V / Fabian Iwand | Observable is a published fork for which I also opened a suggestion. The notebook has no changes but is still reported as having changed.

Clicking “Publish” reloads the page, but does not change the state. If I view the history I can see that no additional revisions are created.

1 Like

Are you referring to the suggestion header?

52%20AM

That’s saying you have an open (un-merged or un-closed) suggestion, and the “View changes” link will compare your fork to its parent.

Or are you referring to the unpublished (or unshared) changes header?

30%20AM

If you’re seeing that, it means you’ve edited the notebook since you last published or shared. You can review your changes by clicking the “View changes” link or, more explicitly, by clicking History in the notebook menu, which will show you something like:

46%20AM

If you clicked “View changes”, the compare may still show no differences if you’ve edited and then manually reverted those changes (e.g., pinning and then unpinning a cell, as above). Also, the compare view currently doesn’t make it clear when the changes involving pinning or moving cells; it only shows additions, modifications, and removals.

We’d like the unpublished changes message to be based on a content hash rather than the version number, but we haven’t implemented this yet. We’re also hoping to find a way to have the compare view reveal these other types of changes.

Also, if you don’t want your changes, you can click Revert in the notebook menu and the message will go away.

@mbostock Sorry if my description wasn’t clear enough:

  1. There are no changes.
  2. Revert has no effect.
  3. After publishing the notebook and reloading the page, “Publish” is again highlighted.

Are there any errors you’re seeing in the developer console? You can also send me screenshots privately.

Nope, none at all.

/document/24994f3f1cca8080/publish payload:

{"token":"7be***f8c","version":227,"title":"Prim’s Algorithm V","unlisted":false}

… response:

{"id":"24994f3f1cca8080","slug":"prims-algorithm-v","version":227,"title":"Prim’s Algorithm V","update_time":"2019-08-10T16:19:09.949Z"}

Clicking “Revert” does not produce any requests.

Screencap:

My guess would be that it’s caused by the notebook being published and at the same time being an unmerged suggestion.

Thanks for the additional detail. I will investigate.

Please let me know if there’s anything else I can do to help.

I’ve been able to reproduce this issue. We should have a fix shortly.

1 Like

This has been fixed. Let me know if you still encounter this problem.

Looks good, thanks for the quick fix! Out of curiosity, would you be willing to share some details about the root cause?

It was a bug in the way that our server calculated if a notebook had any unpublished changes; one that was introduced after we added the ability to revert a notebook to any past version.

1 Like