Tasks follow the architecture spec phases: - Phase 0: key field on UElement (2 tasks + review) - Phase 1: reactive-host bridge / fiber tree (4 tasks + review) - Phase 2: key-based children reconciliation (3 tasks + review) - Phase 3: unmount & dispose support (4 tasks) - Phase 4: TypeBox value optimizations (4 tasks) Validated with taskgraph CLI: no cycles, 15 parallel generations, 3 high-risk tasks identified (signal-driven-updates, commit-mutations, fiber-disposal).
2.1 KiB
2.1 KiB
id, name, status, depends_on, created, modified, scope, risk, impact, level
| id | name | status | depends_on | created | modified | scope | risk | impact | level | |
|---|---|---|---|---|---|---|---|---|---|---|
| render-re-renderable | Make Root.render() re-renderable | pending |
|
2026-05-18T16:22:57.183371873Z | 2026-05-18T16:22:57.183372316Z | moderate | medium | component | implementation |
Description
Make Root.render() support being called multiple times. Currently, calling render() twice creates two independent instance trees appended alongside each other. After this task, the second render() call reconciles against the stored fiber tree: it compares the new UNode tree to the existing fiber tree and applies property-only updates (structural reconciliation is Phase 2).
This task also addresses the render() → mount() naming question from host-config.md Open Question 1: consider whether renaming render() to mount() for the first call makes the semantic clearer.
For Phase 1 (before key-based reconciliation), render() handles:
- First call: mounts the tree and builds the fiber tree
- Subsequent calls: reconciles props positionally (same structure assumed), calls
prepareUpdate/commitUpdatefor changed props
Acceptance Criteria
Root.render(node)on first call mounts and builds fiber tree (existing behavior)Root.render(node)on second call reconciles props against existing fiber tree- Second
render()does NOT create duplicate instances - Positional children matching: Nth old child → Nth new child
- If child count differs, excess old children remain (structural changes deferred to Phase 2)
Root.unmount()still a stub (proper unmount is Phase 3)- Existing tests pass
- New test: calling
render()twice on same root produces one instance tree with updated props - New test:
prepareUpdateis called for changed props on re-render
References
- docs/architecture/host-config.md — Known Gaps: The Reconciler Gap, render() is not idempotent
- docs/architecture/reconciler.md — Step 2 (Reconcile Props), Changes to Existing Files
- docs/architecture/host-config.md — Open Question 1 (render → mount rename)
Notes
To be filled by implementation agent
Summary
To be filled on completion