Incremental sync (v2): delta upload + manifest reconciliation + persisted state#1
Merged
Merged
Conversation
Gedthub
force-pushed
the
incremental-loot-session-sync
branch
from
June 19, 2026 22:04
1bc45d9 to
bdd015c
Compare
…sted state watcher.ts: processV2 sends only entries whose content hash differs from the acknowledged one (delta), with a manifest reconciliation safety net (GET /api/loot-sessions/manifest at startup and once per day, full reconcile on drift). store.ts persists syncState per file (acked hashes + last reconcile) so restarting no longer re-uploads the whole history. v1 path preserved. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Gedthub
force-pushed
the
incremental-loot-session-sync
branch
from
June 19, 2026 22:08
bdd015c to
84e4fcd
Compare
Englishize pre-existing French strings/comments in App.tsx (UI labels) and watcher.ts (logs, connection-test and sync status messages), so the public repo contains no French. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Moves the companion from re-uploading the entire loot history on every sync to incremental syncing (payload v2), and persists sync state across restarts.
Problem
Previously, any change re-sent the full history and the backend replaced everything. The dedup hash lived only in memory, so every app restart re-uploaded the whole history again.
Changes (
electron/watcher.ts,electron/store.ts)is_full_sync: false). Per-entry id and hash use the same formulas as the addon and backend.GET /api/loot-sessions/manifest({ entryId: hash }); if local state diverges it performs a full reconcile, otherwise it uploads nothing. Self-healing against drift.syncState(acknowledged hashes + last reconcile time) is stored per file viaelectron-store, so restarting no longer triggers a full re-upload.id(older addon) keep the previous behavior.Verification
tsc -p tsconfig.node.json).Note
Requires the matching backend (v2 endpoints) to be deployed. Until then the v1 fallback keeps working.
🤖 Generated with Claude Code