Skip to content

Conversation

@zeelsheladiya
Copy link

Pull Request

This PR addresses critical issues with the editor's data persistence and state management. It fixes a bug where autosave was failing to trigger and corrects the dirty state logic to accurately reflect unsaved changes, ensuring the indicator clears when content matches the saved version.

Description

  • Fixed a critical bug where the autosave mechanism was not triggering because the onChange callback was not being called in the Editor
  • Refactored BufferStore to include a savedContent field for each buffer.
  • Updated updateBufferContent and markBufferDirty to use savedContent for accurate dirty state calculation. This resolves the issue where the dirty indicator would remain active even after reverting changes to the original state.
  • Ensured that onChange is correctly propagated from useEditorStateStore to the Editor

Screenshots/Videos

Related Issues

Closes # Fixes #

@mehmetozguldev mehmetozguldev self-requested a review December 4, 2025 13:35
@mehmetozguldev mehmetozguldev added the area: editor Specific to editor label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: editor Specific to editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants