Skip to content

Add periodic auto-save feature#3031

Merged
HelioGuilherme66 merged 3 commits intorobotframework:developfrom
chelslava:feature/auto-save-interval-v2
Apr 12, 2026
Merged

Add periodic auto-save feature#3031
HelioGuilherme66 merged 3 commits intorobotframework:developfrom
chelslava:feature/auto-save-interval-v2

Conversation

@chelslava
Copy link
Copy Markdown

Summary

Closes #1376

Adds a periodic auto-save feature that automatically saves all modified files at a configurable interval.

Changes

  • Added auto-save interval setting to preferences
  • Added auto-save timer in mainframe
  • Default interval: 0 (disabled)


def _on_auto_save(self, event):
"""Auto-save all files when timer fires."""
_ = event
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid breaking translation function, when we use it, we should use:
__ = event

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do a change and new commit. It must be double underscore to not change the original function.

__ = event  # Not _ = event 

Copy link
Copy Markdown
Member

@HelioGuilherme66 HelioGuilherme66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comment.

Copy link
Copy Markdown
Member

@HelioGuilherme66 HelioGuilherme66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the reset of the timer.

@HelioGuilherme66 HelioGuilherme66 added the enhancement Request for improvement: either for an existing feature or a new one label Apr 11, 2026
@HelioGuilherme66 HelioGuilherme66 added this to the v2.3 milestone Apr 11, 2026
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)
@HelioGuilherme66 HelioGuilherme66 merged commit 17b0b99 into robotframework:develop Apr 12, 2026
5 checks passed
@chelslava chelslava deleted the feature/auto-save-interval-v2 branch April 12, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Request for improvement: either for an existing feature or a new one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants