Skip to content

fix(copilot): added user scrolling, fixed code block, fixed code copying and styling#872

Merged
waleedlatif1 merged 6 commits intostagingfrom
fix/copilot-mkdown
Aug 5, 2025
Merged

fix(copilot): added user scrolling, fixed code block, fixed code copying and styling#872
waleedlatif1 merged 6 commits intostagingfrom
fix/copilot-mkdown

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

respect user scrolling, fixed code block, fixed code copying and styling
final touches

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Aug 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sim ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2025 2:47am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Aug 5, 2025 2:47am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

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

Edit Code Review Bot Settings | Greptile

Sg312 and others added 4 commits August 4, 2025 19:43
* 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
@vercel vercel bot temporarily deployed to Preview – docs August 5, 2025 02:44 Inactive
@waleedlatif1 waleedlatif1 merged commit 41b1357 into staging Aug 5, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/copilot-mkdown branch August 5, 2025 02:49
waleedlatif1 added a commit that referenced this pull request Aug 5, 2025
…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>
waleedlatif1 added a commit that referenced this pull request Aug 6, 2025
…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>
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…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>
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