How to edit a diagram on a Confluence Cloud page that isn't published?

Existing diagrams cannot be edited from draft or a page that is not in edit mode until they have been edited and published once. Because of the way Cloud handles drafts and attachments, they must be published once to appear in the list of diagrams in a space.

If the macro is not visible on the page, even though your diagram had been previously saved/published, you can recover it from the .tmp file that is attached to that Confluence Cloud page.