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 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-11 11:00:30 +02:00
1 parent 9212e61c4c
commit 8f92a06c84
96 files changed
+999 -1261

No files matched your search

+3 -6
View File
@@ -39,8 +39,7 @@ describe('formatNumber', () => {
});
it('never hides a fractional value behind a whole number', () => {
// The bug this replaces: a field with step 1 showed a stored 100.234 as "100", and
// committing that text wrote the rounded value back into the project.
// A step-1 field showing 100.234 as "100" would write the rounded value back on commit.
expect(formatNumber(100.234)).toBe('100.234');
expect(formatNumber(0.001)).toBe('0.001');
});
@@ -71,8 +70,7 @@ describe('formatNumber', () => {
describe('roundTo', () => {
it('keeps a value at the precision its field shows', () => {
// Why the field rounds instead of only formatting: a `decimals: 0` field used to display
// "641" while the project still held 640.5.
// The field rounds, not just formats, so a `decimals: 0` field never shows "641" over a stored 640.5.
expect(roundTo(640.5, 0)).toBe(641);
expect(roundTo(32.4, 0)).toBe(32);
expect(roundTo(1.2345)).toBe(1.234);
@@ -90,8 +88,7 @@ describe('roundTo', () => {
describe('snapToStep', () => {
it('lands on whole numbers for a step-1 field', () => {
// The bug: a scrub added fractional device pixels to an already fractional value, so
// dragging X produced values like 100.667 instead of 101.
// A scrub adds fractional device pixels; without snapping X would land on 100.667 instead of 101.
expect(snapToStep(100.667, 1)).toBe(101);
expect(snapToStep(100.333, 1)).toBe(100);
expect(snapToStep(-3.5, 1)).toBe(-3);