@bevel-software/platform-core-frontend 0.4.1 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +5366 -0
- package/package.json +7 -4
- package/src/core/CoreAppShell.tsx +195 -56
- package/src/core/__tests__/AppChrome.test.tsx +125 -0
- package/src/core/__tests__/ShellRoutes.test.tsx +37 -2
- package/src/core/__tests__/bootstrap.test.ts +63 -0
- package/src/core/bootstrap.ts +73 -0
- package/src/core/events.ts +12 -0
- package/src/core/registry.ts +58 -9
- package/src/index.css +100 -11
- package/src/index.ts +24 -23
- package/src/lib/utils.ts +93 -117
- package/src/modules/access/__tests__/ManageAccessDialog.placement.test.tsx +281 -0
- package/src/modules/access/__tests__/ManageAccessDialog.test.tsx +166 -1
- package/src/modules/access/api.ts +49 -0
- package/src/modules/access/components/ManageAccessDialog.tsx +786 -481
- package/src/modules/access/hooks/useFileAccess.ts +1 -1
- package/src/modules/admin/__tests__/AdminRolesPage.suggest.test.tsx +86 -0
- package/src/modules/admin/__tests__/UserAccountsPage.test.tsx +17 -1
- package/src/modules/admin/__tests__/admin.unread.test.tsx +61 -0
- package/src/modules/admin/components/AdminRolesPage.tsx +44 -38
- package/src/modules/admin/components/RolesCorruptedBanner.tsx +11 -10
- package/src/modules/admin/components/UserAccountsPage.tsx +36 -28
- package/src/modules/admin/state/admin.context.tsx +15 -6
- package/src/modules/auth/components/AccountPage.tsx +11 -11
- package/src/modules/auth/components/LoginScreen.tsx +12 -12
- package/src/modules/auth/services/sso.ts +47 -1
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.test.tsx +277 -0
- package/src/modules/change-requests/__tests__/author.test.ts +48 -0
- package/src/modules/change-requests/__tests__/conflict.test.ts +73 -0
- package/src/modules/change-requests/__tests__/diff.test.ts +134 -0
- package/src/modules/change-requests/__tests__/propose.test.ts +93 -0
- package/src/modules/change-requests/__tests__/useFileOnBranch.test.tsx +72 -0
- package/src/modules/change-requests/change-requests.css +22 -0
- package/src/modules/change-requests/components/ChangeBox.tsx +277 -0
- package/src/modules/change-requests/components/ChangeRequestDialog.tsx +713 -0
- package/src/modules/change-requests/components/ConflictHelp.tsx +47 -0
- package/src/modules/change-requests/components/CrFileTree.tsx +398 -0
- package/src/modules/change-requests/components/FileChangeBoxes.tsx +168 -0
- package/src/modules/change-requests/hooks/useApplyChangeRequest.ts +236 -0
- package/src/modules/change-requests/hooks/useCrFileDiffs.ts +79 -0
- package/src/modules/change-requests/hooks/useFileOnBranch.ts +80 -0
- package/src/modules/change-requests/services/change-requests.api.ts +45 -0
- package/src/modules/change-requests/services/propose.api.ts +162 -0
- package/src/modules/change-requests/utils/author.ts +47 -0
- package/src/modules/change-requests/utils/conflict.ts +38 -0
- package/src/modules/change-requests/utils/diff.ts +80 -0
- package/src/modules/git/__tests__/BranchSwitcher.test.tsx +27 -18
- package/src/modules/git/__tests__/FileHistoryPanel.test.tsx +36 -83
- package/src/modules/git/__tests__/PullNeededBanner.test.tsx +5 -5
- package/src/modules/git/__tests__/PullRequestsForMe.test.tsx +147 -0
- package/src/modules/git/__tests__/useAutoPullUpdates.test.tsx +2 -8
- package/src/modules/git/components/BranchSwitcher.tsx +68 -31
- package/src/modules/git/components/DiffView.tsx +4 -4
- package/src/modules/git/components/FileComparisonPanel.tsx +20 -20
- package/src/modules/git/components/FileHistoryPanel.tsx +71 -107
- package/src/modules/git/components/PullNeededBanner.tsx +6 -13
- package/src/modules/git/components/PullRequestsForMe.tsx +71 -36
- package/src/modules/git/components/UnifiedDiffView.tsx +4 -4
- package/src/modules/git/hooks/__tests__/useGitState.deleteBranch.test.tsx +2 -2
- package/src/modules/git/hooks/useGitState.ts +15 -14
- package/src/modules/git/services/__tests__/error-messages.test.ts +4 -4
- package/src/modules/git/services/error-messages.ts +7 -7
- package/src/modules/git/services/git.api.ts +17 -11
- package/src/modules/git/services/pr-prompts.ts +2 -2
- package/src/modules/git/state/git.context.ts +10 -1
- package/src/modules/layout/__tests__/SidebarFrameResponsive.test.tsx +224 -0
- package/src/modules/layout/__tests__/SidebarToggle.test.tsx +242 -0
- package/src/modules/layout/__tests__/breakpoints.test.ts +56 -0
- package/src/modules/layout/breakpoints.ts +6 -0
- package/src/modules/layout/components/AppLayout.tsx +17 -5
- package/src/modules/layout/components/DemoBanner.tsx +10 -1
- package/src/modules/layout/components/MaintenanceOverlay.tsx +3 -3
- package/src/modules/layout/components/MobileChatLayout.tsx +31 -26
- package/src/modules/layout/components/ResizableThreePaneLayout.tsx +59 -24
- package/src/modules/layout/components/SidebarFrame.tsx +317 -0
- package/src/modules/layout/components/SidebarToggle.tsx +86 -0
- package/src/modules/layout/components/SlideOverlay.tsx +1 -1
- package/src/modules/layout/components/__tests__/MobileChatLayout.test.tsx +40 -2
- package/src/modules/layout/components/__tests__/ResizableThreePaneLayout.test.tsx +19 -3
- package/src/modules/layout/state/sidebar.ts +200 -0
- package/src/modules/library/__tests__/AddToGroupDialog.test.tsx +313 -0
- package/src/modules/library/__tests__/ChangeRequestDock.test.tsx +84 -0
- package/src/modules/library/__tests__/GroupJoinRequests.test.tsx +178 -0
- package/src/modules/library/__tests__/GroupPage.test.tsx +479 -0
- package/src/modules/library/__tests__/GroupsIndexPage.test.tsx +283 -0
- package/src/modules/library/__tests__/GroupsSidebar.contextmenu.test.tsx +175 -0
- package/src/modules/library/__tests__/GroupsSidebar.locked.test.tsx +96 -0
- package/src/modules/library/__tests__/GroupsSidebar.test.tsx +142 -0
- package/src/modules/library/__tests__/GroupsSidebarMenu.test.tsx +142 -0
- package/src/modules/library/__tests__/LibraryCard.test.tsx +149 -0
- package/src/modules/library/__tests__/LibraryRoutes.test.tsx +378 -0
- package/src/modules/library/__tests__/LibrarySidebarMenu.test.tsx +347 -0
- package/src/modules/library/__tests__/LockedGroupView.test.tsx +203 -0
- package/src/modules/library/__tests__/NewGroupDialog.test.tsx +114 -0
- package/src/modules/library/__tests__/PersonalAddDialog.test.tsx +177 -0
- package/src/modules/library/__tests__/SkillPage.test.tsx +1063 -0
- package/src/modules/library/__tests__/ToolConnectionSection.test.tsx +259 -0
- package/src/modules/library/__tests__/ToolLogo.test.tsx +63 -0
- package/src/modules/library/__tests__/ToolPage.test.tsx +315 -0
- package/src/modules/library/__tests__/ToolSharePanel.test.tsx +36 -0
- package/src/modules/library/__tests__/ToolVarRow.test.tsx +260 -0
- package/src/modules/library/__tests__/WorkspaceItemRoute.test.tsx +197 -0
- package/src/modules/library/__tests__/auth-harness.tsx +37 -0
- package/src/modules/library/__tests__/oauth-fragment.test.ts +48 -0
- package/src/modules/library/__tests__/status.test.ts +113 -20
- package/src/modules/library/__tests__/useSkillDetail.test.tsx +102 -0
- package/src/modules/library/__tests__/useToolPage.test.tsx +146 -0
- package/src/modules/library/components/AccessRequestsBanner.tsx +101 -0
- package/src/modules/library/components/AddToGroupDialog.tsx +115 -0
- package/src/modules/library/components/ChangeRequestDock.tsx +52 -28
- package/src/modules/library/components/DeleteGroupDialog.tsx +87 -0
- package/src/modules/library/components/GroupIndexRow.tsx +63 -0
- package/src/modules/library/components/GroupJoinRequests.tsx +56 -0
- package/src/modules/library/components/GroupPage.tsx +373 -0
- package/src/modules/library/components/GroupsIndexPage.tsx +222 -0
- package/src/modules/library/components/GroupsSidebar.tsx +338 -0
- package/src/modules/library/components/GroupsSidebarMenu.tsx +160 -0
- package/src/modules/library/components/LibraryCard.tsx +123 -102
- package/src/modules/library/components/LibraryLayout.tsx +344 -0
- package/src/modules/library/components/LibraryPage.tsx +111 -227
- package/src/modules/library/components/LockGlyph.tsx +31 -0
- package/src/modules/library/components/LockedGroupView.tsx +159 -0
- package/src/modules/library/components/ManagedGroupRequests.tsx +70 -0
- package/src/modules/library/components/NewGroupDialog.tsx +112 -0
- package/src/modules/library/components/NewSkillPanel.tsx +151 -0
- package/src/modules/library/components/PageActions.tsx +156 -0
- package/src/modules/library/components/PendingSkillReview.tsx +63 -0
- package/src/modules/library/components/PersonalAddDialog.tsx +88 -0
- package/src/modules/library/components/PersonalGroupPage.tsx +125 -0
- package/src/modules/library/components/StatusDot.tsx +25 -0
- package/src/modules/library/components/ToolLogo.tsx +171 -0
- package/src/modules/library/components/group-page-parts.tsx +419 -0
- package/src/modules/library/components/skill-page/SkillFileEditor.tsx +134 -0
- package/src/modules/library/components/skill-page/SkillFilePane.tsx +117 -0
- package/src/modules/library/components/skill-page/SkillFileTabs.tsx +112 -0
- package/src/modules/library/components/skill-page/SkillPage.tsx +673 -0
- package/src/modules/library/components/skill-page/tab-ids.ts +33 -0
- package/src/modules/library/components/tool-page/ToolConnectionSection.tsx +175 -0
- package/src/modules/library/components/tool-page/ToolPage.tsx +228 -0
- package/src/modules/library/components/tool-page/ToolSharePanel.tsx +45 -0
- package/src/modules/library/components/tool-page/ToolVarRow.tsx +289 -0
- package/src/modules/library/hooks/useJoinRequests.ts +114 -0
- package/src/modules/library/hooks/useLibraryData.ts +134 -119
- package/src/modules/library/hooks/useSkillDetail.ts +119 -74
- package/src/modules/library/hooks/useToolPage.ts +145 -0
- package/src/modules/library/library.css +33 -245
- package/src/modules/library/routes/LibraryRoutes.tsx +134 -0
- package/src/modules/library/routes/WorkspaceItemRoute.tsx +74 -0
- package/src/modules/library/routes/library-paths.ts +191 -0
- package/src/modules/library/services/groups.api.ts +189 -0
- package/src/modules/library/services/library.api.ts +291 -164
- package/src/modules/library/services/tools.api.ts +60 -0
- package/src/modules/library/state/library-context.ts +22 -0
- package/src/modules/library/state/library-data.tsx +223 -0
- package/src/modules/library/state/toast.context.ts +32 -0
- package/src/modules/library/state/toast.tsx +84 -42
- package/src/modules/library/utils/clipboard.ts +33 -0
- package/src/modules/library/utils/group-summary.ts +68 -0
- package/src/modules/library/utils/names.ts +30 -0
- package/src/modules/library/utils/navigate-external.ts +15 -0
- package/src/modules/library/utils/oauth-fragment.ts +32 -0
- package/src/modules/library/utils/personal-group.ts +36 -0
- package/src/modules/library/utils/status.ts +108 -25
- package/src/modules/library/utils/toast-duration.ts +16 -0
- package/src/modules/onboarding/__tests__/onboarding.test.tsx +533 -0
- package/src/modules/onboarding/agent-clients.ts +48 -0
- package/src/modules/onboarding/components/ConnectAgentPill.tsx +133 -0
- package/src/modules/onboarding/components/RootLanding.tsx +54 -0
- package/src/modules/onboarding/components/WelcomePage.tsx +364 -0
- package/src/modules/onboarding/paths.ts +9 -0
- package/src/modules/onboarding/state/onboarding.ts +191 -0
- package/src/modules/pr/components/OpenChangeRequestDialog.tsx +10 -10
- package/src/modules/pr/services/pr-approvals.api.ts +19 -0
- package/src/modules/pr/services/pr-cancel.api.ts +11 -0
- package/src/modules/review/components/BinaryChangePlaceholder.tsx +3 -3
- package/src/modules/review/components/DiffViewer.tsx +4 -4
- package/src/modules/review/components/MarkdownDiffViewer.tsx +84 -26
- package/src/modules/review/components/ReviewFileRow.tsx +10 -10
- package/src/modules/review/components/ReviewPanel.tsx +49 -17
- package/src/modules/review/components/ReviewPanelSurface.tsx +1 -1
- package/src/modules/review/components/__tests__/MarkdownDiffViewer.test.tsx +122 -0
- package/src/modules/review/hooks/__tests__/useReviewState.test.ts +1 -1
- package/src/modules/secrets-vault/components/ConnectToolsPage.tsx +273 -171
- package/src/modules/secrets-vault/components/SecretsPage.tsx +147 -110
- package/src/modules/secrets-vault/components/ToolSecretsPanel.tsx +109 -92
- package/src/modules/secrets-vault/components/__tests__/SecretsPage.test.tsx +35 -4
- package/src/modules/secrets-vault/services/connect.api.ts +24 -3
- package/src/modules/settings/components/DeploymentPage.tsx +90 -0
- package/src/modules/settings/components/SettingsLayout.tsx +135 -0
- package/src/modules/settings/components/SettingsNav.tsx +114 -0
- package/src/modules/settings/components/__tests__/DeploymentPage.test.tsx +110 -0
- package/src/modules/settings/components/__tests__/SettingsLayout.test.tsx +249 -0
- package/src/modules/settings/settings-nav-items.tsx +166 -0
- package/src/modules/setup/__tests__/setup.test.tsx +540 -0
- package/src/modules/setup/components/SetupGate.tsx +67 -0
- package/src/modules/setup/components/SetupScreen.tsx +573 -0
- package/src/modules/setup/services/setup.api.ts +106 -0
- package/src/modules/setup/utils/git-host.ts +34 -0
- package/src/modules/toolbar/components/AppSwitcher.tsx +38 -15
- package/src/modules/toolbar/components/ExternalAgentAccessPage.tsx +50 -50
- package/src/modules/toolbar/components/ProfileMenu.tsx +294 -0
- package/src/modules/toolbar/components/Toolbar.tsx +56 -54
- package/src/modules/toolbar/components/__tests__/AppSwitcher.test.tsx +176 -122
- package/src/modules/toolbar/components/__tests__/Toolbar.test.tsx +252 -77
- package/src/modules/tools/ToolsExplorerPage.tsx +45 -40
- package/src/modules/workspace/__tests__/design-system-parity.test.ts +133 -0
- package/src/modules/workspace/__tests__/testFixtures.ts +2 -0
- package/src/modules/workspace/components/EditorTabs.tsx +82 -50
- package/src/modules/workspace/components/FileExplorer.tsx +413 -189
- package/src/modules/workspace/components/FilePaneCard.tsx +53 -0
- package/src/modules/workspace/components/FileRoute.tsx +89 -84
- package/src/modules/workspace/components/FileViewer.tsx +700 -294
- package/src/modules/workspace/components/KbDocumentShell.tsx +138 -0
- package/src/modules/workspace/components/KbFileRail.tsx +128 -0
- package/src/modules/workspace/components/KbPageHeader.tsx +390 -0
- package/src/modules/workspace/components/__tests__/EditorTabs.test.tsx +87 -3
- package/src/modules/workspace/components/__tests__/FileExplorer.test.tsx +293 -39
- package/src/modules/workspace/components/__tests__/FileRoute.test.tsx +1 -16
- package/src/modules/workspace/components/__tests__/FileViewer.test.tsx +462 -44
- package/src/modules/workspace/components/__tests__/KbDocumentShell.test.tsx +84 -0
- package/src/modules/workspace/components/__tests__/KbFileRail.test.tsx +83 -0
- package/src/modules/workspace/components/__tests__/KbPageHeader.test.tsx +192 -0
- package/src/modules/workspace/components/renderers/CopyAnchorButton.tsx +64 -0
- package/src/modules/workspace/components/renderers/CsvRenderer.tsx +8 -8
- package/src/modules/workspace/components/renderers/DocxRenderer.tsx +18 -9
- package/src/modules/workspace/components/renderers/HtmlRenderer.tsx +14 -14
- package/src/modules/workspace/components/renderers/ImageRenderer.tsx +2 -2
- package/src/modules/workspace/components/renderers/KbMarkdownView.tsx +31 -165
- package/src/modules/workspace/components/renderers/MarkdownRenderer.tsx +18 -5
- package/src/modules/workspace/components/renderers/MermaidDiagram.tsx +27 -10
- package/src/modules/workspace/components/renderers/PdfRenderer.tsx +2 -2
- package/src/modules/workspace/components/renderers/TextRenderer.tsx +11 -5
- package/src/modules/workspace/components/renderers/ToolForm.tsx +24 -24
- package/src/modules/workspace/components/renderers/ToolRenderer.tsx +27 -27
- package/src/modules/workspace/components/renderers/XlsxRenderer.tsx +11 -11
- package/src/modules/workspace/components/renderers/__tests__/DocxRenderer.test.tsx +66 -0
- package/src/modules/workspace/components/renderers/__tests__/KbMarkdownView.test.tsx +17 -1
- package/src/modules/workspace/components/renderers/__tests__/MarkdownRenderer.test.tsx +1 -1
- package/src/modules/workspace/components/renderers/__tests__/MermaidDiagram.test.tsx +58 -0
- package/src/modules/workspace/components/renderers/__tests__/lazyRenderer.test.tsx +68 -0
- package/src/modules/workspace/components/renderers/__tests__/rendererLayout.test.ts +64 -0
- package/src/modules/workspace/components/renderers/__tests__/sanitizeDocxHtml.test.ts +0 -0
- package/src/modules/workspace/components/renderers/chunk-boundary.tsx +71 -0
- package/src/modules/workspace/components/renderers/index.ts +78 -2
- package/src/modules/workspace/components/renderers/kbMarkdownPipeline.tsx +241 -0
- package/src/modules/workspace/components/renderers/lazyRenderer.tsx +59 -0
- package/src/modules/workspace/components/renderers/sanitizeDocxHtml.ts +91 -0
- package/src/modules/workspace/hooks/__tests__/useLinksOut.test.ts +59 -0
- package/src/modules/workspace/hooks/__tests__/useOpenChangeRequests.test.tsx +237 -0
- package/src/modules/workspace/hooks/__tests__/useWorkspaceState.test.tsx +185 -0
- package/src/modules/workspace/hooks/useAutoGrowTextarea.ts +30 -0
- package/src/modules/workspace/hooks/useLastCommit.ts +66 -0
- package/src/modules/workspace/hooks/useLinksOut.ts +56 -0
- package/src/modules/workspace/hooks/useOpenChangeRequests.ts +20 -0
- package/src/modules/workspace/hooks/useWorkspaceState.ts +123 -14
- package/src/modules/workspace/routing/__tests__/kb-routes.test.tsx +1 -1
- package/src/modules/workspace/services/workspace.api.ts +9 -2
- package/src/modules/workspace/state/open-change-requests.context.ts +35 -0
- package/src/modules/workspace/state/open-change-requests.tsx +185 -0
- package/src/modules/workspace/state/workspace.context.ts +9 -0
- package/src/modules/workspace/utils/__tests__/diff.test.ts +87 -0
- package/src/modules/workspace/utils/diff.ts +130 -53
- package/src/modules/workspace/utils/fileTree.ts +7 -4
- package/src/modules/workspace/workspace.css +28 -0
- package/src/shared/components/Badge.tsx +62 -0
- package/src/shared/components/Banner.tsx +58 -0
- package/src/shared/components/Button.tsx +90 -0
- package/src/shared/components/Dialog.tsx +6 -6
- package/src/shared/components/Field.tsx +45 -0
- package/src/shared/components/IconButton.tsx +74 -0
- package/src/shared/components/ListRow.tsx +96 -0
- package/src/shared/components/Menu.tsx +88 -0
- package/src/shared/components/PageShell.tsx +8 -5
- package/src/shared/components/Surface.tsx +86 -0
- package/src/shared/components/__tests__/primitives.test.tsx +333 -0
- package/src/shared/components/index.ts +48 -0
- package/src/shared/components/useDismissableMenu.ts +71 -0
- package/src/shared/theme/__tests__/accent-contrast.test.ts +84 -0
- package/src/shared/theme/index.css +12 -0
- package/src/shared/theme/measure.ts +64 -0
- package/src/shared/theme/shadows.css +34 -0
- package/src/shared/theme/tokens.css +193 -0
- package/src/test-setup.ts +9 -0
- package/src/modules/access/components/AccessRestrictedBanner.tsx +0 -31
- package/src/modules/access/components/NodeOwnersBanner.tsx +0 -30
- package/src/modules/git/__tests__/ProtectedBranchBanner.test.tsx +0 -82
- package/src/modules/git/components/ProtectedBranchBanner.tsx +0 -42
- package/src/modules/library/__tests__/DetailDialog.test.tsx +0 -200
- package/src/modules/library/__tests__/diff.test.ts +0 -62
- package/src/modules/library/__tests__/loadout.test.tsx +0 -72
- package/src/modules/library/components/CompareView.tsx +0 -357
- package/src/modules/library/components/DetailDialog.tsx +0 -566
- package/src/modules/library/components/GearIcon.tsx +0 -12
- package/src/modules/library/components/LoadoutSidebar.tsx +0 -156
- package/src/modules/library/components/StatusGem.tsx +0 -21
- package/src/modules/library/components/SuggestChange.tsx +0 -171
- package/src/modules/library/components/particles.ts +0 -50
- package/src/modules/library/state/loadout.tsx +0 -129
- package/src/modules/library/utils/diff.ts +0 -102
- package/src/modules/pr/__tests__/PrApprovalBadge.test.tsx +0 -93
- package/src/modules/pr/__tests__/PrCancelButton.test.tsx +0 -158
- package/src/modules/pr/__tests__/PrCancelConfirmDialog.test.tsx +0 -44
- package/src/modules/pr/__tests__/PrMergeButton.test.tsx +0 -360
- package/src/modules/pr/__tests__/bucketize-comments.test.ts +0 -85
- package/src/modules/pr/__tests__/parsePatch.test.ts +0 -104
- package/src/modules/pr/__tests__/usePrViewerState.test.ts +0 -72
- package/src/modules/pr/components/PrApprovalBadge.tsx +0 -80
- package/src/modules/pr/components/PrCancelButton.tsx +0 -99
- package/src/modules/pr/components/PrCancelConfirmDialog.tsx +0 -119
- package/src/modules/pr/components/PrCommentComposer.tsx +0 -92
- package/src/modules/pr/components/PrCommentThread.tsx +0 -168
- package/src/modules/pr/components/PrCommentsPanel.tsx +0 -143
- package/src/modules/pr/components/PrDiffPane.tsx +0 -425
- package/src/modules/pr/components/PrFileRow.tsx +0 -164
- package/src/modules/pr/components/PrFilesList.tsx +0 -53
- package/src/modules/pr/components/PrHeader.tsx +0 -45
- package/src/modules/pr/components/PrHeaderOverflowMenu.tsx +0 -58
- package/src/modules/pr/components/PrMergeButton.tsx +0 -268
- package/src/modules/pr/components/PrMergeConfirmDialog.tsx +0 -112
- package/src/modules/pr/components/PrRefreshFromTargetButton.tsx +0 -110
- package/src/modules/pr/components/PrViewer.tsx +0 -364
- package/src/modules/pr/hooks/usePrViewerState.ts +0 -150
- package/src/modules/pr/state/pr-viewer.context.ts +0 -34
- package/src/modules/pr/utils/bucketize-comments.ts +0 -55
- package/src/modules/pr/utils/parsePatch.ts +0 -57
- package/src/modules/toolbar/components/AdminMenu.tsx +0 -271
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { Fragment, useCallback, useRef, useState } from 'react';
|
|
2
|
+
import { ChevronDown, LogOut } from 'lucide-react';
|
|
3
|
+
import { useNavigate } from 'react-router-dom';
|
|
4
|
+
import type { AuthUser } from '@bevel-software/platform-shared';
|
|
5
|
+
import { useAuth } from '../../auth/state/auth.context';
|
|
6
|
+
import { useAdmin } from '../../admin/state/admin.context';
|
|
7
|
+
import type { AdminMenuItem } from '../../../core/registry';
|
|
8
|
+
import { useMenuSections } from '../../settings/settings-nav-items';
|
|
9
|
+
import {
|
|
10
|
+
MenuItem,
|
|
11
|
+
MenuLabel,
|
|
12
|
+
MenuPanel,
|
|
13
|
+
useDismissableMenu,
|
|
14
|
+
} from '../../../shared/components';
|
|
15
|
+
import { cn } from '../../../lib/utils';
|
|
16
|
+
|
|
17
|
+
const MENU_ID = 'app-profile-menu';
|
|
18
|
+
|
|
19
|
+
/** First letters of the first two words — the prototype's `initials` (proto:2315). */
|
|
20
|
+
function initials(name: string): string {
|
|
21
|
+
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
22
|
+
const mark = ((words[0]?.[0] ?? '') + (words[1]?.[0] ?? '')).toUpperCase();
|
|
23
|
+
return mark || '?';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A person, as a circle. Falls back to initials rather than to nothing: the
|
|
28
|
+
* avatar is the menu's trigger, and a trigger that vanishes for anyone without
|
|
29
|
+
* a profile picture is not a trigger.
|
|
30
|
+
*/
|
|
31
|
+
function Avatar({ user, className }: { user: AuthUser; className?: string }) {
|
|
32
|
+
const base = cn('flex-none rounded-full object-cover', className);
|
|
33
|
+
if (user.avatarUrl) {
|
|
34
|
+
return (
|
|
35
|
+
<img
|
|
36
|
+
src={user.avatarUrl}
|
|
37
|
+
alt=""
|
|
38
|
+
aria-hidden
|
|
39
|
+
referrerPolicy="no-referrer"
|
|
40
|
+
className={cn(base, 'border border-line')}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
return (
|
|
45
|
+
<span
|
|
46
|
+
aria-hidden
|
|
47
|
+
className={cn(
|
|
48
|
+
base,
|
|
49
|
+
'inline-flex items-center justify-center border border-line bg-sunken',
|
|
50
|
+
'font-bold text-ink-muted',
|
|
51
|
+
)}
|
|
52
|
+
>
|
|
53
|
+
{initials(user.name)}
|
|
54
|
+
</span>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* One button in the top bar's right edge, holding everything about you —
|
|
60
|
+
* the prototype's `.tbme` trigger and `.pmenu` panel (proto:3397-3462).
|
|
61
|
+
*
|
|
62
|
+
* It replaces THREE separate controls that used to sit here in a row: an inert
|
|
63
|
+
* name, a gear, and a sign-out arrow. The prototype's objection is that all
|
|
64
|
+
* three answer the same question — "me, and the settings that follow me" — so
|
|
65
|
+
* splitting them makes you learn three places to look for one thing. The name
|
|
66
|
+
* was the worst of the three: it sat between two buttons looking pressable and
|
|
67
|
+
* did nothing.
|
|
68
|
+
*
|
|
69
|
+
* Order inside the panel is an argument: identity first, so the menu states
|
|
70
|
+
* who you are before it offers to change anything; then the settings anyone
|
|
71
|
+
* has; then the admin-only set; then the way out — destructive last, and the
|
|
72
|
+
* only red thing in it.
|
|
73
|
+
*
|
|
74
|
+
* The prototype's "Viewing as" person-switcher is deliberately absent. It says
|
|
75
|
+
* so itself: "switching person is a demo affordance, not a product one."
|
|
76
|
+
*
|
|
77
|
+
* Open/close mechanics are `useDismissableMenu` (outside click, Escape,
|
|
78
|
+
* focus back to the trigger) rather than the bespoke pair of document
|
|
79
|
+
* listeners this component used to carry.
|
|
80
|
+
*
|
|
81
|
+
* This dropdown is the DOOR into the settings surfaces, not their navigation —
|
|
82
|
+
* they keep their own nav once you are inside (see `SettingsLayout`). Both
|
|
83
|
+
* render the same list from `settings-nav-items`, so they cannot drift. It
|
|
84
|
+
* still lists rows the nav deliberately excludes — dialog rows, and anything
|
|
85
|
+
* the enterprise shell contributes that lives elsewhere in the app — because
|
|
86
|
+
* running arbitrary actions is this surface's job and not the nav's.
|
|
87
|
+
*/
|
|
88
|
+
export function ProfileMenu() {
|
|
89
|
+
const navigate = useNavigate();
|
|
90
|
+
const { user, logout } = useAuth();
|
|
91
|
+
const { isAdmin, unreadCount } = useAdmin();
|
|
92
|
+
const { defaultItems, adminItems } = useMenuSections();
|
|
93
|
+
const [open, setOpen] = useState(false);
|
|
94
|
+
// Per-row dialog open flags, keyed by item id. A plain map (rather than one
|
|
95
|
+
// "active dialog" slot) preserves the historical behavior where two dialogs
|
|
96
|
+
// opened in sequence can coexist until each is closed on its own.
|
|
97
|
+
const [openDialogs, setOpenDialogs] = useState<Record<string, boolean>>({});
|
|
98
|
+
const triggerRef = useRef<HTMLButtonElement>(null);
|
|
99
|
+
|
|
100
|
+
// Two ways to shut it, because they want different focus behaviour. Picking
|
|
101
|
+
// a row hands focus back to the trigger (the row it was on is about to
|
|
102
|
+
// unmount, and focus must not fall to document.body). An outside click has
|
|
103
|
+
// already moved focus somewhere the person chose — dragging it back to the
|
|
104
|
+
// avatar would undo their click.
|
|
105
|
+
const dismiss = useCallback(() => setOpen(false), []);
|
|
106
|
+
const close = useCallback(() => {
|
|
107
|
+
setOpen(false);
|
|
108
|
+
triggerRef.current?.focus();
|
|
109
|
+
}, []);
|
|
110
|
+
const panelRef = useDismissableMenu<HTMLDivElement>({
|
|
111
|
+
open,
|
|
112
|
+
onClose: dismiss,
|
|
113
|
+
returnFocusTo: triggerRef,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// Only admins have the Feedback Inbox, so the unread badge is admin-only too.
|
|
117
|
+
const showBadge = isAdmin && unreadCount > 0;
|
|
118
|
+
|
|
119
|
+
// Open a dialog from a menu row: close the menu first (so focus/scroll state
|
|
120
|
+
// is clean), then flip the dialog open.
|
|
121
|
+
const openDialog = (id: string) => {
|
|
122
|
+
close();
|
|
123
|
+
setOpenDialogs((prev) => ({ ...prev, [id]: true }));
|
|
124
|
+
};
|
|
125
|
+
const closeDialog = (id: string) => {
|
|
126
|
+
setOpenDialogs((prev) => ({ ...prev, [id]: false }));
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* `dialog` → `onSelect` → `path`, and the order is the contract.
|
|
131
|
+
*
|
|
132
|
+
* Dialog stays first because that is the documented precedence registry rows
|
|
133
|
+
* were written against. `path` is LAST so it can never shadow a row that
|
|
134
|
+
* asked to run its own code — it is the fallback that lets a row which only
|
|
135
|
+
* needs to navigate say so as data instead of as a closure.
|
|
136
|
+
*/
|
|
137
|
+
const handleSelect = (item: AdminMenuItem) => {
|
|
138
|
+
if (item.dialog) {
|
|
139
|
+
openDialog(item.id);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (item.onSelect) {
|
|
143
|
+
item.onSelect({ closeMenu: close, navigate });
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (item.path) {
|
|
147
|
+
navigate(item.path);
|
|
148
|
+
close();
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const renderRow = (item: AdminMenuItem) => (
|
|
153
|
+
<MenuItem
|
|
154
|
+
key={item.id}
|
|
155
|
+
className="group"
|
|
156
|
+
onClick={() => handleSelect(item)}
|
|
157
|
+
>
|
|
158
|
+
<span className="flex items-center gap-2.5">
|
|
159
|
+
<span className="flex-none text-ink-faint transition-colors group-hover:text-ink-muted">
|
|
160
|
+
{item.icon}
|
|
161
|
+
</span>
|
|
162
|
+
{item.label}
|
|
163
|
+
</span>
|
|
164
|
+
</MenuItem>
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
const renderDialogs = (items: AdminMenuItem[]) =>
|
|
168
|
+
items
|
|
169
|
+
.filter((item) => item.dialog)
|
|
170
|
+
.map((item) => (
|
|
171
|
+
<Fragment key={item.id}>
|
|
172
|
+
{item.dialog!({
|
|
173
|
+
open: !!openDialogs[item.id],
|
|
174
|
+
onClose: () => closeDialog(item.id),
|
|
175
|
+
})}
|
|
176
|
+
</Fragment>
|
|
177
|
+
));
|
|
178
|
+
|
|
179
|
+
// No user, no menu. Everything in it is either about a person or an action
|
|
180
|
+
// taken as one; signed out there is nobody to be.
|
|
181
|
+
if (!user) return null;
|
|
182
|
+
|
|
183
|
+
return (
|
|
184
|
+
<div className="relative">
|
|
185
|
+
<button
|
|
186
|
+
ref={triggerRef}
|
|
187
|
+
type="button"
|
|
188
|
+
onClick={() => setOpen((v) => !v)}
|
|
189
|
+
className={cn(
|
|
190
|
+
'flex items-center gap-[7px] rounded-full py-[3px] pr-[9px] pl-[3px]',
|
|
191
|
+
'text-detail text-ink-muted transition-colors hover:bg-hover hover:text-ink',
|
|
192
|
+
open && 'bg-hover text-ink',
|
|
193
|
+
)}
|
|
194
|
+
title="You and your settings"
|
|
195
|
+
/* A DISCLOSURE, not a menu button. `aria-haspopup="true"` is defined
|
|
196
|
+
as a synonym for `"menu"`, so it would still promise the roving
|
|
197
|
+
arrow-key model that `role="menu"` implies — and the panel below is
|
|
198
|
+
a `group` of ordinary buttons that Tab walks. `aria-expanded` plus
|
|
199
|
+
`aria-controls` is the whole contract this trigger can keep. */
|
|
200
|
+
aria-expanded={open}
|
|
201
|
+
aria-controls={open ? MENU_ID : undefined}
|
|
202
|
+
/* The full name, where the pill shows only the first — an accessible
|
|
203
|
+
name that CONTAINS the visible one, which is what WCAG's
|
|
204
|
+
label-in-name asks for and what keeps voice control working. It has
|
|
205
|
+
to be an attribute rather than the button's text because the pill
|
|
206
|
+
drops to just the avatar on a narrow window, and a button whose
|
|
207
|
+
name disappears with the viewport has no name at all. */
|
|
208
|
+
aria-label={
|
|
209
|
+
showBadge ? `${user.name}, ${unreadCount} new feedback` : user.name
|
|
210
|
+
}
|
|
211
|
+
>
|
|
212
|
+
<span className="relative flex-none">
|
|
213
|
+
<Avatar user={user} className="size-[22px] text-micro" />
|
|
214
|
+
{showBadge && (
|
|
215
|
+
<span
|
|
216
|
+
className="absolute -top-0.5 -right-0.5 block size-2 rounded-full bg-danger ring-2 ring-surface"
|
|
217
|
+
aria-hidden
|
|
218
|
+
/>
|
|
219
|
+
)}
|
|
220
|
+
</span>
|
|
221
|
+
{/* First name only (proto:3726). The full one is on the button and in
|
|
222
|
+
the panel's identity block; a top bar does not need your surname. */}
|
|
223
|
+
<span aria-hidden className="hidden truncate sm:inline">
|
|
224
|
+
{user.name.trim().split(/\s+/)[0]}
|
|
225
|
+
</span>
|
|
226
|
+
<ChevronDown
|
|
227
|
+
aria-hidden
|
|
228
|
+
size={12}
|
|
229
|
+
className={cn(
|
|
230
|
+
'hidden flex-none text-ink-faint transition-transform sm:block',
|
|
231
|
+
open && 'rotate-180',
|
|
232
|
+
)}
|
|
233
|
+
/>
|
|
234
|
+
</button>
|
|
235
|
+
|
|
236
|
+
{/* The ref goes on a positioning wrapper rather than on MenuPanel:
|
|
237
|
+
MenuPanel is presentation only and takes no ref, which is the same
|
|
238
|
+
reason PageActions wraps it. */}
|
|
239
|
+
{open && (
|
|
240
|
+
<div ref={panelRef} className="absolute right-0 top-[calc(100%+5px)] z-40">
|
|
241
|
+
{/* A GROUP of buttons, not a `role="menu"`.
|
|
242
|
+
`menu`/`menuitem` is a promise about the keyboard: arrow keys move
|
|
243
|
+
between items, one roving tab stop, Home/End jump the ends — and
|
|
244
|
+
screen readers switch to application mode to deliver it. This panel
|
|
245
|
+
implements none of that; every row is a plain focusable button and
|
|
246
|
+
Tab is how you reach them. Claiming the role would put a keyboard
|
|
247
|
+
user in a mode where the keys they are told to press do nothing. */}
|
|
248
|
+
<MenuPanel
|
|
249
|
+
id={MENU_ID}
|
|
250
|
+
role="group"
|
|
251
|
+
aria-label="You and your settings"
|
|
252
|
+
className="w-[274px] max-h-[calc(100dvh-62px)] overflow-y-auto"
|
|
253
|
+
>
|
|
254
|
+
{/* Who you are, stated once at the top so no row below has to
|
|
255
|
+
repeat it. The email is real here — the prototype fabricates it
|
|
256
|
+
from the first name (proto:3440). */}
|
|
257
|
+
<div className="mb-1 flex items-center gap-2.5 border-b border-line px-2.5 pt-1.5 pb-3">
|
|
258
|
+
<Avatar user={user} className="size-[26px] text-meta" />
|
|
259
|
+
<span className="min-w-0">
|
|
260
|
+
<span className="block truncate text-ui font-semibold text-ink">
|
|
261
|
+
{user.name}
|
|
262
|
+
</span>
|
|
263
|
+
<span className="block truncate text-meta text-ink-faint">{user.email}</span>
|
|
264
|
+
</span>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
{defaultItems.map(renderRow)}
|
|
268
|
+
|
|
269
|
+
{isAdmin && adminItems.length > 0 && (
|
|
270
|
+
<div role="group" aria-labelledby="profile-menu-admin-section-label">
|
|
271
|
+
<MenuLabel id="profile-menu-admin-section-label">Admin only</MenuLabel>
|
|
272
|
+
{adminItems.map(renderRow)}
|
|
273
|
+
</div>
|
|
274
|
+
)}
|
|
275
|
+
|
|
276
|
+
<div className="mt-1.5 border-t border-line pt-1.5">
|
|
277
|
+
<MenuItem tone="danger" onClick={logout}>
|
|
278
|
+
<span className="flex items-center gap-2.5">
|
|
279
|
+
<LogOut size={15} className="flex-none opacity-80" />
|
|
280
|
+
Sign out
|
|
281
|
+
</span>
|
|
282
|
+
</MenuItem>
|
|
283
|
+
</div>
|
|
284
|
+
</MenuPanel>
|
|
285
|
+
</div>
|
|
286
|
+
)}
|
|
287
|
+
|
|
288
|
+
{/* Dialogs opened by the menu rows above. Mounted at the menu root so they
|
|
289
|
+
persist independently of the (transient) dropdown. */}
|
|
290
|
+
{renderDialogs(defaultItems)}
|
|
291
|
+
{isAdmin && renderDialogs(adminItems)}
|
|
292
|
+
</div>
|
|
293
|
+
);
|
|
294
|
+
}
|
|
@@ -1,27 +1,58 @@
|
|
|
1
1
|
import { Fragment, useMemo } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useLocation } from 'react-router-dom';
|
|
3
|
+
import { PanelRight } from 'lucide-react';
|
|
4
|
+
import { ProfileMenu } from './ProfileMenu';
|
|
5
5
|
import { AppSwitcher } from './AppSwitcher';
|
|
6
6
|
import { useLayout } from '../../layout/state/layout.context';
|
|
7
7
|
import { useMediaQuery } from '../../layout/hooks/useMediaQuery';
|
|
8
|
-
import { useAppRegistry } from '../../../core/registry';
|
|
8
|
+
import { useActiveAppId, useAppRegistry } from '../../../core/registry';
|
|
9
|
+
import { SidebarToggle } from '../../layout/components/SidebarToggle';
|
|
10
|
+
import { toggleSidebar, useSidebar } from '../../layout/state/sidebar';
|
|
11
|
+
import { TOOLBAR_STACK_QUERY } from '../../layout/breakpoints';
|
|
12
|
+
import { isSettingsNavPath } from '../../settings/settings-nav-items';
|
|
9
13
|
|
|
14
|
+
/**
|
|
15
|
+
* The app's top bar: the nav toggle, the app switcher, and whatever the
|
|
16
|
+
* registry contributes beside them.
|
|
17
|
+
*
|
|
18
|
+
* It lives in the shell ABOVE the app surfaces rather than inside either one,
|
|
19
|
+
* which is why the nav toggle survives a switch between Knowledge and Skills &
|
|
20
|
+
* Tools instead of being re-mounted by each.
|
|
21
|
+
*/
|
|
10
22
|
export function Toolbar() {
|
|
11
|
-
const { user, logout } = useAuth();
|
|
12
23
|
const registry = useAppRegistry();
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
const location = useLocation();
|
|
25
|
+
/**
|
|
26
|
+
* ONE nav toggle, for the app's ONE sidebar.
|
|
27
|
+
*
|
|
28
|
+
* There used to be two buttons here — a path-gated `SidebarToggle` for the
|
|
29
|
+
* Library and a registry-gated one for Knowledge's explorer — with the same
|
|
30
|
+
* glyph, in the same spot, driving two different pieces of state. They read
|
|
31
|
+
* as one control to anyone using the app, so now they are one.
|
|
32
|
+
*
|
|
33
|
+
* Which surfaces HAVE a sidebar is asked three ways, because they answer it
|
|
34
|
+
* differently: Knowledge declares a `sidebar` pane (so the layout controller
|
|
35
|
+
* can say `canToggleExplorer`), while Skills & Tools and the settings pages
|
|
36
|
+
* have no pane group at all and are identified by their paths.
|
|
37
|
+
*
|
|
38
|
+
* The settings clause is `&& !isCompact` because below `md` the settings
|
|
39
|
+
* layout mounts no `SidebarFrame` at all — the nav is a strip inside the
|
|
40
|
+
* page — and a toggle there would point `aria-controls` at an element that
|
|
41
|
+
* does not exist.
|
|
42
|
+
*/
|
|
43
|
+
// By ACTIVE APP, not path prefix: a skill page at its canonical /workspace
|
|
44
|
+
// URL claims Skills & Tools (see AppClaimContext), and the toggle must
|
|
45
|
+
// follow the surface on screen — a path test here made the sidebar's own
|
|
46
|
+
// toggle vanish the moment a skill was opened.
|
|
47
|
+
const onLibrary = useActiveAppId() === 'skills-tools';
|
|
48
|
+
const { collapsed: sidebarCollapsed } = useSidebar();
|
|
49
|
+
const { isChatCollapsed, canToggleExplorer, canToggleChat, toggleChat } = useLayout();
|
|
21
50
|
// Below the `md` breakpoint the registry item cluster (the enterprise
|
|
22
51
|
// branch switcher, for one) does not fit alongside the toolbar essentials,
|
|
23
52
|
// so it drops onto a second row instead of overflowing offscreen.
|
|
24
|
-
const isCompact = useMediaQuery(
|
|
53
|
+
const isCompact = useMediaQuery(TOOLBAR_STACK_QUERY);
|
|
54
|
+
const hasSidebar =
|
|
55
|
+
onLibrary || canToggleExplorer || (isSettingsNavPath(location.pathname) && !isCompact);
|
|
25
56
|
|
|
26
57
|
// Registry-contributed left-cluster items. The CORE toolbar has none of its
|
|
27
58
|
// own: the branch switcher is an enterprise contribution scoped (by the
|
|
@@ -39,20 +70,10 @@ export function Toolbar() {
|
|
|
39
70
|
));
|
|
40
71
|
|
|
41
72
|
return (
|
|
42
|
-
<header className="border-b border-
|
|
73
|
+
<header className="border-b border-line shrink-0 bg-white">
|
|
43
74
|
<div className="h-12 flex items-center px-4 gap-2">
|
|
44
|
-
{
|
|
45
|
-
<
|
|
46
|
-
onClick={toggleExplorer}
|
|
47
|
-
className={`p-1.5 rounded hover:bg-slate-100 transition-colors ${
|
|
48
|
-
isExplorerCollapsed ? 'text-slate-600' : 'text-slate-700'
|
|
49
|
-
}`}
|
|
50
|
-
title={isExplorerCollapsed ? 'Show file explorer' : 'Hide file explorer'}
|
|
51
|
-
aria-label={isExplorerCollapsed ? 'Show file explorer' : 'Hide file explorer'}
|
|
52
|
-
aria-pressed={!isExplorerCollapsed}
|
|
53
|
-
>
|
|
54
|
-
<PanelLeft size={16} />
|
|
55
|
-
</button>
|
|
75
|
+
{hasSidebar && (
|
|
76
|
+
<SidebarToggle collapsed={sidebarCollapsed} onToggle={toggleSidebar} />
|
|
56
77
|
)}
|
|
57
78
|
|
|
58
79
|
<AppSwitcher />
|
|
@@ -63,27 +84,11 @@ export function Toolbar() {
|
|
|
63
84
|
|
|
64
85
|
<div className="flex-1" />
|
|
65
86
|
|
|
66
|
-
{user && (
|
|
67
|
-
<div className="flex items-center gap-2">
|
|
68
|
-
{user.avatarUrl && (
|
|
69
|
-
<img
|
|
70
|
-
src={user.avatarUrl}
|
|
71
|
-
alt={user.name}
|
|
72
|
-
className="w-6 h-6 rounded-full"
|
|
73
|
-
referrerPolicy="no-referrer"
|
|
74
|
-
/>
|
|
75
|
-
)}
|
|
76
|
-
<span className="text-xs text-slate-600 hidden sm:inline">{user.name}</span>
|
|
77
|
-
</div>
|
|
78
|
-
)}
|
|
79
|
-
|
|
80
|
-
<AdminMenu />
|
|
81
|
-
|
|
82
87
|
{canToggleChat && (
|
|
83
88
|
<button
|
|
84
89
|
onClick={toggleChat}
|
|
85
|
-
className={`p-1.5 rounded hover:bg-
|
|
86
|
-
isChatCollapsed ? 'text-
|
|
90
|
+
className={`p-1.5 rounded hover:bg-hover transition-colors ${
|
|
91
|
+
isChatCollapsed ? 'text-ink-muted' : 'text-ink'
|
|
87
92
|
}`}
|
|
88
93
|
title={isChatCollapsed ? 'Show chat panel' : 'Hide chat panel'}
|
|
89
94
|
aria-label={isChatCollapsed ? 'Show chat panel' : 'Hide chat panel'}
|
|
@@ -93,14 +98,11 @@ export function Toolbar() {
|
|
|
93
98
|
</button>
|
|
94
99
|
)}
|
|
95
100
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
>
|
|
102
|
-
<LogOut size={16} />
|
|
103
|
-
</button>
|
|
101
|
+
{/* One button for who you are and everything that follows you around.
|
|
102
|
+
It used to be three things in a row here — a name that was not a
|
|
103
|
+
control, a gear, and a sign-out arrow — all answering the same
|
|
104
|
+
question. See ProfileMenu's docblock. */}
|
|
105
|
+
<ProfileMenu />
|
|
104
106
|
</div>
|
|
105
107
|
|
|
106
108
|
{isCompact && itemCluster.length > 0 && (
|
|
@@ -111,7 +113,7 @@ export function Toolbar() {
|
|
|
111
113
|
// browsers not to claim a vertical pan gesture on this strip —
|
|
112
114
|
// otherwise iOS / Android can hijack downward swipes that started
|
|
113
115
|
// on the toolbar.
|
|
114
|
-
className="h-10 flex items-center px-3 gap-2 border-t border-
|
|
116
|
+
className="h-10 flex items-center px-3 gap-2 border-t border-line overflow-x-auto overflow-y-hidden"
|
|
115
117
|
style={{ touchAction: 'pan-x' }}
|
|
116
118
|
>
|
|
117
119
|
{itemCluster}
|