Skip to content

[Snapshots] Scheduled snapshot exports corrupt relationship/subquery fields to “[object Object]” #71

Description

@Exotic209093

Severity

High — scheduled backups of relationship queries are unrecoverable in CSV/XML/Excel.

What happens

The scheduled-export path stores raw records and derives only top-level keys — it never runs flattenRecord like the interactive path. A schedule for SELECT Id, Account.Name FROM Contact produces a snapshot whose Account value is a nested object; downloading as CSV/XML runs String(value) → the cell contains the literal text [object Object] and Account.Name is lost. Excel hands the raw object to SheetJS. Subquery results corrupt the same way. Only JSON survives.

Evidence

  • src/ui/screens/SnapshotCenterScreen.tsx:136
  • src/services/salesforce/queryAll.ts:56; src/ui/utils/csv.ts:11
  • Storage: src/background/index.ts:2298-2300

Suggested fix

Run snapshot records through flattenRecord/deriveColumns before export, same as the interactive path.

Environment

Commit 74cf21b (main), WaveLink 0.6.0. Found in the 2026-08-31 adversarial audit (code-verified).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions