mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
debug: add visual debug info and render logging
- Added debug info boxes to both fallback and main render - Added console logging at render time to track component state - Visual debug boxes will show session counts and canvas dimensions - This will help identify if component is rendering at all
This commit is contained in:
@@ -342,16 +342,24 @@ const SessionTimelineView: React.FC<SessionTimelineViewProps> = ({
|
||||
onSelectSession(nodeId);
|
||||
};
|
||||
|
||||
console.log('SessionTimelineView: About to render, treeData.nodes.length =', treeData.nodes.length);
|
||||
|
||||
if (treeData.nodes.length === 0) {
|
||||
console.log('SessionTimelineView: Rendering fallback - no nodes');
|
||||
return (
|
||||
<div className={`flex flex-col items-center justify-center h-full text-text-muted ${className}`}>
|
||||
<Calendar className="h-12 w-12 mb-4" />
|
||||
<p className="text-lg mb-2">No sessions to display</p>
|
||||
<p className="text-sm">Your session tree will appear here</p>
|
||||
<p className="text-xs mt-4 bg-red-100 p-2 rounded">
|
||||
DEBUG: {sessions.length} sessions passed, {treeData.nodes.length} nodes created
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
console.log('SessionTimelineView: Rendering tree with', treeData.nodes.length, 'nodes');
|
||||
|
||||
return (
|
||||
<div className={`${className}`}>
|
||||
{/* Header */}
|
||||
@@ -360,6 +368,9 @@ const SessionTimelineView: React.FC<SessionTimelineViewProps> = ({
|
||||
<p className="text-sm text-text-muted">
|
||||
Tree visualization of {sessions.length} sessions showing temporal and topical relationships with curved connections.
|
||||
</p>
|
||||
<p className="text-xs mt-2 bg-green-100 p-2 rounded">
|
||||
DEBUG: Rendering {treeData.nodes.length} nodes, canvas: {treeData.width}x{treeData.height}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<ScrollArea className="h-full">
|
||||
|
||||
Reference in New Issue
Block a user