@taskforcehq/taskforce 0.3.305 → 0.3.307
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/README.md +0 -2
- package/dist/Taskforce.module.css +603 -107
- package/dist/TaskforceCore.js +216 -43
- package/dist/TaskforceCore.test.js +611 -28
- package/dist/assets/fonts/CourierPrime-Bold.woff2 +0 -0
- package/dist/assets/fonts/CourierPrime-BoldItalic.woff2 +0 -0
- package/dist/assets/fonts/CourierPrime-Italic.woff2 +0 -0
- package/dist/assets/fonts/CourierPrime-Regular.woff2 +0 -0
- package/dist/assets/fonts/Noir_medium.woff2 +0 -0
- package/dist/assets/fonts/Noir_regular.woff2 +0 -0
- package/dist/assets/fonts/RussoOne-Regular.woff2 +0 -0
- package/dist/assets/fonts/SpecialElite-Regular.woff2 +0 -0
- package/dist/compat/workspaceSyncCompat.js +46 -2
- package/dist/compat/workspaceSyncCompat.test.js +38 -1
- package/dist/components/activity/EntityActivityTimeline.d.ts +34 -0
- package/dist/components/activity/EntityActivityTimeline.js +81 -0
- package/dist/components/context/ContextAttachmentManager.d.ts +14 -0
- package/dist/components/context/ContextAttachmentManager.js +561 -0
- package/dist/components/features/AgentsModule.d.ts +14 -1
- package/dist/components/features/AgentsModule.js +366 -18
- package/dist/components/features/AgentsModule.test.js +507 -8
- package/dist/components/features/AnnotatedAttachmentWorkspace.d.ts +3 -1
- package/dist/components/features/AnnotatedAttachmentWorkspace.js +118 -4
- package/dist/components/features/AnnotatedAttachmentWorkspace.test.js +52 -0
- package/dist/components/features/DocumentIndex.d.ts +2 -2
- package/dist/components/features/DocumentIndex.js +3 -4
- package/dist/components/features/DocumentViewer.d.ts +7 -1
- package/dist/components/features/DocumentViewer.js +62 -4
- package/dist/components/features/DocumentWorkspace.d.ts +10 -2
- package/dist/components/features/DocumentWorkspace.js +15 -4
- package/dist/components/features/DocumentWorkspace.test.js +51 -1
- package/dist/components/features/TaskSettings.d.ts +2 -0
- package/dist/components/features/TaskSettings.js +83 -78
- package/dist/components/features/TaskSettings.test.js +171 -82
- package/dist/components/features/documentWorkspaceModel.d.ts +1 -1
- package/dist/components/task/TaskActionHeader.js +11 -5
- package/dist/components/task/TaskActionHeader.test.js +10 -0
- package/dist/components/task/TaskCard.js +24 -29
- package/dist/components/task/TaskCard.test.js +38 -3
- package/dist/components/task/TaskContextUpload.js +4 -526
- package/dist/components/task/TaskContextUpload.test.js +3 -3
- package/dist/components/task/TaskForm.js +61 -116
- package/dist/components/task/TaskForm.test.js +110 -8
- package/dist/components/task/TaskKanban.d.ts +2 -1
- package/dist/components/task/TaskKanban.js +94 -21
- package/dist/components/task/TaskKanban.test.js +36 -0
- package/dist/components/task/TaskList.js +5 -1
- package/dist/components/task/TaskList.test.js +4 -0
- package/dist/components/ui/EditableAvatarButton.d.ts +18 -0
- package/dist/components/ui/EditableAvatarButton.js +18 -0
- package/dist/components/ui/HierarchyActionBadge.d.ts +10 -0
- package/dist/components/ui/HierarchyActionBadge.js +5 -0
- package/dist/components/views/AppShellHeader.d.ts +3 -1
- package/dist/components/views/AppShellHeader.js +27 -11
- package/dist/components/views/AppShellHeader.test.js +18 -1
- package/dist/components/views/PlanComparisonPage.d.ts +9 -1
- package/dist/components/views/PlanComparisonPage.js +78 -14
- package/dist/components/views/PlanComparisonPage.test.js +257 -0
- package/dist/components/views/PlansPage.js +127 -36
- package/dist/components/views/PlansPage.test.js +294 -12
- package/dist/components/views/StandaloneLayout.js +529 -592
- package/dist/components/views/WidgetView.js +10 -8
- package/dist/components/views/panels/PlanningDrawer.d.ts +25 -5
- package/dist/components/views/panels/PlanningDrawer.js +270 -55
- package/dist/components/views/panels/PlanningDrawer.test.d.ts +1 -0
- package/dist/components/views/panels/PlanningDrawer.test.js +529 -0
- package/dist/components/views/planningScope.d.ts +20 -0
- package/dist/components/views/planningScope.js +25 -0
- package/dist/components/views/planningScope.test.d.ts +1 -0
- package/dist/components/views/planningScope.test.js +60 -0
- package/dist/components/views/standalone/modals/AccountHubModal.d.ts +26 -1
- package/dist/components/views/standalone/modals/AccountHubModal.js +76 -2
- package/dist/components/views/standalone/modals/AccountHubModal.test.js +20 -3
- package/dist/components/views/standalone/modals/AvatarImageManagerModal.d.ts +20 -0
- package/dist/components/views/standalone/modals/AvatarImageManagerModal.js +127 -0
- package/dist/components/views/standalone/modals/EditProfileModal.d.ts +2 -9
- package/dist/components/views/standalone/modals/EditProfileModal.js +3 -2
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.d.ts +9 -0
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.js +6 -0
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.test.d.ts +1 -0
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.test.js +24 -0
- package/dist/components/views/standalone/modals/SyncStatusModal.d.ts +2 -1
- package/dist/components/views/standalone/modals/SyncStatusModal.js +2 -2
- package/dist/config/envSchema.js +1 -0
- package/dist/core/AiProfileService.d.ts +46 -2
- package/dist/core/AiProfileService.js +1073 -82
- package/dist/core/AiProfileService.test.js +19 -1
- package/dist/core/AiProfiles.test.js +1249 -44
- package/dist/core/AttachmentLinkService.d.ts +3 -0
- package/dist/core/AttachmentLinkService.js +110 -23
- package/dist/core/AuthIdentityService.d.ts +107 -0
- package/dist/core/AuthIdentityService.js +284 -0
- package/dist/core/AuthTokenService.d.ts +4 -0
- package/dist/core/AuthTokenService.js +34 -6
- package/dist/core/AuthTokenService.test.js +3 -3
- package/dist/core/EntitlementsPolicy.test.js +2 -2
- package/dist/core/GlobalSettingsService.js +127 -6
- package/dist/core/McpTokenService.d.ts +12 -0
- package/dist/core/McpTokenService.js +44 -1
- package/dist/core/PlanEntitlementService.d.ts +23 -2
- package/dist/core/PlanEntitlementService.js +343 -57
- package/dist/core/PlanFeatureCatalog.test.d.ts +1 -0
- package/dist/core/PlanFeatureCatalog.test.js +84 -0
- package/dist/core/PlanVersionPolicy.test.js +35 -2
- package/dist/core/PlanningEntities.test.js +418 -4
- package/dist/core/SignupMonetizationSettings.test.js +199 -27
- package/dist/core/SyncReconciliationService.js +2 -65
- package/dist/core/SystemAdmin.test.js +42 -42
- package/dist/core/TaskActivityService.d.ts +28 -1
- package/dist/core/TaskActivityService.js +227 -46
- package/dist/core/TaskActivitySync.test.d.ts +1 -0
- package/dist/core/TaskActivitySync.test.js +90 -0
- package/dist/core/TaskAttachmentsCanonical.test.js +51 -1
- package/dist/core/TaskAuditTimeline.test.js +96 -0
- package/dist/core/Taskforce.d.ts +415 -40
- package/dist/core/Taskforce.ids.test.js +58 -0
- package/dist/core/Taskforce.js +1543 -266
- package/dist/core/Taskforce.listTasksSlim.test.d.ts +1 -0
- package/dist/core/Taskforce.listTasksSlim.test.js +91 -0
- package/dist/core/Taskforce.mcpAuth.test.js +109 -0
- package/dist/core/UserProfileAvatarDrafts.test.js +30 -3
- package/dist/core/WorkspaceLifecycleService.js +0 -5
- package/dist/core/WorkspacePermissions.test.js +25 -1
- package/dist/core/WorkspacePlanMode.test.js +117 -16
- package/dist/core/shared.d.ts +1 -1
- package/dist/core/shared.js +5 -1
- package/dist/core/types.d.ts +75 -2
- package/dist/hooks/auth/useTaskforceAuthBootstrap.js +28 -2
- package/dist/hooks/bootstrapTimeouts.d.ts +4 -0
- package/dist/hooks/bootstrapTimeouts.js +8 -0
- package/dist/hooks/bootstrapTimeouts.test.d.ts +1 -0
- package/dist/hooks/bootstrapTimeouts.test.js +12 -0
- package/dist/hooks/sync/bootstrap.js +2 -0
- package/dist/hooks/sync/controlPlane.d.ts +37 -0
- package/dist/hooks/sync/controlPlane.js +78 -0
- package/dist/hooks/sync/controlPlane.test.d.ts +1 -0
- package/dist/hooks/sync/controlPlane.test.js +121 -0
- package/dist/hooks/sync/lifecyclePolicy.d.ts +45 -0
- package/dist/hooks/sync/lifecyclePolicy.js +93 -0
- package/dist/hooks/sync/lifecyclePolicy.test.d.ts +1 -0
- package/dist/hooks/sync/lifecyclePolicy.test.js +124 -0
- package/dist/hooks/sync/orchestratorShared.d.ts +13 -4
- package/dist/hooks/sync/orchestratorShared.js +129 -48
- package/dist/hooks/sync/orchestratorShared.test.js +50 -1
- package/dist/hooks/sync/pullLifecycle.d.ts +31 -0
- package/dist/hooks/sync/pullLifecycle.js +24 -0
- package/dist/hooks/sync/pullLifecycle.test.d.ts +1 -0
- package/dist/hooks/sync/pullLifecycle.test.js +80 -0
- package/dist/hooks/sync/recovery.d.ts +16 -2
- package/dist/hooks/sync/recovery.js +179 -53
- package/dist/hooks/sync/recovery.test.d.ts +1 -0
- package/dist/hooks/sync/recovery.test.js +292 -0
- package/dist/hooks/sync/transfers.d.ts +16 -3
- package/dist/hooks/sync/transfers.js +210 -66
- package/dist/hooks/sync/transfers.test.d.ts +1 -0
- package/dist/hooks/sync/transfers.test.js +928 -0
- package/dist/hooks/sync/useRecentSyncEvents.d.ts +21 -0
- package/dist/hooks/sync/useRecentSyncEvents.js +92 -0
- package/dist/hooks/sync/useRecentSyncEvents.test.d.ts +1 -0
- package/dist/hooks/sync/useRecentSyncEvents.test.js +124 -0
- package/dist/hooks/sync/useSyncStatusActions.d.ts +30 -0
- package/dist/hooks/sync/useSyncStatusActions.js +88 -0
- package/dist/hooks/sync/useSyncStatusActions.test.d.ts +1 -0
- package/dist/hooks/sync/useSyncStatusActions.test.js +133 -0
- package/dist/hooks/sync/useSyncStatusControls.d.ts +25 -0
- package/dist/hooks/sync/useSyncStatusControls.js +60 -0
- package/dist/hooks/sync/useSyncStatusControls.test.d.ts +1 -0
- package/dist/hooks/sync/useSyncStatusControls.test.js +88 -0
- package/dist/hooks/useFilterSort.js +13 -13
- package/dist/hooks/useFilterSort.test.js +87 -1
- package/dist/hooks/useSyncOrchestrator.aiProfiles.test.js +12 -0
- package/dist/hooks/useSyncOrchestrator.d.ts +9 -2
- package/dist/hooks/useSyncOrchestrator.js +409 -183
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.js +407 -0
- package/dist/hooks/useTaskData.js +8 -3
- package/dist/hooks/useTaskData.test.js +45 -0
- package/dist/hooks/useTaskforce.d.ts +145 -52
- package/dist/hooks/useTaskforce.js +592 -253
- package/dist/hooks/useTaskforce.runtime-routing.test.d.ts +1 -0
- package/dist/hooks/useTaskforce.runtime-routing.test.js +246 -0
- package/dist/hooks/useTaskforce.sync-behavior.test.js +2468 -201
- package/dist/hooks/useWorkspaceSyncController.d.ts +1 -0
- package/dist/hooks/useWorkspaceSyncController.js +13 -2
- package/dist/hooks/useWorkspaceSyncController.test.js +48 -0
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.d.ts +16 -0
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.js +328 -40
- package/dist/localization/locales/en-US.d.ts +0 -1
- package/dist/localization/locales/en-US.js +0 -1
- package/dist/localization/locales/es-419.js +0 -1
- package/dist/localization/locales/pt-BR.js +0 -1
- package/dist/mcp/canonicalAssetHelpers.d.ts +16 -4
- package/dist/mcp/canonicalAssetHelpers.js +18 -10
- package/dist/mcp/canonicalAssetHelpers.test.d.ts +1 -0
- package/dist/mcp/canonicalAssetHelpers.test.js +67 -0
- package/dist/mcp/clientIntegrations.d.ts +1 -0
- package/dist/mcp/clientIntegrations.js +25 -0
- package/dist/mcp/clientIntegrations.test.js +14 -3
- package/dist/mcp/clientProfileDefaults.js +3 -3
- package/dist/mcp/collaborationRegistrar.js +7 -7
- package/dist/mcp/documentAssetRegistrar.js +116 -10
- package/dist/mcp/runtime.d.ts +3 -0
- package/dist/mcp/runtime.js +1099 -185
- package/dist/mcp/runtime.test.js +1491 -140
- package/dist/mcp/taskAttachmentTypes.d.ts +1 -1
- package/dist/mcp/taskPlanningRegistrar.js +48 -0
- package/dist/mcp/toolRegistry.d.ts +56 -0
- package/dist/mcp/toolRegistry.js +8 -0
- package/dist/mcp/toolRegistry.test.js +4 -0
- package/dist/migrations/taskSchemaMigrations.d.ts +1 -1
- package/dist/migrations/taskSchemaMigrations.js +192 -61
- package/dist/migrations/taskSchemaMigrations.test.js +15 -0
- package/dist/resources/templates/workflow-sources/workflowDocs.mjs +6 -6
- package/dist/resources/templates/workflows/collaborate.yaml +1 -1
- package/dist/resources/templates/workflows/evaluate.yaml +2 -2
- package/dist/resources/templates/workflows/plan.yaml +1 -1
- package/dist/resources/templates/workflows/review.yaml +2 -2
- package/dist/server/aiProfileAvatarAssets.d.ts +49 -0
- package/dist/server/aiProfileAvatarAssets.js +319 -0
- package/dist/server/aiProfileAvatarAssets.test.d.ts +1 -0
- package/dist/server/aiProfileAvatarAssets.test.js +213 -0
- package/dist/server/annotatedAttachmentsRoutes.test.js +69 -10
- package/dist/server/auth/providers/apple.d.ts +33 -0
- package/dist/server/auth/providers/apple.js +82 -0
- package/dist/server/auth/providers/appleClientSecret.d.ts +37 -0
- package/dist/server/auth/providers/appleClientSecret.js +65 -0
- package/dist/server/auth/providers/github.d.ts +26 -0
- package/dist/server/auth/providers/github.js +86 -0
- package/dist/server/auth/providers/google.d.ts +21 -0
- package/dist/server/auth/providers/google.js +56 -0
- package/dist/server/auth/providers/types.d.ts +21 -0
- package/dist/server/auth/providers/types.js +1 -0
- package/dist/server/auth.d.ts +2 -0
- package/dist/server/auth.js +6 -3
- package/dist/server/documentReviewRoutes.test.js +36 -3
- package/dist/server/index.cookieProxy.test.js +1 -0
- package/dist/server/index.d.ts +12 -0
- package/dist/server/index.js +124 -9
- package/dist/server/index.rateLimit.test.js +3 -0
- package/dist/server/index.test.js +111 -3
- package/dist/server/routes/admin.d.ts +3 -0
- package/dist/server/routes/admin.js +459 -28
- package/dist/server/routes/annotatedAttachments.js +51 -0
- package/dist/server/routes/auth.d.ts +26 -2
- package/dist/server/routes/auth.js +1170 -71
- package/dist/server/routes/authSupport.d.ts +5 -1
- package/dist/server/routes/authSupport.js +13 -2
- package/dist/server/routes/billing.js +372 -35
- package/dist/server/routes/billing.test.js +595 -12
- package/dist/server/routes/documents.d.ts +1 -0
- package/dist/server/routes/documents.js +182 -70
- package/dist/server/routes/shared.d.ts +28 -2
- package/dist/server/routes/shared.js +69 -14
- package/dist/server/routes/sync.integration.test.js +658 -39
- package/dist/server/routes/sync.js +74 -608
- package/dist/server/routes/syncAuxRoutes.d.ts +15 -0
- package/dist/server/routes/syncAuxRoutes.js +91 -0
- package/dist/server/routes/syncAuxRoutes.test.d.ts +1 -0
- package/dist/server/routes/syncAuxRoutes.test.js +158 -0
- package/dist/server/routes/syncPullApplyRoutes.d.ts +36 -0
- package/dist/server/routes/syncPullApplyRoutes.js +204 -0
- package/dist/server/routes/syncPushRoutes.d.ts +24 -0
- package/dist/server/routes/syncPushRoutes.js +212 -0
- package/dist/server/routes/syncRouteGuards.d.ts +36 -0
- package/dist/server/routes/syncRouteGuards.js +67 -0
- package/dist/server/routes/syncRouteGuards.test.d.ts +1 -0
- package/dist/server/routes/syncRouteGuards.test.js +94 -0
- package/dist/server/routes/syncRouteTypes.d.ts +13 -0
- package/dist/server/routes/syncRouteTypes.js +1 -0
- package/dist/server/routes/syncSnapshotRoutes.d.ts +66 -0
- package/dist/server/routes/syncSnapshotRoutes.js +182 -0
- package/dist/server/routes/tasks.js +55 -10
- package/dist/server/routes/workspaces.js +36 -5
- package/dist/server/routes.js +147 -11
- package/dist/server/routes.test.js +2704 -183
- package/dist/services/workflowExportSnapshots.test.js +2 -0
- package/dist/shared/aiProfileSeatScope.d.ts +5 -0
- package/dist/shared/aiProfileSeatScope.js +21 -0
- package/dist/shared/aiProfileSurfaceType.d.ts +1 -1
- package/dist/shared/aiProfileSurfaceType.js +10 -8
- package/dist/shared/passwordPolicy.d.ts +13 -0
- package/dist/shared/passwordPolicy.js +84 -0
- package/dist/shared/passwordPolicy.test.d.ts +1 -0
- package/dist/shared/passwordPolicy.test.js +34 -0
- package/dist/storage/objectStorage.d.ts +1 -0
- package/dist/storage/objectStorage.js +2 -1
- package/dist/storage/objectStorageClient.d.ts +1 -0
- package/dist/storage/objectStorageClient.js +41 -8
- package/dist/storage/objectStorageClient.test.js +26 -1
- package/dist/storage/objectStorageConfig.js +3 -1
- package/dist/storage/objectStorageConfig.test.js +13 -1
- package/dist/storage/workspaceAssetStore.d.ts +15 -3
- package/dist/storage/workspaceAssetStore.js +132 -44
- package/dist/storage/workspaceAssetStore.test.js +93 -6
- package/dist/styles/fonts.css +70 -0
- package/dist/sync/collaborationSyncPayload.d.ts +6 -1
- package/dist/sync/collaborationSyncPayload.js +19 -11
- package/dist/sync/collaborationSyncPayload.test.js +14 -1
- package/dist/sync/collaborationSyncState.d.ts +3 -3
- package/dist/sync/collaborationSyncState.js +19 -12
- package/dist/sync/contentSyncPayload.d.ts +5 -1
- package/dist/sync/contentSyncPayload.js +9 -0
- package/dist/sync/contentSyncPayload.test.js +39 -0
- package/dist/sync/contentSyncState.d.ts +9 -9
- package/dist/sync/contentSyncState.js +248 -107
- package/dist/sync/planningSyncPayload.js +5 -0
- package/dist/sync/planningSyncPayload.test.js +24 -0
- package/dist/sync/syncApplyHandlers.d.ts +11 -4
- package/dist/sync/syncApplyHandlers.js +115 -42
- package/dist/sync/syncApplyHandlers.test.js +251 -4
- package/dist/sync/syncFieldSemantics.d.ts +12 -0
- package/dist/sync/syncFieldSemantics.js +55 -0
- package/dist/sync/syncResourceAdapters.d.ts +46 -0
- package/dist/sync/syncResourceAdapters.js +79 -0
- package/dist/sync/syncService.d.ts +6 -0
- package/dist/sync/syncService.js +65 -1
- package/dist/sync/syncService.test.js +96 -3
- package/dist/sync/taskSyncChangeKey.d.ts +2 -0
- package/dist/sync/taskSyncChangeKey.js +143 -0
- package/dist/sync/taskSyncPayload.js +3 -8
- package/dist/sync/workspacePullFeed.d.ts +4 -0
- package/dist/sync/workspacePullFeed.js +132 -72
- package/dist/sync/workspacePullFeed.test.js +92 -0
- package/dist/sync/workspaceRepair.js +5 -2
- package/dist/sync/workspaceSyncModel.d.ts +73 -6
- package/dist/sync/workspaceSyncModel.js +342 -73
- package/dist/sync/workspaceSyncModel.test.js +559 -14
- package/dist/sync/workspaceSyncState.d.ts +17 -0
- package/dist/sync/workspaceSyncState.js +2 -1
- package/dist/sync/workspaceSyncSurface.js +3 -8
- package/dist/types.d.ts +50 -2
- package/dist/ui/assets/AgentsModule-2y82_3DO.js +1 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-BTLZZCiQ.js +3 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-BVKew-mH.css +1 -0
- package/dist/ui/assets/ContextAttachmentManager-D2epuNnG.js +3 -0
- package/dist/ui/assets/CourierPrime-Bold-BuLj_dpw.woff2 +0 -0
- package/dist/ui/assets/CourierPrime-BoldItalic-BrK2pUkZ.woff2 +0 -0
- package/dist/ui/assets/CourierPrime-Italic-DFUZK5Ey.woff2 +0 -0
- package/dist/ui/assets/CourierPrime-Regular-BsKphzVf.woff2 +0 -0
- package/dist/ui/assets/DocumentWorkspace-D4rJKXzd.css +1 -0
- package/dist/ui/assets/DocumentWorkspace-sVa-3Do6.js +252 -0
- package/dist/ui/assets/EntityActivityTimeline-DyqvvhuF.css +1 -0
- package/dist/ui/assets/EntityActivityTimeline-Zods27y_.js +1 -0
- package/dist/ui/assets/{InitiativesModule-Dhm7M8e7.js → InitiativesModule-D4XseTwW.js} +1 -1
- package/dist/ui/assets/Noir_medium-bxQwKGzB.woff2 +0 -0
- package/dist/ui/assets/Noir_regular-ojf2kxlG.woff2 +0 -0
- package/dist/ui/assets/PlansPage-D5AcbO0L.js +1 -0
- package/dist/ui/assets/PlansPage-Dvqsz5zc.css +1 -0
- package/dist/ui/assets/RussoOne-Regular-Cu_qq_qC.woff2 +0 -0
- package/dist/ui/assets/SpecialElite-Regular-Di6gSvAS.woff2 +0 -0
- package/dist/ui/assets/TaskContextUpload-uC5qx4Bv.js +1 -0
- package/dist/ui/assets/TaskSettings-CqvPAsTv.js +9 -0
- package/dist/ui/assets/{WorkflowsModule-BcS4afRn.js → WorkflowsModule-oOA9bcdK.js} +4 -4
- package/dist/ui/assets/documentReferences-DPZuTgHh.js +1 -0
- package/dist/ui/assets/index-607WPo_X.js +4 -0
- package/dist/ui/assets/index-CYyodXsg.css +1 -0
- package/dist/ui/assets/{vendor-icons-BSUaRwF8.js → vendor-icons-B32hGuF2.js} +1 -1
- package/dist/ui/fonts/CourierPrime-Bold.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-Bold.woff2 +0 -0
- package/dist/ui/fonts/CourierPrime-BoldItalic.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-BoldItalic.woff2 +0 -0
- package/dist/ui/fonts/CourierPrime-Italic.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-Italic.woff2 +0 -0
- package/dist/ui/fonts/CourierPrime-Regular.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-Regular.woff2 +0 -0
- package/dist/ui/fonts/Noir_medium.otf +0 -0
- package/dist/ui/fonts/Noir_medium.woff2 +0 -0
- package/dist/ui/fonts/Noir_regular.otf +0 -0
- package/dist/ui/fonts/Noir_regular.woff2 +0 -0
- package/dist/ui/fonts/RussoOne-Regular.woff2 +0 -0
- package/dist/ui/fonts/SpecialElite-Regular.ttf +0 -0
- package/dist/ui/fonts/SpecialElite-Regular.woff2 +0 -0
- package/dist/ui/index.html +3 -3
- package/dist/ui/product/agent manager.png +0 -0
- package/dist/ui/product/agent_manager_02.png +0 -0
- package/dist/utils/accountProfileSummaryCache.d.ts +5 -0
- package/dist/utils/aiProfileEvents.d.ts +7 -0
- package/dist/utils/aiProfileEvents.js +6 -0
- package/dist/utils/assignees.d.ts +8 -0
- package/dist/utils/assignees.js +10 -1
- package/dist/utils/assignees.test.d.ts +1 -0
- package/dist/utils/assignees.test.js +25 -0
- package/dist/utils/avatarDisplay.d.ts +1 -0
- package/dist/utils/avatarDisplay.js +15 -0
- package/dist/utils/avatarUpload.d.ts +27 -0
- package/dist/utils/avatarUpload.js +132 -0
- package/dist/utils/avatarUpload.test.d.ts +1 -0
- package/dist/utils/avatarUpload.test.js +40 -0
- package/dist/utils/bootstrapTrace.d.ts +7 -0
- package/dist/utils/bootstrapTrace.js +29 -0
- package/dist/utils/commercialLifecyclePresentation.js +3 -0
- package/dist/utils/contextAssetEvents.d.ts +2 -0
- package/dist/utils/contextFiles.d.ts +3 -1
- package/dist/utils/contextFiles.js +2 -1
- package/dist/utils/syncEventDetails.d.ts +3 -0
- package/dist/utils/syncEventDetails.js +64 -0
- package/dist/utils/syncEventDetails.test.d.ts +1 -0
- package/dist/utils/syncEventDetails.test.js +23 -0
- package/dist/utils/syncEventPresentation.d.ts +15 -0
- package/dist/utils/syncEventPresentation.js +129 -0
- package/dist/utils/syncEventPresentation.test.d.ts +1 -0
- package/dist/utils/syncEventPresentation.test.js +64 -0
- package/dist/utils/syncStatusPresentation.d.ts +72 -0
- package/dist/utils/syncStatusPresentation.js +217 -0
- package/dist/utils/syncStatusPresentation.test.d.ts +1 -0
- package/dist/utils/syncStatusPresentation.test.js +164 -0
- package/dist/utils/taskActivity.d.ts +9 -1
- package/dist/utils/taskActivity.js +290 -22
- package/dist/utils/taskActivity.test.js +141 -8
- package/dist/utils/taskSearch.d.ts +22 -0
- package/dist/utils/taskSearch.js +87 -0
- package/dist/utils/taskSearch.test.d.ts +1 -0
- package/dist/utils/taskSearch.test.js +69 -0
- package/dist/utils/taskUtils.js +10 -3
- package/dist/utils/taskUtils.test.d.ts +1 -0
- package/dist/utils/taskUtils.test.js +19 -0
- package/dist/utils/workspaceSyncPresentation.d.ts +4 -0
- package/dist/utils/workspaceSyncPresentation.js +68 -2
- package/dist/utils/workspaceSyncPresentation.test.js +36 -1
- package/package.json +3 -2
- package/scripts/export-sqlite-to-postgres.mjs +7 -9
- package/scripts/run-e2e-realtime.sh +17 -3
- package/scripts/run-smoke.sh +17 -5
- package/scripts/run-soak.sh +17 -5
- package/src/resources/templates/workflow-sources/workflowDocs.mjs +6 -6
- package/src/resources/templates/workflows/collaborate.yaml +1 -1
- package/src/resources/templates/workflows/evaluate.yaml +2 -2
- package/src/resources/templates/workflows/plan.yaml +1 -1
- package/src/resources/templates/workflows/review.yaml +2 -2
- package/dist/ui/assets/AgentsModule-N2MnQBZk.js +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-BG6P_GVW.js +0 -3
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-BaS2VwIr.css +0 -1
- package/dist/ui/assets/DocumentWorkspace-B3nV_Gc5.css +0 -1
- package/dist/ui/assets/DocumentWorkspace-DRbDMwh8.js +0 -252
- package/dist/ui/assets/PlansPage-C2dd2n1X.css +0 -1
- package/dist/ui/assets/PlansPage-Cq0zXj3I.js +0 -1
- package/dist/ui/assets/RussoOne-Regular-C3BxZIj7.ttf +0 -0
- package/dist/ui/assets/TaskSettings-ln0aF7xc.js +0 -9
- package/dist/ui/assets/index-C2-OXZV7.css +0 -1
- package/dist/ui/assets/index-DcSI5F86.js +0 -6
- package/scripts/migrate-planning-model.ts +0 -233
|
@@ -61,3 +61,39 @@ describe('TaskKanban schedule expired behavior', () => {
|
|
|
61
61
|
expect(screen.getByText('1 / 2')).toBeInTheDocument();
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
|
+
describe('TaskKanban filter bootstrap behavior', () => {
|
|
65
|
+
it('keeps task columns visible while filters are still initializing', () => {
|
|
66
|
+
const task = makeTask({
|
|
67
|
+
id: 'task-filter-bootstrap',
|
|
68
|
+
title: 'Filter bootstrap visible task',
|
|
69
|
+
category: 'shared'
|
|
70
|
+
});
|
|
71
|
+
render(_jsx(TaskKanban, { tasks: [task], allTasks: [task], columns: [
|
|
72
|
+
{ value: 'shared', label: 'Shared', color: '#3b82f6', icon: 'Folder' }
|
|
73
|
+
], groupBy: "category", filterCategories: [], filtersReady: false, onUpdateTask: vi.fn(), onTaskClick: vi.fn() }));
|
|
74
|
+
expect(screen.getByText('Shared')).toBeInTheDocument();
|
|
75
|
+
expect(screen.getByText('Filter bootstrap visible task')).toBeInTheDocument();
|
|
76
|
+
});
|
|
77
|
+
it('renders a discoverable task when category columns are not loaded yet', () => {
|
|
78
|
+
const task = makeTask({
|
|
79
|
+
id: 'task-missing-category-columns',
|
|
80
|
+
title: 'Visible before categories load',
|
|
81
|
+
category: 'default'
|
|
82
|
+
});
|
|
83
|
+
render(_jsx(TaskKanban, { tasks: [task], allTasks: [task], columns: [], groupBy: "category", filterCategories: [], filtersReady: false, onUpdateTask: vi.fn(), onTaskClick: vi.fn() }));
|
|
84
|
+
expect(screen.getByText('default')).toBeInTheDocument();
|
|
85
|
+
expect(screen.getByText('Visible before categories load')).toBeInTheDocument();
|
|
86
|
+
});
|
|
87
|
+
it('hides filtered-out columns after filters initialize', () => {
|
|
88
|
+
const task = makeTask({
|
|
89
|
+
id: 'task-filter-ready',
|
|
90
|
+
title: 'Filter ready hidden task',
|
|
91
|
+
category: 'shared'
|
|
92
|
+
});
|
|
93
|
+
render(_jsx(TaskKanban, { tasks: [task], allTasks: [task], columns: [
|
|
94
|
+
{ value: 'shared', label: 'Shared', color: '#3b82f6', icon: 'Folder' }
|
|
95
|
+
], groupBy: "category", filterCategories: [], filtersReady: true, onUpdateTask: vi.fn(), onTaskClick: vi.fn() }));
|
|
96
|
+
expect(screen.queryByText('Shared')).not.toBeInTheDocument();
|
|
97
|
+
expect(screen.queryByText('Filter ready hidden task')).not.toBeInTheDocument();
|
|
98
|
+
});
|
|
99
|
+
});
|
|
@@ -11,6 +11,7 @@ import { getVisibleTaxonomiesForTasks } from '../../utils/taxonomyLifecycle.js';
|
|
|
11
11
|
import { TaskCard } from './TaskCard';
|
|
12
12
|
import { t } from '../../localization';
|
|
13
13
|
import { DeleteAllDeletedAction, TaskScopeToggle } from '../views/panels/FilterToolbarControls';
|
|
14
|
+
import { normalizeTaskReferenceToken } from '../../utils/taskSearch';
|
|
14
15
|
export const TaskList = forwardRef((props, ref) => {
|
|
15
16
|
const { tasks, archivedTasks, categories, types, priorities, taxonomyDisplayLabels, assigneeOptions = [], workstreams = [], initiatives = [], searchQuery, filterCategories, filterTypes, filterPriorities, filterStatus, filterAssignees = [], filterTaxonomies, sortBy, sortOrder, showArchive, taskScope, collapsedCategories, loadingTasks, filteredTasks, filteredArchive, groupedTasks, filteredDeletedTasks = [], groupedDeletedTasks = {}, copiedId, recentlyChangedTaskIds = [], showTaskCardStatusLabel = true, onSearchChange, onFilterCategoriesChange, onFilterTypesChange, onFilterPrioritiesChange, onFilterStatusChange, onFilterAssigneesChange, onTaxonomyFilterChange, onSortByChange, onSortOrderChange, onShowArchiveChange, onTaskScopeChange, onClearFilters, onToggleCategory, onEditTask, onOpenTaskById, onCopyId, onToggleInProgress, onToggleReview, onToggleComplete, onToggleCancel, onSetStatus, onArchiveTask, onBulkArchive, onUnarchive, onDelete, onDeleteAllDeleted, onFetchArchive, onAddTaskToCategory, supplementalTasks = [], taxonomies, } = props;
|
|
16
17
|
const changedTaskIdSet = new Set(recentlyChangedTaskIds);
|
|
@@ -46,8 +47,11 @@ export const TaskList = forwardRef((props, ref) => {
|
|
|
46
47
|
: effectiveTaskScope === 'archived'
|
|
47
48
|
? 'archived'
|
|
48
49
|
: null;
|
|
50
|
+
const searchedTaskReference = normalizeTaskReferenceToken(searchQuery);
|
|
49
51
|
const emptyLabel = searchQuery
|
|
50
|
-
?
|
|
52
|
+
? searchedTaskReference
|
|
53
|
+
? `No task found for ${searchedTaskReference.toUpperCase()}`
|
|
54
|
+
: t('taskList.noMatchingTasks')
|
|
51
55
|
: effectiveTaskScope === 'archived'
|
|
52
56
|
? 'No archived tasks found.'
|
|
53
57
|
: effectiveTaskScope === 'deleted'
|
|
@@ -390,6 +390,10 @@ describe('TaskList Component', () => {
|
|
|
390
390
|
renderComponent({ filteredTasks: [], loadingTasks: false });
|
|
391
391
|
expect(screen.getByText('No active tasks')).toBeInTheDocument();
|
|
392
392
|
});
|
|
393
|
+
it('shows a task-reference-specific empty state for unmatched searches', () => {
|
|
394
|
+
renderComponent({ filteredTasks: [], loadingTasks: false, searchQuery: ' T - 123 ' });
|
|
395
|
+
expect(screen.getByText('No task found for T-123')).toBeInTheDocument();
|
|
396
|
+
});
|
|
393
397
|
it('2.13 Loading state', () => {
|
|
394
398
|
renderComponent({ loadingTasks: true });
|
|
395
399
|
expect(screen.queryByText('No active tasks')).not.toBeInTheDocument();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface EditableAvatarButtonProps {
|
|
3
|
+
label: string;
|
|
4
|
+
imageUrl?: string | null;
|
|
5
|
+
fallback?: React.ReactNode;
|
|
6
|
+
accentColor?: string | null;
|
|
7
|
+
size?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
radius?: number | string;
|
|
11
|
+
editBadgeSize?: number | string;
|
|
12
|
+
editIconSize?: number;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
onClick: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function EditableAvatarButton({ label, imageUrl, fallback, accentColor, size, width, height, radius, editBadgeSize, editIconSize, disabled, className, onClick, }: EditableAvatarButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Pencil } from 'lucide-react';
|
|
3
|
+
import styles from './EditableAvatarButton.module.css';
|
|
4
|
+
export function EditableAvatarButton({ label, imageUrl, fallback, accentColor, size = 52, width, height, radius, editBadgeSize, editIconSize = 16, disabled = false, className = '', onClick, }) {
|
|
5
|
+
const normalizedImageUrl = String(imageUrl || '').trim();
|
|
6
|
+
const resolvedWidth = width ?? size;
|
|
7
|
+
const resolvedHeight = height ?? size;
|
|
8
|
+
const resolvedRadius = typeof radius === 'number' ? `${radius}px` : radius;
|
|
9
|
+
const resolvedEditBadgeSize = typeof editBadgeSize === 'number' ? `${editBadgeSize}px` : editBadgeSize;
|
|
10
|
+
return (_jsxs("button", { type: "button", className: `${styles.editableAvatarButton} ${className}`.trim(), "aria-label": label, title: label, onClick: onClick, disabled: disabled, style: {
|
|
11
|
+
['--editable-avatar-size']: `${size}px`,
|
|
12
|
+
['--editable-avatar-width']: `${resolvedWidth}px`,
|
|
13
|
+
['--editable-avatar-height']: `${resolvedHeight}px`,
|
|
14
|
+
...(resolvedRadius ? { ['--editable-avatar-radius']: resolvedRadius } : {}),
|
|
15
|
+
...(resolvedEditBadgeSize ? { ['--editable-avatar-badge-size']: resolvedEditBadgeSize } : {}),
|
|
16
|
+
...(accentColor ? { ['--editable-avatar-accent']: accentColor } : {})
|
|
17
|
+
}, children: [normalizedImageUrl ? (_jsx("img", { src: normalizedImageUrl, alt: "", className: styles.editableAvatarImage })) : (_jsx("span", { className: styles.editableAvatarFallback, children: fallback })), _jsx("span", { className: styles.editableAvatarBadge, "aria-hidden": "true", children: _jsx(Pencil, { size: editIconSize }) })] }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface HierarchyActionBadgeProps {
|
|
3
|
+
ariaLabel: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function HierarchyActionBadge({ ariaLabel, children, disabled, onClick, title, }: HierarchyActionBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styles from '../../Taskforce.module.css';
|
|
3
|
+
export function HierarchyActionBadge({ ariaLabel, children, disabled = false, onClick, title, }) {
|
|
4
|
+
return (_jsx("button", { type: "button", className: `${styles.taskIdBadge} ${styles.taskHierarchyActionBtn}`, onClick: onClick, disabled: disabled, title: title, "aria-label": ariaLabel, children: children }));
|
|
5
|
+
}
|
|
@@ -4,10 +4,12 @@ interface AppShellHeaderProps {
|
|
|
4
4
|
projectName?: string | null;
|
|
5
5
|
currentWorkspaceId?: string | null;
|
|
6
6
|
brandLabel?: string;
|
|
7
|
+
brandHomeLabel?: string;
|
|
8
|
+
onBrandClick?: () => void;
|
|
7
9
|
runtimeMode?: 'local' | 'cloud';
|
|
8
10
|
theme?: TaskforceTheme;
|
|
9
11
|
meta?: React.ReactNode;
|
|
10
12
|
actions?: React.ReactNode;
|
|
11
13
|
}
|
|
12
|
-
export declare function AppShellHeader({ projectName, currentWorkspaceId, brandLabel, runtimeMode, theme, meta, actions }: AppShellHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function AppShellHeader({ projectName, currentWorkspaceId, brandLabel, brandHomeLabel, onBrandClick, runtimeMode, theme, meta, actions }: AppShellHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export {};
|
|
@@ -5,19 +5,35 @@ import logoLight from '../../assets/branding/logos/logo_light.svg';
|
|
|
5
5
|
import logoDark from '../../assets/branding/logos/logo_dark.svg';
|
|
6
6
|
import favicon from '../../assets/favicon/favicon.svg';
|
|
7
7
|
import { DEFAULT_TASKFORCE_THEME, isLightThemeFamily } from '../../utils/theme';
|
|
8
|
-
export function AppShellHeader({ projectName, currentWorkspaceId, brandLabel = 'TaskForce', runtimeMode = 'local', theme = DEFAULT_TASKFORCE_THEME, meta, actions }) {
|
|
8
|
+
export function AppShellHeader({ projectName, currentWorkspaceId, brandLabel = 'TaskForce', brandHomeLabel = 'Go to Kanban', onBrandClick, runtimeMode = 'local', theme = DEFAULT_TASKFORCE_THEME, meta, actions }) {
|
|
9
9
|
const logo = isLightThemeFamily(theme) ? logoDark : logoLight;
|
|
10
10
|
const normalizedProjectName = String(projectName || '').trim();
|
|
11
|
-
const
|
|
11
|
+
const workspaceIdForCopy = String(currentWorkspaceId || '').trim();
|
|
12
|
+
const normalizedWorkspaceId = workspaceIdForCopy.toLowerCase();
|
|
12
13
|
const showProjectName = Boolean(normalizedProjectName
|
|
13
14
|
&& (runtimeMode !== 'cloud' || (normalizedWorkspaceId && normalizedWorkspaceId !== 'default')));
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
const copyWorkspaceId = () => {
|
|
16
|
+
if (!workspaceIdForCopy || typeof navigator === 'undefined')
|
|
17
|
+
return;
|
|
18
|
+
const clipboard = navigator.clipboard;
|
|
19
|
+
if (!clipboard?.writeText)
|
|
20
|
+
return;
|
|
21
|
+
void clipboard.writeText(workspaceIdForCopy).catch(() => undefined);
|
|
22
|
+
};
|
|
23
|
+
const handleProjectNameKeyDown = (event) => {
|
|
24
|
+
if (event.key !== 'Enter' && event.key !== ' ')
|
|
25
|
+
return;
|
|
26
|
+
event.preventDefault();
|
|
27
|
+
copyWorkspaceId();
|
|
28
|
+
};
|
|
29
|
+
const brandContent = (_jsxs(_Fragment, { children: [_jsx("img", { src: logo, alt: "Taskforce Logo", className: styles.brandIcon, onError: (event) => {
|
|
30
|
+
const target = event.currentTarget;
|
|
31
|
+
if (target.src !== favicon) {
|
|
32
|
+
target.src = favicon;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
target.style.display = 'none';
|
|
36
|
+
}
|
|
37
|
+
} }), _jsx("span", { children: brandLabel }), runtimeMode === 'cloud' && (_jsx("span", { className: styles.brandCloudSuffix, children: "HQ" }))] }));
|
|
38
|
+
return (_jsxs("div", { className: `${styles.header} ${shellStyles.standaloneHeader}`, children: [_jsxs("div", { className: `${styles.headerTitle} ${shellStyles.standaloneTitle}`, children: [onBrandClick ? (_jsx("button", { type: "button", className: styles.brandHomeButton, onClick: onBrandClick, title: brandHomeLabel, "aria-label": brandHomeLabel, children: brandContent })) : (_jsx("span", { className: styles.brandHomeStatic, children: brandContent })), showProjectName && (_jsxs(_Fragment, { children: [_jsx("span", { className: styles.projectSlash, children: "/" }), _jsx("span", { className: styles.projectName, title: workspaceIdForCopy ? `Workspace ID: ${workspaceIdForCopy}` : undefined, role: workspaceIdForCopy ? 'button' : undefined, tabIndex: workspaceIdForCopy ? 0 : undefined, onClick: copyWorkspaceId, onMouseDown: (event) => event.preventDefault(), onKeyDown: handleProjectNameKeyDown, children: normalizedProjectName })] })), meta] }), _jsx("div", { className: styles.headerActions, style: { gap: '16px' }, children: actions })] }));
|
|
23
39
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
|
-
import
|
|
3
|
+
import userEvent from '@testing-library/user-event';
|
|
4
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
4
5
|
import { AppShellHeader } from './AppShellHeader';
|
|
5
6
|
import logoDark from '../../assets/branding/logos/logo_dark.svg';
|
|
6
7
|
describe('AppShellHeader', () => {
|
|
@@ -18,6 +19,22 @@ describe('AppShellHeader', () => {
|
|
|
18
19
|
render(_jsx(AppShellHeader, { runtimeMode: "local", theme: "dawn" }));
|
|
19
20
|
expect(screen.getByAltText('Taskforce Logo')).toHaveAttribute('src', logoDark);
|
|
20
21
|
});
|
|
22
|
+
it('calls the brand click handler from the logo button', async () => {
|
|
23
|
+
const onBrandClick = vi.fn();
|
|
24
|
+
render(_jsx(AppShellHeader, { runtimeMode: "local", onBrandClick: onBrandClick }));
|
|
25
|
+
await userEvent.click(screen.getByRole('button', { name: 'Go to Kanban' }));
|
|
26
|
+
expect(onBrandClick).toHaveBeenCalledTimes(1);
|
|
27
|
+
});
|
|
28
|
+
it('copies the workspace id from the project badge', async () => {
|
|
29
|
+
const writeText = vi.fn().mockResolvedValue(undefined);
|
|
30
|
+
Object.defineProperty(navigator, 'clipboard', {
|
|
31
|
+
configurable: true,
|
|
32
|
+
value: { writeText }
|
|
33
|
+
});
|
|
34
|
+
render(_jsx(AppShellHeader, { runtimeMode: "local", projectName: "Roadmap", currentWorkspaceId: "workspace-alpha" }));
|
|
35
|
+
await userEvent.click(screen.getByRole('button', { name: 'Roadmap' }));
|
|
36
|
+
expect(writeText).toHaveBeenCalledWith('workspace-alpha');
|
|
37
|
+
});
|
|
21
38
|
it('hides a stale project label while cloud runtime is still on the default workspace', () => {
|
|
22
39
|
render(_jsx(AppShellHeader, { runtimeMode: "cloud", projectName: "Old Workspace", currentWorkspaceId: "default" }));
|
|
23
40
|
expect(screen.queryByText('Old Workspace')).not.toBeInTheDocument();
|
|
@@ -4,6 +4,7 @@ export type BillingPricingType = 'stripe' | 'free';
|
|
|
4
4
|
export interface PublicPricingPlan {
|
|
5
5
|
planId: string;
|
|
6
6
|
displayName: string;
|
|
7
|
+
description?: string | null;
|
|
7
8
|
status: string;
|
|
8
9
|
defaultVersion: {
|
|
9
10
|
planVersionId: string;
|
|
@@ -15,6 +16,10 @@ export interface PublicPricingPlan {
|
|
|
15
16
|
featureKey: string;
|
|
16
17
|
access: string;
|
|
17
18
|
config?: Record<string, unknown>;
|
|
19
|
+
label?: string | null;
|
|
20
|
+
description?: string | null;
|
|
21
|
+
publicLabel?: string | null;
|
|
22
|
+
publicDescription?: string | null;
|
|
18
23
|
}>;
|
|
19
24
|
pricing: {
|
|
20
25
|
month: {
|
|
@@ -55,6 +60,7 @@ interface PlanComparisonPageProps {
|
|
|
55
60
|
currentPlanId?: string | null;
|
|
56
61
|
currentPlanVersionId?: string | null;
|
|
57
62
|
currentEntitlementState?: string | null;
|
|
63
|
+
markCurrentPlan?: boolean;
|
|
58
64
|
canManageCurrentPlan?: boolean;
|
|
59
65
|
pricingEndpoint?: string;
|
|
60
66
|
statusBanner?: {
|
|
@@ -67,8 +73,10 @@ interface PlanComparisonPageProps {
|
|
|
67
73
|
topActions?: React.ReactNode;
|
|
68
74
|
shellOwnsScroll?: boolean;
|
|
69
75
|
showPageBackButton?: boolean;
|
|
76
|
+
showHeaderBarWithChrome?: boolean;
|
|
77
|
+
currentPlanCardActionMode?: 'manage' | 'indicator' | 'hidden';
|
|
70
78
|
fallbackPricingSource?: PricingSourceDetails | null;
|
|
71
79
|
onSelectPlan: (intent: PlanSelectionIntent) => void | Promise<void>;
|
|
72
80
|
}
|
|
73
|
-
export declare function PlanComparisonPage({ heading, subtitle, variant, chrome, footer, isAuthenticated, authSessionResolved, currentPlanId, currentPlanVersionId, currentEntitlementState, canManageCurrentPlan, pricingEndpoint, statusBanner, onBack, backLabel, backDisabled, topActions, shellOwnsScroll, showPageBackButton, fallbackPricingSource, onSelectPlan }: PlanComparisonPageProps): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
export declare function PlanComparisonPage({ heading, subtitle, variant, chrome, footer, isAuthenticated, authSessionResolved, currentPlanId, currentPlanVersionId, currentEntitlementState, markCurrentPlan, canManageCurrentPlan, pricingEndpoint, statusBanner, onBack, backLabel, backDisabled, topActions, shellOwnsScroll, showPageBackButton, showHeaderBarWithChrome, currentPlanCardActionMode, fallbackPricingSource, onSelectPlan }: PlanComparisonPageProps): import("react/jsx-runtime").JSX.Element;
|
|
74
82
|
export {};
|
|
@@ -61,9 +61,52 @@ function getPlanSortRank(plan) {
|
|
|
61
61
|
return Math.min(...numericAmounts);
|
|
62
62
|
return Number.POSITIVE_INFINITY;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
function formatFeatureKeyFallback(featureKey) {
|
|
65
|
+
return String(featureKey || '')
|
|
66
|
+
.replace(/[_\-.]+/g, ' ')
|
|
67
|
+
.replace(/\b\w/g, (c) => c.toUpperCase());
|
|
68
|
+
}
|
|
69
|
+
function readConfiguredFeatureLimit(config, key) {
|
|
70
|
+
const rawValue = config?.[key];
|
|
71
|
+
const numericValue = Number(rawValue);
|
|
72
|
+
if (!Number.isFinite(numericValue))
|
|
73
|
+
return null;
|
|
74
|
+
const normalized = Math.max(1, Math.floor(numericValue));
|
|
75
|
+
return normalized;
|
|
76
|
+
}
|
|
77
|
+
function getFeatureDisplayParts(feature, seatLimit) {
|
|
78
|
+
const baseLabel = String(feature.publicLabel || feature.label || '').trim() || formatFeatureKeyFallback(feature.featureKey);
|
|
79
|
+
const config = feature.config && typeof feature.config === 'object' ? feature.config : {};
|
|
80
|
+
if (feature.featureKey === 'context.uploads') {
|
|
81
|
+
const storageLimitMb = readConfiguredFeatureLimit(config, 'storageLimitMb');
|
|
82
|
+
if (storageLimitMb !== null) {
|
|
83
|
+
return { limitValue: String(storageLimitMb), limitUnit: 'MB', baseLabel };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (feature.featureKey === 'workspace.workspaces') {
|
|
87
|
+
const maxWorkspaces = readConfiguredFeatureLimit(config, 'maxWorkspaces');
|
|
88
|
+
if (maxWorkspaces !== null) {
|
|
89
|
+
return { limitValue: String(maxWorkspaces), limitUnit: 'x', baseLabel };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (feature.featureKey === 'collaboration.ai_profiles') {
|
|
93
|
+
const maxAiProfiles = readConfiguredFeatureLimit(config, 'maxAiProfiles');
|
|
94
|
+
if (maxAiProfiles !== null) {
|
|
95
|
+
return { limitValue: String(maxAiProfiles), limitUnit: 'x', baseLabel };
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (feature.featureKey === 'collaboration.team_management') {
|
|
99
|
+
const normalizedSeatLimit = Number(seatLimit);
|
|
100
|
+
if (Number.isFinite(normalizedSeatLimit) && normalizedSeatLimit > 0) {
|
|
101
|
+
return { limitValue: String(Math.floor(normalizedSeatLimit)), limitUnit: 'x', baseLabel };
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return { limitValue: null, limitUnit: null, baseLabel };
|
|
105
|
+
}
|
|
106
|
+
export function PlanComparisonPage({ heading, subtitle, variant = 'app', chrome, footer, isAuthenticated, authSessionResolved = true, currentPlanId, currentPlanVersionId, currentEntitlementState, markCurrentPlan, canManageCurrentPlan = true, pricingEndpoint, statusBanner, onBack, backLabel, backDisabled = false, topActions, shellOwnsScroll = false, showPageBackButton = true, showHeaderBarWithChrome = false, currentPlanCardActionMode = 'manage', fallbackPricingSource = null, onSelectPlan }) {
|
|
65
107
|
const [plans, setPlans] = useState([]);
|
|
66
108
|
const [pricingSource, setPricingSource] = useState(null);
|
|
109
|
+
const [pricingPageCopy, setPricingPageCopy] = useState({ pageTitle: null, pageDescription: null });
|
|
67
110
|
const [loading, setLoading] = useState(true);
|
|
68
111
|
const [error, setError] = useState(null);
|
|
69
112
|
const [retryNonce, setRetryNonce] = useState(0);
|
|
@@ -82,6 +125,10 @@ export function PlanComparisonPage({ heading, subtitle, variant = 'app', chrome,
|
|
|
82
125
|
if (active) {
|
|
83
126
|
setPlans(Array.isArray(body?.plans) ? body.plans : []);
|
|
84
127
|
setPricingSource(body?.pricingSource && typeof body.pricingSource === 'object' ? body.pricingSource : null);
|
|
128
|
+
setPricingPageCopy({
|
|
129
|
+
pageTitle: typeof body?.pageTitle === 'string' ? (body.pageTitle.trim() || null) : null,
|
|
130
|
+
pageDescription: typeof body?.pageDescription === 'string' ? (body.pageDescription.trim() || null) : null
|
|
131
|
+
});
|
|
85
132
|
}
|
|
86
133
|
return;
|
|
87
134
|
}
|
|
@@ -92,6 +139,7 @@ export function PlanComparisonPage({ heading, subtitle, variant = 'app', chrome,
|
|
|
92
139
|
const message = err instanceof Error ? err.message : 'Failed to load pricing';
|
|
93
140
|
setError(message || 'Failed to load pricing');
|
|
94
141
|
setPricingSource(null);
|
|
142
|
+
setPricingPageCopy({ pageTitle: null, pageDescription: null });
|
|
95
143
|
}
|
|
96
144
|
}
|
|
97
145
|
finally {
|
|
@@ -114,6 +162,9 @@ export function PlanComparisonPage({ heading, subtitle, variant = 'app', chrome,
|
|
|
114
162
|
return String(a.displayName || a.planId).localeCompare(String(b.displayName || b.planId));
|
|
115
163
|
}), [plans]);
|
|
116
164
|
const pricingSourceLabel = useMemo(() => formatPricingSource(pricingSource || fallbackPricingSource), [fallbackPricingSource, pricingSource]);
|
|
165
|
+
const resolvedHeading = String(pricingPageCopy.pageTitle || heading).trim() || heading;
|
|
166
|
+
const resolvedSubtitle = String(pricingPageCopy.pageDescription || subtitle || '').trim();
|
|
167
|
+
const planSelectionEnabled = authSessionResolved;
|
|
117
168
|
const contentClassName = `${styles.plansWrapper} ${shellOwnsScroll ? styles.shellOwnsScroll : 'tf-scrollbar'} ${variant === 'site' ? styles.siteVariant : ''} ${chrome ? styles.withChrome : ''}`.trim();
|
|
118
169
|
const wrapPage = (content) => {
|
|
119
170
|
if (shellOwnsScroll) {
|
|
@@ -121,13 +172,13 @@ export function PlanComparisonPage({ heading, subtitle, variant = 'app', chrome,
|
|
|
121
172
|
}
|
|
122
173
|
return (_jsxs("div", { className: taskforceStyles.standaloneWrapper, "data-theme": "dark", children: [chrome, content, footer] }));
|
|
123
174
|
};
|
|
124
|
-
if (loading
|
|
175
|
+
if (loading) {
|
|
125
176
|
return wrapPage(_jsx(_Fragment, { children: _jsx("div", { className: contentClassName, children: _jsx("div", { className: styles.contentFrame, children: _jsxs("div", { className: styles.loader, children: [_jsx(Loader2, { size: 48, className: styles.spinner }), _jsx("p", { children: "Loading plans..." })] }) }) }) }));
|
|
126
177
|
}
|
|
127
178
|
if (error) {
|
|
128
179
|
return wrapPage(_jsx(_Fragment, { children: _jsx("div", { className: contentClassName, children: _jsx("div", { className: styles.contentFrame, children: _jsxs("div", { className: styles.emptyState, children: [_jsx("h2", { children: "Connecting to plan pricing..." }), _jsx("p", { children: error }), _jsx("button", { className: styles.backBtn, onClick: () => setRetryNonce((value) => value + 1), children: "Retry" })] }) }) }) }));
|
|
129
180
|
}
|
|
130
|
-
return wrapPage(_jsx(_Fragment, { children: _jsx("div", { className: contentClassName, children: _jsxs("div", { className: styles.contentFrame, children: [_jsxs("div", { className: styles.header, children: [!chrome && (showPageBackButton || topActions) && (_jsxs("div", { className: styles.headerBar, children: [_jsx("div", { children: showPageBackButton ? (_jsx("button", { className: styles.backBtn, onClick: onBack, disabled: backDisabled, children: backLabel })) : null }), _jsx("div", { className: styles.headerActions, children: topActions })] })), _jsx("h1", { className: styles.title, children:
|
|
181
|
+
return wrapPage(_jsx(_Fragment, { children: _jsx("div", { className: contentClassName, children: _jsxs("div", { className: styles.contentFrame, children: [_jsxs("div", { className: styles.header, children: [(!chrome || showHeaderBarWithChrome) && (showPageBackButton || topActions) && (_jsxs("div", { className: styles.headerBar, children: [_jsx("div", { children: showPageBackButton ? (_jsx("button", { className: styles.backBtn, onClick: onBack, disabled: backDisabled, children: backLabel })) : null }), _jsx("div", { className: styles.headerActions, children: topActions })] })), _jsx("h1", { className: styles.title, children: resolvedHeading }), resolvedSubtitle && _jsx("p", { className: styles.subtitle, children: resolvedSubtitle }), isDebugModeEnabled() && pricingSourceLabel ? (_jsxs("p", { className: styles.debugMeta, children: ["Pricing source: ", pricingSourceLabel] })) : null, statusBanner && (_jsx("div", { className: `${styles.statusBanner} ${statusBanner.type === 'success'
|
|
131
182
|
? styles.successBanner
|
|
132
183
|
: (statusBanner.type === 'info' ? styles.infoBanner : styles.errorBanner)}`, children: statusBanner.message }))] }), sortedPlans.length === 0 ? (_jsxs("div", { className: `${styles.emptyState} ${styles.marketingEmptyState}`, children: [_jsx("span", { className: styles.emptyBadge, children: "Coming Soon" }), _jsx("h2", { children: "Paid plans are getting their final polish." }), _jsx("p", { children: "Taskforce pricing is on the way with flexible options for solo operators, teams, and larger rollouts. Check back soon for launch tiers, feature bundles, and early access details." }), _jsxs("div", { className: styles.emptyHighlights, "aria-label": "Upcoming pricing highlights", children: [_jsx("span", { children: "Launch-ready tiers" }), _jsx("span", { children: "Team billing controls" }), _jsx("span", { children: "Feature-based packaging" })] })] })) : (_jsx("div", { className: styles.grid, children: sortedPlans.map((plan) => {
|
|
133
184
|
const monthPrice = plan.pricing.month;
|
|
@@ -136,17 +187,27 @@ export function PlanComparisonPage({ heading, subtitle, variant = 'app', chrome,
|
|
|
136
187
|
const hasYear = isSelectablePrice(yearPrice);
|
|
137
188
|
const planVersionId = String(plan.defaultVersion?.planVersionId || '').trim();
|
|
138
189
|
const hasActiveEntitlement = isCommercialEntitlementActive(currentEntitlementState);
|
|
139
|
-
const
|
|
190
|
+
const shouldMarkCurrentPlan = markCurrentPlan ?? hasActiveEntitlement;
|
|
191
|
+
const hasKnownLinkedPlan = Boolean(planVersionId
|
|
140
192
|
&& currentPlanVersionId
|
|
141
|
-
&& currentPlanVersionId === planVersionId) || (!currentPlanVersionId
|
|
142
|
-
&& Boolean(currentPlanId && currentPlanId === plan.planId))
|
|
193
|
+
&& currentPlanVersionId === planVersionId) || Boolean(!currentPlanVersionId
|
|
194
|
+
&& Boolean(currentPlanId && currentPlanId === plan.planId));
|
|
195
|
+
const isCurrent = shouldMarkCurrentPlan && hasKnownLinkedPlan && currentEntitlementState !== 'canceled';
|
|
143
196
|
const defaultInterval = hasMonth ? 'month' : (hasYear ? 'year' : null);
|
|
144
197
|
const defaultPrice = defaultInterval === 'year' ? yearPrice : monthPrice;
|
|
145
|
-
const
|
|
198
|
+
const currentPlanShowsManageAction = currentPlanCardActionMode === 'manage';
|
|
199
|
+
const currentPlanShowsIndicator = currentPlanCardActionMode === 'indicator';
|
|
200
|
+
const canSelectCard = planSelectionEnabled
|
|
201
|
+
&& Boolean(planVersionId)
|
|
202
|
+
&& (isCurrent
|
|
203
|
+
? (currentPlanShowsManageAction && canManageCurrentPlan)
|
|
204
|
+
: Boolean(defaultInterval));
|
|
146
205
|
const handleCardSelect = () => {
|
|
147
206
|
if (!planVersionId)
|
|
148
207
|
return;
|
|
149
208
|
if (isCurrent) {
|
|
209
|
+
if (!currentPlanShowsManageAction)
|
|
210
|
+
return;
|
|
150
211
|
if (!canManageCurrentPlan)
|
|
151
212
|
return;
|
|
152
213
|
void onSelectPlan({
|
|
@@ -173,23 +234,26 @@ export function PlanComparisonPage({ heading, subtitle, variant = 'app', chrome,
|
|
|
173
234
|
event.preventDefault();
|
|
174
235
|
handleCardSelect();
|
|
175
236
|
}
|
|
176
|
-
} : undefined, children: [isCurrent && _jsx("span", { className: styles.currentBadge, children: "Current Plan" }), _jsx("h3", { className: styles.planName, children: plan.displayName }),
|
|
237
|
+
} : undefined, children: [isCurrent && _jsx("span", { className: styles.currentBadge, children: "Current Plan" }), _jsx("h3", { className: styles.planName, children: plan.displayName }), String(plan.description || '').trim() && (_jsx("p", { className: styles.planDescription, children: String(plan.description || '').trim() })), _jsx("div", { className: styles.featuresList, children: Array.isArray(plan.features) && plan.features.length > 0 ? plan.features.map((feature, idx) => (_jsxs("div", { className: styles.featureItem, children: [_jsx(CheckCircle2, { className: styles.featureIcon }), _jsxs("div", { className: styles.featureTextBlock, children: [(() => {
|
|
238
|
+
const { limitValue, limitUnit, baseLabel } = getFeatureDisplayParts(feature, plan.defaultVersion?.seatLimit);
|
|
239
|
+
return (_jsxs("span", { className: styles.featureText, children: [limitValue && (_jsxs("span", { className: styles.featureLimitAccent, children: [_jsx("span", { children: limitValue }), limitUnit ? (_jsx("span", { className: limitUnit === 'MB' ? styles.featureLimitUnit : undefined, children: limitUnit })) : null] })), _jsx("span", { children: limitValue ? ` ${baseLabel}` : baseLabel })] }));
|
|
240
|
+
})(), String(feature.publicDescription || feature.description || '').trim() && (_jsx("span", { className: styles.featureDescription, children: String(feature.publicDescription || feature.description || '').trim() }))] })] }, `${feature.featureKey}-${idx}`))) : (_jsx("span", { className: styles.featureText, children: "No additional features included" })) }), (hasMonth || hasYear) ? (_jsxs("div", { className: styles.priceRows, children: [hasMonth ? (_jsxs("div", { className: styles.priceRow, children: [_jsx("span", { className: styles.priceRowAmount, children: renderPriceLabel(monthPrice) }), _jsx("span", { className: styles.priceRowInterval, children: "/ month" })] })) : null, hasYear ? (_jsxs("div", { className: styles.priceRow, children: [_jsx("span", { className: styles.priceRowAmount, children: renderPriceLabel(yearPrice) }), _jsx("span", { className: styles.priceRowInterval, children: "/ year" })] })) : null] })) : null, isCurrent ? (currentPlanShowsManageAction ? (_jsx("button", { className: `${styles.callToAction} ${styles.currentCta}`, "data-testid": `plan-manage-${plan.planId}`, onClick: (event) => {
|
|
177
241
|
event.stopPropagation();
|
|
178
242
|
if (!canManageCurrentPlan)
|
|
179
243
|
return;
|
|
180
244
|
void onSelectPlan({ planId: plan.planId, planVersionId, interval: defaultInterval || 'month', pricingType: defaultPrice?.pricingType || 'stripe', isCurrentPlan: true });
|
|
181
|
-
}, disabled: !planVersionId || !canManageCurrentPlan, children: isAuthenticated
|
|
245
|
+
}, disabled: !planVersionId || !canManageCurrentPlan || !planSelectionEnabled, children: isAuthenticated
|
|
182
246
|
? (canManageCurrentPlan ? 'Manage Plan' : 'Current Plan')
|
|
183
|
-
: 'Current Plan' })) : (_jsxs("div", { className: styles.ctaRow, children: [_jsx("button", { className: `${styles.callToAction} ${styles.secondaryCta}`, "data-testid": `plan-select-${plan.planId}-month`, onClick: (event) => {
|
|
247
|
+
: 'Current Plan' })) : (currentPlanShowsIndicator ? (_jsx("button", { className: `${styles.callToAction} ${styles.currentCta}`, "data-testid": `plan-current-${plan.planId}`, disabled: true, children: "Current Plan" })) : null)) : (_jsxs("div", { className: styles.ctaRow, children: [hasMonth ? (_jsx("button", { className: `${styles.callToAction} ${styles.secondaryCta}`, "data-testid": `plan-select-${plan.planId}-month`, onClick: (event) => {
|
|
184
248
|
event.stopPropagation();
|
|
185
249
|
void onSelectPlan({ planId: plan.planId, planVersionId, interval: 'month', pricingType: monthPrice?.pricingType || 'stripe', isCurrentPlan: false });
|
|
186
|
-
}, disabled: !planVersionId || !
|
|
250
|
+
}, disabled: !planVersionId || !planSelectionEnabled, children: monthPrice?.pricingType === 'free'
|
|
187
251
|
? (isAuthenticated ? 'Select Free' : 'Get Started Free')
|
|
188
|
-
: (isAuthenticated ? 'Choose Monthly' : 'Get Started Monthly') }), _jsx("button", { className: `${styles.callToAction} ${styles.primaryCta}`, "data-testid": `plan-select-${plan.planId}-year`, onClick: (event) => {
|
|
252
|
+
: (isAuthenticated ? 'Choose Monthly' : 'Get Started Monthly') })) : null, hasYear ? (_jsx("button", { className: `${styles.callToAction} ${styles.primaryCta}`, "data-testid": `plan-select-${plan.planId}-year`, onClick: (event) => {
|
|
189
253
|
event.stopPropagation();
|
|
190
254
|
void onSelectPlan({ planId: plan.planId, planVersionId, interval: 'year', pricingType: yearPrice?.pricingType || 'stripe', isCurrentPlan: false });
|
|
191
|
-
}, disabled: !planVersionId || !
|
|
255
|
+
}, disabled: !planVersionId || !planSelectionEnabled, children: yearPrice?.pricingType === 'free'
|
|
192
256
|
? (isAuthenticated ? 'Select Free' : 'Get Started Free')
|
|
193
|
-
: (isAuthenticated ? 'Choose Yearly' : 'Get Started Yearly') })] }))] }, plan.planId));
|
|
257
|
+
: (isAuthenticated ? 'Choose Yearly' : 'Get Started Yearly') })) : null] }))] }, plan.planId));
|
|
194
258
|
}) }))] }) }) }));
|
|
195
259
|
}
|