MCPcopy
hub / github.com/AutoMaker-Org/automaker / Sidebar

Function Sidebar

apps/ui/src/components/layout/sidebar/sidebar.tsx:48–555  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46const logger = createLogger('Sidebar');
47
48export function Sidebar() {
49 const navigate = useNavigate();
50 const location = useLocation();
51
52 const {
53 projects,
54 trashedProjects,
55 currentProject,
56 sidebarOpen,
57 sidebarStyle,
58 mobileSidebarHidden,
59 projectHistory,
60 upsertAndSetCurrentProject,
61 toggleSidebar,
62 toggleMobileSidebarHidden,
63 restoreTrashedProject,
64 deleteTrashedProject,
65 emptyTrash,
66 cyclePrevProject,
67 cycleNextProject,
68 moveProjectToTrash,
69 removeProject,
70 specCreatingForProject,
71 setSpecCreatingForProject,
72 setCurrentProject,
73 } = useAppStore();
74
75 const isCompact = useIsCompact();
76
77 // Environment variable flags for hiding sidebar items
78 const { hideTerminal, hideRunningAgents, hideContext, hideSpecEditor, hideWiki } =
79 SIDEBAR_FEATURE_FLAGS;
80
81 // Get customizable keyboard shortcuts
82 const shortcuts = useKeyboardShortcutsConfig();
83
84 // Get unread notifications count
85 const unreadNotificationsCount = useNotificationsStore((s) => s.unreadCount);
86
87 // State for context menu
88 const [contextMenuProject, setContextMenuProject] = useState<Project | null>(null);
89 const [contextMenuPosition, setContextMenuPosition] = useState<{ x: number; y: number } | null>(
90 null
91 );
92 const [editDialogProject, setEditDialogProject] = useState<Project | null>(null);
93
94 // State for delete project confirmation dialog
95 const [showDeleteProjectDialog, setShowDeleteProjectDialog] = useState(false);
96 // State for remove from automaker confirmation dialog
97 const [showRemoveFromAutomakerDialog, setShowRemoveFromAutomakerDialog] = useState(false);
98
99 // State for trash dialog
100 const [showTrashDialog, setShowTrashDialog] = useState(false);
101
102 // Project creation state and handlers
103 const {
104 showNewProjectModal,
105 setShowNewProjectModal,

Callers

nothing calls this directly

Calls 15

useIsCompactFunction · 0.90
useProjectCreationFunction · 0.90
useSetupDialogFunction · 0.90
useSidebarAutoCollapseFunction · 0.90
useRunningAgentsFunction · 0.90
useUnviewedValidationsFunction · 0.90
useTrashOperationsFunction · 0.90
useSpecRegenerationFunction · 0.90
getElectronAPIFunction · 0.90
hasAutomakerDirFunction · 0.90
initializeProjectFunction · 0.90

Tested by

no test coverage detected