AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core-control-center
  4. gh-40
  5. plan
  6. plan.md
plan.md(1.3 KB)· Apr 1, 2026· 1 min read
  • Summary
  • Files
  • Steps
  • Verification
  • Risks

Plan: Pipeline Details — Events Descending Order#

Summary#

Sort the events list on the Pipeline Details page by timestamp descending (newest first), with tie-breaking on event id descending. The Events page (/events) uses a separate component and data source, so it is out of scope and tracked separately.

Files#

FileActionDescription
app/pipeline/[taskId]/page.tsxmodifySort task.events array by createdAt desc, then id desc before rendering

Steps#

  1. S1 — Sort events descending in Pipeline Details page: In app/pipeline/[taskId]/page.tsx, sort the task.events array by createdAt descending before the .map() call (line ~355). Use new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime() as primary sort, fall back to b.id - a.id for identical timestamps. Use [...task.events].sort() to avoid mutating the original array.

Verification#

  • Events on the Pipeline Details page render newest-first by default.
  • Empty events list and single-event lists render without errors.
  • npm run lint and npm run build pass.

Risks#

  • The /events page uses a separate DataTable component and getEvents() API endpoint — it does not share the same component or data source. A follow-up issue should be created if its sort order also needs changing.
ContextPrd