feat(canvas): extract reusable graph model#562
Conversation
|
Warning Review limit reached
More reviews will be available in 18 minutes and 41 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (13)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
lambda-editor | 280574e | Commit Preview URL Branch Preview URL |
Jun 07 2026, 08:37 AM |
Benchmark Comparison ReportComparing PR branch against Main Module BenchmarksBase branch: PR branch: event-graph-walker BenchmarksBase branch: PR branch: Benchmarks run with |
Summary
examples/canvas/graph_modelinto reusablelib/canvas-graphmodule (dowdiness/canopy-canvas-graph).examples/canvasto depend on the new graph model via path dependency.Closes #485.
Reuse check
Existing APIs considered:
apply_action(CanvasState, WorkflowAction)lib/canvas-graph/graph_modelSelectNodesthrough the reducer instead of exportingset_selection.WorkflowAction::SelectNodeslib/canvas-graph/graph_modelArray::iter().any(...)node_id_in_arrayhelper at downstream call sites.New helpers added (if any):
workflow_node_kind_from_keyinexamples/canvas/main/canvas_update.mbt: example-local FFI/menu glue; moved out of the reusable library to avoid exporting UI-specific string-key mapping.Test plan
NEW_MOON_MOD=0 moon checkpassesNEW_MOON_MOD=0 moon testpassesgit diff *.mbtireviewed for unintended API surface changescd examples/canvas/web && npm run build)Validation