diff --git a/backend/app/api/activity.py b/backend/app/api/activity.py index 12b40af..8f992cc 100644 --- a/backend/app/api/activity.py +++ b/backend/app/api/activity.py @@ -5,7 +5,7 @@ from __future__ import annotations import asyncio import json from collections import deque -from datetime import UTC, datetime +from datetime import UTC, datetime, timedelta from typing import TYPE_CHECKING, Any from uuid import UUID @@ -257,12 +257,14 @@ async def get_activity_ticker( ) -> list[ActivityTickerItem]: """Return recent activity items shaped for the navbar ticker.""" board_ids = await list_accessible_board_ids(session, member=ctx.member, write=False) + cutoff = utcnow() - timedelta(minutes=15) statement = ( select(ActivityEvent, Agent) .outerjoin(Agent, col(ActivityEvent.agent_id) == col(Agent.id)) .outerjoin(Task, col(ActivityEvent.task_id) == col(Task.id)) .where(func.length(func.trim(col(ActivityEvent.message))) > 0) + .where(col(ActivityEvent.created_at) >= cutoff) .order_by(desc(col(ActivityEvent.created_at))) .limit(limit) ) diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index 127802a..ebfd0df 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -215,6 +215,11 @@ textarea::placeholder { 100% { transform: translateX(-50%); } } +@keyframes live-pulse { + 0%, 100% { opacity: 1; } + 50% { opacity: 0.2; } +} + @keyframes progress-shimmer { 0% { transform: translateX(-100%); @@ -272,6 +277,9 @@ textarea::placeholder { .animate-ticker:hover { animation-play-state: paused; } + .animate-live-pulse { + animation: live-pulse 1.4s ease-in-out infinite; + } .shadow-lush { box-shadow: var(--shadow-panel); } diff --git a/frontend/src/components/organisms/AgentActivityTicker.tsx b/frontend/src/components/organisms/AgentActivityTicker.tsx index 18618ae..88c5067 100644 --- a/frontend/src/components/organisms/AgentActivityTicker.tsx +++ b/frontend/src/components/organisms/AgentActivityTicker.tsx @@ -62,8 +62,11 @@ export function AgentActivityTicker() { return (