From 7ab22675ac1a26ad910c792dba3961a00fc2bd55 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 4 Aug 2026 15:27:54 +0200 Subject: [PATCH 1/3] Added settings keys sorting --- src/components/questions/QuestionsTable.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/questions/QuestionsTable.tsx b/src/components/questions/QuestionsTable.tsx index 11dc6ddc..bb8c7dbb 100644 --- a/src/components/questions/QuestionsTable.tsx +++ b/src/components/questions/QuestionsTable.tsx @@ -803,7 +803,10 @@ export default function QuestionsTable({ data, updatedDate }: { data: Question[] }, [syncNow]); const exportProgress = useCallback(() => { - const payload = { completed: [...completed], starred: [...starred], notes, solvedDates, reminders }; + // Serialize the JSON keys in order, so that they're stable across backups + const settings = { completed: [...completed], starred: [...starred], notes, solvedDates, reminders }; + const keys = Object.keys(settings).sort(); + const payload = Object.fromEntries(keys.map((k) => [k, settings[k as keyof typeof settings]])) + "\n"; const blob = new Blob([JSON.stringify(payload, null, 2)], { type: "application/json" }); const url = URL.createObjectURL(blob); const a = document.createElement("a"); From 879bc5d25c7c3f64b2c787660a08ef933fb8afc5 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 4 Aug 2026 15:39:05 +0200 Subject: [PATCH 2/3] Sort also arrays with problems numbers --- src/components/questions/QuestionsTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/questions/QuestionsTable.tsx b/src/components/questions/QuestionsTable.tsx index bb8c7dbb..0c66355a 100644 --- a/src/components/questions/QuestionsTable.tsx +++ b/src/components/questions/QuestionsTable.tsx @@ -804,7 +804,7 @@ export default function QuestionsTable({ data, updatedDate }: { data: Question[] const exportProgress = useCallback(() => { // Serialize the JSON keys in order, so that they're stable across backups - const settings = { completed: [...completed], starred: [...starred], notes, solvedDates, reminders }; + const settings = { completed: [...completed].sort(), starred: [...starred].sort(), notes, solvedDates, reminders }; const keys = Object.keys(settings).sort(); const payload = Object.fromEntries(keys.map((k) => [k, settings[k as keyof typeof settings]])) + "\n"; const blob = new Blob([JSON.stringify(payload, null, 2)], { type: "application/json" }); From b180ef7266effdded52692440e26b5e5ac8ef8b3 Mon Sep 17 00:00:00 2001 From: Oleh Kostiuk Date: Sun, 9 Aug 2026 03:23:46 +0200 Subject: [PATCH 3/3] Update src/components/questions/QuestionsTable.tsx Co-authored-by: Sean Prashad <13009507+seanprashad@users.noreply.github.com> Signed-off-by: Oleh Kostiuk --- src/components/questions/QuestionsTable.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/questions/QuestionsTable.tsx b/src/components/questions/QuestionsTable.tsx index 0c66355a..5b079d5d 100644 --- a/src/components/questions/QuestionsTable.tsx +++ b/src/components/questions/QuestionsTable.tsx @@ -803,11 +803,8 @@ export default function QuestionsTable({ data, updatedDate }: { data: Question[] }, [syncNow]); const exportProgress = useCallback(() => { - // Serialize the JSON keys in order, so that they're stable across backups - const settings = { completed: [...completed].sort(), starred: [...starred].sort(), notes, solvedDates, reminders }; - const keys = Object.keys(settings).sort(); - const payload = Object.fromEntries(keys.map((k) => [k, settings[k as keyof typeof settings]])) + "\n"; - const blob = new Blob([JSON.stringify(payload, null, 2)], { type: "application/json" }); + const payload = { completed: [...completed].sort((a, b) => a - b), starred: [...starred].sort((a, b) => a - b), notes, solvedDates, reminders }; + const blob = new Blob([JSON.stringify(payload, null, 2) + "\n"], { type: "application/json" }); const url = URL.createObjectURL(blob); const a = document.createElement("a"); a.href = url;