Frontend
Frontend Performance for AI Products
AI Apps Have Different Waiting States
Traditional apps often wait on quick database reads. AI apps may wait on generation, tool calls, retrieval, or multi-step workflows.
That means frontend performance is not only about the initial bundle. It is also about making progress visible and recoverable.
Stream When You Can
Streaming gives users immediate feedback. Even when the final answer takes time, the interface feels more alive because the user can see work happening.
Good streaming UI should include:
- A clear active state.
- Partial content that remains readable.
- Retry and stop controls.
- Error states that preserve user input.
Keep the Interface Stable
Avoid layout jumps while content is generated. Reserve space for responses, keep action buttons predictable, and make long outputs easy to scan.
.response-panel {
min-height: 220px;
overflow-wrap: anywhere;
}The best AI product interfaces make waiting feel understandable instead of mysterious.