Skip to content

feat: add Excalidraw support across .excalidraw files and embedded ma…#773

Open
julienevano wants to merge 22 commits into
refactoringhq:mainfrom
julienevano:main
Open

feat: add Excalidraw support across .excalidraw files and embedded ma…#773
julienevano wants to merge 22 commits into
refactoringhq:mainfrom
julienevano:main

Conversation

@julienevano

Copy link
Copy Markdown

…rkdown diagrams

Adds Excalidraw as a first-class diagram surface with two routes sharing one editable canvas component:

  • Embedded markdown blocks via a fenced excalidraw block, round-tripped through the existing DurableBlockCodec pipeline (cloned from tldraw).
  • Standalone .excalidraw files routed to ExcalidrawFileEditor based on extension; reuses get_note_content / save_note_content IPC, no new commands.

ExcalidrawCanvas consumes initialData on mount only — callers remount via React key to load new content (ExcalidrawFileEditor keys on path). Autosave is gated behind a first-user-interaction flag so opening a file never rewrites it; pending debounced edits flush synchronously on unmount.

Storage is fully in the source file (markdown fence or .excalidraw JSON). Embedded image assets in the scene files field are explicitly deferred, matching ADR-0107's deferral for tldraw assets. Documented in ADR-0134.

@julienevano julienevano force-pushed the main branch 3 times, most recently from 31e1f6b to d36db64 Compare June 1, 2026 12:12
…rkdown diagrams

Adds Excalidraw as a first-class diagram surface with two routes sharing one
editable canvas component:

- Embedded markdown blocks via a fenced `excalidraw` block, round-tripped
  through the existing DurableBlockCodec pipeline (cloned from tldraw).
- Standalone `.excalidraw` files routed to ExcalidrawFileEditor based on
  extension; reuses get_note_content / save_note_content IPC, no new commands.

ExcalidrawCanvas computes mount-only initialData via a useState lazy
initializer (callers remount via React key to load new content;
ExcalidrawFileEditor keys on path). Autosave is gated behind a
first-user-interaction flag so opening a file never rewrites it; pending
debounced edits flush synchronously on unmount.

Storage is fully in the source file (markdown fence or .excalidraw JSON).
Embedded image assets in the scene `files` field are explicitly deferred,
matching ADR-0107's deferral for tldraw assets.

lodash-es is pinned to 4.18.1 (pnpm override) so Excalidraw's transitive
chevrotain path cannot pull vulnerable lodash-es 4.17.21.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The fake shell in user_shell_bindings_from_shell_reads_zshrc_exports_for_requested_keys
set HOME to a temp dir but left ZDOTDIR inherited from the runner's environment.
On machines where ZDOTDIR points at a real ~/.zshrc, the probe sourced that file
instead of the temp .zshrc, so the expected exports never appeared and the call
returned None -> panic. Clear ZDOTDIR in the fake shell so the test is hermetic.
Production behaviour is unchanged (it still honours a real ZDOTDIR).
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.

1 participant