Skip to content

Return to the previous archive after the demo or a cancelled switch - #71

Merged
Kuncarlos91 merged 2 commits into
mainfrom
fix/return-to-archive
Nov 18, 2026
Merged

Kuncarlos91 merged 2 commits into
mainfrom
fix/return-to-archive

Conversation

@Kuncarlos91

@Kuncarlos91 Kuncarlos91 commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Owner decisions (2026-11-18): demo exit goes back to where you were; Cancel during a switch goes back to the previous archive.

Behaviour

  • Demo exit: reopens the saved archive that was open when the demo started, showing the Opening screen with Cancel. A demo started from setup with nothing open still returns to setup, and so does one whose previous archive was forgotten during the demo.
  • Cancel while switching: reopens the archive that was open before the switch.
  • Still returns to setup: Cancel at startup, Cancel while the previous archive reopens (so Cancel never loops), a switch started with nothing open, and a previous archive forgotten meanwhile.
  • Privacy: reopening contacts that archive's server the same way switching to it does. No mail is cached and no new archive is added. Entering and browsing the demo use no secure storage; returning to a real archive reads its saved credentials and may update active-profile/account selection.

Implementation

Reopening goes through switchArchive, so the Opening screen, Cancel, the opening and connect token checks, the persistence lock and failure handling are all reused. exitDemo now returns a Future; the UI callbacks are unchanged.

Tests

  • Updated the four tests that asserted the old return to setup.
  • Added tests for: Cancel while reopening goes to setup; a switch from setup with nothing open; a previous archive forgotten mid-switch; and a demo started with nothing open.
  • flutter analyze is clean and flutter test passes (420 tests). check_docs, privacy_check, the Python tests and git diff --check pass.
  • Added a regression for a delayed Cancel overview after a newer manual connection attempt: reproduced failure before the token guard, passes after it. Cancel refresh and automatic return now check both opening and connection tokens.
  • All 225 Python tests pass. Documentation links, privacy scan and whitespace checks pass.
  • Not yet checked on a device; no native build or publication performed.

Docs

Playbook (demo mode and Cancel), troubleshooting and a CHANGELOG Unreleased entry.


Generated by Claude Code

claude and others added 2 commits November 18, 2026 11:07
- Exiting the demo reopens the saved archive that was open when it
  started; a demo started with nothing open still returns to setup.
- Cancel on the Opening screen during a switch reopens the archive that
  was open before it. Startup Cancel, a Cancel while reopening, a switch
  begun with nothing open, or a previous archive forgotten meanwhile
  still return to setup, so Cancel never loops.
- Reopening goes through switchArchive, so the Opening screen, Cancel,
  token checks and failure handling are unchanged.
- Tests updated for the new behaviour plus the no-loop, nothing-open and
  forgotten-archive cases. Playbook, troubleshooting and CHANGELOG updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VAvgB9dNWtJBuNHAAxsPDH

Copy link
Copy Markdown
Owner Author

Reviewed and pushed follow-up commit 33ec8a9.

Fixed a cancellation race: a delayed saved-archive refresh could reopen the previous archive after a newer manual connection attempt. Both the refresh and automatic return now honor opening and connection tokens, captured before notifying listeners. The new regression fails against the original PR and passes with this fix.

Corrected the demo privacy wording in the Playbook, README and setup guide: browsing stays local, but returning to a saved real archive reads credentials, contacts its server and may update its saved selection. Published 0.5.0 behavior is distinguished from this development change.

Validation: clean Flutter analysis; all 420 Flutter tests and 225 Python tests pass; 250 local documentation links pass; privacy scan reports 0 items; whitespace check passes. No remaining blocker found in the host review. Follow-up CI must pass; the return/cancel recovery paths still need checking on the next device candidate. No merge, native build or publication performed.

@Kuncarlos91
Kuncarlos91 merged commit 5a2c4d8 into main Nov 18, 2026
5 checks passed
@Kuncarlos91
Kuncarlos91 deleted the fix/return-to-archive branch November 18, 2026 17:38
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.

2 participants