--- id: fiber-type name: Define Fiber and Effect types status: pending depends_on: [review-key-field] created: 2026-05-18T16:22:57.140011417Z modified: 2026-05-18T16:22:57.140011873Z scope: narrow risk: medium impact: phase level: implementation --- # Description Define the `Fiber` interface and `Effect` type in a new file `src/host/fiber.ts`. The fiber tree is the reconciler's internal state — it maps `UElement` positions to host instances across renders. This is the foundational type that all reconciler work builds on. The `Fiber` type is generic over `I` (matching `HostConfig`'s `Instance` type) so each fiber carries a reference to its host instance. This is the bridge: fiber → host instance → host-specific state. ## Acceptance Criteria - [ ] `Fiber` interface defined with all fields: `instance`, `tag`, `props`, `key`, `children`, `parent`, `effect`, `signalDisposers`, `prevProps` - [ ] `Effect` union type defined with variants: `update`, `insert`, `move`, `remove` - [ ] Types are exported from `src/host/fiber.ts` - [ ] Types are re-exported from `src/mod.ts` barrel - [ ] TypeScript compiles (`npm run build:tsc`) - [ ] No runtime behavior changes — this is type-only ## References - docs/architecture/reconciler.md — Fiber Node, Effect Types sections - docs/architecture/lifecycle.md — Fiber Tree Disposal (signalDisposers field) ## Notes > To be filled by implementation agent ## Summary > To be filled on completion