fix: infinite scroll and link dialog issues#49
Conversation
|
@ankushchhabradelta4infotech-ai is attempting to deploy a commit to the Delta4 Infotech Team on Vercel. A member of the Team first needs to authorize it. |
| }: ChatContainerRootProps) { | ||
| return ( | ||
| <StickToBottom | ||
| className={cn("flex overflow-y-auto", className)} |
Sahil5963
left a comment
There was a problem hiding this comment.
Code Review - @ankushchhabradelta4infotech-ai
Thanks for fixing these UI issues! The infinite scroll and link visibility problems are real pain points. A few concerns to consider:
🟡 Potential Breaking Change - CSS Classes Removed
chat-container.tsx:50 changed from:
className={cn("flex overflow-y-auto", className)}
to:
className={cn("min-h-0", className)}
Removing flex and overflow-y-auto from ChatContainerRoot could break layouts that depend on these classes being present. Users who have customized their chat container styling may experience unexpected layout changes.
Recommendation: Test with various integration scenarios to ensure this doesn't break existing implementations.
🟡 Hardcoded Colors May Break Theming
message.tsx:96-98 uses hardcoded Tailwind colors with !important:
"[&_a]:!text-blue-600 dark:[&_a]:!text-blue-400"
"[&_button[data-streamdown='link']]:!text-blue-600 dark:[&_button[data-streamdown='link']]:!text-blue-400"
Issues:
- Using
!important(via Tailwind's!prefix) makes future styling changes difficult - Hardcoded blue colors override any custom theme colors users may have set
- Users with brand colors other than blue can't customize link appearance
Recommendation: Consider using CSS custom properties like var(--csdk-link-color, #2563eb) to allow theming while providing sensible defaults.
🟡 Fragile CSS Selectors for Streamdown
base.css has very specific selectors:
[data-streamdown="link-safety-modal"] > div .font-semibold,
[data-streamdown="link-safety-modal"] > div .font-mono,
[data-streamdown="link-safety-modal"] > div button.bg-background {
color: hsl(var(--foreground));
}
These selectors depend on Streamdown's internal DOM structure. If the Streamdown library updates its markup, these styles could silently break.
Recommendation: Consider if there's a more robust way to style this, or document that these styles target Streamdown internals.
🟡 Content Clipping Concern
message.tsx:87 changed from max-w-none to max-w-full overflow-hidden:
// Before
"csdk-message-content rounded-lg p-2 break-words whitespace-normal max-w-none leading-relaxed"
// After
"csdk-message-content rounded-lg p-2 break-words whitespace-normal max-w-full leading-relaxed overflow-hidden"
Adding overflow-hidden could clip content that previously displayed correctly (e.g., code blocks, tables, or other wide content).
✅ What Looks Good
- Link visibility fix with blue underlined links - much better UX
min-w-0on user message wrapper - proper flex child behavior- Long URL wrapping with
break-all- prevents overflow - Modal positioning fix - ensures proper centering
- Light/dark mode handling for dialog - good attention to both themes
Overall the fixes address real issues - just want to make sure we don't introduce regressions in the process. Let me know your thoughts!
|
Thanks for the thorough review! I've addressed all the concerns. Here's the status of each point: 1. CSS Classes Removed from ChatContainerRoot — ✅ Non-breakingVerified that 2. Hardcoded Colors /
|


Description
Fixes infinite scroll issue during agent thinking state and link dialog styling inconsistencies between user and AI messages.
Changes
ChatContainerRootclassName handling to usemin-h-0constraint<a>tags and Streamdown link buttonsmin-w-0to user message wrapper andmax-w-fullto message contentType of Change
Testing
Tested scenarios:
Checklist
Screenshots (if applicable)