Repository navigation
feat(chat): draw mermaid diagrams, and markdown files with their images in the file viewer #616
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
Merged
devswha
merged 13 commits into
devswha:main
from
lyonbot:feat/markdown-mermaid-lightbox
Oct 11, 2026
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
cdc186f
feat(chat): draw mermaid diagrams, and markdown files with their imag…
lyonbot 139b53b
docs(changelog): add the mermaid and markdown viewer entry
lyonbot 46f721b
fix(chat): address review: Mermaid notice, theme change redraws, file…
lyonbot c2ac825
Merge branch 'main' into feat/markdown-mermaid-lightbox
lyonbot a45fd98
chore(merge): sync PR 616 with main
devswha 34f45d7
fix(markdown): render every Mermaid diagram
devswha baf80d0
docs(licenses): add elkjs EPL notice
devswha 3b80066
fix(viewer): limit inline Markdown images
devswha e6d646f
docs(changelog): move Mermaid entry to Unreleased
devswha d06e46e
Merge remote-tracking branch 'origin/main' into pr-616-sync
devswha cc38748
test(viewer): load the layout fixture bundle as a module script
devswha 9ebae22
docs: add notices for Mermaid bundled deps
devswha 0d4a5e5
Merge remote-tracking branch 'origin/main' into pr-616-sync
devswha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| /* above the file viewer (modal + 1), which opens diagrams of its own markdown */ | ||
| .mermaid-lightbox-scrim { | ||
| z-index: calc(var(--z-modal) + 2); | ||
| padding: 0; | ||
| background: var(--bg); | ||
| } | ||
|
|
||
| .mermaid-lightbox { | ||
| position: relative; | ||
| width: 100%; | ||
| height: 100%; | ||
| background: var(--bg); | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .mermaid-lightbox-bar { | ||
| position: absolute; | ||
| top: var(--space-3); | ||
| right: var(--space-3); | ||
| z-index: 1; | ||
| display: flex; | ||
| align-items: center; | ||
| gap: var(--space-1); | ||
| padding: var(--space-1); | ||
| background: var(--bg-elevated); | ||
| border: var(--hairline) solid var(--border); | ||
| border-radius: var(--radius-lg); | ||
| box-shadow: var(--shadow-pop); | ||
| } | ||
|
|
||
| .mermaid-lightbox-zoom { | ||
| min-width: 4ch; | ||
| text-align: center; | ||
| color: var(--text-dim); | ||
| font-family: var(--font-mono); | ||
| font-size: var(--fs-xs); | ||
| font-variant-numeric: tabular-nums; | ||
| } | ||
|
|
||
| /* the stage never scrolls: the diagram moves inside it, and the page behind stays put */ | ||
| .mermaid-lightbox-stage { | ||
| position: absolute; | ||
| inset: 0; | ||
| overflow: hidden; | ||
| cursor: grab; | ||
| touch-action: none; | ||
| user-select: none; | ||
| } | ||
|
|
||
| .mermaid-lightbox-stage.is-dragging { cursor: grabbing; } | ||
|
|
||
| /* the svg fills the canvas and keeps its aspect ratio, which is the fit */ | ||
| .mermaid-lightbox-canvas { | ||
| position: absolute; | ||
| inset: var(--space-8) var(--space-4) var(--space-4); | ||
| transform-origin: 0 0; | ||
| } | ||
|
|
||
| .mermaid-lightbox-canvas svg { | ||
| display: block; | ||
| width: 100%; | ||
| height: 100%; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.