Skip to content

feat(app): Backup in Settings, to save a copy and restore one - #201

Merged
httpsphl merged 2 commits into
mainfrom
feat/backup-screen
Oct 5, 2026
Merged

httpsphl merged 2 commits into
mainfrom
feat/backup-screen

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Third part of backups, stacked on #199 and #200: this diff includes their commits until they merge.

Settings has a new Backup page.

Save a copy

  • The passphrase twice. The button lights up only when both match and have 8 characters or more.
  • backup.export makes the file, then the system's Save dialog keeps it where the owner picks.
  • The page says "Copy saved (1.2 MB)", or that the copy was not saved.

Restore a copy

  • "Choose a copy…" opens the system's Open dialog, showing only .botloft files. This is the new host pickFile.
  • Then "The copy's passphrase" and backup.stage.
  • The page shows when the copy was made, each crew with its number of bots, the work folders that are not in it, and a warning that everything is replaced.
  • Restore and restart calls backup.confirm, then restartDaemon. Cancel calls backup.cancel.

Errors are worded from the daemon's reasons (wrong passphrase, not a copy, newer copy, short passphrase). Texts in en, pt-BR and es.

Spec: 14.2.

Tests: backup.test.tsx covers matching passphrases, Save as, the file filter, a wrong passphrase, the summary, and confirm with restart.

Manual: save a copy, then restore it on a test install, or after pnpm local on the owner's PC with their OK.

backup.stage opens a backup with the passphrase into <home>/restore and
checks its manifest and database; backup.confirm marks it, and on the
next start, before the database opens, the daemon unpacks it, moves the
current database and the whole workspaces_root aside (never deleted),
and puts the backup's in place. backup.cancel drops it. A marker is
cleared first, so a failing backup is not tried forever. Spec 14.2.
Save a copy: the passphrase twice, then the system's Save dialog for the
file the daemon sealed. Restore a copy: the system's Open dialog for a
.botloft file, its passphrase, what the copy holds (crews, bots, the
work folders that are not in it) and Restore and restart. Errors are
worded from the daemon's reasons. The host gains pickFile. Spec 14.2.
@httpsphl
httpsphl enabled auto-merge October 5, 2026 17:54
@httpsphl
httpsphl merged commit 473f483 into main Oct 5, 2026
4 checks passed
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.

1 participant