Add periodic auto-save feature#3031
Open
chelslava wants to merge 3 commits intorobotframework:developfrom
Open
Add periodic auto-save feature#3031chelslava wants to merge 3 commits intorobotframework:developfrom
chelslava wants to merge 3 commits intorobotframework:developfrom
Conversation
src/robotide/ui/mainframe.py
Outdated
|
|
||
| def _on_auto_save(self, event): | ||
| """Auto-save all files when timer fires.""" | ||
| _ = event |
Member
There was a problem hiding this comment.
To avoid breaking translation function, when we use it, we should use:
__ = event
Member
There was a problem hiding this comment.
Please do a change and new commit. It must be double underscore to not change the original function.
__ = event # Not _ = event
HelioGuilherme66
approved these changes
Apr 11, 2026
HelioGuilherme66
requested changes
Apr 11, 2026
Member
HelioGuilherme66
left a comment
There was a problem hiding this comment.
Please add the reset of the timer.
The PR review for robotframework#3031 requested that the periodic auto-save timer be reset after a successful auto-save cycle. This change follows the reviewer suggestion by scheduling _start_auto_save_timer with wx.CallAfter, while preserving the double-underscore event placeholder so translations remain intact. A focused regression test now verifies that the restart is scheduled after save completion. Constraint: Keep the fix scoped to the open PR robotframework#3031 review feedback Rejected: Restart the timer inline inside the EVT_TIMER callback | reviewer proposed deferred restart via wx.CallAfter Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep __ = event in _on_auto_save so the _() translation helper is not shadowed Tested: Targeted pytest for test_on_auto_save_restarts_timer_after_save; py_compile on touched files Not-tested: Full GUI-heavy utest/ui/test_mainframe.py module in this environment (wx access violation outside the targeted test)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1376
Adds a periodic auto-save feature that automatically saves all modified files at a configurable interval.
Changes