Skip to content

feat: add offline draw.io diagram editor - #39

Closed
lindoo67 wants to merge 6 commits into
stablyai:mainfrom
lindoo67:feat/drawio-plugin
Closed

lindoo67 wants to merge 6 commits into
stablyai:mainfrom
lindoo67:feat/drawio-plugin

Conversation

@lindoo67

@lindoo67 lindoo67 commented Oct 30, 2026 •

Copy link
Copy Markdown

Adds an offline draw.io editor for .drawio and .drawio.xml files in Orca, including a new-file template, multi-page XML support, light/dark themes, and synchronization with Orca document buffers.

The plugin uses sandboxed-ui because it embeds an interactive diagram editor. It requests no capabilities. The bundled draw.io version is pinned to upstream commit 84487b4891cbc0f32d7e30f34cf878c87cb1f414; build sources, license notices, screenshots, and browser tests are included.

The catalog release was generated using the validator at the repository CI's pinned Orca commit. Plugin files and generated release metadata are in separate commits as required.

Validation:

  • Existing Playwright editor suite passed: offline CSP/no network requests, clean open, edits/flush, undo/redo, settings, compressed multi-page XML, metadata, conflict retry, read-only mode, invalid XML, and themes.
  • ORCA_DIR=/tmp/orca-drawio-release-validator node scripts/release-entry.mjs passed.
  • ORCA_DIR=/tmp/orca-drawio-release-validator node scripts/check-catalog.mjs passed: all 30 releases match their remote commits, including Draw.io; legacy catalog is up to date.
  • Real Orca installation and keyboard shortcut behavior still require manual acceptance.

Maintainer review: this contribution preserves the author's lindoo.drawio identity. The repository policy reserves official plugins for stablyai; please review publishing ownership and placement before merging. The catalog source targets this upstream repository for the proposed merge.

@lindoo67

Copy link
Copy Markdown
Author
image image image

@AmethystLiang , please check this drawio plugin, thanks!

@AmethystLiang

Copy link
Copy Markdown
Contributor

Thanks for building this! An offline draw.io editor would be a great addition. I tested the bundled editor and found a few things to address:

  1. Text editing is interrupted by autosync. Insert a text shape and start typing: the pending 200 ms autosync calls flush(), which calls graph.stopEditing(false) and ends editing. I reproduced this using the Insert Text action. Background synchronization should avoid ending an active edit; an explicit save can still commit it.
  2. Compressed pages need an expansion limit. A roughly 87 KB compressed diagram expanded to 64 MB and blocked the editor frame for about 1.35 seconds in my test. Larger files can exhaust memory or freeze the renderer. Please bound decompression and document complexity before loading, including compressed pages.
  3. Unavailable actions are still exposed. Mermaid opens a dialog, but inserting a valid diagram reports “Mermaid parser not available.” Please hide or disable unsupported actions so users don't run into broken workflows.

The existing browser suite passed, as did additional checks for host synchronization without echoes, page insertion/duplication, read-only mode, and catalog validation. A 2,000-node diagram flushed in about 34 ms in my test. Real Orca installation and keyboard shortcuts still need end-to-end verification.

We also have a new way to publish community plugins directly from your own public GitHub repository! This lets you maintain the plugin there and can help bring users and traffic to your repo. Add the orca-plugin topic, push a vX.Y.Z tag, and check your listing status on the Orca plugins page. The page also links to the full guide; listings usually appear within an hour.

Remove the official plugin directories copied from upstream main and
trim orca-catalog.json down to the lindoo.drawio entry, pointing its
source at lindoo67/orca-plugins on feat/drawio-plugin.
@lindoo67 lindoo67 closed this Oct 31, 2026
@lindoo67

Copy link
Copy Markdown
Author

thaks,i will update the plugin in the newest method.

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.

2 participants