-
+
+
+
@@ -71,49 +81,29 @@ export const DashboardSidebarSectionHeader = forwardRef<
onChange={onRenameValueChange}
onSubmit={onSubmitRename}
onCancel={onCancelRename}
- className="-ml-1 h-5 w-full min-w-0 px-1 py-0 text-[11px] font-medium bg-transparent border-none outline-none text-muted-foreground"
+ className="-ml-1 h-5 w-full min-w-0 px-1 py-0 text-[13px] font-medium bg-transparent border-none outline-none text-muted-foreground"
/>
) : (
{section.name}
)}
{!isRenaming && (
-
-
- ({section.workspaces.length})
-
- {
- event.stopPropagation();
- onStartRename();
- }}
- className="z-10 flex items-center justify-center opacity-0 text-muted-foreground transition-[opacity,color] duration-150 group-hover:opacity-100 hover:text-foreground"
- aria-label="Rename section"
- >
-
-
-
+
+ ({section.workspaces.length})
+
)}
-
{
- event.stopPropagation();
- onToggleCollapse();
- }}
- onContextMenu={(event) => event.stopPropagation()}
- aria-expanded={!section.isCollapsed}
- className="p-1 rounded hover:bg-muted transition-colors shrink-0 ml-1"
- >
-
-
+ {!isRenaming && actions ? (
+ // biome-ignore lint/a11y/noStaticElementInteractions: Nested action controls handle their own semantics; this wrapper only isolates events from the header toggle.
+
event.stopPropagation()}
+ onKeyDown={(event) => event.stopPropagation()}
+ >
+ {actions}
+
+ ) : null}
);
},
diff --git a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/index.ts b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/index.ts
deleted file mode 100644
index 5823f140adf..00000000000
--- a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSection/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { DashboardSidebarSection } from "./DashboardSidebarSection";
diff --git a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSectionRenameContext/DashboardSidebarSectionRenameContext.tsx b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSectionRenameContext/DashboardSidebarSectionRenameContext.tsx
new file mode 100644
index 00000000000..775984b8ea7
--- /dev/null
+++ b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarSectionRenameContext/DashboardSidebarSectionRenameContext.tsx
@@ -0,0 +1,64 @@
+import {
+ createContext,
+ type ReactNode,
+ useCallback,
+ useContext,
+ useMemo,
+ useState,
+} from "react";
+
+interface DashboardSidebarSectionRenameContextValue {
+ pendingRenameSectionId: string | null;
+ requestSectionRename: (sectionId: string) => void;
+ clearPendingSectionRename: (sectionId: string) => void;
+}
+
+const DashboardSidebarSectionRenameContext =
+ createContext