feat(desktop): add file-backed Excalidraw editing - #84096
Open
kidclone3 wants to merge 15 commits into
Open
Conversation
kidclone3
marked this pull request as ready for review
August 12, 2026 12:10
kidclone3
force-pushed
the
feat/desktop-excalidraw-upstream
branch
from
August 12, 2026 17:29
22311e9 to
8f5163a
Compare
Author
Contributor
feat(desktop): add file-backed Excalidraw editing
|
kidclone3
force-pushed
the
feat/desktop-excalidraw-upstream
branch
from
August 17, 2026 03:44
5e57f15 to
7db0231
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.

What does this PR do?
Adds a native, file-backed Excalidraw workflow to Hermes Desktop. A user can open a
.excalidrawdocument in a real editor pane, manipulate it directly, and let the agent inspect or mutate the same document through guarded tools.The design keeps authority at the correct boundaries:
desktop_uitoolset; no process environment variable decides whether a GUI capability exists.This is intentionally separate from the existing ASCII-to-Excalidraw preview skill in #17720 and the offline tldraw proposal in #66896. Those generate or preview diagrams; this PR adds a persistent, editable
.excalidrawdocument pane with agent tools.No duplicate was found for the native file-backed Excalidraw workflow. #75457 is adjacent work covering guarded external local-file and
obsidian://openlink handling rather than in-app document editing. This PR has a narrower.excalidrawinterception path that opens drawings inside the native Hermes editor. The PRs touch the same Markdown and Electron link-routing surfaces and may require coordination or rebasing, but neither depends on the other.Related Issue
None.
Type of Change
Changes Made
Desktop editor and pane lifecycle
src/plugins/excalidraw/ExcalidrawPane.tsx, backed by the real@excalidraw/excalidraweditor and loaded lazily with its production stylesheet.Session-scoped gateway integration
excalidraw.openandexcalidraw.changedevent contracts to the shared Hermes protocol.HERMES_DESKTOP.Validated document mutations
tools/excalidraw_document.pyas the file-format boundary for.excalidrawdocuments.Agent tools and skill
open_excalidraw,read_excalidraw,excalidraw_add,excalidraw_update, andexcalidraw_deletetool handlers and schemas.excalidrawskill with the supported tool workflow, fingerprint discipline, mutation guidance, and verification steps.Regression coverage
apps/desktop/e2e/excalidraw.spec.ts. It mounts the production editor, draws a rectangle, persists it, drags the same stable element ID, verifies changed coordinates on disk, and rejects renderer feedback-loop diagnostics.How to Test
From the repository root, run the focused Python integration coverage:
Expected: 123 passed.
From
apps/desktop, verify TypeScript and renderer contracts:Expected: typecheck passes; 64 tests pass.
Build the packaged Desktop artifact:
Expected: renderer, Electron main/preload bundles, build-stamp assertion, and native dependency staging all succeed.
Run the real-editor E2E with the required isolated Desktop environment:
Expected: 1 passed; the test draws and moves one real Excalidraw rectangle and verifies both persisted states.
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass — focused wrapper coverage passed (123 tests); the full Python suite was not run locallyDocumentation & Housekeeping
docs/, docstrings) — bundled skill and tool schemas document the workflowcli-config.yaml.exampleif I added/changed config keys — N/A, no config keys addedCONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/A, the feature uses existing plugin/toolset contractsFor New Skills
Screenshots / Logs
Focused verification on the rebased branch:
Wall time: 1.14 seconds