Skip to content

Highlight incomplete operator nodes in tree and viewport#41

Merged
kmatzen merged 2 commits intomainfrom
highlight-incomplete-nodes
Apr 18, 2026
Merged

Highlight incomplete operator nodes in tree and viewport#41
kmatzen merged 2 commits intomainfrom
highlight-incomplete-nodes

Conversation

@kmatzen
Copy link
Copy Markdown
Owner

@kmatzen kmatzen commented Apr 18, 2026

Summary

  • Tree UI: Incomplete operators (and ancestors up to root) show red tint, ⚠ warning icon, and auto-expand to reveal urgent "needs shape" placeholder slots
  • Slot preservation: Deleting a boolean child inserts a disabled _empty placeholder so the remaining operand keeps its position (A/B order maintained)
  • Partial rendering: Incomplete trees now render available geometry instead of blanking the viewport
  • Viewport tinting: Shapes from collapsed incomplete booleans tint orange via a generated sdfWarn() GLSL function that preserves ancestor transforms for correct spatial localization

Test plan

  • Create a subtract with two children, delete the first — verify the second stays in its slot and a placeholder appears in the first slot
  • Verify the warning icon and red tint propagate up to ancestor operators in the tree
  • Verify incomplete nodes auto-expand to show missing slots
  • Build union(box, subtract(sphere)), delete the sphere's sibling — verify only the sphere tints orange in the viewport while the box stays blue
  • Add a translate wrapping the incomplete subtree — verify the orange tint appears at the correct transformed position
  • Drop a shape onto a placeholder slot — verify it replaces the placeholder and warnings clear
  • Run npx vitest run — all 81 tests pass

🤖 Generated with Claude Code

kmatzen and others added 2 commits April 17, 2026 19:54
Users were confused when an operator had missing children because
nothing visually indicated the problem — the viewport just went blank.

Tree UI: incomplete operators and their ancestors show a red tint,
warning icon, and auto-expand to reveal "needs shape" placeholder
slots. Boolean slot order is preserved when deleting a child by
replacing it with a disabled _empty placeholder node.

Viewport: incomplete trees now render whatever geometry is available
instead of blanking. Shapes from collapsed incomplete booleans tint
orange via a generated sdfWarn() function that preserves ancestor
transforms for correct localization.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e booleans

The incomplete boolean placeholder now shows "⚠ needs shape" instead
of "drop here" when urgent, so the E2E test needs to match the new text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kmatzen kmatzen merged commit 0bbf8f3 into main Apr 18, 2026
5 checks passed
@kmatzen kmatzen deleted the highlight-incomplete-nodes branch April 18, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant