a2ui-project / a2ui-project/a2ui
[BUG]: React renderer shows developer `[Loading {id}...]` placeholders to end users
- Lenguaje dominante
- TypeScript
- Estrellas
- 16.4k
- Forks
- 1.3k
- Merge medio
- 3 d 15 h
- PR fusionados (30 d)
- 134
Descripción
- [x] I have searched the existing issues to make sure this bug has not already been reported.
## Describe the Bug
The React renderer renders hard-coded developer placeholders directly into the surface tree, and there is no way to customize or disable them.
In `renderers/react/src/v0_9/A2uiSurface.tsx`, `DeferredChild` returns literal debug text when a component is not yet available:
```tsx
const componentModel = surface.componentsModel.get(id);
if (!componentModel) {
return
}
...
```
Because `A2uiSurface` renders ``, this placeholder sits on the only rendering path and cannot be bypassed. During streaming, when a referenced component has not been created yet, end users briefly see text such as `[Loading root...]`, and `Unknown component: ` (red) when a catalog implementation is missing. These are debug-style placeholders (inline `color`/`padding`) that are not appropriate for production UIs.
## Steps to Reproduce
1. Render a surface with `A2uiSurface`.
2. Stream component updates incrementally (e.g., send `createSurface`, then `updateComponents` in separate messages, or add a parent component before its children).
3. Observe the surface between updates.
4. See `[Loading root...]` (and `[Loading ...]` for not-yet-created children) rendered to the user.
## Expected Behavior
While a component is not yet available, the renderer should render nothing by default, or let the consumer provide a fallback. Debug text should not reach end users.
## Screenshots
## Environment Details
- **OS**: macOS
- **Browser/Platform**: Chrome
- **SDK/Package Name & Version**: @a2ui/react v0.10.1, @a2ui/web_core v0.10.3
- **Protocol Version**: v0.9
- **Agent Framework & LLM Model**: ADK
Guía de contribución
Línea de trabajo
El issue se encuentra en `renderers/react/src/v0_9/A2uiSurface.tsx`, en el componente `DeferredChild`. Empieza examinando cómo se obtiene `componentModel` y cómo se renderiza el placeholder. El objetivo es modificar el renderer para que no muestre nada o muestre un fallback configurable en lugar del texto de depuración `[Loading {id}...]`. Comprueba si ya existen patrones de fallback o props en la lógica de renderizado de la surface. Verifica la corrección reproduciendo el escenario de streaming descrito.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- react, typescript
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bien especificado
- Aptitud para principiantes
- 65/100