The unique expense index can silently fail to build over pre-existing duplicate data, so re-syncs were re-adding ledger fees every run. - syncLedgerEntries now explicitly checks existing references (and de-dupes within the batch) instead of trusting the unique index - dedupeLedgerExpenses keeps one row per etsy-ledger-<entry_id> and deletes the rest; runs automatically at the start of each sync so existing duplicates self-heal. Distinct entries sharing a date/amount are untouched (each has its own reference). - Sync response/toast report deduped and already-imported counts Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| .env.example | ||
| .env.production | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||