diff --git a/src/app/(app)/app/page.tsx b/src/app/(app)/app/page.tsx index cc2207a..0fb93c5 100644 --- a/src/app/(app)/app/page.tsx +++ b/src/app/(app)/app/page.tsx @@ -52,12 +52,13 @@ export default async function AppHomePage() { const workspace = membership.workspace; const workspaceTitle = titleCase(workspace.name); + const firstName = session.user.name?.trim().split(/\s+/)[0] || "there"; return (
-

{workspaceTitle}

-

{roleLabel(membership.role)} workspace

+

Welcome back, {firstName}

+

{workspaceTitle} · {roleLabel(membership.role)} workspace

Create project
diff --git a/src/app/(app)/layout.tsx b/src/app/(app)/layout.tsx index be8ba2a..b382d74 100644 --- a/src/app/(app)/layout.tsx +++ b/src/app/(app)/layout.tsx @@ -25,7 +25,7 @@ export default async function TeamLayout({ children }: Readonly<{ children: Reac
{initials} - {accountName} + {accountName}
diff --git a/src/app/components/dashboard-stats.tsx b/src/app/components/dashboard-stats.tsx index ace8cac..75e9761 100644 --- a/src/app/components/dashboard-stats.tsx +++ b/src/app/components/dashboard-stats.tsx @@ -63,10 +63,10 @@ export async function DashboardStats({ ]; const completedSteps = steps.filter((step) => step.complete).length; const cards = [ - { label: "Active projects", value: stats.activeProjects, detail: `Projects marked Active · ${projectCount} total`, icon: "projects" as const, tone: "indigo" }, - { label: "Overdue tasks", value: stats.overdueTasks, icon: "overdue" as const, tone: stats.overdueTasks > 0 ? "danger" : "slate" }, - { label: "Pending reviews", value: stats.pendingReviews, icon: "reviews" as const, tone: "amber" }, - { label: "Deliverable approval rate", value: stats.approvalRate === null ? "—" : `${stats.approvalRate}%`, icon: "approval" as const, tone: "emerald" }, + { label: "Active projects", value: stats.activeProjects, detail: projectCount > stats.activeProjects ? `${projectCount - stats.activeProjects} ${projectCount - stats.activeProjects === 1 ? "project is" : "projects are"} not marked Active · ${projectCount} total` : `All ${projectCount} projects are Active`, icon: "projects" as const, tone: "indigo" }, + { label: "Overdue tasks", value: stats.overdueTasks, detail: stats.overdueTasks > 0 ? "Tasks past their due date" : "No tasks past their due date", icon: "overdue" as const, tone: stats.overdueTasks > 0 ? "danger" : "slate" }, + { label: "Pending reviews", value: stats.pendingReviews, detail: stats.pendingReviews > 0 ? "Deliverables waiting for client decisions" : "No deliverables waiting for review", icon: "reviews" as const, tone: "amber" }, + { label: "Deliverable approval rate", value: stats.approvalRate === null ? "N/A" : `${stats.approvalRate}%`, detail: stats.approvalRate === null ? "No reviews yet" : `${stats.decidedReviews} completed review decisions`, icon: "approval" as const, tone: "emerald" }, ]; return ( @@ -137,14 +137,16 @@ export async function DashboardStats({

Tasks by status

Workspace-wide totals

-
- {Object.entries(stats.tasksByStatus).map(([status, count]) => ( -
- -

{statusLabels[status as keyof typeof statusLabels]}

-

{count}

-
- ))} +
+ {taskCount > 0 ?
+ {Object.entries(stats.tasksByStatus).map(([status, count]) => ( +
+ +

{statusLabels[status as keyof typeof statusLabels]}

+

{count}

+
+ ))} +
:

No tasks to summarize yet

Create a task in a project to see its status distribution here.

{firstProjectId ? "Add your first task" : "Create a project first"}
}

Approval rate is based on completed client review decisions ({stats.decidedReviews} total). diff --git a/src/app/page.tsx b/src/app/page.tsx index 5c81eec..23bf1cb 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -20,11 +20,11 @@ function WorkspacePreview() {

Sample workspace

- Illustrative preview + Illustrative preview
); }