Canopy開発日誌-4月

2026年4月のCanopy開発ログ。4月はeditor protocolの統一、pretty-printer ViewNode bridge、Markdown block editor、generic B-tree、Confidence lattice、drag-and-drop、Web E2E、loom Parser[T]統一、moon.work workspace導入など、Canopyの土台を次の段階へ引き上げる月になった。

Canopyは、テキストとプログラムの構造を同じ空間で直接編集できる、次世代のコードエディタです。ソースコードを文字列ではなく「構造」として扱うことで、安全なリファクタリングやAIとの協調作業、CRDTによる複数人同時編集を実現しています。

今月の大きな流れ

  • EditorProtocol: Ideal editorとprosemirror exampleをEditorProtocol経由に統一。CM6Adapter/PMAdapterを追加し、editorのadapter層を整理した。
  • Pretty-printer bridge: Wadler-Lindig pretty-printerの出力をViewNodeへ変換し、HTML syntax highlightingと統合。
  • Markdown block editor: Markdown用のblock editor、7つのMarkdown edit ops、three-mode web editor、block-input textarea overlay、MarkdownPreview semantic HTML adapterを実装。
  • Container: 文書をブロック単位で扱う編集コンテナ。Phase 2(text sync)、Phase 3(block doc sync)、document-level undo groupingを実装。
  • Generic B-tree: lib/btreeを汎用B-tree libraryとして切り出し、order-treeと統合。range delete、splice promotion chain repairを実装。
  • Semantic layer: 推論結果の確信度を扱うlib/semanticを追加。Confidence lattice(確信度の階層構造)とsymbolic annotatorを実装。
  • Language decoupling: LanguageCapabilities[T]でSyncEditorからlambda-specific typesを切り離し、generic tree opを実現。
  • Drag-and-drop: Ideal editorとblock editorでdrag-and-drop foundation、semantic Before/After drop、grip-only drag、outline DnDを実装。
  • Web E2E: Lambda/JSON editorのE2EテストをCIへ追加。
  • loom Parser[T]統一: ReactiveParserを廃止し、unified @loom.Parser[T]へ移行。
  • moon.work: MoonBit workspace機構を導入し、依存方向ルールをCIで検証。

4月第1週: EditorProtocol、pretty-printer、Markdown block editor

editorとviewの接続方式をEditorProtocolに統一し、ideal editor/prosemirror example/CodeMirror 6を同じprotocolで扱えるようにした。同時にpretty-printerの出力をViewNodeへ橋渡しし、HTML syntax highlightingを実現。Markdown向けのblock editorも立ち上げ、複数言語・複数viewの編集基盤を並列して拡張した一週間。

2026/4/1

Canopy / EditorProtocolとinspector panel

EditorProtocol Phase 3〜5を実装。CM6Adapter/PMAdapter追加、Ideal editor protocol migration、prosemirror example migration。Ideal editorにsource range、text preview、token spansを表示するinspector panelを追加(#107)。

主なPR / Issue: canopy #107

2026/4/2

Canopy / Pretty-printer ViewNode bridge

pretty-printer outputをViewNodeへ変換するbridgeを実装。get_pretty_viewcompute_pretty_patches、HTMLAdapter syntax highlighting、FFI exports追加。projectionをlanguage-agnosticにするrefactorも並行して進行(#109)。

主なPR / Issue: canopy #109

2026/4/3

Canopy / Container Phase 2とecho/TinySegmenter

  • Container Phase 2(shared global LVs、text sync)を実装(#112)。
  • echo: コミット履歴や作業ログから意味的に関連する情報を探すAI検索機能。TinySegmenter + bigram blended tokenizerを実装(#110)。

主なPR / Issue: canopy #110, #112

2026/4/4

Canopy / Markdown edit opsとweb editor

Markdown block editor向けに7つのMarkdownEditOp(SplitBlock、MergeBlocks等)を実装し、web editor pageとTypeScript bridgeを追加(#113, #114, #115)。

主なPR / Issue: canopy #113, #114, #115

4月第2週: block-input、zipper、B-tree、semantic layer

Markdown block-inputのtextarea overlay、arrow key navigation、backspace mergeなど細かい挙動を整理し、block editorを実用的に磨いた。 rose tree zipper(lib/zipper)、generic B-tree library(lib/btree)、semantic layer(lib/semantic)という新しい汎用ライブラリを立ち上げ、MoonBit v0.9 migrationも完了させた。

2026/4/5

Canopy / BlockInputとMarkdownPreview

textarea overlay付きのBlockInput thin input layerと、MarkdownPreview semantic HTML adapterを追加(#117)。

2026/4/6

Canopy / Block editing fixとscope highlighting

block editorのarrow key navigation、backspace merge、ZWSP placeholder、block ID uniquenessなどのbug fix。Ideal editorでtree viewにscope-colored binder highlightingを追加(#122)。

主なPR / Issue: canopy #121, #123, #125, #126, #128

2026/4/7

Canopy / Rose tree zipperとMoonBit v0.9

  • rose tree zipper library(lib/zipper)を追加(#130)。
  • Ideal editorのoutline tree keyboard navigationを強化(#132)。
  • full MoonBit v0.9 migration(#131)。

主なPR / Issue: canopy #130, #131, #132

2026/4/8

Canopy / lib/btreeとlib/semantic

  • generic B-tree library(lib/btree)を追加(#137)。
  • lib/semanticにConfidence lattice(推論結果の確信度を階層的に扱う数学的構造)とsymbolic annotatorを追加(#136)。
  • lambda-specific logicをlang/lambda packagesへ抽出(#135)。
  • container block doc sync(#134)。

主なPR / Issue: canopy #134, #135, #136, #137

2026/4/9

Canopy / B-tree range delete extraction

order-treeからB-tree range delete logicをlib/btreeへ移行。BTreeElem trait統合、range delete whitebox tests追加(#138, #139, #140)。

主なPR / Issue: canopy #138, #139, #140

2026/4/10

Canopy / B-tree defensive fix

B-tree delete_rangeのunderfull boundary repair、property-based tests、API narrowing(walker internals非公開化)を追加。

主なPR / Issue: canopy #141

4月第3週: Language decoupling、egraph optimizer、Web E2E、drag-and-drop

SyncEditorをlambda-specific typesから切り離すLanguageCapabilities[T]を導入し、Canopyを汎用構造編集フレームワークへ近づけた。Lambda evaluatorにはegraph optimizer Tier 3を統合。品質面ではWeb E2EテストをCIへ追加。UI面ではideal editorとblock editor双方でdrag-and-drop foundation、semantic Before/After drop、grip-only dragを実装した。

2026/4/11

Canopy / LanguageCapabilitiesとegraph optimizer

  • LanguageCapabilities[T]でSyncEditorをlambda-specific typesからdecouple(#146)。
  • egraph lambda optimizer Tier 3をcanopyに統合(#158)。
  • Tier 1 + Tier 2 batch escalation with incremental caching(#150)。
  • Web E2EテストをCIへ追加(#145)。
  • lib/btreeのsplice promotion chain repair(#143)。

主なPR / Issue: canopy #142, #143, #145, #146, #147, #148, #150, #151, #152, #158

2026/4/12

Canopy / Drag-and-drop foundation

Ideal editor向けdrag-and-drop foundationを実装(#174)。 Confidence lattice lawsのformal verification(#161)。

主なPR / Issue: canopy #161, #172, #173, #174

2026/4/14

Canopy / Drag-and-drop exchange

drag-drop exchange、grip-only drag、position detection、outline DnDを実装(#176)。

2026/4/15

Canopy / Block editor drag-and-dropとsemantic drop

  • block editorでsemantic Before/After positioning付きdrag-and-drop reordering(#179, #181)。
  • move_blockのlegality validation(#180)。
  • loom Boundary 3 bidirectional type-checkerを統合(#182)。

主なPR / Issue: canopy #179, #180, #181, #182

2026/4/17

Canopy / Document-level undoとlambda diagnostics

  • containerのdocument-level undo grouping(#187)。
  • lambda type-check diagnosticsをweb editorへ表示(#186)。

主なPR / Issue: canopy #185, #186, #187

4月第4週: Unified Parser、FFI split、moon.work

loomのunified @loom.Parser[T]へ移行し、ReactiveParserを廃止。FFIをjson/markdown/lambdaごとにpackage分割して言語ごとの責務を明確にした。最後にMoonBit workspace機構であるmoon.workを導入し、CIでパッケージ間の依存方向ルールを検証する仕組みを整えた。

2026/4/18

Canopy / Unified Parser[T]とFFI split

  • SyncEditor + lang companions + FFIをunified @loom.Parser[T]へ移行(#200)。
  • FFIをjson/markdown/lambdaごとにpackage分割(#195, #196, #197)。
  • parse recoveryをError ProjNodesとしてsurface(#193)。
  • SyncStatus + watchdog for WebSocket sync recovery(#199)。

主なPR / Issue: canopy #191, #192, #193, #194, #195, #196, #197, #199, #200, #201

2026/4/19

Canopy / loom Stage 5/6 bump

loom Stage 5(remove ReactiveParser)とStage 6にbump。MemoMap sweep-on-rebuild、InternId-in-Relation testを取り込んだ。

主なPR / Issue: canopy #202, #203

2026/4/22

Canopy / moon.work workspace導入

MoonBit workspace(moon.work)を導入。canopy + lib/text-change + lib/zipperをworkspace化し、CIで依存方向ルールを検証。lib/editor-adapterをnpm package @canopy/editor-adapterへ変換(#210, #211, #212)。

主なPR / Issue: canopy #210, #211, #212

2026/4/24

Canopy / btree registry化

lib/btreeをmooncakes registry経由のrle@0.2.0に切り替え、独立packageとして整理。

2026/4/26

Canopy / lambda typecheck pipeline evolution

loomのtypecheck range wedge fixをbump。lambda typecheck pipeline evolution planをdocsに追加。

作業運用メモ

4月はCanopyが「Lambda中心のエディタ」から「複数言語・複数editor viewを扱える汎用構造編集フレームワーク」へ近づいた月。EditorProtocol、LanguageCapabilities[T]、FFI分割、moon.workの導入がその象徴。同時にblock editor、Markdown editor、B-tree、semantic layerなど新しい柱も増え、5月以降の大規模な機能展開の土台が整った。