fix: AI chat scroll, suggestion parsing, and dialog stability#101
fix: AI chat scroll, suggestion parsing, and dialog stability#101TerrifiedBug merged 6 commits intomainfrom
Conversation
Two bugs fixed: - VRL chat route was reusing existing conversations when conversationId was null (New Chat), causing old context to persist. Now always creates a new conversation, matching the pipeline route behavior. - Review tab ScrollArea lacked height constraint in flex layout, causing content to overflow and hiding the New Conversation button. Added h-0 to establish proper scroll containment.
LLMs sometimes wrap JSON responses in ```json fences despite instructions not to. Both VRL and pipeline parsers now strip code fences before parsing, and server-side routes reuse the same parsing functions.
…tability - Replace Radix ScrollArea with native overflow-y-auto div in pipeline review tab — ScrollArea wasn't constraining height in flex layout - Use SelectTrigger size="sm" prop instead of className h-8 (component's data-[size=default]:h-9 was overriding the class) - Use onInteractOutside on VRL dialog to prevent closing on tab switch
Greptile SummaryThis PR fixes four independent UI/UX regressions in the AI chat and VRL editor features: scroll layout in the pipeline review tab, suggestion card rendering when LLMs wrap JSON in markdown code fences, VRL dialog stability on browser tab switches, and a sample dropdown height mismatch. Key changes:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[LLM streams response tokens] --> B[fullResponse assembled]
B --> C{Strip code fences\nstripCodeFences}
C -->|Plain JSON| D[JSON.parse]
C -->|```json fence detected| E[Extract inner JSON] --> D
D -->|valid shape| F[parsedSuggestions = suggestions array]
D -->|invalid / null| G[parsedSuggestions = null]
F --> H[Persist AiMessage with suggestions JSON]
G --> H
H --> I[Stream done event to client]
|
Summary
ScrollAreawith nativeoverflow-y-autodiv — ScrollArea's internal viewport wasn't constraining height in flex layouts, causing content to overflow onto the input areaonInteractOutsideprevention to keep the dialog open when switching browser tabsSelectTrigger size="sm"prop instead of className override (component'sdata-attribute was winning specificity)parseVrlChatResponse/parseAiReviewResponsefunctions instead of inlineJSON.parseTest plan