()
| 89 | }); |
| 90 | |
| 91 | export function AppShell() { |
| 92 | useWebviewZoomShortcuts(); |
| 93 | useTauriWindowDrag(); |
| 94 | useWebviewScrollBoundaryLock(); |
| 95 | |
| 96 | const workspacesHook = useWorkspaces(); |
| 97 | const workspaceRailEnabled = useFeatureEnabled("workspaceRail"); |
| 98 | const [isAddWorkspaceOpen, setIsAddWorkspaceOpen] = React.useState(false); |
| 99 | const [isChannelManagementOpen, setIsChannelManagementOpen] = |
| 100 | React.useState(false); |
| 101 | const [managedChannelId, setManagedChannelId] = React.useState<string | null>( |
| 102 | null, |
| 103 | ); |
| 104 | const [searchFocusRequest, setSearchFocusRequest] = React.useState(0); |
| 105 | const [browseDialogType, setBrowseDialogType] = |
| 106 | React.useState<BrowseDialogType>(null); |
| 107 | const [isNewDmOpen, setIsNewDmOpen] = React.useState(false); |
| 108 | const [isCreateChannelOpen, setIsCreateChannelOpen] = React.useState(false); |
| 109 | const [isHuddleDrawerOpen, setIsHuddleDrawerOpen] = React.useState(false); |
| 110 | const mainInsetRef = React.useRef<HTMLElement>(null); |
| 111 | const location = useLocation(); |
| 112 | const queryClient = useQueryClient(); |
| 113 | const { |
| 114 | goAgents, |
| 115 | goChannel, |
| 116 | goHome, |
| 117 | goProjects, |
| 118 | goPulse, |
| 119 | goSettings, |
| 120 | goWorkflows, |
| 121 | closeSettings, |
| 122 | openSearchHit, |
| 123 | } = useAppNavigation(); |
| 124 | const { canGoBack, canGoForward, goBack, goForward } = |
| 125 | useBackForwardControls(); |
| 126 | const { selectedChannelId, selectedView } = React.useMemo( |
| 127 | () => deriveShellRoute(location.pathname), |
| 128 | [location.pathname], |
| 129 | ); |
| 130 | // Settings lives in history so back returns to the previous app entry. |
| 131 | const settingsOpen = location.pathname === "/settings"; |
| 132 | const locationSearchSection = (location.search as { section?: unknown }) |
| 133 | .section; |
| 134 | const settingsSection: SettingsSection = isSettingsSection( |
| 135 | locationSearchSection, |
| 136 | ) |
| 137 | ? locationSearchSection |
| 138 | : DEFAULT_SETTINGS_SECTION; |
| 139 | const startupReady = useDeferredStartup(); |
| 140 | |
| 141 | const identityQuery = useIdentityQuery(); |
| 142 | const { mutedChannelIds, muteChannel, unmuteChannel } = useChannelMutes( |
| 143 | identityQuery.data?.pubkey, |
| 144 | ); |
| 145 | const { starredChannelIds, starChannel, unstarChannel } = useChannelStars( |
| 146 | identityQuery.data?.pubkey, |
| 147 | ); |
| 148 | usePersonaSync(identityQuery.data?.pubkey); |
nothing calls this directly
no test coverage detected