()
| 46 | const logger = createLogger('Sidebar'); |
| 47 | |
| 48 | export 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, |
nothing calls this directly
no test coverage detected