@taskforcehq/taskforce 0.3.304 → 0.3.306
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 +140 -247
- package/dist/Taskforce.module.css +295 -89
- package/dist/TaskforceCore.js +378 -111
- package/dist/TaskforceCore.test.js +1221 -107
- 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 +52 -2
- package/dist/compat/workspaceSyncCompat.test.js +38 -1
- package/dist/components/context/ContextAttachmentManager.d.ts +14 -0
- package/dist/components/context/ContextAttachmentManager.js +549 -0
- package/dist/components/features/AgentsModule.d.ts +10 -1
- package/dist/components/features/AgentsModule.js +260 -15
- package/dist/components/features/AgentsModule.test.js +255 -5
- package/dist/components/features/DocumentIndex.d.ts +1 -1
- package/dist/components/features/DocumentIndex.js +1 -1
- package/dist/components/features/DocumentViewer.d.ts +6 -2
- package/dist/components/features/DocumentViewer.js +90 -10
- package/dist/components/features/DocumentWorkspace.d.ts +5 -22
- package/dist/components/features/DocumentWorkspace.js +12 -155
- package/dist/components/features/DocumentWorkspace.test.js +226 -6
- package/dist/components/features/TaskSettings.js +29 -3
- package/dist/components/features/TaskSettings.test.js +42 -1
- package/dist/components/features/documentWorkspaceModel.d.ts +24 -0
- package/dist/components/features/documentWorkspaceModel.js +57 -0
- package/dist/components/features/useDocumentWorkspaceController.d.ts +34 -0
- package/dist/components/features/useDocumentWorkspaceController.js +113 -0
- package/dist/components/task/TaskCard.js +19 -28
- package/dist/components/task/TaskCard.test.js +38 -3
- package/dist/components/task/TaskContextUpload.js +4 -526
- package/dist/components/task/TaskForm.d.ts +8 -8
- package/dist/components/task/TaskForm.js +362 -230
- package/dist/components/task/TaskForm.test.js +558 -381
- package/dist/components/task/TaskKanban.d.ts +2 -1
- package/dist/components/task/TaskKanban.js +96 -14
- package/dist/components/task/TaskKanban.test.js +36 -0
- package/dist/components/ui/EditableAvatarButton.d.ts +18 -0
- package/dist/components/ui/EditableAvatarButton.js +18 -0
- package/dist/components/views/PlanComparisonPage.d.ts +9 -1
- package/dist/components/views/PlanComparisonPage.js +70 -17
- package/dist/components/views/PlanComparisonPage.test.js +289 -41
- package/dist/components/views/PlansPage.js +239 -106
- package/dist/components/views/PlansPage.test.js +593 -42
- package/dist/components/views/StandaloneLayout.js +310 -554
- package/dist/components/views/panels/FilterToolbar.test.js +6 -4
- package/dist/components/views/panels/PlanningDrawer.d.ts +8 -1
- package/dist/components/views/panels/PlanningDrawer.js +18 -11
- package/dist/components/views/panels/PlanningDrawer.test.d.ts +1 -0
- package/dist/components/views/panels/PlanningDrawer.test.js +141 -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 +27 -14
- package/dist/components/views/standalone/modals/AccountHubModal.js +87 -15
- package/dist/components/views/standalone/modals/AccountHubModal.test.js +42 -2
- 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 -1
- package/dist/core/AiProfileService.d.ts +45 -3
- package/dist/core/AiProfileService.js +774 -63
- package/dist/core/AiProfileService.test.js +22 -2
- package/dist/core/AiProfiles.test.js +761 -2
- package/dist/core/AttachmentLinkService.js +57 -15
- 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.d.ts +1 -0
- package/dist/core/AuthTokenService.test.js +78 -0
- package/dist/core/EntitlementsPolicy.test.js +77 -15
- package/dist/core/GlobalSettingsService.js +115 -6
- package/dist/core/PlanEntitlementService.d.ts +30 -3
- package/dist/core/PlanEntitlementService.js +454 -93
- package/dist/core/PlanFeatureCatalog.test.d.ts +1 -0
- package/dist/core/PlanFeatureCatalog.test.js +84 -0
- package/dist/core/PlanVersionPolicy.test.js +54 -28
- package/dist/core/PlanningEntities.test.js +52 -0
- package/dist/core/SignupMonetizationSettings.test.js +241 -44
- package/dist/core/SyncReconciliationService.js +2 -65
- package/dist/core/SystemAdmin.test.js +244 -88
- package/dist/core/TaskAttachmentsCanonical.test.js +51 -1
- package/dist/core/TaskTaxonomyValidation.test.js +53 -0
- package/dist/core/Taskforce.d.ts +228 -14
- package/dist/core/Taskforce.js +814 -201
- package/dist/core/Taskforce.listTasksSlim.test.d.ts +1 -0
- package/dist/core/Taskforce.listTasksSlim.test.js +91 -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 +128 -27
- package/dist/core/shared.d.ts +3 -1
- package/dist/core/shared.js +16 -1
- package/dist/core/types.d.ts +68 -2
- package/dist/hooks/auth/useTaskforceAuthBootstrap.js +26 -1
- package/dist/hooks/sync/auth.js +3 -1
- 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 +10 -1
- package/dist/hooks/sync/orchestratorShared.js +68 -47
- 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 +171 -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 +186 -65
- package/dist/hooks/sync/transfers.test.d.ts +1 -0
- package/dist/hooks/sync/transfers.test.js +396 -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/useSyncOrchestrator.aiProfiles.test.js +12 -0
- package/dist/hooks/useSyncOrchestrator.d.ts +16 -6
- package/dist/hooks/useSyncOrchestrator.js +424 -175
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.js +487 -10
- package/dist/hooks/useTaskData.js +8 -3
- package/dist/hooks/useTaskData.test.js +45 -0
- package/dist/hooks/useTaskMutations.d.ts +2 -1
- package/dist/hooks/useTaskMutations.js +12 -1
- package/dist/hooks/useTaskMutations.test.js +30 -1
- package/dist/hooks/useTaskforce.d.ts +65 -4
- package/dist/hooks/useTaskforce.js +564 -243
- package/dist/hooks/useTaskforce.runtime-routing.test.d.ts +1 -0
- package/dist/hooks/useTaskforce.runtime-routing.test.js +152 -0
- package/dist/hooks/useTaskforce.sync-behavior.test.js +2454 -208
- package/dist/hooks/useWorkspaceSyncController.d.ts +4 -1
- package/dist/hooks/useWorkspaceSyncController.js +17 -2
- package/dist/hooks/useWorkspaceSyncController.test.js +1 -0
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.d.ts +16 -0
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.js +316 -35
- 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/adminWorkspaceRegistrar.d.ts +2 -0
- package/dist/mcp/adminWorkspaceRegistrar.js +154 -0
- package/dist/mcp/collaborationRegistrar.d.ts +2 -0
- package/dist/mcp/collaborationRegistrar.js +71 -0
- package/dist/mcp/documentAssetRegistrar.d.ts +2 -0
- package/dist/mcp/documentAssetRegistrar.js +346 -0
- package/dist/mcp/runtime.d.ts +2 -0
- package/dist/mcp/runtime.js +2433 -3534
- package/dist/mcp/runtime.test.js +440 -2
- package/dist/mcp/taskPlanningRegistrar.d.ts +2 -0
- package/dist/mcp/taskPlanningRegistrar.js +418 -0
- package/dist/mcp/toolCatalog.d.ts +35 -0
- package/dist/mcp/toolCatalog.js +3 -0
- package/dist/migrations/taskSchemaMigrations.d.ts +1 -1
- package/dist/migrations/taskSchemaMigrations.js +171 -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/annotatedAttachmentsRoutes.test.js +3 -3
- 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 +120 -9
- package/dist/server/index.rateLimit.test.js +3 -0
- package/dist/server/index.test.js +106 -3
- package/dist/server/routes/admin.d.ts +4 -5
- package/dist/server/routes/admin.js +410 -80
- package/dist/server/routes/annotatedAttachments.d.ts +1 -1
- package/dist/server/routes/annotatedAttachments.js +1 -1
- package/dist/server/routes/auth.d.ts +16 -6
- package/dist/server/routes/auth.js +1015 -118
- package/dist/server/routes/authSupport.d.ts +30 -0
- package/dist/server/routes/authSupport.js +81 -0
- package/dist/server/routes/billing.d.ts +1 -1
- package/dist/server/routes/billing.js +276 -34
- package/dist/server/routes/billing.test.js +760 -52
- package/dist/server/routes/documentReviews.d.ts +1 -1
- package/dist/server/routes/documentReviews.js +1 -1
- package/dist/server/routes/documents.d.ts +5 -2
- package/dist/server/routes/documents.js +242 -74
- package/dist/server/routes/primitives.d.ts +11 -0
- package/dist/server/routes/primitives.js +73 -0
- package/dist/server/routes/resources.d.ts +1 -1
- package/dist/server/routes/resources.js +1 -1
- package/dist/server/routes/shared.d.ts +29 -3
- package/dist/server/routes/shared.js +69 -4
- package/dist/server/routes/sync.d.ts +1 -1
- package/dist/server/routes/sync.integration.test.js +437 -39
- package/dist/server/routes/sync.js +62 -606
- 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 +180 -0
- package/dist/server/routes/tasks.d.ts +1 -1
- package/dist/server/routes/tasks.js +44 -2
- package/dist/server/routes/workspaces.d.ts +1 -1
- package/dist/server/routes/workspaces.js +37 -6
- package/dist/server/routes.d.ts +2 -9
- package/dist/server/routes.js +136 -165
- package/dist/server/routes.test.js +2457 -162
- 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/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/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 +17 -11
- package/dist/sync/collaborationSyncPayload.test.js +13 -1
- package/dist/sync/contentSyncState.d.ts +4 -8
- package/dist/sync/contentSyncState.js +33 -77
- package/dist/sync/syncApplyHandlers.d.ts +7 -0
- package/dist/sync/syncApplyHandlers.js +28 -13
- package/dist/sync/syncApplyHandlers.test.js +72 -3
- package/dist/sync/syncFieldSemantics.d.ts +12 -0
- package/dist/sync/syncFieldSemantics.js +55 -0
- package/dist/sync/syncResourceAdapters.d.ts +44 -0
- package/dist/sync/syncResourceAdapters.js +77 -0
- package/dist/sync/syncService.d.ts +6 -0
- package/dist/sync/syncService.js +60 -0
- package/dist/sync/syncService.test.js +71 -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.js +4 -3
- package/dist/sync/workspacePullFeed.test.js +43 -0
- package/dist/sync/workspaceRepair.js +5 -2
- package/dist/sync/workspaceSyncModel.d.ts +48 -0
- package/dist/sync/workspaceSyncModel.js +195 -31
- package/dist/sync/workspaceSyncModel.test.js +325 -12
- package/dist/sync/workspaceSyncState.d.ts +19 -0
- package/dist/sync/workspaceSyncState.js +3 -1
- package/dist/sync/workspaceSyncSurface.js +3 -8
- package/dist/types.d.ts +17 -0
- package/dist/ui/assets/AgentsModule-DrLawwNl.js +1 -0
- package/dist/ui/assets/{AnnotatedAttachmentWorkspace-BlS-cqnl.js → AnnotatedAttachmentWorkspace-Z9_whf7F.js} +1 -1
- 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-B03MaSkw.js +252 -0
- package/dist/ui/assets/DocumentWorkspace-Dhdso07p.css +1 -0
- package/dist/ui/assets/{InitiativesModule-BjR6iBf9.js → InitiativesModule-9E6ParrY.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-CvfnMiWq.css +1 -0
- package/dist/ui/assets/PlansPage-DRXscYxH.js +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/TaskSettings-DZX4jk7e.js +9 -0
- package/dist/ui/assets/{WorkflowsModule-DnFqdUME.js → WorkflowsModule-BA7jcEpH.js} +1 -1
- package/dist/ui/assets/index-9eT8e0Lu.css +1 -0
- package/dist/ui/assets/index-C6k75jr8.js +6 -0
- package/dist/ui/assets/{vendor-icons-I7ZwG1z_.js → vendor-icons-DuEd_65c.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/utils/accountProfileSummaryCache.d.ts +5 -0
- package/dist/utils/assignees.d.ts +2 -0
- package/dist/utils/assignees.js +2 -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.d.ts +19 -0
- package/dist/utils/commercialLifecyclePresentation.js +199 -0
- package/dist/utils/contextAssetEvents.d.ts +2 -0
- 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 +2 -0
- package/dist/utils/taskActivity.js +228 -22
- package/dist/utils/taskActivity.test.js +119 -8
- 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 +10 -2
- package/scripts/check-cloud-mcp.mjs +83 -0
- package/scripts/export-sqlite-to-postgres.mjs +7 -9
- package/scripts/playwright-auth.sh +5 -1
- package/scripts/run-billing-performance-smoke.sh +24 -0
- 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-BLWVbuKP.js +0 -1
- package/dist/ui/assets/DocumentWorkspace-BH_6DF6x.js +0 -250
- package/dist/ui/assets/DocumentWorkspace-C_8T8oz-.css +0 -1
- package/dist/ui/assets/PlansPage-C2dd2n1X.css +0 -1
- package/dist/ui/assets/PlansPage-CSDQ4sLa.js +0 -1
- package/dist/ui/assets/RussoOne-Regular-C3BxZIj7.ttf +0 -0
- package/dist/ui/assets/TaskSettings-CEDy34Jo.js +0 -9
- package/dist/ui/assets/index-DXUdtH1B.js +0 -6
- package/dist/ui/assets/index-Ii0B0rTO.css +0 -1
- package/scripts/migrate-planning-model.ts +0 -233
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { getReadableDocumentName } from '../../utils/documentNames';
|
|
2
|
+
export function normalizeDocPath(value) {
|
|
3
|
+
let decoded = value;
|
|
4
|
+
try {
|
|
5
|
+
decoded = decodeURIComponent(value);
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
decoded = value;
|
|
9
|
+
}
|
|
10
|
+
const normalized = decoded
|
|
11
|
+
.trim()
|
|
12
|
+
.replace(/\\/g, '/')
|
|
13
|
+
.replace(/^\/+/, '')
|
|
14
|
+
.replace(/^\.\//, '')
|
|
15
|
+
.replace(/^\.taskforce\//, '');
|
|
16
|
+
return normalized;
|
|
17
|
+
}
|
|
18
|
+
export function docPathMatches(candidate, requested) {
|
|
19
|
+
if (candidate === requested)
|
|
20
|
+
return true;
|
|
21
|
+
if (candidate.endsWith(`/${requested}`))
|
|
22
|
+
return true;
|
|
23
|
+
if (requested.endsWith(`/${candidate}`))
|
|
24
|
+
return true;
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
export function extractAssetIdFromPath(value) {
|
|
28
|
+
const normalized = normalizeDocPath(String(value || ''));
|
|
29
|
+
if (!normalized)
|
|
30
|
+
return null;
|
|
31
|
+
const match = normalized.match(/(^|\/)(asset-[a-f0-9]{32})(?=[^/]*$)/i);
|
|
32
|
+
return match?.[2] ? match[2].toLowerCase() : null;
|
|
33
|
+
}
|
|
34
|
+
export function getEffectiveAttachmentState(doc) {
|
|
35
|
+
if (doc.attachmentState === 'attached' || doc.attachmentState === 'unattached') {
|
|
36
|
+
return doc.attachmentState;
|
|
37
|
+
}
|
|
38
|
+
const attachmentCount = typeof doc.attachmentCount === 'number' && Number.isFinite(doc.attachmentCount)
|
|
39
|
+
? doc.attachmentCount
|
|
40
|
+
: 0;
|
|
41
|
+
if (attachmentCount > 0 || !!doc.taskId) {
|
|
42
|
+
return 'attached';
|
|
43
|
+
}
|
|
44
|
+
return 'unattached';
|
|
45
|
+
}
|
|
46
|
+
export function filterDocuments(documents, searchQuery, typeFilters, attachmentFilters) {
|
|
47
|
+
const normalizedQuery = searchQuery.trim().toLowerCase();
|
|
48
|
+
return documents.filter((doc) => {
|
|
49
|
+
const readableName = getReadableDocumentName(doc);
|
|
50
|
+
const haystack = `${readableName} ${doc.originalFilename || ''}`.toLowerCase();
|
|
51
|
+
const matchesSearch = normalizedQuery.length === 0 || haystack.includes(normalizedQuery);
|
|
52
|
+
const matchesType = typeFilters.length === 0 || typeFilters.includes(doc.docType);
|
|
53
|
+
const attachmentState = getEffectiveAttachmentState(doc);
|
|
54
|
+
const matchesAttachment = attachmentFilters.length === 0 || attachmentFilters.includes(attachmentState);
|
|
55
|
+
return matchesSearch && matchesType && matchesAttachment;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type DocumentAttachmentFilter, type DocumentTypeFilter } from './documentWorkspaceFilters';
|
|
2
|
+
import { type DocMeta } from './documentWorkspaceModel';
|
|
3
|
+
interface Options {
|
|
4
|
+
runtimeMode?: 'local' | 'cloud';
|
|
5
|
+
apiBaseUrl?: string;
|
|
6
|
+
cloudAuthBaseUrl?: string;
|
|
7
|
+
typeFilters?: DocumentTypeFilter[];
|
|
8
|
+
attachmentFilters?: DocumentAttachmentFilter[];
|
|
9
|
+
onTypeFiltersChange?: (values: DocumentTypeFilter[]) => void;
|
|
10
|
+
onAttachmentFiltersChange?: (values: DocumentAttachmentFilter[]) => void;
|
|
11
|
+
requestedDocPath?: string | null;
|
|
12
|
+
requestedDocAssetId?: string | null;
|
|
13
|
+
onRequestedDocHandled?: () => void;
|
|
14
|
+
}
|
|
15
|
+
interface Result {
|
|
16
|
+
documentApiBaseUrl: string;
|
|
17
|
+
documents: DocMeta[];
|
|
18
|
+
filteredDocs: DocMeta[];
|
|
19
|
+
loading: boolean;
|
|
20
|
+
error: string | null;
|
|
21
|
+
selectedDoc: DocMeta | null;
|
|
22
|
+
searchQuery: string;
|
|
23
|
+
typeFilters: DocumentTypeFilter[];
|
|
24
|
+
attachmentFilters: DocumentAttachmentFilter[];
|
|
25
|
+
hasActiveFilters: boolean;
|
|
26
|
+
setSearchQuery: (value: string) => void;
|
|
27
|
+
handleTypeFiltersChange: (values: DocumentTypeFilter[]) => void;
|
|
28
|
+
handleAttachmentFiltersChange: (values: DocumentAttachmentFilter[]) => void;
|
|
29
|
+
fetchDocuments: () => Promise<void>;
|
|
30
|
+
selectDoc: (doc: DocMeta | null) => void;
|
|
31
|
+
handleDeleteSelected: () => Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
export declare function useDocumentWorkspaceController({ runtimeMode, apiBaseUrl, cloudAuthBaseUrl, typeFilters: controlledTypeFilters, attachmentFilters: controlledAttachmentFilters, onTypeFiltersChange, onAttachmentFiltersChange, requestedDocPath, requestedDocAssetId, onRequestedDocHandled, }: Options): Result;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import { fetchTaskforceApi } from '../../utils/taskforceApiClient';
|
|
3
|
+
import { logDocumentManagerDebug, resolveDocumentManagerApiBase } from '../../utils/documentManagerApi';
|
|
4
|
+
import { DOCUMENT_ATTACHMENT_FILTER_OPTIONS, DOCUMENT_TYPE_FILTER_OPTIONS, } from './documentWorkspaceFilters';
|
|
5
|
+
import { docPathMatches, extractAssetIdFromPath, filterDocuments, normalizeDocPath, } from './documentWorkspaceModel';
|
|
6
|
+
export function useDocumentWorkspaceController({ runtimeMode = 'local', apiBaseUrl = '', cloudAuthBaseUrl = '', typeFilters: controlledTypeFilters, attachmentFilters: controlledAttachmentFilters, onTypeFiltersChange, onAttachmentFiltersChange, requestedDocPath = null, requestedDocAssetId = null, onRequestedDocHandled, }) {
|
|
7
|
+
const [documents, setDocuments] = useState([]);
|
|
8
|
+
const [loading, setLoading] = useState(true);
|
|
9
|
+
const [error, setError] = useState(null);
|
|
10
|
+
const [selectedDocId, setSelectedDocId] = useState(null);
|
|
11
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
12
|
+
const [internalTypeFilters, setInternalTypeFilters] = useState(() => DOCUMENT_TYPE_FILTER_OPTIONS.map((option) => option.value));
|
|
13
|
+
const [internalAttachmentFilters, setInternalAttachmentFilters] = useState(() => DOCUMENT_ATTACHMENT_FILTER_OPTIONS.map((option) => option.value));
|
|
14
|
+
const documentApiBaseUrl = resolveDocumentManagerApiBase({
|
|
15
|
+
runtimeMode,
|
|
16
|
+
apiBaseUrl,
|
|
17
|
+
cloudAuthBaseUrl,
|
|
18
|
+
});
|
|
19
|
+
const typeFilters = controlledTypeFilters ?? internalTypeFilters;
|
|
20
|
+
const attachmentFilters = controlledAttachmentFilters ?? internalAttachmentFilters;
|
|
21
|
+
const handleTypeFiltersChange = onTypeFiltersChange ?? setInternalTypeFilters;
|
|
22
|
+
const handleAttachmentFiltersChange = onAttachmentFiltersChange ?? setInternalAttachmentFilters;
|
|
23
|
+
const fetchDocuments = useCallback(async () => {
|
|
24
|
+
setLoading(true);
|
|
25
|
+
setError(null);
|
|
26
|
+
try {
|
|
27
|
+
const res = await fetchTaskforceApi('/api/taskforce/documents', {
|
|
28
|
+
credentials: 'include',
|
|
29
|
+
}, documentApiBaseUrl);
|
|
30
|
+
if (!res.ok)
|
|
31
|
+
throw new Error(`Failed to load documents (${res.status})`);
|
|
32
|
+
const data = await res.json();
|
|
33
|
+
const nextDocuments = Array.isArray(data.documents) ? data.documents : [];
|
|
34
|
+
logDocumentManagerDebug('list.loaded', {
|
|
35
|
+
runtimeMode,
|
|
36
|
+
apiBaseUrl: documentApiBaseUrl || '(same-origin)',
|
|
37
|
+
count: nextDocuments.length,
|
|
38
|
+
});
|
|
39
|
+
setDocuments(nextDocuments);
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
setError(e?.message || 'Failed to load documents');
|
|
43
|
+
logDocumentManagerDebug('list.error', {
|
|
44
|
+
runtimeMode,
|
|
45
|
+
apiBaseUrl: documentApiBaseUrl || '(same-origin)',
|
|
46
|
+
message: e?.message || 'Failed to load documents',
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
setLoading(false);
|
|
51
|
+
}
|
|
52
|
+
}, [documentApiBaseUrl, runtimeMode]);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
void fetchDocuments();
|
|
55
|
+
}, [fetchDocuments]);
|
|
56
|
+
const filteredDocs = useMemo(() => filterDocuments(documents, searchQuery, typeFilters, attachmentFilters), [attachmentFilters, documents, searchQuery, typeFilters]);
|
|
57
|
+
const selectedDoc = useMemo(() => (selectedDocId ? documents.find((doc) => doc.id === selectedDocId) ?? null : null), [documents, selectedDocId]);
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
if ((!requestedDocPath && !requestedDocAssetId) || documents.length === 0)
|
|
60
|
+
return;
|
|
61
|
+
const requested = requestedDocPath ? normalizeDocPath(requestedDocPath) : '';
|
|
62
|
+
const normalizedRequestedAssetId = String(requestedDocAssetId || '').trim().toLowerCase()
|
|
63
|
+
|| extractAssetIdFromPath(requestedDocPath);
|
|
64
|
+
const matched = documents.find((doc) => {
|
|
65
|
+
const candidateAssetId = extractAssetIdFromPath(doc.fsPath) || String(doc.assetId || '').trim().toLowerCase() || null;
|
|
66
|
+
if (normalizedRequestedAssetId && candidateAssetId && candidateAssetId === normalizedRequestedAssetId)
|
|
67
|
+
return true;
|
|
68
|
+
if (!requested)
|
|
69
|
+
return false;
|
|
70
|
+
return docPathMatches(normalizeDocPath(doc.fsPath), requested);
|
|
71
|
+
});
|
|
72
|
+
if (!matched)
|
|
73
|
+
return;
|
|
74
|
+
setSelectedDocId(matched.id);
|
|
75
|
+
onRequestedDocHandled?.();
|
|
76
|
+
}, [documents, onRequestedDocHandled, requestedDocAssetId, requestedDocPath]);
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if ((requestedDocPath || requestedDocAssetId) && !selectedDoc)
|
|
79
|
+
return;
|
|
80
|
+
if (filteredDocs.length === 0) {
|
|
81
|
+
if (selectedDocId !== null) {
|
|
82
|
+
setSelectedDocId(null);
|
|
83
|
+
}
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (selectedDoc && filteredDocs.some((doc) => doc.id === selectedDoc.id))
|
|
87
|
+
return;
|
|
88
|
+
setSelectedDocId(filteredDocs[0].id);
|
|
89
|
+
}, [filteredDocs, requestedDocAssetId, requestedDocPath, selectedDoc, selectedDocId]);
|
|
90
|
+
const handleDeleteSelected = useCallback(async () => {
|
|
91
|
+
setSelectedDocId(null);
|
|
92
|
+
await fetchDocuments();
|
|
93
|
+
}, [fetchDocuments]);
|
|
94
|
+
const hasActiveFilters = searchQuery.trim().length > 0 || typeFilters.length > 0 || attachmentFilters.length > 0;
|
|
95
|
+
return {
|
|
96
|
+
documentApiBaseUrl,
|
|
97
|
+
documents,
|
|
98
|
+
filteredDocs,
|
|
99
|
+
loading,
|
|
100
|
+
error,
|
|
101
|
+
selectedDoc,
|
|
102
|
+
searchQuery,
|
|
103
|
+
typeFilters,
|
|
104
|
+
attachmentFilters,
|
|
105
|
+
hasActiveFilters,
|
|
106
|
+
setSearchQuery,
|
|
107
|
+
handleTypeFiltersChange,
|
|
108
|
+
handleAttachmentFiltersChange,
|
|
109
|
+
fetchDocuments,
|
|
110
|
+
selectDoc: (doc) => setSelectedDocId(doc?.id ?? null),
|
|
111
|
+
handleDeleteSelected,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import * as Icons from 'lucide-react';
|
|
4
|
-
const { MessageSquare, User, Bot, Gauge,
|
|
4
|
+
const { MessageSquare, User, Bot, Gauge, ClipboardList, HelpCircle, File } = Icons;
|
|
5
5
|
import styles from '../../Taskforce.module.css';
|
|
6
6
|
import cardStyles from './TaskCard.module.css';
|
|
7
7
|
import { Markdown } from '../ui/Markdown';
|
|
@@ -15,7 +15,7 @@ import { getDocumentDownloadName } from '../../utils/documentNames';
|
|
|
15
15
|
import { TaskStatusActions } from './TaskStatusActions';
|
|
16
16
|
import { getTaskReferenceDisplayState } from '../../utils/taskReferences';
|
|
17
17
|
import { getAssigneeKind, getAssigneeLabel } from '../../utils/assignees';
|
|
18
|
-
import { getLatestTaskActivity, summarizeTaskActivity } from '../../utils/taskActivity';
|
|
18
|
+
import { getLatestTaskActivity, getTaskActivityItems, summarizeTaskActivity } from '../../utils/taskActivity';
|
|
19
19
|
import { DEFAULT_TYPE_VALUE } from '../../shared/taxonomyDefaults.js';
|
|
20
20
|
import { getVisibleTaxonomiesForTasks } from '../../utils/taxonomyLifecycle.js';
|
|
21
21
|
import { getInitiativeReferenceLabel, getWorkstreamReferenceLabel } from '../../utils/planningReferences';
|
|
@@ -51,6 +51,18 @@ const TaskCardInner = ({ task, searchQuery = '', copiedId = null, taxonomies = [
|
|
|
51
51
|
const hasLegacyClass = !!styles[`priorityItem_${displayPriority}`];
|
|
52
52
|
const assigneeKind = getAssigneeKind(task.assignee);
|
|
53
53
|
const assigneeLabel = getAssigneeLabel(task.assignee, assigneeOptions);
|
|
54
|
+
const assigneeOption = React.useMemo(() => {
|
|
55
|
+
const value = String(task.assignee || '').trim();
|
|
56
|
+
return assigneeOptions.find((option) => String(option.value || '').trim() === value) || null;
|
|
57
|
+
}, [assigneeOptions, task.assignee]);
|
|
58
|
+
const assigneeAvatarUrl = assigneeKind !== 'unassigned' && typeof assigneeOption?.avatarUrl === 'string'
|
|
59
|
+
? assigneeOption.avatarUrl.trim()
|
|
60
|
+
: '';
|
|
61
|
+
const assigneeAvatarAccent = assigneeKind === 'agent'
|
|
62
|
+
? 'var(--color-violet-500, #8b5cf6)'
|
|
63
|
+
: assigneeKind === 'member'
|
|
64
|
+
? 'var(--color-green-500, #22c55e)'
|
|
65
|
+
: 'var(--text-secondary, #888)';
|
|
54
66
|
const latestActivity = React.useMemo(() => getLatestTaskActivity(task), [task]);
|
|
55
67
|
const resolvedReadOnlyMode = readOnlyMode || (task.isDeleted ? 'deleted' : (isArchived ? 'archived' : null));
|
|
56
68
|
const isReadOnly = resolvedReadOnlyMode !== null;
|
|
@@ -70,9 +82,7 @@ const TaskCardInner = ({ task, searchQuery = '', copiedId = null, taxonomies = [
|
|
|
70
82
|
return undefined;
|
|
71
83
|
}, [assigneeOptions, initiativeReferenceLabel, taskInitiative, taskWorkstream, workstreamReferenceLabel]);
|
|
72
84
|
const latestActivityText = React.useMemo(() => summarizeTaskActivity(latestActivity, formatActivityFieldValue), [formatActivityFieldValue, latestActivity]);
|
|
73
|
-
const activityCount =
|
|
74
|
-
? task.activity.length
|
|
75
|
-
: (task.comments?.length || 0);
|
|
85
|
+
const activityCount = React.useMemo(() => getTaskActivityItems(task).length, [task]);
|
|
76
86
|
const cardClasses = [
|
|
77
87
|
cardStyles.taskItem,
|
|
78
88
|
task.status === 'on-hold' ? cardStyles.onHold : '',
|
|
@@ -286,29 +296,10 @@ const TaskCardInner = ({ task, searchQuery = '', copiedId = null, taxonomies = [
|
|
|
286
296
|
borderColor: `color-mix(in srgb, ${complexityColor}, transparent 72%)`,
|
|
287
297
|
gap: '4px',
|
|
288
298
|
padding: '0 8px'
|
|
289
|
-
}, children: [_jsx(Gauge, { size: 14 }), !compressed && _jsx("span", { children: complexityLabel })] }), _jsx("span", { className:
|
|
290
|
-
|
|
291
|
-
? 'color-mix(in srgb, var(--color-violet-500, #8b5cf6), transparent 88%)'
|
|
292
|
-
: assigneeKind === 'member'
|
|
293
|
-
? 'color-mix(in srgb, var(--color-green-500, #22c55e), transparent 88%)'
|
|
294
|
-
: 'color-mix(in srgb, var(--text-secondary, #888), transparent 88%)',
|
|
295
|
-
padding: '0 8px',
|
|
296
|
-
color: assigneeKind === 'agent'
|
|
297
|
-
? 'var(--color-violet-500, #8b5cf6)'
|
|
298
|
-
: assigneeKind === 'member'
|
|
299
|
-
? 'var(--color-green-500, #22c55e)'
|
|
300
|
-
: 'var(--text-secondary, #888)',
|
|
301
|
-
borderColor: assigneeKind === 'agent'
|
|
302
|
-
? 'color-mix(in srgb, var(--color-violet-500, #8b5cf6), transparent 72%)'
|
|
303
|
-
: assigneeKind === 'member'
|
|
304
|
-
? 'color-mix(in srgb, var(--color-green-500, #22c55e), transparent 72%)'
|
|
305
|
-
: 'color-mix(in srgb, var(--text-secondary, #888), transparent 70%)',
|
|
306
|
-
display: 'flex',
|
|
307
|
-
alignItems: 'center'
|
|
308
|
-
}, children: assigneeKind === 'agent'
|
|
309
|
-
? _jsx(Bot, { size: compressed ? 14 : 16 })
|
|
299
|
+
}, children: [_jsx(Gauge, { size: 14 }), !compressed && _jsx("span", { children: complexityLabel })] }), _jsx("span", { className: `${cardStyles.assigneeAvatarIndicator} ${assigneeKind === 'unassigned' ? cardStyles.assigneeAvatarEmpty : ''}`, title: `Assigned to: ${assigneeLabel}`, "aria-label": assigneeKind === 'unassigned' ? 'Unassigned' : `Assigned to ${assigneeLabel}`, style: { '--assignee-avatar-color': assigneeAvatarAccent }, children: assigneeAvatarUrl ? (_jsx("img", { src: assigneeAvatarUrl, alt: "", className: cardStyles.assigneeAvatarImage })) : assigneeKind === 'agent'
|
|
300
|
+
? _jsx(Bot, { size: compressed ? 18 : 20 })
|
|
310
301
|
: assigneeKind === 'member'
|
|
311
|
-
? _jsx(User, { size: compressed ?
|
|
312
|
-
:
|
|
302
|
+
? _jsx(User, { size: compressed ? 18 : 20 })
|
|
303
|
+
: null })] })] }) })) })] })] }));
|
|
313
304
|
};
|
|
314
305
|
export const TaskCard = React.memo(TaskCardInner);
|
|
@@ -30,7 +30,7 @@ const baseInitiative = (overrides = {}) => ({
|
|
|
30
30
|
createdAt: '2026-02-13T00:00:00.000Z',
|
|
31
31
|
...overrides,
|
|
32
32
|
});
|
|
33
|
-
describe('TaskCard
|
|
33
|
+
describe('TaskCard planning hierarchy references', () => {
|
|
34
34
|
it('renders initiative/workstream/task hierarchy references when planning context is provided', () => {
|
|
35
35
|
const task = baseTask({
|
|
36
36
|
id: 'task-hierarchy',
|
|
@@ -105,7 +105,7 @@ describe('TaskCard parent/child progress', () => {
|
|
|
105
105
|
});
|
|
106
106
|
render(_jsx(TaskCard, { task: task, onClick: () => { }, onCopyId: () => { } }));
|
|
107
107
|
expect(screen.getByText(/Latest Activity:/)).toBeInTheDocument();
|
|
108
|
-
expect(screen.getByText(/Status:
|
|
108
|
+
expect(screen.getByText(/Status changed: Task -> Review/)).toBeInTheDocument();
|
|
109
109
|
expect(screen.getByTitle('2 activity items')).toBeInTheDocument();
|
|
110
110
|
});
|
|
111
111
|
it('uses the current workstream reference in latest activity summaries', () => {
|
|
@@ -136,7 +136,7 @@ describe('TaskCard parent/child progress', () => {
|
|
|
136
136
|
]
|
|
137
137
|
});
|
|
138
138
|
render(_jsx(TaskCard, { task: task, taskWorkstream: baseWorkstream({ id: 'workstream-1', referenceNumber: 12 }), onClick: () => { }, onCopyId: () => { } }));
|
|
139
|
-
expect(screen.getByText(/Workstream: none -> WS-12/)).toBeInTheDocument();
|
|
139
|
+
expect(screen.getByText(/Workstream changed: none -> WS-12/)).toBeInTheDocument();
|
|
140
140
|
expect(screen.queryByText(/workstream-1/i)).not.toBeInTheDocument();
|
|
141
141
|
});
|
|
142
142
|
it('renders named AI assignee labels from assignee options', () => {
|
|
@@ -151,6 +151,41 @@ describe('TaskCard parent/child progress', () => {
|
|
|
151
151
|
], onClick: () => { }, onCopyId: () => { } }));
|
|
152
152
|
expect(screen.getByLabelText('Assigned to Codex')).toBeInTheDocument();
|
|
153
153
|
});
|
|
154
|
+
it('renders AI profile photos in the assignee indicator when available', () => {
|
|
155
|
+
const task = baseTask({
|
|
156
|
+
id: 'task-ai-avatar',
|
|
157
|
+
title: 'AI-owned task',
|
|
158
|
+
assignee: 'ai-profile-123'
|
|
159
|
+
});
|
|
160
|
+
render(_jsx(TaskCard, { task: task, assigneeOptions: [
|
|
161
|
+
{ value: 'ai-profile-123', label: 'Codex', icon: 'Bot', color: '#0ea5e9', kind: 'agent', avatarUrl: '/api/taskforce/context/ai-avatar.webp' }
|
|
162
|
+
], onClick: () => { }, onCopyId: () => { } }));
|
|
163
|
+
const badge = screen.getByLabelText('Assigned to Codex');
|
|
164
|
+
expect(badge.querySelector('img')).toHaveAttribute('src', '/api/taskforce/context/ai-avatar.webp');
|
|
165
|
+
});
|
|
166
|
+
it('renders member profile photos in the assignee indicator when available', () => {
|
|
167
|
+
const task = baseTask({
|
|
168
|
+
id: 'task-member-avatar',
|
|
169
|
+
title: 'Member-owned task',
|
|
170
|
+
assignee: 'user-123'
|
|
171
|
+
});
|
|
172
|
+
render(_jsx(TaskCard, { task: task, assigneeOptions: [
|
|
173
|
+
{ value: 'user-123', label: 'Ross Burke', icon: 'User', color: '#22c55e', kind: 'member', avatarUrl: '/api/taskforce/context/member-avatar.webp' }
|
|
174
|
+
], onClick: () => { }, onCopyId: () => { } }));
|
|
175
|
+
const badge = screen.getByLabelText('Assigned to Ross Burke');
|
|
176
|
+
expect(badge.querySelector('img')).toHaveAttribute('src', '/api/taskforce/context/member-avatar.webp');
|
|
177
|
+
});
|
|
178
|
+
it('renders an empty avatar circle for unassigned tasks', () => {
|
|
179
|
+
const task = baseTask({
|
|
180
|
+
id: 'task-unassigned-avatar',
|
|
181
|
+
title: 'Unassigned task',
|
|
182
|
+
assignee: 'unassigned'
|
|
183
|
+
});
|
|
184
|
+
render(_jsx(TaskCard, { task: task, onClick: () => { }, onCopyId: () => { } }));
|
|
185
|
+
const indicator = screen.getByLabelText('Unassigned');
|
|
186
|
+
expect(indicator.querySelector('img')).toBeNull();
|
|
187
|
+
expect(indicator.querySelector('svg')).toBeNull();
|
|
188
|
+
});
|
|
154
189
|
it('prefers provided type metadata over hardcoded defaults', () => {
|
|
155
190
|
const task = baseTask({
|
|
156
191
|
id: 'task-type-metadata',
|