Skip to content

Conversation

Wadehl
Copy link

@Wadehl Wadehl commented Aug 6, 2025

Old:

image

New:

image image

Need Help:

Currently unable to render Mermaid diagrams directly within the MessageList due to virtual scrolling implementation. The virtual scrolling causes components to repeatedly unmount/mount during scroll operations, resulting in constant flickering and re-rendering of Mermaid SVGs. This approach with on-demand dialog rendering solves the performance issue, but if anyone has experience with stable Mermaid rendering in virtualized lists, feedback would be appreciated.

Issue Resolution

This change potentially provides a temporary workaround solution for Issue #249, which likely relates to Mermaid diagram rendering problems in the message interface

…m support

- Add MermaidRenderer component with fullscreen dialog viewer
- Integrate @panzoom/panzoom for smooth pan and zoom interactions
- Replace auto-rendering with on-demand code block buttons (copy + render)
- Add intelligent height fitting and vertical centering for optimal viewing
- Support copy feedback with visual indicators
- Add accessibility compliance with proper DialogTitle
- Maintain performance with caching and intersection observer optimization
@123vivekr
Copy link
Member

Oh this is looks cool. I see its been a while since you've submitted this. Do you still want to work on this?

@Wadehl
Copy link
Author

Wadehl commented Sep 26, 2025

Oh this is looks cool. I see its been a while since you've submitted this. Do you still want to work on this?

Yes, absolutely! I'm still interested in working on this.

Sallvainian added a commit to Sallvainian/opcode that referenced this pull request Oct 16, 2025
- Add interactive Mermaid diagram rendering with pan-zoom support
- Implement MermaidRenderer component with fullscreen dialog viewer
- Add global SVG caching strategy with timestamp expiry
- Integrate MermaidCodeBlock into StreamMessage for code blocks
- Add zoom controls and copy-to-clipboard functionality
- Install dependencies: mermaid, @panzoom/panzoom, @types/mermaid
- Resolve cherry-pick conflicts from PR winfunc#261
- Fix duplicate code blocks from automated conflict resolution
- Clean up unused imports and variables

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sallvainian added a commit to Sallvainian/opcode that referenced this pull request Oct 16, 2025
Added logging to confirm all integrated features work at runtime:

- PR winfunc#261 (Mermaid): Track cache hits and render success
- PR winfunc#222 (MCP Async): Track sidecar vs regular execution
- PR winfunc#346 (NVM PATH): Track Node.js PATH additions

All logs prefixed with PR numbers for easy identification.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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.

3 participants