fix(canvas): show all templates in EmptyState grid, not just first 6 (#387)

Templates 7-8 (LangGraph Agent, OpenClaw Agent) were silently hidden
by a hard-coded `.slice(0, 6)` cap. The grid container already has
`max-h-[240px] overflow-y-auto` to handle overflow — the slice was
redundant and harmful. Remove it so all API-returned templates render.

Co-authored-by: UIUX Designer <uiux@molecule-ai.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hongming Wang 2026-04-16 00:19:24 -07:00 committed by GitHub
parent a9fdbe4185
commit 98e7d90213
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -108,7 +108,7 @@ export function EmptyState() {
<div className="text-xs text-zinc-400 py-4">Loading templates...</div>
) : templates.length > 0 ? (
<div className="grid grid-cols-2 gap-2.5 mb-4 text-left max-h-[240px] overflow-y-auto">
{templates.slice(0, 6).map((t) => {
{templates.map((t) => {
const tierColor = TIER_COLORS[t.tier] || TIER_COLORS[1];
return (
<button