From af15e68a3ddb06a8a942db0ea47561765bbf2fde Mon Sep 17 00:00:00 2001 From: anti Date: Mon, 27 Apr 2026 13:32:51 -0400 Subject: [PATCH] fix(web): pick decky from a select instead of a free-text input Fetches GET /deckies on page load and feeds the running fleet into the create modal as a setDecky(e.target.value)} - placeholder="web1" - autoFocus - style={INPUT_STYLE} - /> + + {deckies.length === 0 ? ( +
+ No deckies running. Deploy a fleet first. +
+ ) : ( + + )}
@@ -372,6 +389,7 @@ const UploadModal: React.FC = ({ onClose, onUploaded }) => { const CanaryTokens: React.FC = () => { const [tokens, setTokens] = useState([]); const [blobs, setBlobs] = useState([]); + const [deckies, setDeckies] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [tab, setTab] = useState<'tokens' | 'blobs'>('tokens'); @@ -386,12 +404,14 @@ const CanaryTokens: React.FC = () => { setLoading(true); setError(null); try { - const [t, b] = await Promise.all([ + const [t, b, d] = await Promise.all([ api.get('/canary/tokens'), api.get('/canary/blobs').catch(() => ({ data: { blobs: [] } })), // viewers can't list blobs + api.get('/deckies').catch(() => ({ data: [] })), ]); setTokens(t.data.tokens || []); setBlobs(b.data.blobs || []); + setDeckies(Array.isArray(d.data) ? d.data : []); } catch (err) { setError(extractError(err, 'Failed to load canary tokens.')); } finally { @@ -618,6 +638,7 @@ const CanaryTokens: React.FC = () => { {showCreate && ( setShowCreate(false)} onCreated={(t) => { setTokens((prev) => [t, ...prev]);