When to use
Use this skill when:
- •UI does not look right or has layout problems
- •Widgets overlap, disappear, or have wrong dimensions
- •Unexpected re-renders or flicker
- •Performance issues during rendering
Source of truth
- •
packages/core/src/app/widgetRenderer.ts— full render pipeline - •
packages/core/src/app/__tests__/widgetRenderer.transition.test.ts— transition behavior expectations - •
packages/core/src/runtime/commit.ts— VNode → RuntimeInstance tree - •
packages/core/src/layout/— layout engine - •
packages/core/src/renderer/renderToDrawlist/— draw operations - •
packages/core/src/widgets/composition.ts— animation hook implementations - •
packages/core/src/ui/— design tokens, recipes, and capability tiers
Debugging steps
- •
Enable profiling:
bashREZI_PERF=1 REZI_PERF_DETAIL=1 node your-app.js
- •
Check VNode tree structure — ensure no missing children or null nodes
- •
Check widget IDs — must be unique across the entire tree. Duplicate IDs cause unpredictable behavior
- •
Check nesting depth:
- •Warning at 200 levels
- •Fatal at 500 levels
- •Flatten unnecessary wrapper nodes
- •
Check
keyprops on list items — missing keys cause full re-render and lost state - •
Inspect with test renderer:
typescriptconst r = createTestRenderer({ viewport: { cols: 80, rows: 24 } }); const result = r.render(myView(state)); console.log(result.toText()); // see actual output result.findById("my-widget"); // locate specific nodes - •
Review layout props:
width,height,flex,p,gap,align - •
If animation is involved, verify:
- •
ui.boxusestransitionwith expectedproperties(position,size,opacity) - •
properties: []is not accidentally disabling tracks - •
opacitystays within[0..1] - •animation hooks are not conditionally called
- •
- •
Read enriched runtime errors carefully:
- •
ZRUI_DUPLICATE_IDnow includes both conflicting widget kinds +ctx.id()guidance - •
ZRUI_DUPLICATE_KEYincludes the duplicate key and parent context - •
ZRUI_INVALID_PROPSincludes prop name, widget kind, and expected type - •
ZRUI_UPDATE_DURING_RENDERincludes guidance to move updates into event handlers/effects
- •
Common causes
| Symptom | Likely cause |
|---|---|
| Widget not visible | Missing from VNode tree, or zero width/height |
| Overlapping widgets | Wrong container type (use column/row not box) |
| Content truncated | Fixed width too small, missing flex |
| Flicker/full re-render | Missing key on list items |
| Transition not animating | transition missing, wrong properties, or no actual value delta |
| Opacity animation looks wrong | opacity outside [0..1] (clamped) or properties excludes opacity |
| Crash on deep tree | Nesting depth > 500 |
| DS styling not applied | DS styling is automatic with ThemeDefinition; check semantic tokens/theme activation (no dsVariant required) |
| Wheel scrolling not working | Ensure the container uses overflow: "scroll" and content exceeds viewport size |