Skip to content

feat[mermaid]:integration of mermaid #1732

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

asminkarki012
Copy link
Contributor

Copy link

vercel bot commented Apr 4, 2025

@asminkarki012 is attempting to deploy a commit to the Arc53 Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

codecov bot commented Apr 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.88%. Comparing base (3e1ec23) to head (55502b3).
Report is 29 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1732      +/-   ##
==========================================
+ Coverage   28.35%   28.88%   +0.53%     
==========================================
  Files          85       89       +4     
  Lines        5273     5449     +176     
==========================================
+ Hits         1495     1574      +79     
- Misses       3778     3875      +97     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dartpain dartpain requested a review from Copilot April 8, 2025 10:59
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • frontend/package.json: Language not supported
Comments suppressed due to low confidence (2)

frontend/src/components/MermaidRenderer.tsx:35

  • [nitpick] Consider using a more robust unique ID generation method (e.g., a UUID library) to minimize potential collisions if multiple diagrams are rendered in quick succession.
const id = `mermaid-${Math.random().toString(36).substring(2, 9)}`;

frontend/src/components/MermaidRenderer.tsx:225

  • [nitpick] Although using the array index as a key is common for static lists, consider using a unique identifier for each download option in case the list order changes in the future.
<li key={index}>

Copy link

vercel bot commented Apr 11, 2025

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

Name Status Preview Comments Updated (UTC)
docs-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 8:18am

Charlesnorris509

This comment was marked as off-topic.

@asminkarki012
Copy link
Contributor Author

Use lazy rendering or virtualization for the sources list, especially if the number of sources grows significantly.Use React.memo or useMemo for components like ToolCalls and Sources to avoid unnecessary re-renders. While you are code renders correctly, it would be slighty efficient consider optimization technique

@Charlesnorris509
Thanks for the suggestions!
Right now, I’m mainly working on the Mermaid rendering part—not the sources list or Tools calls. Could you help me understand what I might be missing there? A bit more context would be great. And yep, I’m definitely looking to optimize, so any tips are super welcome!

@Charlesnorris509
Copy link
Contributor

@asminkarki012 On the mermaidRendering.tsx file, you could use Lazy rendering to minimize the number of ressources needed to process the components of the files it basically divide the code, stores the files on intermediate storage, and only reprocess the files when it's changed. Here's a file that goes in depth on that process
https://vitiya99.medium.com/supercharging-react-typescript-performance-optimization-techniques-8b19de6e664e

@asminkarki012
Copy link
Contributor Author

@asminkarki012 On the mermaidRendering.tsx file, you could use Lazy rendering to minimize the number of ressources needed to process the components of the files it basically divide the code, stores the files on intermediate storage, and only reprocess the files when it's changed. Here's a file that goes in depth on that process https://vitiya99.medium.com/supercharging-react-typescript-performance-optimization-techniques-8b19de6e664e

thank you for clarifying,
sure I am currently working on implementing the optimization technique that you have mentioned here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants