From 125d5949d7c5f61e3671add6204da6ae0ae014b5 Mon Sep 17 00:00:00 2001 From: Shivam Date: Sun, 7 Jun 2026 21:51:26 +0530 Subject: [PATCH] Improve query history localStorage recovery --- frontend/index.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 839f8095..2ada52ea 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2836,7 +2836,15 @@

Debug. Understand.
Ship faster.

}; const MAX_HISTORY = 50; - let history = JSON.parse(localStorage.getItem('qyx_history') || '[]'); + + let history = []; + + try { + history = JSON.parse(localStorage.getItem('qyx_history') || '[]'); + } catch (error) { + console.error('Failed to load history from localStorage:', error); + history = []; + } let favorites = JSON.parse(localStorage.getItem('qyx_favorites') || '[]'); let currentResult = null; let selectedLang = 'python'; @@ -4050,7 +4058,7 @@

Project Health Score

document.getElementById('downloadCsvBtn').addEventListener('click', () => { if (!history || history.length === 0) { - toast('No history to download', 'info'); + toast('No history to download', 'info');git checkout -b fix-history-persistence return; }