diff --git a/.changeset/fix-dashboard-applicable-storyboards-fallback.md b/.changeset/fix-dashboard-applicable-storyboards-fallback.md new file mode 100644 index 0000000000..76e4c661ed --- /dev/null +++ b/.changeset/fix-dashboard-applicable-storyboards-fallback.md @@ -0,0 +1,4 @@ +--- +--- + +Drops the unfiltered `/api/storyboards` fallback on the dashboard's storyboard picker. When `/api/registry/agents/:url/applicable-storyboards` returned a generic error (capabilities probe failed for a reason other than the recognized OAuth / needs-auth / unknown-specialism shapes), the dashboard fell back to the unfiltered full storyboard catalog — so a signals-only agent showed pagination-creative-formats, get-media-buys-pagination-integrity, and the rest. Closes #4254. Now: error message stays, but no storyboards render until the agent's `get_adcp_capabilities` returns `supported_protocols` and `specialisms`. OAuth / needs-auth / unknown-specialism error paths are unchanged. diff --git a/server/public/dashboard-agents.html b/server/public/dashboard-agents.html index 810869c513..2af2857cac 100644 --- a/server/public/dashboard-agents.html +++ b/server/public/dashboard-agents.html @@ -3022,35 +3022,20 @@

Agents

return; } + // Capability probe failed for an unclassified reason. We deliberately + // do NOT fall back to the unfiltered storyboard catalog here: without + // the agent's declared protocols + specialisms, every storyboard we + // could show is misleading (the agent may not even implement most of + // them). Issue #4254 — signals-only agent was seeing pagination- + // creative-formats etc. because of that fallback. const reasonText = errBody.reason ? ' (' + errBody.reason + ')' : ''; const msg = errBody.error || ('HTTP ' + res.status); - let html = '
'; + let html = '
'; html += 'Could not probe agent capabilities. ' + escapeHtml(String(msg) + reasonText); + html += '
'; + html += 'Once get_adcp_capabilities responds with supported_protocols and specialisms, applicable storyboards will appear here.'; + html += '
'; html += '
'; - - try { - const fallback = await fetch('/api/storyboards', { credentials: 'include' }); - if (fallback.ok) { - const fdata = await fallback.json(); - if (fdata.storyboards && fdata.storyboards.length > 0) { - html += '
Showing all available storyboards:
'; - html += '
'; - for (const sb of fdata.storyboards) { - html += '
'; - html += '
'; - html += '
' + escapeHtml(sb.title) + '
'; - html += '
' + escapeHtml(sb.summary) + '
'; - html += '
'; - html += '' + sb.step_count + ' steps'; - html += '
'; - } - html += '
'; - } - } - } catch (fallbackErr) { - console.error('Storyboard fallback failed:', fallbackErr); - } - panel.innerHTML = html; } catch (err) { console.error('Failed to load storyboards:', err);