@bevel-software/platform-core-frontend 0.15.1 → 0.19.0
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 +2 -2
- package/package.json +3 -3
- package/src/core/CoreAppShell.tsx +16 -9
- package/src/core/__tests__/AppChrome.test.tsx +0 -3
- package/src/core/__tests__/events.test.ts +43 -0
- package/src/core/bootstrap.ts +11 -3
- package/src/core/events.ts +85 -3
- package/src/core/registry.ts +1 -1
- package/src/lib/__tests__/email.test.ts +44 -0
- package/src/lib/email.ts +37 -1
- package/src/modules/access/__tests__/ManageAccessDialog.add-row-picking.test.tsx +141 -0
- package/src/modules/access/__tests__/ManageAccessDialog.chip-truncation.test.tsx +204 -0
- package/src/modules/access/__tests__/ManageAccessDialog.download-read.test.tsx +234 -0
- package/src/modules/access/__tests__/ManageAccessDialog.edited-row-visible.test.tsx +160 -0
- package/src/modules/access/__tests__/ManageAccessDialog.placement.test.tsx +2 -2
- package/src/modules/access/__tests__/ManageAccessDialog.proposal.test.tsx +166 -0
- package/src/modules/access/__tests__/ManageAccessDialog.restrict.test.tsx +510 -0
- package/src/modules/access/__tests__/ManageAccessDialog.row-menu-axes.test.tsx +299 -0
- package/src/modules/access/__tests__/ManageAccessDialog.row-menu-width.test.tsx +226 -0
- package/src/modules/access/__tests__/ManageAccessDialog.test.tsx +721 -126
- package/src/modules/access/__tests__/ManageAccessDialog.unknown-email.test.tsx +314 -0
- package/src/modules/access/__tests__/manage-access-affordance.test.ts +14 -0
- package/src/modules/access/__tests__/tailwindDeclarations.ts +210 -0
- package/src/modules/access/api.ts +140 -6
- package/src/modules/access/components/ManageAccessDialog.tsx +1299 -561
- package/src/modules/access/manage-access-affordance.ts +17 -0
- package/src/modules/admin/__tests__/AddMemberInput.test.tsx +297 -0
- package/src/modules/admin/__tests__/AdminRolesPage.capabilities.test.tsx +2 -2
- package/src/modules/admin/__tests__/AdminRolesPage.fixed-admin.test.tsx +189 -0
- package/src/modules/admin/__tests__/AdminRolesPage.suggest.test.tsx +1 -1
- package/src/modules/admin/__tests__/ConnectionKeysPage.test.tsx +266 -0
- package/src/modules/admin/__tests__/DirectoryGroupsPage.suggest.test.tsx +182 -0
- package/src/modules/admin/__tests__/DirectoryGroupsPage.test.tsx +165 -14
- package/src/modules/admin/__tests__/UserAccountsPage.test.tsx +401 -4
- package/src/modules/admin/__tests__/group-members-path.test.ts +27 -0
- package/src/modules/admin/components/AddMemberInput.tsx +268 -0
- package/src/modules/admin/components/AdminRolesPage.tsx +97 -132
- package/src/modules/admin/components/ConnectionKeysPage.tsx +269 -0
- package/src/modules/admin/components/DirectoryGroupsPage.tsx +91 -39
- package/src/modules/admin/components/UserAccountsPage.tsx +271 -37
- package/src/modules/admin/components/connection-keys-grouping.ts +43 -0
- package/src/modules/admin/components/group-members-path.ts +32 -0
- package/src/modules/admin/services/connection-keys.api.ts +47 -0
- package/src/modules/admin/services/roles.api.ts +12 -1
- package/src/modules/auth/__tests__/AccountPage.test.tsx +50 -2
- package/src/modules/auth/components/AccountPage.tsx +73 -54
- package/src/modules/auth/components/LoginScreen.tsx +1 -0
- package/src/modules/auth/services/account.api.ts +78 -4
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.access-rules.test.tsx +144 -0
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.binary.test.tsx +422 -0
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.brings-itself-up-to-date.test.tsx +431 -0
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.fork-point.test.tsx +193 -0
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.initial-file.test.tsx +142 -0
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.moved.test.tsx +202 -0
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.test.tsx +205 -13
- package/src/modules/change-requests/__tests__/ChangeRequestDialog.unreadable.test.tsx +271 -0
- package/src/modules/change-requests/__tests__/FileChangeBoxes.test.tsx +208 -0
- package/src/modules/change-requests/__tests__/apply-outcome-for-every-viewer.test.tsx +286 -0
- package/src/modules/change-requests/__tests__/propose.concurrent.test.ts +273 -0
- package/src/modules/change-requests/__tests__/readFailure.test.ts +122 -0
- package/src/modules/change-requests/__tests__/useCrFileDiffs.test.tsx +238 -0
- package/src/modules/change-requests/__tests__/useFileOnBranch.test.tsx +56 -1
- package/src/modules/change-requests/__tests__/useForkPointFile.test.tsx +79 -0
- package/src/modules/change-requests/components/BranchFilePreview.tsx +357 -0
- package/src/modules/change-requests/components/ChangeBox.tsx +31 -2
- package/src/modules/change-requests/components/ChangeRequestDialog.tsx +862 -72
- package/src/modules/change-requests/components/CrFileTree.tsx +74 -58
- package/src/modules/change-requests/components/FileChangeBoxes.tsx +19 -15
- package/src/modules/change-requests/hooks/useApplyChangeRequest.ts +41 -7
- package/src/modules/change-requests/hooks/useCrFileDiffs.ts +181 -23
- package/src/modules/change-requests/hooks/useFileOnBranch.ts +70 -7
- package/src/modules/change-requests/hooks/useForkPointFile.ts +77 -0
- package/src/modules/change-requests/services/change-requests.api.ts +57 -1
- package/src/modules/change-requests/services/denied-file.api.ts +53 -0
- package/src/modules/change-requests/services/propose.api.ts +97 -8
- package/src/modules/change-requests/utils/approval.ts +15 -0
- package/src/modules/change-requests/utils/author.ts +32 -0
- package/src/modules/change-requests/utils/readFailure.ts +110 -0
- package/src/modules/git/__tests__/FileHistoryPanel.test.tsx +20 -0
- package/src/modules/git/components/FileHistoryPanel.tsx +5 -0
- package/src/modules/git/components/PullRequestsForMe.tsx +51 -24
- package/src/modules/git/services/__tests__/error-messages.test.ts +29 -0
- package/src/modules/git/services/error-messages.ts +12 -0
- package/src/modules/git/services/pr-prompts.ts +5 -5
- package/src/modules/layout/__tests__/HeaderAlignment.test.tsx +401 -0
- package/src/modules/layout/__tests__/SidebarFooterGrid.test.tsx +286 -0
- package/src/modules/layout/__tests__/SidebarFrameResponsive.test.tsx +61 -0
- package/src/modules/layout/components/AppLayout.tsx +2 -0
- package/src/modules/layout/components/MobileChatLayout.tsx +4 -1
- package/src/modules/layout/components/ResizableThreePaneLayout.tsx +4 -1
- package/src/modules/layout/components/SidebarFrame.tsx +108 -3
- package/src/modules/library/__tests__/AddToPluginDialog.test.tsx +171 -5
- package/src/modules/library/__tests__/DeleteToolDialog.test.tsx +356 -0
- package/src/modules/library/__tests__/IntegrationsSetupReminder.test.tsx +60 -0
- package/src/modules/library/__tests__/LibraryCard.test.tsx +91 -10
- package/src/modules/library/__tests__/LibraryRoutes.test.tsx +242 -107
- package/src/modules/library/__tests__/LibrarySidebarMenu.test.tsx +103 -98
- package/src/modules/library/__tests__/LinkSkillPanel.test.tsx +20 -5
- package/src/modules/library/__tests__/LockedPluginView.test.tsx +97 -7
- package/src/modules/library/__tests__/NewPluginDialog.test.tsx +13 -4
- package/src/modules/library/__tests__/PersonalAddDialog.test.tsx +79 -3
- package/src/modules/library/__tests__/PersonalPluginPage.test.tsx +201 -0
- package/src/modules/library/__tests__/PluginExtras.test.tsx +100 -9
- package/src/modules/library/__tests__/PluginJoinRequests.test.tsx +60 -1
- package/src/modules/library/__tests__/PluginPage.test.tsx +258 -6
- package/src/modules/library/__tests__/PluginsSidebar.contextmenu.test.tsx +16 -56
- package/src/modules/library/__tests__/PluginsSidebar.test.tsx +155 -152
- package/src/modules/library/__tests__/PluginsSidebarMenu.test.tsx +16 -0
- package/src/modules/library/__tests__/SharedViaPlugins.test.tsx +106 -0
- package/src/modules/library/__tests__/SkillPage.test.tsx +386 -80
- package/src/modules/library/__tests__/SkillsTree.test.tsx +293 -4
- package/src/modules/library/__tests__/ToolConnectionSection.test.tsx +582 -71
- package/src/modules/library/__tests__/ToolPage.test.tsx +87 -4
- package/src/modules/library/__tests__/WorkspaceItemRoute.test.tsx +173 -26
- package/src/modules/library/__tests__/auth-harness.tsx +9 -9
- package/src/modules/library/__tests__/card-row-menu.test.tsx +320 -0
- package/src/modules/library/__tests__/library-data.mapping.test.tsx +98 -0
- package/src/modules/library/__tests__/library-data.stale.test.tsx +121 -28
- package/src/modules/library/__tests__/library-data.test.ts +7 -0
- package/src/modules/library/__tests__/library-paths.test.ts +47 -4
- package/src/modules/library/__tests__/link-membership.test.ts +13 -4
- package/src/modules/library/__tests__/name-with-badges.test.tsx +273 -0
- package/src/modules/library/__tests__/newSkillMarkdown.test.ts +30 -0
- package/src/modules/library/__tests__/owner-pill.test.tsx +357 -0
- package/src/modules/library/__tests__/pending-tools.test.tsx +400 -0
- package/src/modules/library/__tests__/plugin-entries.test.ts +122 -0
- package/src/modules/library/__tests__/plugin-summary.test.ts +36 -1
- package/src/modules/library/__tests__/status.test.ts +82 -2
- package/src/modules/library/__tests__/tools.api.test.ts +44 -1
- package/src/modules/library/components/AccessRequestsBanner.tsx +85 -47
- package/src/modules/library/components/AddDialogTabs.tsx +103 -0
- package/src/modules/library/components/AddToPluginDialog.tsx +74 -18
- package/src/modules/library/components/IntegrationsSetupReminder.tsx +59 -0
- package/src/modules/library/components/ItemActionsMenu.tsx +288 -0
- package/src/modules/library/components/LibraryCard.tsx +146 -45
- package/src/modules/library/components/LibraryLayout.tsx +119 -256
- package/src/modules/library/components/LibraryPage.tsx +172 -39
- package/src/modules/library/components/LinkSkillPanel.tsx +1 -3
- package/src/modules/library/components/LockedPluginView.tsx +62 -34
- package/src/modules/library/components/NameWithBadges.tsx +164 -0
- package/src/modules/library/components/NewPluginDialog.tsx +16 -2
- package/src/modules/library/components/PageActions.tsx +11 -9
- package/src/modules/library/components/{PendingSkillReview.tsx → PendingItemReview.tsx} +14 -7
- package/src/modules/library/components/PersonalAddDialog.tsx +68 -18
- package/src/modules/library/components/PersonalPluginPage.tsx +121 -22
- package/src/modules/library/components/PluginExtras.tsx +140 -17
- package/src/modules/library/components/PluginIndexRow.tsx +47 -12
- package/src/modules/library/components/PluginPage.tsx +157 -41
- package/src/modules/library/components/PluginRows.tsx +286 -0
- package/src/modules/library/components/PluginsSidebar.tsx +239 -263
- package/src/modules/library/components/PluginsSidebarMenu.tsx +26 -1
- package/src/modules/library/components/ShareButton.tsx +17 -0
- package/src/modules/library/components/SkillsTree.tsx +141 -28
- package/src/modules/library/components/TeamRoute.tsx +15 -0
- package/src/modules/library/components/__tests__/upload-notices-once-per-page.test.tsx +144 -0
- package/src/modules/library/components/plugin-page-parts.tsx +103 -17
- package/src/modules/library/components/skill-page/SharedViaPlugins.tsx +6 -12
- package/src/modules/library/components/skill-page/SkillFilePane.tsx +5 -0
- package/src/modules/library/components/skill-page/SkillPage.tsx +274 -122
- package/src/modules/library/components/tool-page/DeleteToolDialog.tsx +218 -0
- package/src/modules/library/components/tool-page/ToolConnectionSection.tsx +79 -178
- package/src/modules/library/components/tool-page/ToolPage.tsx +106 -16
- package/src/modules/library/components/tool-page/ToolVarRow.tsx +42 -41
- package/src/modules/library/hooks/__tests__/useLibraryData.test.ts +98 -0
- package/src/modules/library/hooks/useLibraryData.ts +92 -19
- package/src/modules/library/routes/LibraryRoutes.tsx +14 -11
- package/src/modules/library/routes/WorkspaceItemRoute.tsx +77 -27
- package/src/modules/library/routes/library-paths.ts +26 -28
- package/src/modules/library/services/library.api.ts +38 -20
- package/src/modules/library/services/plugins.api.ts +69 -8
- package/src/modules/library/services/teams.api.ts +15 -0
- package/src/modules/library/services/tools.api.ts +78 -0
- package/src/modules/library/state/library-data.tsx +170 -32
- package/src/modules/library/utils/personal-plugin.ts +13 -15
- package/src/modules/library/utils/plugin-entries.ts +134 -0
- package/src/modules/library/utils/plugin-summary.ts +75 -9
- package/src/modules/library/utils/status.ts +135 -33
- package/src/modules/onboarding/__tests__/creator-welcome.test.tsx +8 -1
- package/src/modules/onboarding/__tests__/onboarding.test.tsx +853 -760
- package/src/modules/onboarding/agent-clients.ts +55 -23
- package/src/modules/onboarding/components/ConnectAgentPill.tsx +5 -1
- package/src/modules/onboarding/components/WelcomePage.tsx +98 -62
- package/src/modules/pr/services/pr-merge.api.ts +2 -1
- package/src/modules/review/components/MarkdownDiffViewer.tsx +53 -8
- package/src/modules/review/components/ReviewPanel.tsx +15 -17
- package/src/modules/review/components/__tests__/MarkdownDiffViewer.test.tsx +64 -0
- package/src/modules/review/components/__tests__/ReviewPanel.test.tsx +25 -1
- package/src/modules/secrets-vault/components/ConnectToolsPage.tsx +454 -117
- package/src/modules/secrets-vault/components/SecretsPage.tsx +48 -7
- package/src/modules/secrets-vault/components/ToolSecretsPanel.tsx +84 -5
- package/src/modules/secrets-vault/components/__tests__/ConnectToolsPage.test.tsx +425 -0
- package/src/modules/secrets-vault/components/__tests__/SecretsPage.test.tsx +417 -82
- package/src/modules/secrets-vault/components/__tests__/ToolSecretsPanel.test.tsx +105 -0
- package/src/modules/secrets-vault/components/__tests__/connect-lists-what-the-banner-counted.test.tsx +407 -0
- package/src/modules/secrets-vault/probe/SavedKeyProbeResult.tsx +98 -0
- package/src/modules/secrets-vault/probe/__tests__/probe-verdict.test.ts +160 -0
- package/src/modules/secrets-vault/probe/probe-verdict.ts +108 -0
- package/src/modules/secrets-vault/probe/useSavedKeyProbe.ts +228 -0
- package/src/modules/secrets-vault/services/connect.api.ts +36 -5
- package/src/modules/secrets-vault/utils/connect-status.ts +98 -0
- package/src/modules/settings/components/ClaudeConnectionCard.tsx +9 -24
- package/src/modules/settings/components/ClaudeConnectionFields.tsx +23 -0
- package/src/modules/settings/components/DeploymentPage.tsx +10 -30
- package/src/modules/settings/components/MarketplaceSection.tsx +152 -0
- package/src/modules/settings/components/__tests__/DeploymentPage.test.tsx +67 -4
- package/src/modules/settings/components/__tests__/MarketplaceSection.test.tsx +325 -0
- package/src/modules/settings/components/__tests__/SettingsLayout.test.tsx +5 -5
- package/src/modules/settings/services/github-facade.api.ts +23 -0
- package/src/modules/settings/settings-nav-items.tsx +10 -2
- package/src/modules/setup/__tests__/setup.oidc.test.tsx +172 -0
- package/src/modules/setup/__tests__/setup.probe-refusal.test.tsx +123 -0
- package/src/modules/setup/__tests__/setup.test.tsx +497 -4
- package/src/modules/setup/__tests__/useSetupStatus.test.tsx +130 -0
- package/src/modules/setup/components/SetupGate.tsx +16 -16
- package/src/modules/setup/components/SetupScreen.tsx +521 -43
- package/src/modules/setup/hooks/useSetupStatus.ts +93 -0
- package/src/modules/setup/services/setup.api.ts +140 -3
- package/src/modules/setup/utils/__tests__/root-folders.test.ts +72 -0
- package/src/modules/setup/utils/root-folders.ts +46 -0
- package/src/modules/toolbar/assets/claude-setup/01-add-manually.webp +0 -0
- package/src/modules/toolbar/assets/claude-setup/02-add-configuration.webp +0 -0
- package/src/modules/toolbar/assets/claude-setup/03-connect-account.webp +0 -0
- package/src/modules/toolbar/assets/claude-setup/04-pick-instance.webp +0 -0
- package/src/modules/toolbar/assets/claude-setup/05-plugins-add.webp +0 -0
- package/src/modules/toolbar/assets/claude-setup/06-add-marketplace.webp +0 -0
- package/src/modules/toolbar/assets/claude-setup/07-paste-url-sync.webp +0 -0
- package/src/modules/toolbar/assets/claude-setup/08-install-plugins.webp +0 -0
- package/src/modules/toolbar/assets/claude-setup/09-select-repository.webp +0 -0
- package/src/modules/toolbar/assets/claude-setup/10-connector-not-added.webp +0 -0
- package/src/modules/toolbar/assets/claude-setup/11-add-custom-connector.webp +0 -0
- package/src/modules/toolbar/assets/claude-setup/README.md +68 -0
- package/src/modules/toolbar/components/AgentInstructionsCard.tsx +296 -0
- package/src/modules/toolbar/components/ClaudeMarketplaceCarousel.tsx +107 -0
- package/src/modules/toolbar/components/ClaudeRegistrationSteps.tsx +127 -0
- package/src/modules/toolbar/components/CoworkSetupSteps.tsx +100 -0
- package/src/modules/toolbar/components/ExternalAgentAccessPage.tsx +177 -118
- package/src/modules/toolbar/components/ScreenshotStep.tsx +77 -0
- package/src/modules/toolbar/components/SetupCarousel.tsx +177 -0
- package/src/modules/toolbar/components/__tests__/AgentInstructionsCard.test.tsx +370 -0
- package/src/modules/toolbar/components/__tests__/ExternalAgentAccessPage.test.tsx +542 -42
- package/src/modules/toolbar/components/__tests__/Toolbar.test.tsx +2 -2
- package/src/modules/toolbar/components/__tests__/claude-setup-shots.test.ts +104 -0
- package/src/modules/toolbar/components/claude-connector-slide.tsx +38 -0
- package/src/modules/toolbar/components/claude-setup-shots.ts +167 -0
- package/src/modules/toolbar/components/deployment-address.ts +29 -0
- package/src/modules/toolbar/components/setup-step-parts.tsx +35 -0
- package/src/modules/toolbar/services/__tests__/agent-instructions.api.test.ts +89 -0
- package/src/modules/toolbar/services/agent-instructions.api.ts +167 -0
- package/src/modules/toolbar/services/external-api-keys.api.ts +6 -0
- package/src/modules/workflow/state/ChangeRequestStaleBinder.tsx +43 -0
- package/src/modules/workflow/state/EventBusProvider.tsx +122 -11
- package/src/modules/workflow/state/__tests__/EventBusProvider.storage.test.tsx +87 -0
- package/src/modules/workflow/state/__tests__/EventBusProvider.watch.test.tsx +223 -0
- package/src/modules/workflow/state/event-bus.context.ts +10 -0
- package/src/modules/workspace/__tests__/testFixtures.ts +5 -3
- package/src/modules/workspace/components/FileExplorer.tsx +1295 -191
- package/src/modules/workspace/components/FileRoute.tsx +353 -36
- package/src/modules/workspace/components/FileViewer.tsx +166 -45
- package/src/modules/workspace/components/KbDocumentShell.tsx +50 -6
- package/src/modules/workspace/components/KbPageHeader.tsx +120 -55
- package/src/modules/workspace/components/TreeActionConfirm.tsx +350 -0
- package/src/modules/workspace/components/__tests__/FileExplorer.test.tsx +2473 -129
- package/src/modules/workspace/components/__tests__/FileRoute.test.tsx +731 -18
- package/src/modules/workspace/components/__tests__/FileViewer.test.tsx +331 -12
- package/src/modules/workspace/components/__tests__/KbDocumentShell.test.tsx +39 -0
- package/src/modules/workspace/components/__tests__/KbPageHeader.test.tsx +33 -20
- package/src/modules/workspace/components/renderers/DocxRenderer.tsx +4 -5
- package/src/modules/workspace/components/renderers/DownloadFileButton.tsx +13 -4
- package/src/modules/workspace/components/renderers/EmailRenderer.tsx +4 -3
- package/src/modules/workspace/components/renderers/HtmlRenderer.tsx +8 -14
- package/src/modules/workspace/components/renderers/ImageRenderer.tsx +75 -16
- package/src/modules/workspace/components/renderers/KbImage.tsx +180 -0
- package/src/modules/workspace/components/renderers/KbMarkdownView.tsx +22 -6
- package/src/modules/workspace/components/renderers/MarkdownRenderer.tsx +48 -22
- package/src/modules/workspace/components/renderers/PdfRenderer.tsx +4 -5
- package/src/modules/workspace/components/renderers/PptxRenderer.tsx +4 -3
- package/src/modules/workspace/components/renderers/XlsxRenderer.tsx +4 -3
- package/src/modules/workspace/components/renderers/__tests__/DocxRenderer.test.tsx +12 -0
- package/src/modules/workspace/components/renderers/__tests__/DownloadFileButton.test.tsx +57 -9
- package/src/modules/workspace/components/renderers/__tests__/EmailRenderer.test.tsx +13 -1
- package/src/modules/workspace/components/renderers/__tests__/ImageRenderer.test.tsx +163 -0
- package/src/modules/workspace/components/renderers/__tests__/KbMarkdownView.test.tsx +237 -0
- package/src/modules/workspace/components/renderers/__tests__/MarkdownRenderer.test.tsx +108 -14
- package/src/modules/workspace/components/renderers/__tests__/PptxRenderer.test.tsx +14 -1
- package/src/modules/workspace/components/renderers/__tests__/XlsxRenderer.test.tsx +16 -1
- package/src/modules/workspace/components/renderers/__tests__/rendererSelection.test.tsx +66 -1
- package/src/modules/workspace/components/renderers/index.ts +53 -2
- package/src/modules/workspace/components/renderers/kbMarkdownPipeline.tsx +25 -4
- package/src/modules/workspace/components/renderers/rendererWorkspace.ts +40 -0
- package/src/modules/workspace/hooks/__tests__/useImageRevision.test.tsx +174 -0
- package/src/modules/workspace/hooks/__tests__/useOpenChangeRequests.test.tsx +179 -1
- package/src/modules/workspace/hooks/__tests__/useWorkspaceImageResolver.test.tsx +122 -0
- package/src/modules/workspace/hooks/__tests__/useWorkspaceState.test.tsx +892 -7
- package/src/modules/workspace/hooks/useImageRevision.ts +101 -0
- package/src/modules/workspace/hooks/useMergedWorkspaceTree.ts +22 -3
- package/src/modules/workspace/hooks/useWorkspaceImageResolver.ts +55 -0
- package/src/modules/workspace/hooks/useWorkspaceState.ts +424 -66
- package/src/modules/workspace/routing/__tests__/kb-routes.test.tsx +279 -3
- package/src/modules/workspace/routing/kb-routes.ts +206 -29
- package/src/modules/workspace/services/__tests__/workspace.api.test.ts +57 -1
- package/src/modules/workspace/services/workspace.api.ts +57 -4
- package/src/modules/workspace/state/__tests__/applied-request-clears-pending.test.tsx +343 -0
- package/src/modules/workspace/state/__tests__/upload-lands-where-it-was-dropped.test.tsx +158 -0
- package/src/modules/workspace/state/open-change-requests.tsx +100 -12
- package/src/modules/workspace/state/workspace.context.ts +125 -19
- package/src/modules/workspace/utils/__tests__/file-trace.test.ts +73 -0
- package/src/modules/workspace/utils/__tests__/fileTree.test.ts +220 -6
- package/src/modules/workspace/utils/__tests__/pasteLink.test.ts +76 -0
- package/src/modules/workspace/utils/__tests__/treeConfirm.test.ts +364 -0
- package/src/modules/workspace/utils/__tests__/uploadError.test.ts +35 -0
- package/src/modules/workspace/utils/file-trace.ts +50 -0
- package/src/modules/workspace/utils/fileTree.ts +112 -36
- package/src/modules/workspace/utils/frontmatter.ts +8 -4
- package/src/modules/workspace/utils/pasteLink.ts +90 -0
- package/src/modules/workspace/utils/treeConfirm.ts +338 -0
- package/src/modules/workspace/utils/uploadError.ts +29 -0
- package/src/shared/__tests__/marketplace-url.test.ts +6 -1
- package/src/shared/components/Button.tsx +16 -2
- package/src/shared/components/Dialog.tsx +27 -11
- package/src/shared/components/Menu.tsx +13 -1
- package/src/shared/components/PageShell.tsx +13 -8
- package/src/shared/components/__tests__/primitives.test.tsx +116 -2
- package/src/shared/components/__tests__/useFocusHandoff.test.tsx +192 -0
- package/src/shared/components/index.ts +2 -0
- package/src/shared/components/useDismissableMenu.ts +32 -10
- package/src/shared/components/useFocusHandoff.ts +51 -0
- package/src/shared/components/useLatestRef.ts +28 -0
- package/src/shared/markdown/Markdown.tsx +12 -3
- package/src/shared/markdown/__tests__/escapeSpacesInLinkDestinations.test.ts +39 -0
- package/src/shared/markdown/hrefs.ts +50 -0
- package/src/shared/marketplace-url.ts +33 -5
- package/src/shared/mcp/ChatGptInstallLink.tsx +3 -3
- package/src/shared/mcp/ConnectionInstructions.tsx +38 -27
- package/src/shared/mcp/__tests__/connect-snippets.test.ts +3 -3
- package/src/shared/mcp/connect-snippets.ts +14 -9
- package/src/shared/mcp/index.ts +1 -1
- package/src/shared/theme/__tests__/header-band.test.ts +197 -0
- package/src/shared/theme/header.ts +75 -0
- package/src/shared/theme/measure.ts +7 -4
- package/src/shared/theme/tokens.css +25 -0
- package/src/modules/library/__tests__/PluginsIndexPage.test.tsx +0 -363
- package/src/modules/library/__tests__/PluginsSidebar.locked.test.tsx +0 -97
- package/src/modules/library/components/PluginsIndexPage.tsx +0 -270
- package/src/modules/update-check/__tests__/UpdateBanner.test.tsx +0 -126
- package/src/modules/update-check/components/UpdateBanner.tsx +0 -92
- package/src/modules/update-check/services/update-check.api.ts +0 -24
|
@@ -6,6 +6,7 @@ import { cn } from '../../../lib/utils';
|
|
|
6
6
|
import { Banner, Button, Dialog, IconButton } from '../../../shared/components';
|
|
7
7
|
import { pathForPluginsIndex } from '../routes/library-paths';
|
|
8
8
|
import type { LibraryItem } from '../state/library-data';
|
|
9
|
+
import { linkedHomeOf } from '../utils/status';
|
|
9
10
|
import { removeLibraryItem } from '../services/library.api';
|
|
10
11
|
import { unlinkSkill } from '../services/plugins.api';
|
|
11
12
|
import { LibraryCard } from './LibraryCard';
|
|
@@ -20,17 +21,30 @@ import { LibraryCard } from './LibraryCard';
|
|
|
20
21
|
* promise drift the first time either is touched.
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
|
-
/**
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* `Everything ›` — the page's place in the Library, and the way back.
|
|
26
|
+
*
|
|
27
|
+
* It belongs ON the page's title band, as the band's leading item, and not in
|
|
28
|
+
* a row above it. A row above the band pushes the title bar down off the line
|
|
29
|
+
* the sidebar's header row holds, which is the seam `shared/theme/header`
|
|
30
|
+
* exists to keep — and the seam is the first thing anyone sees below the
|
|
31
|
+
* toolbar.
|
|
32
|
+
*
|
|
33
|
+
* The trail stops SHORT of the current page for the same reason: the `<h1>`
|
|
34
|
+
* standing beside it IS the current page, and a crumb repeating the heading
|
|
35
|
+
* it sits next to says the name twice on one line. That also makes the trail
|
|
36
|
+
* a fixed width, so it never competes with the title for the row's space.
|
|
37
|
+
*/
|
|
38
|
+
export function PluginBreadcrumb() {
|
|
25
39
|
return (
|
|
26
|
-
<nav
|
|
40
|
+
<nav
|
|
41
|
+
aria-label="Breadcrumb"
|
|
42
|
+
className="flex flex-none items-center gap-1.5 text-detail text-ink-faint"
|
|
43
|
+
>
|
|
27
44
|
<Link to={pathForPluginsIndex()} className="rounded-xs hover:text-ink">
|
|
28
|
-
|
|
45
|
+
Everything
|
|
29
46
|
</Link>
|
|
30
47
|
<span aria-hidden="true">›</span>
|
|
31
|
-
<span aria-current="page" className="truncate text-ink-muted">
|
|
32
|
-
{name}
|
|
33
|
-
</span>
|
|
34
48
|
</nav>
|
|
35
49
|
);
|
|
36
50
|
}
|
|
@@ -111,11 +125,24 @@ export function PluginSection({
|
|
|
111
125
|
export function CardGrid({
|
|
112
126
|
items,
|
|
113
127
|
onOpen,
|
|
128
|
+
onShare,
|
|
114
129
|
onRemove,
|
|
115
130
|
canRemove,
|
|
131
|
+
linkedIn,
|
|
132
|
+
linkedRoots,
|
|
116
133
|
}: {
|
|
117
134
|
items: LibraryItem[];
|
|
118
135
|
onOpen(item: LibraryItem): void;
|
|
136
|
+
/**
|
|
137
|
+
* Open Manage access on a SKILL's own folder — the skill page's `Share`,
|
|
138
|
+
* from the card's `…` menu. Absent: no card carries a menu.
|
|
139
|
+
*
|
|
140
|
+
* Only skills are offered it, and the card's props enforce that: access to a
|
|
141
|
+
* tool is decided at the plugin that carries it, so a tool has no rules of
|
|
142
|
+
* its own to open. A PROPOSED skill is left out too — its folder is on a
|
|
143
|
+
* change request's branch and does not exist on the one the dialog reads.
|
|
144
|
+
*/
|
|
145
|
+
onShare?(item: LibraryItem): void;
|
|
119
146
|
/**
|
|
120
147
|
* The manager's "remove from this place". Present only when the caller
|
|
121
148
|
* runs the page the grid is on — the pages decide that, not the grid.
|
|
@@ -129,6 +156,24 @@ export function CardGrid({
|
|
|
129
156
|
* item. A verb the server would refuse is not offered.
|
|
130
157
|
*/
|
|
131
158
|
canRemove?(item: LibraryItem): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* The plugin whose page this grid is on. With it, a card whose membership in
|
|
161
|
+
* that plugin is by LINK wears the Linked pill, naming on hover the folder
|
|
162
|
+
* the item actually lives in.
|
|
163
|
+
*
|
|
164
|
+
* Absent on every surface that is not one plugin's page: your own space has
|
|
165
|
+
* no manifest to link from, and a gallery card belongs to as many plugins as
|
|
166
|
+
* it belongs to — there is no "this plugin" for it to be linked from.
|
|
167
|
+
*/
|
|
168
|
+
linkedIn?: string;
|
|
169
|
+
/**
|
|
170
|
+
* That plugin's `linkedRoots` — the folders its manifest names. The pill's
|
|
171
|
+
* tooltip names the root a card came in through, and only the manifest
|
|
172
|
+
* knows which root that is (see `linkedHomeOf`). Absent or empty when the
|
|
173
|
+
* summary has not arrived, which the tooltip degrades around rather than
|
|
174
|
+
* waiting for.
|
|
175
|
+
*/
|
|
176
|
+
linkedRoots?: readonly string[];
|
|
132
177
|
}) {
|
|
133
178
|
return (
|
|
134
179
|
<div
|
|
@@ -138,22 +183,33 @@ export function CardGrid({
|
|
|
138
183
|
)}
|
|
139
184
|
>
|
|
140
185
|
{items.map((item) => {
|
|
141
|
-
// The change-request number
|
|
142
|
-
//
|
|
143
|
-
//
|
|
144
|
-
//
|
|
145
|
-
|
|
186
|
+
// The change-request number AND the declaration's path are part of the
|
|
187
|
+
// key, not decoration. A released item's id is unique because the
|
|
188
|
+
// catalog refuses a collision; a PROPOSAL has been refused nothing yet.
|
|
189
|
+
// Two people can propose the same name into different plugins, and one
|
|
190
|
+
// request can add `weather.tool` to two plugin folders at once — same
|
|
191
|
+
// id, same request number, and the path is what tells them apart.
|
|
192
|
+
const key = item.pending
|
|
193
|
+
? `${item.kind}:${item.id}:${item.pending.changeRequestNumber}:${item.path}`
|
|
194
|
+
: `${item.kind}:${item.id}`;
|
|
146
195
|
// The flavor badge names the DECLARATION file — which file an owner
|
|
147
196
|
// edits — not the transport: a `.tool` manual whose call template is
|
|
148
197
|
// `type: mcp` still edits as a UTCP manual, so the path suffix is the
|
|
149
198
|
// authoritative signal, not the tool's `type` metadata.
|
|
199
|
+
// Whether THIS card carries a `…`, which the remove overlay below has
|
|
200
|
+
// to know: both are corner controls on the same card, and two things
|
|
201
|
+
// pinned to the same corner is one thing you cannot click.
|
|
202
|
+
const menued = item.kind === 'skill' && !!onShare && !item.pending;
|
|
150
203
|
const kindProps =
|
|
151
204
|
item.kind === 'integration'
|
|
152
205
|
? ({
|
|
153
206
|
kind: 'integration',
|
|
154
207
|
flavor: item.path.endsWith('/mcp.json') ? 'mcp' : 'utcp',
|
|
155
208
|
} as const)
|
|
156
|
-
: ({
|
|
209
|
+
: ({
|
|
210
|
+
kind: 'skill',
|
|
211
|
+
onShare: menued ? () => onShare!(item) : undefined,
|
|
212
|
+
} as const);
|
|
157
213
|
const card = (
|
|
158
214
|
<LibraryCard
|
|
159
215
|
key={key}
|
|
@@ -164,7 +220,9 @@ export function CardGrid({
|
|
|
164
220
|
owned={item.owned}
|
|
165
221
|
status={item.status}
|
|
166
222
|
version={item.version}
|
|
167
|
-
|
|
223
|
+
// Null (inline, or no plugin in question) has to become `undefined`
|
|
224
|
+
// — the prop is "there is a folder to name", and `null` is not it.
|
|
225
|
+
linkedHome={(linkedIn ? linkedHomeOf(item, linkedIn, linkedRoots) : null) ?? undefined}
|
|
168
226
|
pending={
|
|
169
227
|
item.pending && {
|
|
170
228
|
authorName: item.pending.authorName,
|
|
@@ -191,8 +249,12 @@ export function CardGrid({
|
|
|
191
249
|
title={`Remove ${item.name}`}
|
|
192
250
|
onClick={() => onRemove(item)}
|
|
193
251
|
className={cn(
|
|
194
|
-
'absolute
|
|
252
|
+
'absolute top-1.5 rounded-sm border border-line bg-surface p-1 text-ink-faint',
|
|
195
253
|
'opacity-0 transition-opacity hover:text-danger focus-visible:opacity-100 group-hover/removable:opacity-100',
|
|
254
|
+
// The overflow `…` keeps the corner — that is where every menu
|
|
255
|
+
// in this product lives — so Remove steps left of it on a card
|
|
256
|
+
// that has one, and keeps the corner on a card that does not.
|
|
257
|
+
menued ? 'right-8' : 'right-1.5',
|
|
196
258
|
)}
|
|
197
259
|
>
|
|
198
260
|
<Trash2 size={13} />
|
|
@@ -295,6 +357,7 @@ export function PluginItemSections({
|
|
|
295
357
|
skillItems,
|
|
296
358
|
toolItems,
|
|
297
359
|
onOpen,
|
|
360
|
+
onShare,
|
|
298
361
|
onRemove,
|
|
299
362
|
canRemove,
|
|
300
363
|
emptySkills,
|
|
@@ -302,14 +365,22 @@ export function PluginItemSections({
|
|
|
302
365
|
hideEmpty = false,
|
|
303
366
|
skillControls,
|
|
304
367
|
skillControlsActive = false,
|
|
368
|
+
linkedIn,
|
|
369
|
+
linkedRoots,
|
|
305
370
|
}: {
|
|
306
371
|
skillItems: LibraryItem[];
|
|
307
372
|
toolItems: LibraryItem[];
|
|
308
373
|
onOpen(item: LibraryItem): void;
|
|
374
|
+
/** See {@link CardGrid} — the skill cards' `Share`. Tools never get one. */
|
|
375
|
+
onShare?(item: LibraryItem): void;
|
|
309
376
|
/** See {@link CardGrid} — present only when the caller manages this place. */
|
|
310
377
|
onRemove?(item: LibraryItem): void;
|
|
311
378
|
/** See {@link CardGrid}. */
|
|
312
379
|
canRemove?(item: LibraryItem): boolean;
|
|
380
|
+
/** See {@link CardGrid} — the plugin a card can be linked FROM. */
|
|
381
|
+
linkedIn?: string;
|
|
382
|
+
/** See {@link CardGrid} — that plugin's linked roots, for the pill's tooltip. */
|
|
383
|
+
linkedRoots?: readonly string[];
|
|
313
384
|
/**
|
|
314
385
|
* A plain sentence, or an `EmptySkillsNudge`. A string still gets the band's
|
|
315
386
|
* standard paragraph; a node is trusted to bring its own — the nudge carries
|
|
@@ -352,7 +423,15 @@ export function PluginItemSections({
|
|
|
352
423
|
emptySkills
|
|
353
424
|
)
|
|
354
425
|
) : (
|
|
355
|
-
<CardGrid
|
|
426
|
+
<CardGrid
|
|
427
|
+
items={skillItems}
|
|
428
|
+
onOpen={onOpen}
|
|
429
|
+
onShare={onShare}
|
|
430
|
+
onRemove={onRemove}
|
|
431
|
+
canRemove={canRemove}
|
|
432
|
+
linkedIn={linkedIn}
|
|
433
|
+
linkedRoots={linkedRoots}
|
|
434
|
+
/>
|
|
356
435
|
)}
|
|
357
436
|
</PluginSection>
|
|
358
437
|
)}
|
|
@@ -362,7 +441,14 @@ export function PluginItemSections({
|
|
|
362
441
|
{toolItems.length === 0 ? (
|
|
363
442
|
<p className="text-ui text-ink-faint">{emptyTools}</p>
|
|
364
443
|
) : (
|
|
365
|
-
<CardGrid
|
|
444
|
+
<CardGrid
|
|
445
|
+
items={toolItems}
|
|
446
|
+
onOpen={onOpen}
|
|
447
|
+
onRemove={onRemove}
|
|
448
|
+
canRemove={canRemove}
|
|
449
|
+
linkedIn={linkedIn}
|
|
450
|
+
linkedRoots={linkedRoots}
|
|
451
|
+
/>
|
|
366
452
|
)}
|
|
367
453
|
</PluginSection>
|
|
368
454
|
)}
|
|
@@ -28,14 +28,14 @@ export function SharedViaPlugins({
|
|
|
28
28
|
skillName,
|
|
29
29
|
skillPath,
|
|
30
30
|
memberships,
|
|
31
|
-
|
|
31
|
+
canWrite,
|
|
32
32
|
onChanged,
|
|
33
33
|
}: {
|
|
34
34
|
skillName: string;
|
|
35
35
|
skillPath: string;
|
|
36
36
|
memberships: PluginMembership[];
|
|
37
37
|
/** The caller may edit the skill (its SKILL.md) — the repair verb. */
|
|
38
|
-
|
|
38
|
+
canWrite: boolean;
|
|
39
39
|
onChanged(): void;
|
|
40
40
|
}) {
|
|
41
41
|
const data = useLibrary();
|
|
@@ -53,15 +53,9 @@ export function SharedViaPlugins({
|
|
|
53
53
|
),
|
|
54
54
|
[data.pluginSummaries],
|
|
55
55
|
);
|
|
56
|
-
// A retired skill is never shared onward — the link API refuses it, so the
|
|
57
|
-
// chooser offers nothing rather than a list of refusals.
|
|
58
|
-
const retired = useMemo(
|
|
59
|
-
() => data.items.some((i) => i.kind === 'skill' && i.id === skillName && i.lifecycle === 'retired'),
|
|
60
|
-
[data.items, skillName],
|
|
61
|
-
);
|
|
62
56
|
const addable = useMemo(
|
|
63
|
-
() =>
|
|
64
|
-
[managed, memberships
|
|
57
|
+
() => [...managed].filter((name) => !memberships.some((m) => m.name === name)).sort(),
|
|
58
|
+
[managed, memberships],
|
|
65
59
|
);
|
|
66
60
|
|
|
67
61
|
async function run(label: string, op: () => Promise<unknown>, done: string) {
|
|
@@ -105,7 +99,7 @@ export function SharedViaPlugins({
|
|
|
105
99
|
</div>
|
|
106
100
|
<small className={cn('block text-meta', broken ? 'text-urgent' : 'text-ink-faint')}>
|
|
107
101
|
{broken
|
|
108
|
-
?
|
|
102
|
+
? canWrite
|
|
109
103
|
? `Needs setup: ${m.name}'s members can't read this skill until the link is repaired.`
|
|
110
104
|
: `Needs setup: ${m.name}'s members can't read this skill. Ask an editor to repair the link.`
|
|
111
105
|
: m.linked
|
|
@@ -115,7 +109,7 @@ export function SharedViaPlugins({
|
|
|
115
109
|
</div>
|
|
116
110
|
<div className="ml-auto flex shrink-0 items-center gap-2">
|
|
117
111
|
{broken && <StatusDot state="urgent" />}
|
|
118
|
-
{broken &&
|
|
112
|
+
{broken && canWrite && (
|
|
119
113
|
<Button
|
|
120
114
|
variant="outline"
|
|
121
115
|
size="tiny"
|
|
@@ -2,6 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import '../../../change-requests/change-requests.css';
|
|
3
3
|
import { FilePaneCard } from '../../../workspace/components/FilePaneCard';
|
|
4
4
|
import { KbMarkdownView } from '../../../workspace/components/renderers/KbMarkdownView';
|
|
5
|
+
import type { KbImageResolver } from '../../../workspace/components/renderers/kbMarkdownPipeline';
|
|
5
6
|
import { HtmlRenderer } from '../../../workspace/components/renderers/HtmlRenderer';
|
|
6
7
|
import type { DiffLine } from '../../../change-requests/utils/diff';
|
|
7
8
|
|
|
@@ -29,6 +30,8 @@ interface SkillFilePaneProps {
|
|
|
29
30
|
onOpenNodeId?(id: string): void;
|
|
30
31
|
/** Heading deep-link builder; present ⇒ headings get the copy-anchor button. */
|
|
31
32
|
headingLink?(slug: string): string;
|
|
33
|
+
/** Image source resolver, same contract as `KbMarkdownView`; absent ⇒ plain `<img>` tags. */
|
|
34
|
+
resolveImage?: KbImageResolver;
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
/**
|
|
@@ -51,6 +54,7 @@ export function SkillFilePane({
|
|
|
51
54
|
onOpenLink,
|
|
52
55
|
onOpenNodeId,
|
|
53
56
|
headingLink,
|
|
57
|
+
resolveImage,
|
|
54
58
|
}: SkillFilePaneProps) {
|
|
55
59
|
return (
|
|
56
60
|
<FilePaneCard file={file} actions={actions} notice={notice} className="mt-4">
|
|
@@ -69,6 +73,7 @@ export function SkillFilePane({
|
|
|
69
73
|
onOpenFile={(href) => onOpenLink?.(href)}
|
|
70
74
|
onOpenNodeId={onOpenNodeId}
|
|
71
75
|
headingLink={headingLink}
|
|
76
|
+
resolveImage={resolveImage}
|
|
72
77
|
scroll={false}
|
|
73
78
|
/>
|
|
74
79
|
) : /\.html?$/i.test(file) ? (
|