fix: make canvas card expanded area scrollable with sticky header

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-02-18 01:14:53 -05:00
parent 3f1cf0f388
commit d295ae5d88

View File

@@ -166,7 +166,8 @@ export function TreeCanvasNode({
className={cn(
'flex items-center gap-2 px-3 py-2.5',
!isExpanded && 'cursor-pointer hover:bg-accent/50 rounded-t-xl',
!isExpanded && 'rounded-xl'
!isExpanded && 'rounded-xl',
isExpanded && 'sticky top-0 z-10 bg-card rounded-t-xl'
)}
onClick={!isExpanded ? handleCardClick : undefined}
>
@@ -322,7 +323,7 @@ export function TreeCanvasNode({
{/* Expanded editing area */}
{isExpanded && (
<div className="border-t border-border px-3 pb-3 pt-3">
<div className="border-t border-border px-3 pb-3 pt-3 max-h-[70vh] overflow-y-auto">
{/* Validation errors */}
{(hasError || hasWarning) && (
<div className="mb-3 space-y-1">