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 | |
|---|---|---|---|---|---|---|---|---|---|---|
| mount-with-fibers | Refactor mountNode to build fiber tree | pending |
|
2026-05-18T16:22:57.152634856Z | 2026-05-18T16:22:57.152635298Z | moderate | medium | phase | implementation |
Description
Refactor the existing mountNode in src/host/config.ts to build a fiber tree alongside host instances during the mount phase. Currently, mountNode creates instances but discards them — the instance tree is unreachable for updates. After this task, Root holds a reference to the root fiber, enabling re-render and unmount.
The mount pipeline stays the same (depth-first, post-order append). The change is that each created instance is wrapped in a Fiber node that tracks its parent, children, and props. Function components remain transparent — they don't get their own fiber.
This task also stores the root fiber on the Root object so that subsequent renders can diff against it.
Acceptance Criteria
mountNodecreatesFibernodes for each intrinsic element and text instance- Function components are transparent — no fiber for the component itself
URootchildren are mounted into the parent fiber (root is a transparent container)- Primitives get text fibers with
tag: "#text" - Fiber tree is linked:
parentandchildrenfields are populated Rootobject holds arootFiberreference (new field)signalDisposersinitialized as empty array on each fibereffectinitialized asnullon each fiber- Existing mount behavior preserved — hosts still receive same
createInstance/appendChildcalls - Existing tests pass
- New test: after
render(),Root.rootFiberhas correct children structure matching the UNode tree
References
- docs/architecture/reconciler.md — Fiber Node, Reconciliation Algorithm, Function Components sections
- docs/architecture/host-config.md — Mount Pipeline, No Instance Tree Reference gap
- docs/architecture/lifecycle.md — Fiber Tree Disposal
Notes
To be filled by implementation agent
Summary
To be filled on completion