Skip to content

Conversation

@galangel
Copy link
Owner

@galangel galangel commented Jan 8, 2026

Signed-off-by: galangel gal0angel@gmail.com


Note

Modernizes AI Chat demo structure and Storybook content with new collapsible sections and layout tweaks.

  • Extracts convertToItems util to build chat Items with grouped Reasoning (auto-collapsing on completion) and Solution sections; updates exports
  • Adds ReasoningHeader and SolutionHeader; enhances AgentStepHeader with explicit collapse button and safer click handling; OutputLineItem now supports indent
  • Updates get-items to hide collapsed sections via display: none and minor overflow behavior tweak (overflow-y: auto)
  • Refactors AIChatDemo to use the new util and preserves smooth auto-scroll behavior
  • Fully redesigns welcome.stories.tsx with structured sections, code examples, and fullscreen layout

Written by Cursor Bugbot for commit d5198bd. This will update automatically on new commits. Configure here.

Signed-off-by: galangel <gal0angel@gmail.com>
@galangel galangel merged commit fbf7ed3 into main Jan 8, 2026
3 checks passed
@galangel galangel deleted the fix-ai-demo branch January 8, 2026 21:50
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 22

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

import React, { useEffect } from 'react';

// Track which message IDs have already had their reasoning auto-collapsed
const collapsedReasoningIds = new Set<string>();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Module-level Set causes unbounded memory growth

Low Severity

The collapsedReasoningIds Set is defined at module level and message IDs are added but never removed. In long-running sessions with many messages, this Set grows indefinitely without any cleanup mechanism, causing memory to accumulate over time. While this is demo code, the pattern represents a memory leak that could become problematic if copied elsewhere or during extended storybook usage.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants