For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.1/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.1/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.1/en/components/log-viewer.md.
Log Viewer is a bounded, framework-agnostic surface for build output, workload logs, and Agent execution streams. The host application owns transport, filtering, retention, and reconnection.
Render unavailable, connecting, empty, live, retrying, and failed states with explicit text. Use data-log-gap when the server reports compacted or missing records. A direct child <output role="alert"> may report a recoverable stream error without replacing already received output.
Give the root and focusable log viewport accessible names. Use role="log" and aria-live="polite" only for appended records; do not re-render the entire log on every message. Keep filters in a labeled <fieldset>, expose the selected filter with aria-pressed, preserve chronological DOM order, and avoid moving keyboard focus when new records arrive.