Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/en/authoring-surface-recipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ Use one hosted handoff from definitions to proof instead of stitching together s
3. Project node-side state from `GetNodeParameterSnapshots(nodeId)` so `NodeParameterEditorHost` and `INodeParameterEditorRegistry` reuse the same metadata and validation contract on the custom node surface.
4. Write values back through `TrySetSelectedNodeParameterValue(...)` or `TrySetNodeParameterValue(...)`; keep validation on the shared session command path instead of adding a second editor model.
5. Project host commands from `GetCommandDescriptors()` so toolbars, menus, shortcuts, and palette actions stay on the same shared command route.
6. Close the handoff with `src/AsterGraph.Demo -- --proof` and expect `PORT_HANDLE_ID_OK:True`, `PORT_GROUP_AUTHORING_OK:True`, `PORT_CONNECTION_HINT_OK:True`, `PORT_AUTHORING_SCOPE_BOUNDARY_OK:True`, `CUSTOM_EXTENSION_SURFACE_OK:True`, and `AUTHORING_SURFACE_OK:True`.
6. For hosted pointer-mode controls, render `AsterGraphAuthoringToolActionFactory.CreatePointerSelectionModeActions(canvas)` into the same authoring toolbar row. These actions set `NodeCanvas.SelectionMode` to `NodeCanvasSelectionMode.Marquee` or `NodeCanvasSelectionMode.Lasso`; they do not add a session command, a parallel selection model, or whiteboard drawing state.
7. Close the handoff with `src/AsterGraph.Demo -- --proof` and expect `PORT_HANDLE_ID_OK:True`, `PORT_GROUP_AUTHORING_OK:True`, `PORT_CONNECTION_HINT_OK:True`, `PORT_AUTHORING_SCOPE_BOUNDARY_OK:True`, `CUSTOM_EXTENSION_SURFACE_OK:True`, and `AUTHORING_SURFACE_OK:True`.

## Copy path

Expand All @@ -89,7 +90,8 @@ Use one hosted handoff from definitions to proof instead of stitching together s
3. Replace node visuals through `IGraphNodeVisualPresenter`.
4. Replace editor bodies through `INodeParameterEditorRegistry`.
5. Render any host-owned edge overlay from `GetConnectionGeometrySnapshots()`.
6. Keep runtime decorations on `IGraphRuntimeOverlayProvider` and inspector snapshots; do not move graph execution into the editor.
6. Add lasso activation through `CreatePointerSelectionModeActions(...)` when the host needs a toolbar affordance for `NodeCanvasSelectionMode.Lasso`.
7. Keep runtime decorations on `IGraphRuntimeOverlayProvider` and inspector snapshots; do not move graph execution into the editor.

## Related docs

Expand Down
14 changes: 10 additions & 4 deletions docs/en/phase-0-reactflow-parity-audit.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs/en/public-api-inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Use this page with [Host Integration](./host-integration.md) and [Extension Cont
| `AsterGraph.Abstractions` | Node definitions, port definitions, provider/plugin-facing contracts, identifiers, metadata DTOs used by the canonical route, and thin definition builders that produce those DTOs. | None. | None. | None currently published as a primary support tier. | Implementation helpers not exposed through package docs. |
| `AsterGraph.Core` | Graph document, current-schema serialization model contracts, explicit legacy import, group container/collapse semantics, persisted node surface state including `GraphNodeSurfaceState.RotationDegrees`, compatibility rule inputs, thin implicit-conversion rule builder, and shared data types used by editor/session composition. | None. | `GraphDocumentSerializer.ImportLegacy(...)` as a bounded import/migration entry point for older payloads. | None in the primary v1 surface. Retired surfaces are listed in the v1 removal policy. | Core internals and persistence implementation details. |
| `AsterGraph.Editor` | `AsterGraphEditorFactory.CreateSession(...)`, `IGraphEditorSession`, `IGraphEditorCommands`, `IGraphEditorQueries`, DTO/snapshot queries including `GraphEditorNodeSurfaceSnapshot.RotationDegrees`, diagnostics, automation, validation snapshots, runtime overlay snapshots/providers, layout plan snapshots/providers, viewport visible scene projection snapshots/projector, hierarchy/group snapshots including collapsed-boundary connection projection, navigator/outline snapshots, plugin discovery/inspection, export services including raster export progress/cancel options. | `AsterGraphEditorFactory.Create(...)` as a hosted composition helper that still exposes the retained facade. | `GraphEditorViewModel`, `GraphEditorViewModel.Session`, retained menu/context-menu hooks, and `NodeViewModel.RotationDegrees` used by migrating hosts. | None in the primary v1 surface. Retired surfaces are listed in the v1 removal policy. | `Runtime.Internal`, `Kernel.Internal`, projection/apply internals, proof-only helpers. |
| `AsterGraph.Avalonia` | Adapter projection over the canonical editor/session route and hosted factories that consume the same runtime owner. | `AsterGraphAvaloniaViewFactory.Create(...)`, `AsterGraphCanvasViewFactory`, `AsterGraphInspectorViewFactory`, `AsterGraphMiniMapViewFactory`, `AsterGraphControls`, `NodeToolbar`, `EdgeToolbar`, `NodeResizer`, `AsterGraphPanel`, `AsterGraphHostBuilder`, `AsterGraphWorkbenchOptions`, `AsterGraphBuiltInComponentCatalog`, hosted workbench layout/panel-state options, and hosted performance policy budget markers. | `GraphEditorView` embedding for hosts that still use the retained editor facade. | Adapter-specific compatibility glue only when it bridges existing hosts to the canonical route. | Control internals, templates, interaction session internals, visual-only implementation details. |
| `AsterGraph.Avalonia` | Adapter projection over the canonical editor/session route and hosted factories that consume the same runtime owner. | `AsterGraphAvaloniaViewFactory.Create(...)`, `AsterGraphCanvasViewFactory`, `AsterGraphInspectorViewFactory`, `AsterGraphMiniMapViewFactory`, `AsterGraphControls`, `NodeToolbar`, `EdgeToolbar`, `NodeResizer`, `AsterGraphPanel`, `AsterGraphHostBuilder`, `AsterGraphWorkbenchOptions`, `AsterGraphBuiltInComponentCatalog`, hosted pointer selection mode actions, hosted workbench layout/panel-state options, and hosted performance policy budget markers. | `GraphEditorView` embedding for hosts that still use the retained editor facade. | Adapter-specific compatibility glue only when it bridges existing hosts to the canonical route. | Control internals, templates, interaction session internals, visual-only implementation details. |

## Route Mapping

Expand All @@ -44,6 +44,7 @@ Use this page with [Host Integration](./host-integration.md) and [Extension Cont
| v0.79 advanced canvas operations route | Stable canonical | `IGraphEditorQueries.GetSelectionRectangleSnapshot(...)`, `GraphEditorSelectionRectangleSnapshot`, `GraphEditorSelectionRectangleSnapshot.NodeIds`, `GraphEditorSelectionRectangleSnapshot.ConnectionIds`, `IGraphEditorCommands.SelectAll(...)`, `IGraphEditorCommands.SelectNone(...)`, `IGraphEditorCommands.InvertSelection(...)` | v0.79 canonical route for selection rectangle queries, marquee-backed selection, and bulk selection commands. These APIs stay on the session command/query route and are proven by editor contract tests and Avalonia overlay tests; they do not add a spatial index, alternate selection model, or generated runnable code. |
| Phase 530 lasso selection query route | Stable canonical | `IGraphEditorQueries.GetSelectionLassoSnapshot(...)`, `GraphEditorSelectionLassoSnapshot`, `GraphEditorSelectionLassoSnapshot.NodeIds`, `GraphEditorSelectionLassoSnapshot.ConnectionIds` | Backend/editor lasso query route for custom UIs that capture freeform polygon points themselves. The query stays on the session route, uses active-scope graph state, selects nodes by center-point polygon containment, and selects connections only when both endpoint nodes are selected. This does not add Avalonia gesture capture, pointer-mode state, drawing primitives, eraser behavior, persistence, renderer changes, screenshot rows, or full React Flow whiteboard parity. |
| Phase 533 lasso pointer-mode route | Supported hosted helper | `NodeCanvas.SelectionMode`, `NodeCanvasSelectionMode.Marquee`, `NodeCanvasSelectionMode.Lasso` | Hosted Avalonia activation path for stock canvas lasso selection. Marquee remains the default; hosts can opt into lasso for empty-canvas selection drags. This reuses the existing backend lasso query and Avalonia lasso bridge, and does not add toolbar UX, visual gesture capture, screenshot rows, eraser behavior, drawing primitives, persistence, renderer changes, or full React Flow whiteboard parity. |
| Phase 537 lasso toolbar ergonomics route | Supported hosted helper | `AsterGraphAuthoringToolActionFactory.CreatePointerSelectionModeActions(...)`, `pointer-mode.marquee-selection`, `pointer-mode.lasso-selection`, `NodeCanvas.SelectionMode`, `NodeCanvasSelectionMode.Lasso` | Hosted toolbar action projection for switching the stock canvas between marquee and lasso selection. The helper writes only the existing `NodeCanvas.SelectionMode` property, returns host-source actions with no runtime command id, and does not add a parallel selection model, eraser behavior, drawing primitives, persistence, renderer changes, strict pixel baselines, retained API removal, or full React Flow whiteboard parity. |
| Shipped Avalonia UI | Supported hosted helper | `AsterGraphEditorFactory.Create(...)`, `AsterGraphAvaloniaViewFactory.Create(...)` | Uses the same runtime owner; not a second runtime model. |
| Thin hosted builder | Supported hosted helper | `AsterGraphHostBuilder.Create(...).UseDefaultWorkbench().UseLayoutProvider(...).BuildAvaloniaView()`, plus `UseBehaviorOptions(...)`, `UseContextMenuAugmentor(...)`, `UseNodePresentationProvider(...)`, `UseToolProvider(...)`, `UseRuntimeOverlayProvider(...)`, and `UseLayoutProvider(...)` | Reduces common Avalonia setup boilerplate while delegating to canonical factories; the pass-throughs expose existing `AsterGraphEditorOptions` seams, including the host-owned synchronous layout provider seam, and do not create a new runtime model. `AsterGraphWorkbenchOptions` only controls stock hosted chrome. |
| Built-in component catalog | Supported hosted helper | `AsterGraphBuiltInComponentCatalog.Components`, `AsterGraphBuiltInComponentCatalog.TryGet(...)`, `AsterGraphBuiltInComponentDescriptor`, `AsterGraphBuiltInComponentStatus`, `AsterGraphControls`, `NodeToolbar`, `EdgeToolbar`, `NodeResizer`, `AsterGraphPanel` | Discovery-only Phase 3 map for built-in component tracks. Public entries point to existing canvas, minimap, background-grid, inspector, controls-panel, `controls`, command-tool-projection, `node-toolbar`, `edge-toolbar`, `node-resizer`, and `panel` surfaces. `AsterGraphControls` is a thin Avalonia control over `IGraphEditorSession.Commands.TryExecuteCommand(...)` for viewport zoom, fit, and reset actions; `NodeToolbar` and `EdgeToolbar` are thin Avalonia controls over `AsterGraphAuthoringToolActionFactory.CreateNodeActions(...)` and `CreateConnectionActions(...)`; `NodeResizer` is a thin Avalonia control over `IGraphEditorSession.Commands.TrySetNodeSize(...)`; `AsterGraphPanel` is a host-owned content overlay primitive with stable positional placement. |
Expand Down
6 changes: 4 additions & 2 deletions docs/zh-CN/authoring-surface-recipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
3. 然后用 `GetNodeParameterSnapshots(nodeId)` 投影节点旁路状态,让 `NodeParameterEditorHost` 和 `INodeParameterEditorRegistry` 在自定义节点表面上继续复用同一份 metadata 和 validation 合同。
4. 写回时继续走 `TrySetSelectedNodeParameterValue(...)` 或 `TrySetNodeParameterValue(...)`,把 validation 保留在共享 session command 路线上,不再引入第二套 editor model。
5. 宿主命令继续从 `GetCommandDescriptors()` 投影,这样 toolbar、menu、shortcut 和 palette action 都停留在同一条共享 command route 上。
6. 最后用 `src/AsterGraph.Demo -- --proof` 收口,并期待看到 `PORT_HANDLE_ID_OK:True`、`PORT_GROUP_AUTHORING_OK:True`、`PORT_CONNECTION_HINT_OK:True`、`PORT_AUTHORING_SCOPE_BOUNDARY_OK:True`、`CUSTOM_EXTENSION_SURFACE_OK:True` 和 `AUTHORING_SURFACE_OK:True`。
6. hosted pointer-mode 控件直接把 `AsterGraphAuthoringToolActionFactory.CreatePointerSelectionModeActions(canvas)` 投到同一行 authoring toolbar。它们只把 `NodeCanvas.SelectionMode` 设为 `NodeCanvasSelectionMode.Marquee` 或 `NodeCanvasSelectionMode.Lasso`,不新增 session command、第二套 selection model 或 whiteboard drawing state。
7. 最后用 `src/AsterGraph.Demo -- --proof` 收口,并期待看到 `PORT_HANDLE_ID_OK:True`、`PORT_GROUP_AUTHORING_OK:True`、`PORT_CONNECTION_HINT_OK:True`、`PORT_AUTHORING_SCOPE_BOUNDARY_OK:True`、`CUSTOM_EXTENSION_SURFACE_OK:True` 和 `AUTHORING_SURFACE_OK:True`。

## 复制顺序

Expand All @@ -89,7 +90,8 @@
3. 通过 `IGraphNodeVisualPresenter` 替换节点可视树。
4. 通过 `INodeParameterEditorRegistry` 替换 editor body。
5. 通过 `GetConnectionGeometrySnapshots()` 渲染宿主自管 edge overlay。
6. runtime decoration 保持在 `IGraphRuntimeOverlayProvider` 和 inspector snapshots 上;不要把图执行搬进 editor。
6. 宿主需要 toolbar affordance 时,用 `CreatePointerSelectionModeActions(...)` 接入 `NodeCanvasSelectionMode.Lasso`。
7. runtime decoration 保持在 `IGraphRuntimeOverlayProvider` 和 inspector snapshots 上;不要把图执行搬进 editor。

## 相关文档

Expand Down
Loading
Loading