Enforce .valid requirement for remote pulls and add progress tracking to image/PDF syncs#558
Draft
Enforce .valid requirement for remote pulls and add progress tracking to image/PDF syncs#558
Conversation
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve sync process in sync.ts and SyncWorker.ts
Add .valid markers and Android foreground notifications for sync safety
Jan 29, 2026
…yncDocumentOnRemote Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Copilot
AI
changed the title
Add .valid markers and Android foreground notifications for sync safety
Fix .valid marker migration for unchanged documents
Jan 29, 2026
…om remote Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Copilot
AI
changed the title
Fix .valid marker migration for unchanged documents
Enforce .valid requirement for remote pulls and add progress tracking to image/PDF syncs
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Remote document pulls had a "legacy migration" path importing documents without
.validmarkers, defeating the corruption-prevention mechanism. Progress notifications only worked for data sync, leaving image and PDF syncs silent.Changes
Strict .valid enforcement for pulls
Removed legacy migration from
importDocumentFromRemote(). Documents without.validare now skipped:Push operations (
addDocumentToRemote(),syncDocumentOnRemote()) still create.validmarkers, enabling subsequent pulls.Progress tracking for image and PDF syncs
Added progress calculations and
updateSyncProgress()calls to match data sync behavior:Android foreground notifications now update for all sync types, preventing process termination.
Files Modified
app/services/sync/WebdavDataSyncService.ts(-18 lines)app/workers/SyncWorker.ts(+16 lines)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.