Skip to content

Settings — Reset local data

import { Aside } from ‘@astrojs/starlight/components’;

Vendor Desktop caches the product catalog + order outbox in a local SQLite database. When the cache is heavily corrupted — wrong prices, duplicate products, outbox won’t sync — you need to reset so the system re-pulls from the server.

This guide is for the store owner (requires settings write).

Source: apps/vendor-web/src/app/point-of-sale/pages/settings/settings-local-data-page.tsx + <PosLocalDataResetPanel> (apps/vendor-web/src/components/point-of-sale/pos-local-data-reset-panel.tsx).

Local data reset panel — 2 scopes + Reset button Image: reset panel — scope radios (Catalog only / With outbox), backup hint line, red Reset button. Spec owner: cashier-screenshots.spec.ts → "settings — local data reset".

  • Run during off-peak hours — the reset empties the cache, so the next sale will trigger a sync (potentially slower).
  • Sync the outbox first if possible — when you include the outbox in the reset, unsynced orders are deleted (a backup is still created).
  • Pick an active store — storeId is required to reset; otherwise you’ll see the “No store” banner.

<PosLocalDataResetPanel> offers 2 radio options:

ScopeDeletesKeepsWhen to use
Catalog only (catalog_only)catalog_* tables in local DBOutbox (pending orders)Stale cache / wrong prices / duplicate products
With outbox (with_outbox)Catalog + entire outbox—Broken outbox, orders stuck in pending

From the Cashier shell → Settings → Local data (/point-of-sale/settings/local-data).

Tick one of the two radios. Default is Catalog only (safer).

Opens the confirmation modal <PosLocalDataResetConfirmModal> → read carefully → click Confirm.

When done, the toast shows:

Reset successful. Backup: <backupVersion>;
catalog rows deleted: <catalogRows>; outbox rows deleted: <outboxRows>.

After that:

  1. Reset Zustand hydration (resetHydration()).
  2. Invalidate all TanStack queries.
  3. Bootstrap the settings cache from the server (bootstrapPosLocalSettingsQueryCache).
  4. Pull a fresh catalog from the server (pullPosLocalCatalogFromServer) — best-effort; if it fails, click Sync manually.
  • The catalog shows the latest product list from the API.
  • The current cart may be empty because the lines referenced the old catalog.
  • Server drafts are untouched — only local cache is deleted.

Every reset creates a backup version inside Electron’s user-data directory (resetPosLocalDataForResync returns backupVersion). The backup contains the full DB before deletion.

To restore (outside the UI scope):

  • Contact support with the backup version from the toast.
  • Support runs the restore script against the backup file.
SymptomFix
Page shows “Desktop only”You’re on a pure browser install — only Vendor Desktop supports it
Page shows “Unavailable”isVendorPosLocalDbEnabled is off (local-first flag) — contact support
“No store” bannerNo active store selected on the top bar
Reset fails with an error toastCheck the server connection; try again
Catalog still looks old after resetClick Sync manually in the Sale screen, or restart Vendor Desktop
  • Peak hours — will slow down the next sale.
  • Outbox has unsynced orders that you don’t want to lose — sync manually first.
  • Right after a bulk price update in Dashboard — wait 5–10 minutes for cashiers to receive the automatic pull.
  • Component: <PosLocalDataResetPanel> (pos-local-data-reset-panel.tsx)
  • Hook helpers: usePosServerOnline, usePosStoreId
  • Services: resetPosLocalDataForResync, pullPosLocalCatalogFromServer
  • Confirm modal: <PosLocalDataResetConfirmModal> (pos-local-data-reset-confirm-modal.tsx)
  • Settings store: usePosLocalSettingsStore (Zustand)