diff --git a/public_html/admin/index.php b/public_html/admin/index.php
index 6da58d0..d8f225f 100644
--- a/public_html/admin/index.php
+++ b/public_html/admin/index.php
@@ -2922,7 +2922,7 @@ async function loadVision() {
}
gallery.innerHTML = shots.map(s => {
- const ts = ts(s.created_at);
+ const shotTs = ts(s.created_at);
const has = s.file_size > 0;
const meth = (s.method || 'unknown').toUpperCase();
const dim = s.width && s.height ? `${s.width}×${s.height}` : '';
@@ -2939,7 +2939,7 @@ async function loadVision() {
◈ ${dim ? dim + ' · ' : ''}${Math.round((s.file_size||0)/1024)}KB IMAGE
` : '
TEXT SNAPSHOT ONLY
'}
${analysis ? `${esc(analysis)}${s.vision_analysis?.length>180?'…':''}
` : ''}
- ${ts}
+ ${shotTs}
`;
}).join('');
@@ -2965,8 +2965,11 @@ async function visionViewScreenshot(id) {
}
async function visionRunScreenshot() {
- // Pick agent from dropdown or prompt
- const agents = _visionAgents;
+ let agents = _visionAgents.length ? _visionAgents : null;
+ if (!agents) {
+ const all = await api('agents_list');
+ agents = (Array.isArray(all) ? all : []).filter(a => a.status === 'online').map(a => a.hostname).filter(Boolean);
+ }
if (!agents.length) {
toast('No agents online — check AGENTS tab', 'err'); return;
}