Repository navigation
feat(app-server): name image downloads diagram.drawio.png and diagram.drawio.svg - #125
Merged
Merged
Conversation
….drawio.svg Both images carry the .drawio file (the PNG in a tEXt chunk, the SVG in its content attribute), so they get the names draw.io gives such files, which show that the image opens as an editable diagram. The menu entries keep their labels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
LGTM. This is a small rename of the PNG and SVG download filenames, and it is covered by the updated test.
What was reviewed:
imageFileRequestinmcp-app-server/src/shared.js: only thefile:///URI changes. The MIME types and the text and blob handling are the same as before. Its only caller isdownloadImage.- I searched the repo for other references to the old
diagram.pnganddiagram.svgnames and found none outside the files this PR updates. - The
mcp-app-server/AGENTS.mdparagraph now matches the code. The.drawiodownload and the menu labels are unchanged.
Extended reasoning...
The PR changes the file URI that imageFileRequest returns for PNG and SVG downloads from diagram.<fmt> to diagram.drawio.<fmt>. It also updates the matching unit test and adds a sentence to mcp-app-server/AGENTS.md. The URI is only a suggested save name passed to the host's ui/download-file, so the change touches no security-sensitive surface. It is an 8-line change with a test, has no reviewer objections in the timeline, and no CODEOWNERS file covers these paths.
alderg
added a commit
that referenced
this pull request
Nov 23, 2026
package.json, package-lock.json and server.json in lockstep; server.json keeps @drawio/mcp 1.13.1 under packages, released in the same cycle. The changelog's unreleased section becomes 1.11.0, with #125 and #128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUK3U3orJF9Q5x2VbPi9jX
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.
The viewer's Download menu saved its images as
diagram.pnganddiagram.svg. Both carry the.drawiofile (the PNG in atEXtchunk namedmxfile, the SVG in itscontentattribute), so draw.io opens them for editing. They are now saved asdiagram.drawio.pnganddiagram.drawio.svg, the names draw.io gives such files, so the name shows that the image is also an editable diagram.imageFileRequestinmcp-app-server/src/shared.jsbuilds the new names. The viewer has no title-based file names; the.drawiodownload is unchanged.test/download.test.jsexpects the new names.mcp-app-server/AGENTS.mddocuments them.Tested:
npm testinmcp-app-server(350 pass, 0 fail, 50 browser tests skipped). A separate headless Chrome check drew a diagram in the viewer and ran both exports through the Download menu's code. The files the host was asked to save werediagram.drawio.pnganddiagram.drawio.svg. Each carried the full.drawiofile with the diagram's cells.🤖 Generated with Claude Code