Commit Graph
2 Commits
Author SHA1 Message Date
adrien 68da5592ef refactor: unwrap nested if-else in error-path code generation
- Replace if/else wrapping in WCProcCall.generateOwnCode with branch-aware
  generation via _branchDescendants, _emitBranch, and _generateCallWithError
- Shared blocks (reachable from both error and success paths) now appear
  only once after the if-block, avoiding deeply nested code
- Add 8 browser tests covering merge, decision passthrough, value style,
  sequential calls, and shared-only error paths
- Increase template block spacing (16px -> 40px) for readability
- Add error WCEnd blocks to console and SDL3 templates with error-hook
  connections to all failure-mode proc calls
- Hide editable WCProcCall input fields behind field-display spans,
  matching existing algorithm-block convention
2026-06-23 00:51:54 +02:00
adrien b8e8ef9113 overhaul: modular architecture, tests, doc generation, warning system, and UX improvements
- Modular block files: split into blocks-algo, blocks-data, blocks-proc
- New modules: sections.js (labelled canvas areas), proc-browser.js (procedure tree modal), lib-loader.js (lazy library loading), templates.js (project templates), errno-data.js (errno table)
- Test infrastructure: browser test suite (28 tests) and Node pure-function tests (75 tests)
- Warning system: unified .block-warn for disconnected inputs, unconnected error hooks, and zero-exit-in-error-path
- Error path highlighting: red flow paths and block borders for error-only subgraphs
- Input hooks: hidden by default, shown during linking; outputs always at bottom
- Block editor modal: pencil icon, colour picker for accent, compact field labels
- Doc generation: standalone node script extracts JSDoc -> docs/API.md (124 declarations)
- Persistence: save/restore sections, errno selection, block colours
- Fixes: _segmentsIntersect bug, WCEnd crash from closest(this), drawpath guard on detached elements
2026-06-22 18:31:23 +02:00