Follow-up from #13594.
The library agent view resolves what a Triggers-tab selection is (trigger agent vs webhook-trigger preset) by membership in the presets list, which is fetched as a single page capped at PRESETS_PAGE_SIZE = 100 (frontend/.../NewAgentLibraryView/hooks/useAgentPresetsQuery.ts).
For agents with more than 100 presets, presetsComplete turns false and unknown IDs fall back to a by-ID preset fetch (fails fast into a graceful not-found card), which degrades the "resolve type before mount" guarantee and costs one throwaway request per stale/unknown selection.
Options:
- Unpaginate
GET /api/library/presets for the graph_id-scoped case (note: the endpoint also backs the copilot list_presets tool via DatabaseManager RPC and the external API surface with a paginated response model, so this is a breaking-ish change needing coordination), or
- Paginate the frontend membership check (fetch all pages), or
- Keep the documented fallback if >100 presets per agent remains a non-case in practice.
Low priority: >100 presets on a single agent is an edge case today, and the current behavior degrades gracefully.
Follow-up from #13594.
The library agent view resolves what a Triggers-tab selection is (trigger agent vs webhook-trigger preset) by membership in the presets list, which is fetched as a single page capped at
PRESETS_PAGE_SIZE = 100(frontend/.../NewAgentLibraryView/hooks/useAgentPresetsQuery.ts).For agents with more than 100 presets,
presetsCompleteturns false and unknown IDs fall back to a by-ID preset fetch (fails fast into a graceful not-found card), which degrades the "resolve type before mount" guarantee and costs one throwaway request per stale/unknown selection.Options:
GET /api/library/presetsfor thegraph_id-scoped case (note: the endpoint also backs the copilotlist_presetstool via DatabaseManager RPC and the external API surface with a paginated response model, so this is a breaking-ish change needing coordination), orLow priority: >100 presets on a single agent is an edge case today, and the current behavior degrades gracefully.