Skip to content

fix(#614): Disconnecting a linked calendar or account keeps the local copy as a normal shar - #616

Merged
BeSovereign merged 1 commit into
mainfrom
fix/issue-614
Oct 20, 2026
Merged

BeSovereign merged 1 commit into
mainfrom
fix/issue-614

Conversation

@BeSovereign

Copy link
Copy Markdown
Contributor

Refs #614

Disconnecting a Google/CalDAV/Microsoft account or a single mirrored calendar now records it in detached_mirrors and keeps it as a normal, editable calendar labelled 'früher '; a mapping row pointing at 'detached:' makes both sync workers skip that remote calendar. Linking the same account again offers re-attaching (one confirm dialog); accepting points the mapping back at the kept calendar (Microsoft event pairings move to the new account) so the sync resumes without duplicates, and declining keeps the calendars as they are. CONCEPTS.md open point removed; choices: one combined offer, closing the dialog means no, single-detached calendars are only offered after the account itself is relinked, Google/Microsoft copies stay events-only.

Driver gates (measured, not claimed)

  • Suites: lint: 1 passed, 0 failed | node: 1946 passed, 0 failed | python: 194 passed, 0 failed | e2e: 316 passed, 0 failed
  • Red/green check on declared tests: server/test/issue614_disconnect_keeps_calendar.test.js, server/test/python/test_issue614_detached_mirrors.py, e2e/issue614_disconnect_keeps_calendar.spec.js, server/test/issue613_msgraph_mirror_calendars.test.js, server/test/issue149_transactions_half_apply.test.js
red/green output
RED without the change:
──────────────────────────────────────────────────────────

    Error Context: test-results/issue614_disconnect_keeps_-a99bd-aches-it-without-duplicates-chromium/error-context.md

    attachment #3: trace (application/zip) ─────────────────────────────────────────────────────────
    test-results/issue614_disconnect_keeps_-a99bd-aches-it-without-duplicates-chromium/trace.zip
    Usage:

        npx playwright show-trace test-results/issue614_disconnect_keeps_-a99bd-aches-it-without-duplicates-chromium/trace.zip

    ────────────────────────────────────────────────────────────────────────────────────────────────

  1 failed
    [chromium] › e2e/issue614_disconnect_keeps_calendar.spec.js:48:1 › Issue #614 — disconnect keeps the calendar editable, relinking re-attaches it without duplicates 


GREEN with the change:
ed again
  ---
  duration_ms: 345.814227
  ...
# Subtest: Issue \#614 — a kept calendar deleted afterwards is no longer offered
ok 15 - Issue \#614 — a kept calendar deleted afterwards is no longer offered
  ---
  duration_ms: 361.646101
  ...
1..15
# tests 15
# suites 0
# pass 15
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 5134.337293

[Sync-Worker] WARNING: encryption key not persisted to /data/.encryption_key: [Errno 13] Permission denied: '/data'
...
----------------------------------------------------------------------
Ran 3 tests in 0.001s

OK


Running 1 test using 1 worker

  ✓  1 [chromium] › e2e/issue614_disconnect_keeps_calendar.spec.js:48:1 › Issue #614 — disconnect keeps the calendar editable, relinking re-attaches it without duplicates (2.9s)

  1 passed (4.3s)

🤖 Generated with Claude Code

Disconnecting a Google/CalDAV/Microsoft account or a single mirrored calendar now records it in detached_mirrors and keeps it as a normal, editable calendar labelled 'früher <Anbieter>'; a mapping row pointing at 'detached:<collection>' makes both sync workers skip that remote calendar. Linking the same account again offers re-attaching (one confirm dialog); accepting points the mapping back at the kept calendar (Microsoft event pairings move to the new account) so the sync resumes without duplicates, and declining keeps the calendars as they are. CONCEPTS.md open point removed; choices: one combined offer, closing the dialog means no, single-detached calendars are only offered after the account itself is relinked, Google/Microsoft copies stay events-only.

Refs #614

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@BeSovereign

Copy link
Copy Markdown
Contributor Author

Security review (claude-fable-5-1): no blocking finding. No auth/IDOR/CSRF/injection/XSS defects; all new DB paths user-scoped, table names from constant map, labels escaped. Data-safety notes: (1) re-attach reuses stale vdirsyncer status (index-based pair names, per-user status dir) so deletions made while detached replay to the provider and vice versa, contradicting the 'nothing deleted at provider' promise; (2) trash restore into a single-detached Microsoft mirror queues a restore the worker cannot map and the account sync fails on every run; (3) detachCalendar accepts names already prefixed 'detached:' and orphans the mapping row; (4) no test proves user scoping of detachCalendar/resolveReattachOffers; (5) former-account msgraph event mappings retained until deleteUser (no secrets); (6) dismissing the re-attach dialog permanently declines.

@BeSovereign
BeSovereign merged commit d5b2748 into main Oct 20, 2026
5 checks passed
@BeSovereign
BeSovereign deleted the fix/issue-614 branch October 20, 2026 00:26
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