Skip to content

Add periodic auto-save feature#3021

Closed
chelslava wants to merge 27 commits intorobotframework:masterfrom
chelslava:feature/auto-save-interval
Closed

Add periodic auto-save feature#3021
chelslava wants to merge 27 commits intorobotframework:masterfrom
chelslava:feature/auto-save-interval

Conversation

@chelslava
Copy link
Copy Markdown

Summary

Adds a configurable periodic auto-save feature to prevent data loss from crashes or accidental closures.

Changes

settings.cfg

  • Added auto save interval setting (default: 0 = disabled)
  • Values: 0 (disabled), 1, 2, 3, 5, 10, 15, 20, 30 minutes

mainframe.py

  • Added _auto_save_timer using wx.Timer
  • Timer fires at configured interval and saves all dirty files
  • Timer automatically updates when settings change
  • Status bar shows "Auto-saved all files" message when triggered
  • Timer properly stopped on application close

saving.py (Preferences)

  • Added "Auto save interval (minutes)" dropdown in Saving preferences
  • Options: 0 (disabled), 1, 2, 3, 5, 10, 15, 20, 30 minutes
  • Help text explains the feature

User Experience

  1. User opens Tools > Preferences > Saving
  2. Sets "Auto save interval" to desired value (e.g., 5 minutes)
  3. RIDE automatically saves all modified files every 5 minutes
  4. Status bar confirms when auto-save occurs

Benefits

  • Prevents data loss from crashes
  • Reduces anxiety about saving work
  • Minimal performance impact (only saves when dirty)

Testing

  • Python syntax validation passed
  • Timer starts/stops correctly
  • Settings change updates timer immediately

HelioGuilherme66 and others added 27 commits January 8, 2026 00:17
* New Crowdin updates (robotframework#2993)

* Prepare Release 2.2rc1 (robotframework#2986)

* Fix missing text colorization in suites and tests settings in Grid Editor

* Fix crashes when editing Tree items.

* Fix location comment based on develop (robotframework#2980)

* update the location comment of RIDE.pot

* Update location comments for bg_BG

* Update location comments for bs_BA

* Update location comments for cs_CZ

* Update location comments for da_DK

* Update location comments for de_DE

* Update location comments for en_US

* Update location comments for en_ES

* Update location comments for fi_FI

* Update location comments for fr_FR

* Update location comments for hi_IN

* Update location comments for hu_HU

* Update location comments for it_IT

* Update location comments for ja_JP

* Update location comments for ko_KR

* Update location comments for nl_NL

* Update location comments for pl_PL

* Update location comments for pt_BR

* Update location comments for pt_PT

* Update location comments for ro_RO

* Update location comments for ru_RU

* Update location comments for sv_SE

* Update location comments for th_TH

* Update location comments for tr_TR

* Update location comments for uk_UA

* Update location comments for vi_VN

* Update location comments for zh_TW

* Add .vscode and *.po~ into gitignore

* Update location comments for zh_CN

* Modify geni18n to make it compatible with cross-platform

* Update path to tools for non Debian based Linuxes (robotframework#2981)

* DevOps: Remove codeboarding actions

* Update zh_CN translations: Menu contexts, About Panel (robotframework#2982)

* Add Chinese Simplified Translator

* zh_CN translation: About panel

* zh_CN translation: Menu context

* Project settings (robotframework#2985)

* Initial creation of settings if .robot directory exists in project dir.

* Correct settings to edit, ut always starts with wrong. Ignore command line arguments

* Still does not update preferences colors. Needs to reload Text Editor and Test Runner

* Improve settings change in Tree when changed project. TODO reload plugins

* Fix opening last file, independent of project settings

* Initial dialog to restart RIDE, when project settings detected

* Working Reload on project settings. Missing restore on not project, fix exceptions.

* Complete project settings detection and restore

* Implenent project settings in Windows

* Initial utest for Project Settings.

* Fix background color in Run Anything. Remove wong files from utest

* Fix unit test for project settings

* Add protection for first time install. Add pip upgrade to actions

* Upgrade SonarCube scanner

* Prepare release 2.2rc1

---------

Co-authored-by: Cherry_ChenNan <45916506+RipplePiam@users.noreply.github.com>

* Update translations

---------

Co-authored-by: Cherry_ChenNan <45916506+RipplePiam@users.noreply.github.com>

* Fixed Cut (Ctrl-X) in cell content edit in Grid Editor

* Development version

* Fix size of folders tree in File Explorer

* Add SeleniumTestability to the list of known Libraries

---------

Co-authored-by: Cherry_ChenNan <45916506+RipplePiam@users.noreply.github.com>
Convert .format() style to f-strings in log output.

Closes robotframework#2554
…oller' (robotframework#3012)

- Add datafile_controller property to Project class that returns self.controller
- Add null checks in _ImportSuggester to handle when datafile_controller is None

This fixes the crash when using Library Finder on a clean install without an open project.

Closes robotframework#2989
…obotframework#3013)

- Add migration from settings version 8 to 9 that ensures General section exists with all required keys
- Add safe access to General settings in application.py, mainframe.py, treeplugin.py, and dialog.py
- Use .get() with fallback values instead of direct dictionary access
- This prevents KeyError when user settings file is missing or corrupted

Closes robotframework#3000
- Added 'auto save interval' setting (0 = disabled, 1-30 minutes)
- Timer automatically saves all dirty files at specified interval
- Settings can be configured in Tools > Preferences > Saving
- Timer updates when settings change
- Status bar shows 'Auto-saved all files' message when triggered

This prevents data loss in case of crashes or accidental closures.
@chelslava
Copy link
Copy Markdown
Author

Recreating PR with clean branch

@chelslava chelslava closed this Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants