Skip to content

Keep the display awake during archive operations - #17

Merged
vrtmrz merged 3 commits into
mainfrom
keep-display-awake-during-backup
Jul 14, 2026
Merged

Keep the display awake during archive operations#17
vrtmrz merged 3 commits into
mainfrom
keep-display-awake-during-backup

Conversation

@vrtmrz

@vrtmrz vrtmrz commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • add one lifecycle-aware screen wake-lock manager for DiffZip
  • protect backup, archive restore, and selective-sync Fetch and Send operations with closure-scoped leases
  • wait for every selected archive file to finish writing before restore completion is reported
  • add App-free lifecycle tests, a local real-Obsidian backup/restore E2E, and user and developer documentation
  • prepare the BRAT review version as 0.1.9-wakelock.1

Why

Long-running mobile archive operations can allow the display to sleep. Restore and selective sync have the same requirement as backup, so all archive-operation entry points share one manager. Nested Fetch and Restore leases share the underlying platform wake lock.

While adding Restore coverage, the real-Obsidian E2E exposed that Extractor.finalise() did not wait for its asynchronous file callbacks. Consequently, extract() could resolve, and its wake-lock lease could be released, before Vault writes had completed. The Extractor now tracks selected files, waits for their callbacks, and propagates write failures.

The Screen Wake Lock API remains best effort. Unsupported or rejected requests do not prevent the operation from running, and this change does not provide background execution. Confirmation dialogues do not hold a lease.

Validation

  • npm ci
  • deno task test — 67 passed
  • deno task test:coveragesrc/wakeLock.ts at 100% branch, function, and line coverage
  • npm run test:ui — 11 passed
  • npm run lint
  • npm run prettyCheck
  • npm run check:e2e:obsidian
  • npm run build
  • exact published octagonal-wheels@0.1.51: clean install, unit/UI/build checks, and local real-Obsidian E2E passed
  • local real-Obsidian E2E: backup lease 1 → 0, restore lease 1 → 0, TOC entry present, and restored content matched
  • manifest.json, package.json, and package-lock.json agree on 0.1.9-wakelock.1
  • maintainer BRAT review on mobile — every 0.1.9-wakelock.1 release checklist item passed

The existing unrelated Svelte initialItems build warning remains unchanged.

Before merge

  • prepare the 0.1.9-wakelock.1 tag, Draft Release, release notes, and release assets
  • publish 0.1.9-wakelock.1 as a prerelease without replacing latest
  • install 0.1.9-wakelock.1 through BRAT and complete the mobile review
  • replace the immutable preview dependency with exact octagonal-wheels@0.1.51
  • review physical display behaviour during backup and restore on mobile
  • review physical display behaviour during selective-sync Fetch and Send on mobile

@vrtmrz
vrtmrz marked this pull request as ready for review July 14, 2026 16:50
@vrtmrz
vrtmrz merged commit 29d349e into main Jul 14, 2026
1 check passed
@vrtmrz vrtmrz mentioned this pull request Jul 14, 2026
10 tasks
@vrtmrz
vrtmrz deleted the keep-display-awake-during-backup branch July 14, 2026 17:28
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