Skip to content

fix(mongo): confirm before Refresh reloads a dirty document editor #870

Description

@ZhuchkaTriplesix

Summary

#782 registers dirty JSON with UnsavedWorkRegistry for Back / Home / Close. Breadcrumb Refresh still bumps refreshTokenMongoDocumentEditor.didUpdateWidget calls _reloadFromServer() with no confirm. Dirty text is replaced from the server (or cleared on error).

Repro

  1. Open a document, edit JSON (unsaved).
  2. 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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrontendTheme parser epic label: frontenduxUser experience, keyboard shortcuts and interactions

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions