From ce4e37c75b65ba79f9ac012de179f8e4f937be6a Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Mon, 16 Mar 2026 15:29:25 -0600 Subject: [PATCH 1/3] refactor: simplify sidebar state handling - Replaced direct state checks with a derived variable `isCollapsed` for better readability and maintainability. - Updated class names and conditions in the SidebarLogo component to use the new `isCollapsed` variable. - Adjusted overflow behavior in Sidebar and SidebarContent components for improved layout management. --- apps/dokploy/components/layouts/side.tsx | 30 ++++++++++-------------- apps/dokploy/components/ui/sidebar.tsx | 4 ++-- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/apps/dokploy/components/layouts/side.tsx b/apps/dokploy/components/layouts/side.tsx index d9f995c568..9f0bb482ba 100644 --- a/apps/dokploy/components/layouts/side.tsx +++ b/apps/dokploy/components/layouts/side.tsx @@ -545,6 +545,7 @@ function SidebarLogo() { const { mutateAsync: setDefaultOrganization, isPending: isSettingDefault } = api.organization.setDefault.useMutation(); const { isMobile } = useSidebar(); + const isCollapsed = state === "collapsed" && !isMobile; const { data: activeOrganization } = api.organization.active.useQuery(); const { data: invitations, refetch: refetchInvitations } = @@ -570,7 +571,7 @@ function SidebarLogo() {
@@ -610,7 +611,7 @@ function SidebarLogo() {

@@ -619,7 +620,7 @@ function SidebarLogo() {

@@ -768,7 +769,7 @@ function SidebarLogo() { {/* Notification Bell */} - +
)} {dokployVersion && ( - <> -
- Version {dokployVersion} -
-
- {dokployVersion} -
- +
+ Version {dokployVersion} +
)}
diff --git a/apps/dokploy/components/ui/sidebar.tsx b/apps/dokploy/components/ui/sidebar.tsx index bb9d940a1c..2160acfde3 100644 --- a/apps/dokploy/components/ui/sidebar.tsx +++ b/apps/dokploy/components/ui/sidebar.tsx @@ -213,7 +213,7 @@ const Sidebar = React.forwardRef< } side={side} > -
{children}
+
{children}
); @@ -412,7 +412,7 @@ const SidebarContent = React.forwardRef< ref={ref} data-sidebar="content" className={cn( - "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", + "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-y-auto", className, )} {...props} From dad49ec96f84d99ed7ef9c37aa75f1f369fa0719 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Mon, 16 Mar 2026 15:32:59 -0600 Subject: [PATCH 2/3] refactor: move TimeBadge to BreadcrumbSidebar for conditional rendering - Removed TimeBadge from the ShowProjects component and integrated it into the BreadcrumbSidebar. - Added a query to determine if the environment is cloud-based, allowing for conditional display of the TimeBadge. - Updated layout in BreadcrumbSidebar for improved spacing and organization. --- apps/dokploy/components/dashboard/projects/show.tsx | 5 ----- apps/dokploy/components/shared/breadcrumb-sidebar.tsx | 7 ++++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/dokploy/components/dashboard/projects/show.tsx b/apps/dokploy/components/dashboard/projects/show.tsx index e92ec280bd..7b5797b451 100644 --- a/apps/dokploy/components/dashboard/projects/show.tsx +++ b/apps/dokploy/components/dashboard/projects/show.tsx @@ -169,11 +169,6 @@ export const ShowProjects = () => { - {!isCloud && ( -
- -
- )}
diff --git a/apps/dokploy/components/shared/breadcrumb-sidebar.tsx b/apps/dokploy/components/shared/breadcrumb-sidebar.tsx index 9ba28850cf..16b185e0f1 100644 --- a/apps/dokploy/components/shared/breadcrumb-sidebar.tsx +++ b/apps/dokploy/components/shared/breadcrumb-sidebar.tsx @@ -17,6 +17,8 @@ import { } from "@/components/ui/dropdown-menu"; import { Separator } from "@/components/ui/separator"; import { SidebarTrigger } from "@/components/ui/sidebar"; +import { TimeBadge } from "@/components/ui/time-badge"; +import { api } from "@/utils/api"; interface BreadcrumbEntry { name: string; @@ -32,9 +34,11 @@ interface Props { } export const BreadcrumbSidebar = ({ list }: Props) => { + const { data: isCloud } = api.settings.isCloud.useQuery(); + return (
-
+
@@ -75,6 +79,7 @@ export const BreadcrumbSidebar = ({ list }: Props) => {
+ {!isCloud && }
); From 4871520dbba517e4b65ca7453dfedd3c08cf03e1 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 21:33:40 +0000 Subject: [PATCH 3/3] [autofix.ci] apply automated fixes --- apps/dokploy/components/layouts/side.tsx | 4 +--- apps/dokploy/components/ui/sidebar.tsx | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/dokploy/components/layouts/side.tsx b/apps/dokploy/components/layouts/side.tsx index 9f0bb482ba..6a0f9de19a 100644 --- a/apps/dokploy/components/layouts/side.tsx +++ b/apps/dokploy/components/layouts/side.tsx @@ -571,9 +571,7 @@ function SidebarLogo() { {/* Organization Logo and Selector */} diff --git a/apps/dokploy/components/ui/sidebar.tsx b/apps/dokploy/components/ui/sidebar.tsx index 2160acfde3..bca3e2b3ea 100644 --- a/apps/dokploy/components/ui/sidebar.tsx +++ b/apps/dokploy/components/ui/sidebar.tsx @@ -213,7 +213,9 @@ const Sidebar = React.forwardRef< } side={side} > -
{children}
+
+ {children} +
);