-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Improvement: subblocks #2850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement: subblocks #2850
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryImproved subblock input components with enhanced UX features and AI wand integration. Key Changes:
Issues:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant SubBlock
participant Input as Input Component<br/>(ShortInput/LongInput/<br/>MessagesInput/Code)
participant Hook as useSubBlockInput
participant Wand as useWand Hook
participant TagDropdown
participant Store as Workflow Store
User->>SubBlock: Focus on empty input field
SubBlock->>Input: Render with config
Input->>Hook: Initialize with shouldForceTagDropdown
Hook->>Hook: handleFocus(event)
Hook->>Hook: Check shouldForceTagDropdown
Hook-->>Input: setShowTags(true)
Input->>TagDropdown: Show dropdown at cursor
User->>SubBlock: Click "Generate" button (wand)
SubBlock->>Input: wandControlRef.onWandTrigger(prompt)
Input->>Wand: generateStream({ prompt })
Wand->>Wand: onStreamStart()
Wand-->>Input: Clear buffer, set initial state
loop Streaming chunks
Wand->>Wand: onStreamChunk(chunk)
Wand->>Input: Update with chunk
Input->>Input: extractStreamingMessages(buffer)
Input->>Input: Parse and update local state
Input-->>User: Display streaming content
end
Wand->>Wand: onGeneratedContent(content)
Wand->>Input: Final parsed content
Input->>Store: setMessages(validMessages)
Store-->>User: Persist to workflow
User->>Input: Select from TagDropdown
TagDropdown->>Input: onSelect(newValue)
Input->>Store: Update value
Store-->>SubBlock: Trigger re-render
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
24 files reviewed, 1 comment
| :root { | ||
| --sidebar-width: 232px; /* SIDEBAR_WIDTH.DEFAULT */ | ||
| --panel-width: 290px; /* PANEL_WIDTH.DEFAULT */ | ||
| --panel-width: 320px; /* PANEL_WIDTH.DEFAULT */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Violates style guide to avoid editing globals.css. Consider moving the panel width update to a CSS variable set in the component or store instead of modifying this global file.
Context Used: Context from dashboard - Avoid editing the globals.css file unless absolutely necessary. Move style changes to local componen... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/_styles/globals.css
Line: 14:14
Comment:
**style:** Violates style guide to avoid editing `globals.css`. Consider moving the panel width update to a CSS variable set in the component or store instead of modifying this global file.
**Context Used:** Context from `dashboard` - Avoid editing the globals.css file unless absolutely necessary. Move style changes to local componen... ([source](https://app.greptile.com/review/custom-context?memory=c3b5e4b0-6580-4307-83aa-ba28f105b3c4))
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.
Summary
Subblock improvements.
Type of Change
Testing
Solo.
Checklist