# IPZ Textarea lifecycle

- **ID:** IPZ-TEXTAREA-LIFECYCLE-2026-08-15
- **Status:** IDLE
- **Task:** Delivery 5 Textarea lifecycle slice
- **Source request:** Add the smallest complete idempotent `mount()`, `update(next)`, and `destroy()` lifecycle contract to the canonical Textarea primitive without changing its public positional factory API, DOM identity, or page behavior.

## Outcome and acceptance criteria

`Textarea` retains its positional and default exports, generated markup, classes, label/help behavior, state behavior, and supported props. Its returned DOM root exposes lifecycle methods that preserve node identity, clean up its change handler, and restore it on remount. Focused tests prove compatibility, in-place updates, repeated lifecycle calls, cleanup, and remount. The UI inventory reports all three lifecycle methods for this factory-handle component. Production assets and required reports are regenerated.

## Constraints

- Preserve unrelated WIP and do not land the commit.
- Change only Textarea, focused tests, required inventory/report records, this plan/index, and generated production assets.
- Follow existing Input, Badge, ProgressBar, and Modal lifecycle patterns after reading their source and tests.

## Execution steps

1. Read the reference lifecycle implementations/tests and inventory scanner.
2. Add the minimal factory-handle lifecycle contract to Textarea.
3. Add focused lifecycle coverage and inventory detection coverage if needed.
4. Run focused tests, full admin tests, lint, production build, inventory/gate, factory gate, and commit locally.

## Current receipt

Local commits `dcd2bbea5` (original slice) and `5b424767c` (review repairs) contain the complete Textarea lifecycle work. The review repair preserves supplied `onchange` precedence across mount and remount, records Textarea as the lifecycle-owning factory handle in the registry and both reports, and adds JSON/Markdown agreement coverage. Focused tests passed (5 tests); full admin tests passed (44 files, 641 tests); lint and production build passed. Inventory tests passed (14 tests), regenerated reports pass `--check`, and `ui-gate` passed.

`tools/factory-gate.sh test` passed: its four entries in `tests/known-failing.txt` are accepted baseline cases, including the no-WordPress-bootstrap and zero-test cases. The requested full factory invocation exited 2 at its PHP baseline stage because the local-gate execution copy has no `origin/master` reference; the direct `phpcs` sub-gate produced the same explicit reference error. This is recorded as gate evidence, not a claim that the factory gate is blocked.

`COMPOSER_PROCESS_TIMEOUT=1200 bash tools/factory-gate.sh all` was run through the required local-gate wrapper after Composer and admin dependencies were installed in this worktree. It exited 0: PHP syntax, unit/integration suite with its accepted baseline exclusions, PHP baseline checks, PHPStan, admin lint/build, 43 UI architecture tests, inventory verification, and UI gate all passed.

## Next executable action

Full gate is clean; land after re-review when permitted.
