Skip to content

fix(backup): version calendar task and note exports - #5958

Draft
RaresKeY wants to merge 2 commits into
odysseus-dev:devfrom
RaresKeY:fix/backup-v2-calendar-task-note
Draft

fix(backup): version calendar task and note exports#5958
RaresKeY wants to merge 2 commits into
odysseus-dev:devfrom
RaresKeY:fix/backup-v2-calendar-task-note

Conversation

@RaresKeY

@RaresKeY RaresKeY commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

Version the mixed-scope Settings backup archive to include calendars, events, tasks, task runs, and notes while retaining import compatibility with version 1 archives. Memories, skills, preferences, calendars, tasks, and notes are selected for the current owner; imported version 2 calendar, task, and note records are stamped with that owner and colliding identifiers are remapped. Presets remain shared across users, while settings and feature flags remain instance-global. Imports also detach external or session-bound state, including webhook tokens, crew/character references, CalDAV remote identifiers, and note uploads. Event datetime normalization keeps timezone semantics consistent, and same-owner imports clear webhook tokens as well.

This change is intentionally stacked on the memory-vector lifecycle change in #5957 because both update backup routes. Review and merge that change first, then rebase this branch before merging.

Target branch

  • This PR targets dev, not main. All PRs land in dev; main is curated by the maintainer at each release. If your PR is on main by accident, click "Edit" on this PR and change the base.

Linked Issue

Fixes #5947

Part of #4377

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)
  • New feature (non-breaking — adds new behaviour)
  • Breaking change (changes or removes existing behaviour)
  • Refactor / cleanup (behaviour unchanged)
  • Documentation only
  • CI / tooling / configuration

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app (docker compose up or uvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.

Automated backup and memory suites passed, but the Settings import/export flow has not yet been exercised in a live application against a large or migrated SQLite database.

How to Test

  1. Run pytest -q tests/test_backup_v2_database_domains.py tests/test_memory_vector_lifecycle.py tests/test_embedding_lanes_memory.py tests/test_app_initializer_memory_vector_degraded.py; the refreshed stacked head reports 28 passing tests.
  2. Run the top-level backup and memory test modules together; the refreshed stacked head reports 115 passing tests.
  3. Export a version 2 backup containing calendars, events, tasks, task runs, and notes, import it into a different owner, and verify identifier collisions are remapped and owner-scoped relationships remain intact while presets stay shared and settings/features stay instance-global.
  4. Verify imported webhook tokens, session-bound references, CalDAV remote identifiers, and note uploads are detached, including a same-owner import.
  5. Import a version 1 archive and confirm it remains accepted without the new domains.

Visual / UI changes — REQUIRED if you touched anything that renders

Anything that changes what the UI looks like — buttons, icons, padding, colors, fonts, spacing, layout, CSS, HTML, SVG, or any static/js/ module that draws to the DOM — needs all of the following. PRs that change rendering without these WILL be closed.

N/A — the change extends existing backup behavior without changing rendered UI files.

  • Screenshot or short clip of the change in the running app, attached below. Mobile screenshot too if the change affects mobile.
  • Style match: the change uses Odysseus's existing visual language. Specifically:
    • Reuse existing CSS variables (--red, --fg, --bg, --card, --border, etc.) — do not introduce new color values, font sizes, or spacing units.
    • Reuse existing button/input/card/border classes. Don't invent parallel styling.
    • No Unicode emoji in UI or code. Use inline SVG (matching the monochrome icon style already in static/index.html) or plain text.
    • Monospaced font (Fira Code) for primary UI text. Don't override.
    • Dark theme is the default; any light-mode work must be wired through the existing theme system, not hard-coded.
  • No new component patterns. If a similar widget already exists in the app, extend it instead of writing a parallel one.
  • I am not an LLM agent submitting a bulk PR. If you are, please open an issue describing the problem first — bulk auto-generated PRs that don't match the project's visual style are closed on sight, even when the underlying fix is correct.

Screenshots / clips

N/A — no rendered UI files changed.

@github-actions github-actions Bot added the ready for review Description complete — ready for maintainer review label Aug 8, 2026
@RaresKeY
RaresKeY force-pushed the fix/backup-v2-calendar-task-note branch from 288605f to bbc7c0b Compare August 9, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings backup omits calendars, scheduled tasks, and notes

1 participant