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).
1.7 KiB
1.7 KiB
id, name, status, depends_on, created, modified, scope, risk, impact, level
| id | name | status | depends_on | created | modified | scope | risk | impact | level | |
|---|---|---|---|---|---|---|---|---|---|---|
| value-clone-prevprops | Value.Clone for prevProps snapshots | pending |
|
2026-05-18T16:22:57.354731873Z | 2026-05-18T16:22:57.354732316Z | narrow | low | component | implementation |
Description
Use Value.Clone to create proper prevProps snapshots before mutation. Currently the architecture spec says fiber.prevProps should hold the snapshot before reconciliation, but without deep cloning, prevProps and fiber.props could share nested references.
Value.Clone provides a deep clone that the commitUpdate contract relies on: host.commitUpdate(instance, payload, tag, prevProps, nextProps, ctx) needs both the before and after state to be independent.
This is the second optimization in the strategy (after Value.Equal), and it's about correctness, not just performance. Without Value.Clone, hosts that read prevProps during commitUpdate might see already-mutated values.
Acceptance Criteria
Value.Cloneimported from@alkdev/typebox/valuefiber.prevPropsset toValue.Clone(fiber.props)before reconciliation updates propsprevPropsis a deep clone — no shared references withfiber.propscommitUpdatereceives independentprevPropsandnextProps- Existing tests pass
- New test: mutating
fiber.propsafter settingprevPropsdoes not affectprevProps - New test:
commitUpdatereceives correct before/after prop values
References
- docs/architecture/reconciler.md — TypeBox Optimization Layer, Value.Clone row
- docs/architecture/reconciler.md — Optimization Strategy (step 3)
Notes
To be filled by implementation agent
Summary
To be filled on completion