Repository navigation
fix(session-ui): render Mermaid after remounting messages - #45768
Closed
opencode-agent[bot] wants to merge 1 commit into
Closed
opencode-agent[bot] wants to merge 1 commit into
opencode-agent[bot] wants to merge 1 commit into
Conversation
1 of 6 tasks
Contributor
Author
|
Superseded by #45773, which fixed the remount path and added regression coverage. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix Mermaid diagrams reverting to source code when returning to a completed message in the web/desktop session UI.
Streaming code blocks already call
decorateMermaid, but completed messages mount through the full-HTML path, which skipped that decoration. Decorate completed Mermaid fences using the existing renderer without storing generated SVG in the Markdown cache.Validation
5d4ce14dc476123032ecbcff31bbd51f03831530; the same transition now retains a visible diagram.bun typecheckpasses inpackages/session-ui.git diff --checkpass.Browser tests exercise the production Markdown component through the existing Storybook fixture, not a full session-tab end-to-end flow. Each browser case was run separately with a fresh Chromium instance and reduced thread settings because of host resource limits. Before/after screenshots were inspected using identical fixture content and the component's real rendering path.
The TUI report is not claimed fixed by this PR; it uses a separate renderer and needs the reporter's exact source/version to identify their failure.
Requested by: @kitlangton (Kit via Slack)