fix: preserve edited changes after export and on Dropbox reload

resetAllPendingRows was setting status to 'synced' instead of 'edited',
causing the merge logic on reload to skip those rows. Also keep 'edited'
and 'saved' statuses locally after export instead of clearing all.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Vidal Wolf
2026-04-23 16:22:35 +02:00
co-authored by Claude Sonnet 4.6
parent 7de903a184
commit f3ed3cf147
2 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ export interface ExcelRow extends Array<any> {}
export interface SyncedRow {
data: ExcelRow;
status?: 'pending' | 'synced';
status?: 'pending' | 'edited' | 'synced' | 'excel';
}
export async function getAllSyncedRows(): Promise<Record<string, SyncedRow>> {
@@ -208,7 +208,7 @@ export async function resetAllPendingRows(): Promise<boolean> {
'Content-Type': 'application/json',
'Prefer': 'return=minimal',
},
body: JSON.stringify({ status: 'synced' })
body: JSON.stringify({ status: 'edited' })
}
);