fix(copilot): added user scrolling, fixed code block, fixed code copying and styling#872
fix(copilot): added user scrolling, fixed code block, fixed code copying and styling#872waleedlatif1 merged 6 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Greptile Summary
This PR implements comprehensive improvements to the chat and copilot interfaces, focusing on user experience enhancements and code organization. The changes address multiple UX issues by introducing intelligent scrolling behavior that respects user intent - when users scroll up to read previous messages, auto-scrolling is disabled to prevent interruption, but new messages still auto-scroll when users are at the bottom of the chat. A floating "scroll to bottom" button appears when users scroll up, providing easy navigation back to recent messages.
The PR significantly improves markdown rendering by extracting functionality into a dedicated CopilotMarkdownRenderer component. This new component includes enhanced code block rendering with improved text extraction, per-block copy-to-clipboard functionality, and CSS fixes for text rendering issues. The component also supports link previews and comprehensive markdown element styling with theme support.
Code organization improvements include separating concerns by moving markdown rendering logic from the main CopilotMessage component into the specialized renderer, replacing console.log statements with structured logging using a proper logger, and simplifying component interfaces by removing unnecessary props.
Styling consistency is addressed through standardizing font sizes across the interface - user messages are changed from text-lg to text-base to match assistant messages, and the chat input component is updated to use consistent text-base sizing across all screen sizes, removing responsive font size variations.
Confidence score: 3/5
- This PR contains significant improvements but has some implementation concerns that could cause issues
- Score reflects complex DOM manipulation logic, global CSS injection patterns, and potential fragility in scroll detection
- Pay close attention to the new markdown renderer component and scroll behavior implementations
6 files reviewed, 3 comments
...ponents/panel/components/copilot/components/copilot-message/components/markdown-renderer.tsx
Show resolved
Hide resolved
...ponents/panel/components/copilot/components/copilot-message/components/markdown-renderer.tsx
Show resolved
Hide resolved
...m/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/copilot.tsx
Show resolved
Hide resolved
* Add basic personalizatoin * Make chat history non-interfering * Always personalize
* Add subblock enums to metadata * Update apps/sim/lib/copilot/tools/server-tools/blocks/get-blocks-metadata.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Initial fix * Add execution start time to message * Lint
…ing and styling (#872) * fix(copilot-ui): added user scrolling, fixed code block, fixed code copying and styling * use console logger instead of console * fix(copilot): make chat history non-interfering (#869) * Add basic personalizatoin * Make chat history non-interfering * Always personalize * improvement(copilot): add subblock enums to block metadata (#870) * Add subblock enums to metadata * Update apps/sim/lib/copilot/tools/server-tools/blocks/get-blocks-metadata.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fix(copilot): fix state message sent on move to background (#871) * Initial fix * Add execution start time to message * Lint * autofocus on new tab open --------- Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…ing and styling (#872) * fix(copilot-ui): added user scrolling, fixed code block, fixed code copying and styling * use console logger instead of console * fix(copilot): make chat history non-interfering (#869) * Add basic personalizatoin * Make chat history non-interfering * Always personalize * improvement(copilot): add subblock enums to block metadata (#870) * Add subblock enums to metadata * Update apps/sim/lib/copilot/tools/server-tools/blocks/get-blocks-metadata.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fix(copilot): fix state message sent on move to background (#871) * Initial fix * Add execution start time to message * Lint * autofocus on new tab open --------- Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…ing and styling (simstudioai#872) * fix(copilot-ui): added user scrolling, fixed code block, fixed code copying and styling * use console logger instead of console * fix(copilot): make chat history non-interfering (simstudioai#869) * Add basic personalizatoin * Make chat history non-interfering * Always personalize * improvement(copilot): add subblock enums to block metadata (simstudioai#870) * Add subblock enums to metadata * Update apps/sim/lib/copilot/tools/server-tools/blocks/get-blocks-metadata.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fix(copilot): fix state message sent on move to background (simstudioai#871) * Initial fix * Add execution start time to message * Lint * autofocus on new tab open --------- Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Summary
respect user scrolling, fixed code block, fixed code copying and styling
final touches
Type of Change
Testing
Tested manually
Checklist