Hide landing/last-scan card whenever results render
The live scan_file_flagged handler showed the grid but never hid #emptyState / #lastScanSummary, so when a scan ran with the landing card visible, results appeared underneath it until a manual refresh (which re-ran loadOpenItems and cleared it). Hide both panels in renderGrid whenever files are present, covering every render path (live SSE, open-items load, history, filters). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
d55778ab35
commit
8a446509c6
@ -122,6 +122,17 @@ function renderGrid(files) {
|
|||||||
const grid = document.getElementById('grid');
|
const grid = document.getElementById('grid');
|
||||||
grid.innerHTML = '';
|
grid.innerHTML = '';
|
||||||
files.forEach(f => appendCard(f));
|
files.forEach(f => appendCard(f));
|
||||||
|
// Whenever results are rendered, the landing/last-scan cards must be hidden —
|
||||||
|
// the live scan_file_flagged path shows the grid but does not clear them, so
|
||||||
|
// results would otherwise appear underneath the still-visible landing page
|
||||||
|
// until a manual refresh. Centralised here so every render path is covered.
|
||||||
|
if (files && files.length) {
|
||||||
|
const es = document.getElementById('emptyState');
|
||||||
|
if (es) es.style.display = 'none';
|
||||||
|
const ls = document.getElementById('lastScanSummary');
|
||||||
|
if (ls) ls.style.display = 'none';
|
||||||
|
if (grid) grid.style.display = S.isListView ? 'block' : 'grid';
|
||||||
|
}
|
||||||
_updateBulkBar();
|
_updateBulkBar();
|
||||||
updateDispositionStats();
|
updateDispositionStats();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user