a2ui-project / a2ui-project/a2ui

Explicit "root" ID Enforcement

Offen
#843 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
P2 type: feature/enhancement
Vorherrschende Sprache
TypeScript
Sterne
16.4k
Forks
1.3k
Ø Merge
2 T. 13 Std.
Gemergte PRs (30 T.)
134

Beschreibung

# Proposal: Explicit "root" ID Enforcement

## Reason
A surface is not valid for rendering until a component with `id="root"` is defined. Currently, the renderers perform a simple null check, leading to inconsistent "empty" states or flicker while the stream is loading.

## Design
1. **Ready State**: Add an `isReady` signal to `SurfaceModel` (or `SurfaceComponentsModel`) that specifically tracks the presence of the `root` ID.
2. **Progressive Feedback**: Update `A2uiSurface` to check `isReady`. While false, it should render a standardized "Loading Surface" state or a shimmer effect.
3. **Enforcement**: Log a warning if components are added to a surface that has been active for a significant time without a root component, aiding developer debugging.

## Key Files
- `renderers/web_core/src/v0_9/state/surface-model.ts`
- `renderers/react_prototype/src/A2uiSurface.tsx`

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.