Summary
#782 registers dirty JSON with UnsavedWorkRegistry for Back / Home / Close. Breadcrumb Refresh still bumps refreshToken → MongoDocumentEditor.didUpdateWidget calls _reloadFromServer() with no confirm. Dirty text is replaced from the server (or cleared on error).
Repro
- Open a document, edit JSON (unsaved).
- Click Refresh in the explorer breadcrumb.
Expected: discard dialog; Cancel keeps the buffer. Actual: editor reloads; _dirty = false.
Scope
- Confirm via
confirmDiscardUnsavedWorkIfNeeded (or editor-local dialog) before _reloadFromServer when _dirty.
- Widget test: dirty editor + refreshToken change does not rewrite text until confirmed.
Out of scope
- Collection-list stale after Save (separate issue).
- Redis string-key Refresh (separate issue).
Summary
#782 registers dirty JSON with
UnsavedWorkRegistryfor Back / Home / Close. Breadcrumb Refresh still bumpsrefreshToken→MongoDocumentEditor.didUpdateWidgetcalls_reloadFromServer()with no confirm. Dirty text is replaced from the server (or cleared on error).Repro
Expected: discard dialog; Cancel keeps the buffer. Actual: editor reloads;
_dirty = false.Scope
confirmDiscardUnsavedWorkIfNeeded(or editor-local dialog) before_reloadFromServerwhen_dirty.Out of scope