Hyperflow UI
ComponentsTimeline

Timeline states

Loading, empty, and error feedback for a session timeline.

TimelineLoading, TimelineEmptyState, and TimelineError are the initial feedback states used by Timeline.

Usage

Replace a state through the corresponding ActTimeline prop. The timeline continues to own the loading, empty, and error semantics.

import {
  ActTimeline,
  type TimelineEmptyStateProps,
} from '@hyperflow/chakra-ui'

function ProjectEmptyState({ message }: TimelineEmptyStateProps) {
  return <p>{message ?? 'No messages yet.'}</p>
}

export function SessionTimeline() {
  return <ActTimeline emptyStateComponent={ProjectEmptyState} />
}

Examples

Replace the initial error

The error component receives the original error. You can supply a product-specific message while retaining the state transition from Timeline.

import {
  ActTimeline,
  type TimelineErrorProps,
} from '@hyperflow/chakra-ui'

function ProjectTimelineError({ error }: TimelineErrorProps) {
  return <p>Conversation history is unavailable: {error.message}</p>
}

export function SessionTimeline() {
  return <ActTimeline errorComponent={ProjectTimelineError} />
}

Guide

Keep the states distinct

Loading means initial history is being obtained. Empty means no timeline entries are available. Error means the initial history request could not be completed.

Use the owning replacement point

Pass loadingComponent, emptyStateComponent, or errorComponent to ActTimeline. Do not render a second state independently inside an entry renderer.

Keep recovery outside the visual state

These components describe feedback only. Put retry or session-recovery behavior in the application layer that owns the route and runtime connection.

Props

TimelineLoading

PropDefaultType
——No props.

TimelineEmptyState

PropDefaultType
message"Nessun messaggio."string
Text shown when there are no entries.

TimelineError

PropDefaultType
error—Error
The initial history error.
message"Storico messaggi non disponibile via WebSocket."string
Text shown for the error.

On this page