Add debugger component-hierarchy inspection - #165
Conversation
📊 PR Size: size/XLTotal changes: 1517 lines (10 files) Top files changed:
Size calculated as additions + deletions. Labels: XS (<10), S (<50), M (<250), L (<1000), XL (1000+) |
|
| Test Suite | Result |
|---|---|
| Valdi Smoke Tests | ✅ success |
| API Surface Check | ✅ success |
| Linux: Build Compiler | ✅ success |
| Snapshot Tests | ✅ success |
| valdi_web Integration Test | ✅ success |
| macOS: C++ & Platform Tests | ❌ failure |
| Linux: Module Tests | ✅ success |
| Linux: C++ Tests | ✅ success |
| Test Coverage Delta | ✅ success |
| Linux: Hotreload Smoke | ✅ success |
| Linux: Build & Export | ✅ success |
| Linux: Registry Validation | ✅ success |
Some tests failed. Please check the workflow logs for details.
🚀 Bazel remote cache is now enabled - future builds will be faster!
Workflow: Valdi CI
clholgat
left a comment
There was a problem hiding this comment.
Review of component-hierarchy inspection. The security posture is good: readComponentName reads only the constructor descriptor value/name and never touches the instance or invokes user getters; props/state/viewModel are never serialized; depth/node/child-link/traversal caps and the final JSON.stringify envelope gate are all enforced fail-closed; and cyclic/torn/mid-mutation trees abort atomically back to the physical element tree. One low observation below.
Note: please carry this feedback into the squashed PR when the stack is collapsed.
- 🟢 Low — component
keyvalues are emitted verbatim intocomponent.keyand the nodeid(component:[elementId,...path]). If an app uses data-derived keys (a common list anti-pattern, e.g.key={user.email}), that value is surfaced in the hierarchy envelope even though the element snapshot redacts attribute values. It's bounded to 256 chars/key and served only over the local loopback debugger, but it is genuinely new exposure not present in the pre-existing element snapshot. Consider redacting or omittingkeyvalues that look data-derived, or documenting the exposure.
Description
Adds bounded component-tree capture and hierarchy presentation to the debugger.
Type of Change
Testing
bazel test //...)Testing Details
npm testpassed 436/436; the CLI production build passed.//src/valdi_modules/src/valdi/web_renderer:testpassed.bazel query //...passed.Checklist
Related Issues
Relates to #154
Additional Context
Stack 12/22. Stacked on #164 (
bjd/debugger-console). Review this PR as the single incremental commit5ca2e137against that base; do not merge it before its parent.