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() {