From 4a278fa56be3b36f676010ee6e36dd8db3837fe0 Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 16 Sep 2026 16:25:39 +0200 Subject: [PATCH] feat(dashboard): recent work in plain English --- .../[projectSlug]/dashboard/page.tsx | 15 +++++++- src/components/dashboard/recent-activity.tsx | 36 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 src/components/dashboard/recent-activity.tsx diff --git a/src/app/p/[clientSlug]/[projectSlug]/dashboard/page.tsx b/src/app/p/[clientSlug]/[projectSlug]/dashboard/page.tsx index 7e18d67..4ebe17c 100644 --- a/src/app/p/[clientSlug]/[projectSlug]/dashboard/page.tsx +++ b/src/app/p/[clientSlug]/[projectSlug]/dashboard/page.tsx @@ -9,13 +9,14 @@ import { ActivityCalendar } from "@/components/dashboard/activity-calendar"; import { BarList } from "@/components/dashboard/bar-list"; import { MonthBars } from "@/components/dashboard/month-bars"; import { Methodology } from "@/components/dashboard/methodology"; +import { RecentActivity } from "@/components/dashboard/recent-activity"; import { RecomputeButton } from "@/components/dashboard/recompute-button"; import { getSession } from "@/lib/auth/session"; import { getServerPb } from "@/lib/pb/server"; import { loadBoard } from "@/lib/data/board"; import { relativeTime } from "@/lib/time/relative"; import type { ProjectMetrics } from "@/lib/metrics/compute"; -import type { ProjectMetricsRecord } from "@/lib/pb/types"; +import type { CommitRecord, ProjectMetricsRecord } from "@/lib/pb/types"; export default async function DashboardPage({ params, @@ -38,6 +39,16 @@ export default async function DashboardPage({ const metrics = cached?.payload as ProjectMetrics | undefined; const boardHref = `/p/${clientSlug}/${projectSlug}`; + // Most recent non-merge commits, with the AI summary where one exists and the + // raw subject otherwise. Mixed list is the point — see the comment on + // RecentActivity. + const recent = await pb + .collection("commits") + .getList(1, 12, { + filter: `project = "${board.project.id}" && is_merge = false`, + sort: "-authored_at", + }); + return ( @@ -94,6 +105,8 @@ export default async function DashboardPage({ + +
+

+ Recent work +

+ +
    + {commits.map((commit) => ( +
  1. +

    + {commit.summary || commit.subject} +

    + + {relativeTime(commit.authored_at)} + +
  2. + ))} +
+ + ); +}