Skip to content

Add configurable max auto-backup count (default 3, max 20)#178

Open
duncanplatt wants to merge 2 commits intophotodiode:masterfrom
duncanplatt:feat/max-backups
Open

Add configurable max auto-backup count (default 3, max 20)#178
duncanplatt wants to merge 2 commits intophotodiode:masterfrom
duncanplatt:feat/max-backups

Conversation

@duncanplatt
Copy link
Copy Markdown
Contributor

Replace the hardcoded 3-backup limit with a user-configurable setting.
Adds a number input to the options page, stores the value in extension storage, and trims existing backups immediately when the count is reduced. Also fixes an off-by-one guard in backup loading (i > 3 → i >= autoBackups.length).

Closes #170

backup.create() crashes when a window has no groups in session storage
or a group has no stored rect, both of which can occur after Firefox 148
changed session data behavior (Bug 2002643). This broke both manual
"Save As" and automatic backups since ~January 2026.

- Add null check for groups from getWindowValue, skip windows with no
  group data instead of crashing on groups.sort()
- Add fallback rect {x:0, y:0, w:0.5, h:0.5} when getGroupValue
  returns undefined, matching the default used in view.js
Introduces a new user-configurable option to set the maximum number of automatic backups (1-20, default 3), replacing the previously hardcoded limit of 3. Includes new i18n strings, background handlers, storage functions, and UI controls. The backup trimming logic now uses this dynamic value instead of a fixed number.
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.

More than 3 backups?

1 participant