Skip to content

feat: add dashboard home page#4244

Merged
Siumauricio merged 6 commits intocanaryfrom
feat/dashboard-home
Apr 18, 2026
Merged

feat: add dashboard home page#4244
Siumauricio merged 6 commits intocanaryfrom
feat/dashboard-home

Conversation

@Siumauricio
Copy link
Copy Markdown
Contributor

@Siumauricio Siumauricio commented Apr 18, 2026

Summary

  • New /dashboard/home page with welcome header, KPI cards (deploys/24h, build, CPU, memory placeholders) and recent deployments list (last 10).
  • Home added to sidebar above Projects with a House icon.
  • Post-login landing and permission fallback redirects across the app now point to /dashboard/home. Projects remains accessible from the sidebar.

Greptile Summary

This PR introduces a /dashboard/home page as the new post-login landing, with a welcome header, four KPI stat cards, and a recent deployments list. All redirect destinations across auth flows and permission fallbacks are updated from /dashboard/projects to /dashboard/home.

  • "Deploys / 24h" stat is wrong: the value is recentDeployments.length (the last 10 deployments by date, capped at 10), not a 24-hour filtered count — users with many deployments will always see "10".
  • All four stat cards render literal \"placeholder\" text via the delta prop, which is unconditionally displayed in StatCard; this is visible in production.

Confidence Score: 3/5

Not safe to merge as-is — two P1 bugs in the primary new feature cause incorrect data and visible placeholder text in production.

The redirect and sidebar changes are clean, but the centrepiece ShowHome component has two distinct P1 regressions: a mislabeled/incorrectly-computed Deploys/24h KPI and hardcoded placeholder delta strings that render visibly in every user's dashboard. These need to be fixed before the page ships.

apps/dokploy/components/dashboard/home/show-home.tsx (wrong KPI logic + visible placeholder text)

Comments Outside Diff (1)

  1. apps/dokploy/components/dashboard/settings/servers/welcome-stripe/welcome-subscription.tsx, line 87 (link)

    P2 Leftover debug expression

    {showConfetti ?? "Flaso"} is a debugging artifact. Because showConfetti is a boolean (never null/undefined), the ?? fallback never activates and nothing renders — but the expression will confuse future readers. It should be removed entirely.

Reviews (1): Last reviewed commit: "[autofix.ci] apply automated fixes" | Re-trigger Greptile

Greptile also left 3 inline comments on this PR.

Adds a new /dashboard/home landing with welcome header, KPI cards
(deploys/24h, build, CPU, memory) and a recent deployments list.

Home is now the post-login landing and the destination for permission
fallback redirects across the app. Projects remains accessible from
the sidebar.
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 18, 2026
@dosubot dosubot bot added the enhancement New feature or request label Apr 18, 2026
Comment on lines +147 to +153
delta="placeholder"
/>
<StatCard label="Avg build" value="—" delta="placeholder" />
<StatCard label="CPU" value="—" delta="placeholder" />
<StatCard label="Memory" value="—" delta="placeholder" />
</div>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 "Deploys / 24h" shows wrong count and all delta values render as literal "placeholder"

Two distinct bugs here:

  1. value={String(recentDeployments.length)} shows the count of the last 10 deployments (sorted by date, sliced to 10), not the count of deployments in the past 24 hours. If there are 15 total deployments across all time, this always shows 10.

  2. delta="placeholder" (and the same on lines 151-153) passes the string "placeholder" to StatCard, which unconditionally renders it as visible text: {delta && <span>{delta}</span>}. All four stat cards will show the word "placeholder" in production.

Comment on lines +44 to +47

await helpers.settings.isCloud.prefetch();
await helpers.user.get.prefetch();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing server-side prefetches for home page data

ShowHome calls four additional queries (project.all, server.all, user.getPermissions, deployment.allCentralized), but only settings.isCloud and user.get are prefetched here. The missing prefetches mean all four data sources will be fetched client-side in a serial waterfall, producing visible loading states on every page visit.

Comment on lines +17 to +37
function getServiceInfo(d: any) {
const app = d.application;
const comp = d.compose;
if (app?.environment?.project && app.environment) {
return {
name: app.name as string,
environment: app.environment.name as string,
projectName: app.environment.project.name as string,
href: `/dashboard/project/${app.environment.project.projectId}/environment/${app.environment.environmentId}/services/application/${app.applicationId}`,
};
}
if (comp?.environment?.project && comp.environment) {
return {
name: comp.name as string,
environment: comp.environment.name as string,
projectName: comp.environment.project.name as string,
href: `/dashboard/project/${comp.environment.project.projectId}/environment/${comp.environment.environmentId}/services/compose/${comp.composeId}`,
};
}
return null;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Database service deployments are silently excluded

getServiceInfo only handles application and compose deployments. Any deployment linked to a database service (postgres, mysql, redis, etc.) returns null and is filtered out via if (!info) return null in the list. If deployment.allCentralized ever returns database-related entries, they will silently disappear from the "Recent deployments" panel without any indication to the user. Consider adding a fallback display or documenting the intentional scope.

Siumauricio and others added 4 commits April 17, 2026 22:11
- Home: 4 KPI cards (projects, services, deploys/7d, status list),
  server column with icon in recent deployments, empty state with
  icon, dashboard card frame to match other pages.
- Include libsql in project services count sort.
- Fix bulk actions in environment page: libsql was missing from
  start, stop, move, delete and deploy handlers.
- Replace individual project and server queries with a consolidated homeStats query to streamline data retrieval for the dashboard.
- Update the ShowHome component to utilize homeStats for displaying project, environment, application, and service counts, along with their status breakdown.
- Enhance data handling for user permissions to ensure accurate statistics based on user access levels.
- Adjusted the Card component to have a minimum height of 85vh for better visual consistency.
- Ensured the inner div has a full height to enhance the layout structure.
@Siumauricio Siumauricio merged commit b392e58 into canary Apr 18, 2026
4 checks passed
@Siumauricio Siumauricio deleted the feat/dashboard-home branch April 18, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant