Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions html/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,6 @@ <h3 id="gapCount" class="text-2xl font-black text-white">0</h3>
</div>
</div>

<div id="chainStatusBanner" class="glass-card p-5 border-l-4 border-emerald-500 flex flex-col lg:flex-row items-start lg:items-center justify-between gap-4">
<div class="flex items-center gap-3">
<div id="chainStatusIndicator" class="status-indicator online"></div>
<div>
<p class="text-[9px] text-slate-500 font-bold uppercase">Chain of Custody</p>
<p id="chainStatusText" class="text-sm font-bold text-white">Chain intact</p>
<p id="chainStatusHint" class="text-[9px] text-slate-500">Session manifest verified locally.</p>
</div>
</div>
<div class="text-left lg:text-right">
<p class="text-[9px] text-slate-500 font-bold uppercase">Latest Chain Hash</p>
<p id="chainStatusHash" class="text-[10px] font-mono text-blue-400 truncate">--</p>
</div>
</div>

<div class="grid grid-cols-12 gap-6">
<div class="col-span-12 lg:col-span-4 space-y-6">
<div class="glass-card p-6 border-l-4 border-blue-500">
Expand Down
10 changes: 7 additions & 3 deletions js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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() {
Expand Down