Commit 749a605
committed
fix: deduplicate interview records from Supabase
- Add 3-layer dedup in syncWithSupabase after mapping DB records:
1. By DB id (primary)
2. By interview token (secondary)
3. By composite key: email+date+position (tertiary)
- Keeps first occurrence (newest by created_at DESC)
- Fix appData refresh: move DataStore.get() AFTER syncWithSupabase
so rendering uses deduplicated data, not stale pre-sync data1 parent 7ccd787 commit 749a605
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2892 | 2892 | | |
2893 | 2893 | | |
2894 | 2894 | | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
2895 | 2910 | | |
2896 | 2911 | | |
2897 | 2912 | | |
| |||
4375 | 4390 | | |
4376 | 4391 | | |
4377 | 4392 | | |
4378 | | - | |
4379 | 4393 | | |
| 4394 | + | |
4380 | 4395 | | |
4381 | 4396 | | |
4382 | 4397 | | |
| |||
0 commit comments