1 standalone ui preview root and transient lifecycle
forgejo-actions edited this page 2026-07-15 12:43:13 +00:00

Standalone UI Preview Root And Transient Lifecycle

Standalone UI preview roots and transient lifecycle scopes let screens, editor previews, and layout diagnostics spawn authored UI without leaking old entities.

How It Works

Standalone UI can spawn centered or character-builder roots. Lifecycle scopes can be manual, flow-state DespawnOnExit, or editor-preview owned with rect and revision. Runtime adapters bind text, actions, dynamic roles, and slot manifests into authored layouts.

How To Use It

Choose the root kind that matches the screen. Use lifecycle scopes whenever a screen can be replaced, previewed, or rebuilt. Surface required layout diagnostics instead of silently falling back to an empty screen.

Invariants

Preview roots must despawn when owner or revision changes. Missing required layouts should produce diagnostics. Text and action adapters should respect localization and dynamic role bindings.

Debugging

Stale preview roots, wrong asset root kind, missing required layouts, stale document revisions, and unlocalized fallback text are common problems. Inspect lifecycle scope and document revision before changing renderer code.

Examples

An editor preview should own its root by preview id and layout revision. A character-create screen should use the character-builder root so layout geometry matches the intended surface.