Show diagram errors as a callout - #223
Merged
Merged
Conversation
MaggieAppleton
force-pushed
the
design/code-block
branch
from
September 30, 2026 10:45
0227b49 to
404e81e
Compare
MaggieAppleton
added this pull request to stack #227
September 30, 2026 11:04
MaggieAppleton
force-pushed
the
design/code-block
branch
from
September 30, 2026 11:14
e255798 to
b04879c
Compare
MaggieAppleton
removed this pull request from stack #227
September 30, 2026 12:56
MaggieAppleton
force-pushed
the
design/diagram-error
branch
from
September 30, 2026 12:58
203d0b5 to
20e7a27
Compare
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.
Replaces the bare red Mermaid error with a contained callout that says what went wrong in plain words and keeps the useful part of Mermaid's message.
Stacked on #218 (code block header bar). The callout sits inside that block's box, so this PR targets
design/code-block. GitHub will retarget it tomainwhen #218 merges.Change
describeDiagramError()incode.ts:--text-smand--text-xswith their line-height tokens, and colours use theme tokens. The design contract passes with no new exceptions.Screenshots
Captured from the dev-only design audit page at 2x, with a parse-error diagram added temporarily to the audit to show that case.
Verification
After resolving the stack
The real editor still shows the parse-error explanation and unknown-diagram callout inside the updated code block.
🤖 Generated with Claude Code