feat(settings): export / import your data (#114) #454

Merged
jared merged 1 commits from feat/data-export into lotus 2026-10-25 02:16:05 -04:00
Owner

Fixes #114. Owner decisions 2026-10-25: all your Lotus data (soundboard clips as links), merge and ask on conflicts, and a new "Your data" section under Settings → General (next to Sync).

Defaults for the issue's other questions:

  • Encryption keys: stay in their separate passphrase export; this file never holds secrets.
  • Versioning: the file is version-stamped. Newer files are refused with "made by a newer Lotus Chat, update first", and older ones have a place to be migrated.

Export: one JSON file, lotus-chat-data-<user>-<date>.json, containing:

  • synced settings, bookmarks, private notes about people, your names for rooms, room sections/sidebar, reminders, status presets, thread notification settings, timed mutes;
  • the soundboard (references; the clips stay on the server), your emoji/sticker packs, and packs enabled everywhere;
  • the avatar decoration, and this device's settings.

It doesn't include messages (Export Room History covers those) or encryption keys.

Import: pick a file, see a per-category summary, then confirm.

  • The summary looks like: "Bookmarks: 1 new", "Private notes about people: 1 differ", "Synced settings: already up to date".
  • New items are added. When things differ, a choice appears: Keep mine (default) or Use the file's.
  • Lists merge by id (e.g. a bookmark's event id) or by content; maps and settings merge by key.
  • A file from another account is allowed, with a note saying whose it is.
  • Only our own account-data types are read from a file, so a crafted file can't write anything else (e.g. push rules).

Tested

  • e2e your-data.spec.ts against a local Synapse:
    • export downloads a valid file with both bookmarks;
    • after removing a bookmark and changing a note, the import summary shows "1 new" and "1 differ";
    • Keep mine brings the bookmark back and leaves the changed note;
    • importing again with Use the file's restores the note;
    • a wrong file gets "This isn't a Lotus Chat data file."
  • Unit tests: 4 new (allow-list, parse incl. newer versions and foreign types, merge rules, plan); 1,437 pass. Lint is at 29.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #114. Owner decisions 2026-10-25: **all your Lotus data** (soundboard clips as links), **merge and ask on conflicts**, and a **new "Your data" section** under Settings → General (next to Sync). Defaults for the issue's other questions: - **Encryption keys:** stay in their separate passphrase export; this file never holds secrets. - **Versioning:** the file is version-stamped. Newer files are refused with "made by a newer Lotus Chat, update first", and older ones have a place to be migrated. **Export:** one JSON file, `lotus-chat-data-<user>-<date>.json`, containing: - synced settings, bookmarks, private notes about people, your names for rooms, room sections/sidebar, reminders, status presets, thread notification settings, timed mutes; - the soundboard (references; the clips stay on the server), your emoji/sticker packs, and packs enabled everywhere; - the avatar decoration, and this device's settings. It doesn't include messages (Export Room History covers those) or encryption keys. **Import:** pick a file, see a per-category summary, then confirm. - The summary looks like: "Bookmarks: 1 new", "Private notes about people: 1 differ", "Synced settings: already up to date". - **New items are added.** When things differ, a choice appears: **Keep mine** (default) or **Use the file's**. - Lists merge by id (e.g. a bookmark's event id) or by content; maps and settings merge by key. - A file from another account is allowed, with a note saying whose it is. - Only our own account-data types are read from a file, so a crafted file can't write anything else (e.g. push rules). **Tested** - **e2e `your-data.spec.ts`** against a local Synapse: - export downloads a valid file with both bookmarks; - after removing a bookmark and changing a note, the import summary shows "1 new" and "1 differ"; - **Keep mine** brings the bookmark back and leaves the changed note; - importing again with **Use the file's** restores the note; - a wrong file gets "This isn't a Lotus Chat data file." - **Unit tests:** 4 new (allow-list, parse incl. newer versions and foreign types, merge rules, plan); 1,437 pass. Lint is at 29. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-25 01:09:02 -04:00
feat(settings): export / import your data (#114)
CI / Build & Quality Checks (push) Skipped
CI / Secret scan (gitleaks) (push) Skipped
CI / Playwright smoke (e2e) (push) Skipped
CI / Build & Quality Checks (pull_request) Successful in 3m38s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 14s
CI / Playwright smoke (e2e) (pull_request) Successful in 22m30s
378b40fabe
Settings -> General -> "Your data": Export writes one JSON file of the
account's Lotus data (synced settings, bookmarks, private notes, room names
and sections, reminders, status presets, thread notification settings,
timed mutes, soundboard (clips stay on the server), emoji packs, avatar
decoration, and this device's settings). Not messages or encryption keys:
they have their own exports, and keys are secret.

Import merges: new items are added; things that differ are listed per
category and kept unless the user picks "Use the file's". Only our own
account-data types are read from a file. Files from a newer Lotus Chat
are refused with a plain message; the version stamp leaves room to
migrate older ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared scheduled this pull request to auto merge when all checks succeed 2026-10-25 01:09:11 -04:00
jared merged commit f8fa1ca5ed into lotus 2026-10-25 02:16:05 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#454