{current.id}{current.config.branch}
{f'{elapsed}' if elapsed else ''}
"""
def render_history_html() -> str:
"""Render build history."""
history = state.get_history(6)
if not history:
return '
No builds yet
'
html = ""
for build in history:
status = build["status"]
status_class = "success" if status == "success" else "failed" if status in ("failed", "timeout", "cancelled") else ""
duration = f'{build["duration_seconds"]:.1f}s' if build.get("duration_seconds") else "-"
image_short = build["image"].split("/")[-1] if build.get("image") else "-"
html += f"""