-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Is there an existing issue for this?
- I have searched the existing issues and didn't find mine.
Steps to reproduce
Summary
When typing in the editor with auto-save enabled, a race condition occurs that causes the file's previous content to be overwritten with an empty file. This issue happens more frequently when working on projects with multiple files. As a result, previously written code suddenly disappears and is replaced by an empty file.
Steps to Reproduce
- Open Maestro Mobile on Windows 10 (64-bit).
- Create or open a project containing multiple files.
- Open one file in the code editor.
- Type several lines quickly.
- Auto-save triggers.
- Switch to another file or continue typing.
- Randomly, the file content becomes empty after an auto-save event.
Suspected Root Cause
- Race condition in the auto-save handler.
- The write operation may occur before the editor finishes updating its internal buffer.
- Multiple auto-save events might be firing in parallel.
Temporary Workaround
To prevent data loss while waiting for a fix, disable auto-save:
- Turn off auto-save in the editor settings.
- Save files manually (Ctrl + S) until the race condition is resolved.
Additional Notes
- Issue occurs more often during fast typing or when switching between multiple files.
- Likely related to asynchronous save queue or debounce mechanism.
Actual results
Actual Behavior
- Auto-save performs an overwrite with an empty payload.
- File content becomes empty.
- There appears to be a race condition between the editor’s "edit" event and the auto-save write operation.
Expected results
Expected Behavior
- Auto-save should save only the latest valid editor content.
- It should never overwrite a file with empty data.
- Editor event synchronization should be atomic.
About app
https://maestro.dev/#maestro-studio
About environment
Environment:
- Maestro Mobile
- Windows 10 64-bit
- Multi-file project
Logs
Logs
<!-- Replace this line with your logs. *DO NOT* remove the backticks! -->
Maestro version
0.8.12
How did you install Maestro?
other (please specify in the text area below)
Anything else?
No response
hyry2024
Metadata
Metadata
Assignees
Labels
No labels