From 54bbb8a25ea6f537d7350693a8cd85976d7943dd Mon Sep 17 00:00:00 2001 From: Cameron Pfiffer Date: Wed, 7 Jan 2026 17:32:58 -0800 Subject: [PATCH] Fix: Don't auto-load schedules without agent ID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed annoying alert on initial authentication: - Only auto-load schedules if agent_id is already saved - Show friendly message in table instead of alert - User can enter agent ID then click Refresh Before: Alert popup 'Please enter an Agent ID first' After: Helpful message in table 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta --- dashboard.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dashboard.html b/dashboard.html index 17305c3..f146874 100644 --- a/dashboard.html +++ b/dashboard.html @@ -501,8 +501,11 @@ sessionStorage.setItem('letta_api_key', API_KEY); document.getElementById('main-content').classList.remove('hidden'); showStatus('api-key-status', 'Connected successfully', 'success'); - loadSchedules(); - loadResults(); + + // Only auto-load if we have a saved agent ID + if (DEFAULT_AGENT_ID) { + loadSchedules(); + } } function clearApiKey() { @@ -534,7 +537,10 @@ async function loadSchedules() { const agentId = document.getElementById('agent-id').value.trim(); if (!agentId) { - alert('Please enter an Agent ID first'); + const onetimeBody = document.querySelector('#onetime-table tbody'); + const recurringBody = document.querySelector('#recurring-table tbody'); + onetimeBody.innerHTML = 'Enter an Agent ID and click Refresh to view schedules'; + recurringBody.innerHTML = 'Enter an Agent ID and click Refresh to view schedules'; return; } -- 2.51.2