From 1a541f5c60f26361bad83a9cdde52117317e7eb9 Mon Sep 17 00:00:00 2001 From: Moresh-Mishra Date: Mon, 25 May 2026 21:14:00 +0530 Subject: [PATCH] dashboard-cleanup --- html/dashboard.html | 15 --------------- js/dashboard.js | 10 +++++++--- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/html/dashboard.html b/html/dashboard.html index 8293125..b9445e0 100644 --- a/html/dashboard.html +++ b/html/dashboard.html @@ -172,21 +172,6 @@

0

-
-
-
-
-

Chain of Custody

-

Chain intact

-

Session manifest verified locally.

-
-
-
-

Latest Chain Hash

-

--

-
-
-
diff --git a/js/dashboard.js b/js/dashboard.js index 20305e0..dcc769c 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -118,9 +118,9 @@ async function verifyChain(manifest) { const expectedPrev = i === 0 ? GENESIS_HASH : stripHashPrefix(manifest[i - 1].chain_hash); - const actualPrev = stripHashPrefix(entry.previous_session_hash); // Fix reference error - if (currentPrev !== expectedPrev) { - // Standardize check + const actualPrev = stripHashPrefix(entry.previous_session_hash); + if (actualPrev !== expectedPrev) { + return { intact: false, brokenIndex: i }; } const computed = await computeChainHash({ @@ -558,6 +558,10 @@ function saveToVault(data, fileName) { if (cases.length > 50) cases.pop(); localStorage.setItem(CASES_KEY, JSON.stringify(cases)); updateCaseBadge(); + const historyView = document.getElementById("view-history"); + if (historyView && !historyView.classList.contains("hidden")) { + renderCaseHistory(); + } } function renderCaseHistory() {