From 8f92a06c84dc7d29e1db99a6c1bf9c65e6db3e42 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Sep 2026 11:00:30 +0200 Subject: [PATCH] Consolidate duplicated editor code, trim comments, refresh README Split GraphCanvas (1076 -> 831 lines) into EdgeLayer and graphMenus; the port and marker menus were the same list and are now one function. Value specs of the inspector and the list tab share valueSpecs.ts, and the remaining copies (compound commands, type glyphs, typed asset lookup, name rule, play/editor world setup, marquee) are merged. Four copies had already drifted apart; merging them fixes: - "Disconnect N links" in the port menu is one undo step, not N - "+ Add collider" is hidden on a placed container instance, as in the hierarchy menu, instead of always failing - a bool property coerced from the text "false" becomes false - a port command on an unknown node type reports instead of crashing Comment-only edits leave the bundle byte-identical. README corrected in 35 places (step limit, jump-run clock, suite duration, 409 body, ...). Co-Authored-By: Claude Opus 5 --- README.md | 110 +++--- src/core/commands/CompoundCommand.ts | 5 + src/core/commands/containerCommands.ts | 7 +- src/core/commands/portCommands.ts | 64 ++-- src/core/commands/require.ts | 6 +- src/core/commands/sceneObjectCommands.ts | 8 +- src/core/commands/variableCommands.ts | 29 +- src/core/graph/GraphInterpreter.ts | 1 - src/core/graph/NodeRegistry.ts | 6 +- src/core/graph/keyRepeat.ts | 7 +- src/core/graph/nested.ts | 3 +- src/core/graph/values.ts | 4 +- src/core/model/Project.ts | 9 + src/core/model/Properties.ts | 20 +- src/core/model/behaviorPrograms.ts | 6 +- src/core/model/instance.ts | 33 +- src/core/properties/PropertySchema.ts | 44 +-- src/core/properties/aspect.ts | 6 +- src/core/properties/editorRun.ts | 7 +- src/core/properties/resolve.ts | 4 - src/core/store/serialize.ts | 7 +- src/editor/AssetTabEditor.ts | 8 +- src/editor/Editor.ts | 1 - src/editor/EditorRun.ts | 18 +- src/editor/PlaySession.ts | 16 +- src/editor/actions.ts | 21 +- src/editor/debugHook.ts | 8 +- src/editor/framing.ts | 7 +- src/editor/graph/EdgeLayer.ts | 172 +++++++++ src/editor/graph/GraphCanvas.ts | 407 +++++----------------- src/editor/graph/folding.ts | 6 +- src/editor/graph/graphMenus.ts | 68 ++++ src/editor/inspector/aspectAction.ts | 4 +- src/editor/inspector/assetSection.ts | 44 +-- src/editor/inspector/fieldFactory.ts | 39 +-- src/editor/inspector/frameSection.ts | 5 +- src/editor/inspector/nodeSection.ts | 34 +- src/editor/inspector/objectSection.ts | 25 +- src/editor/inspector/portSection.ts | 92 ++--- src/editor/inspector/previewHandlers.ts | 6 +- src/editor/inspector/valueSpecs.ts | 64 ++++ src/editor/inspector/variableRows.ts | 73 ++-- src/editor/list/ListEditor.ts | 20 +- src/editor/list/slot.ts | 54 +-- src/editor/panels/HierarchyPanel.ts | 30 +- src/editor/panels/Toolbar.ts | 1 - src/editor/state.ts | 37 +- src/editor/viewport/SceneViewport.ts | 17 +- src/playground.ts | 3 - src/runtime/Entity.ts | 7 +- src/runtime/World.ts | 24 +- src/runtime/systems/BehaviorSystem.ts | 38 +- src/runtime/systems/CollisionSystem.ts | 16 +- src/runtime/systems/Input.ts | 2 - src/ui/KeyboardBridge.ts | 2 - src/ui/Widget.ts | 1 - src/ui/clicks.ts | 9 +- src/ui/drag.ts | 6 +- src/ui/draw.ts | 7 + src/ui/index.ts | 2 +- src/viewport/textureFill.ts | 6 +- tests/core/asset-ref.test.ts | 3 +- tests/core/collider.test.ts | 3 +- tests/core/dynamic-ports.test.ts | 5 +- tests/core/list-value.test.ts | 18 +- tests/core/nested-behavior.test.ts | 8 + tests/core/node-catalog.test.ts | 16 +- tests/core/resolve.test.ts | 4 - tests/core/walk.test.ts | 2 +- tests/editor/list-slot.test.ts | 5 +- tests/editor/variable-rows.test.ts | 6 +- tests/ui/math.test.ts | 9 +- todo-notes/inspector-buttons-entfernen.md | 2 + tools/e2e/02-inspector.mjs | 1 - tools/e2e/06-graph.mjs | 27 +- tools/e2e/09-containers.mjs | 35 +- tools/e2e/10-text-and-enabled.mjs | 2 +- tools/e2e/11-menus.mjs | 6 +- tools/e2e/12-textures.mjs | 28 +- tools/e2e/13-frames.mjs | 9 +- tools/e2e/14-overflow.mjs | 10 +- tools/e2e/15-aspect.mjs | 9 +- tools/e2e/16-container.mjs | 8 +- tools/e2e/17-editor-run.mjs | 58 +-- tools/e2e/18-pause.mjs | 15 +- tools/e2e/19-nested-behavior.mjs | 19 +- tools/e2e/20-key-repeat.mjs | 8 +- tools/e2e/21-list.mjs | 9 +- tools/e2e/22-struct.mjs | 3 +- tools/e2e/23-variable-nodes.mjs | 14 +- tools/e2e/lib/scaffold.mjs | 13 +- tools/lib/browser.mjs | 25 +- tools/lib/builders.mjs | 1 - tools/lib/harness.mjs | 49 ++- tools/seed-tetris.mjs | 32 +- tools/smoke-jumprun.mjs | 12 +- 96 files changed, 999 insertions(+), 1261 deletions(-) create mode 100644 src/editor/graph/EdgeLayer.ts create mode 100644 src/editor/graph/graphMenus.ts create mode 100644 src/editor/inspector/valueSpecs.ts create mode 100644 todo-notes/inspector-buttons-entfernen.md diff --git a/README.md b/README.md index 5aec84ff..18b413df 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Live: · Widget playground: