Split out of #82, where it was mistakenly listed as a straight deletion.
Why it is not a deletion
src/utils/offline-queue.ts is marked @deprecated and superseded by src/lib/offline-queue/form-adapter.ts, but it is still live in production:
/contact -> ContactForm -> useWeb3Forms.ts:15 -> utils/background-sync.ts:11 -> utils/offline-queue.ts
background-sync.ts pulls getQueuedItems, removeFromQueue and updateRetryCount from it.
Why it needs care rather than an import swap
useWeb3Forms already straddles both systems — line 14 writes via addToQueue from @/lib/offline-queue, line 15 registers background sync, which reads through the old module.
Both implementations target the same IndexedDB database name, 'OfflineFormSubmissions' (src/utils/offline-queue.ts:21, src/lib/offline-queue/form-adapter.ts:37). So they are not two independent stores that can be swapped — they are two implementations pointed at one database, and whether their schemas and version numbers are equivalent is unverified.
Getting this wrong risks queued-but-unsent contact form submissions on real users' devices.
Work
Already done
The module-scope console.warn is now dev-only (5ef426b). It had been printing in the console of every visitor to /contact. The debt is no longer user-visible, which lowers the urgency but does not remove it.
Split out of #82, where it was mistakenly listed as a straight deletion.
Why it is not a deletion
src/utils/offline-queue.tsis marked@deprecatedand superseded bysrc/lib/offline-queue/form-adapter.ts, but it is still live in production:background-sync.tspullsgetQueuedItems,removeFromQueueandupdateRetryCountfrom it.Why it needs care rather than an import swap
useWeb3Formsalready straddles both systems — line 14 writes viaaddToQueuefrom@/lib/offline-queue, line 15 registers background sync, which reads through the old module.Both implementations target the same IndexedDB database name,
'OfflineFormSubmissions'(src/utils/offline-queue.ts:21,src/lib/offline-queue/form-adapter.ts:37). So they are not two independent stores that can be swapped — they are two implementations pointed at one database, and whether their schemas and version numbers are equivalent is unverified.Getting this wrong risks queued-but-unsent contact form submissions on real users' devices.
Work
versionnumbers, and the record shape each writesbackground-sync.tsat@/lib/offline-queuesrc/utils/offline-queue.tsand its.browser.test.ts, and drop thevi.mockatsrc/hooks/useWeb3Forms.test.ts:23Already done
The module-scope
console.warnis now dev-only (5ef426b). It had been printing in the console of every visitor to/contact. The debt is no longer user-visible, which lowers the urgency but does not remove it.