@taskforcehq/taskforce 0.3.324 → 0.3.327
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/LICENSE.md +68 -0
- package/README.md +19 -0
- package/dist/Taskforce.module.css +2191 -540
- package/dist/TaskforceCore.d.ts +1 -0
- package/dist/TaskforceCore.js +65 -22
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.d.ts +1 -0
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.js +3 -2
- package/dist/annotatedAttachments/commandService.d.ts +68 -0
- package/dist/annotatedAttachments/commandService.js +348 -0
- package/dist/annotatedAttachments/service.d.ts +2 -0
- package/dist/annotatedAttachments/service.js +13 -12
- package/dist/cli.js +158 -9
- package/dist/cliOpenPort.d.ts +1 -0
- package/dist/cliOpenPort.js +4 -0
- package/dist/compat/taskforceAgentDefinitionCompat.d.ts +12 -0
- package/dist/compat/taskforceAgentDefinitionCompat.js +25 -0
- package/dist/compat/workspaceSyncCompat.js +6 -2
- package/dist/compat/workspaceSyncV3CombinedCoverageCompat.d.ts +6 -0
- package/dist/compat/workspaceSyncV3CombinedCoverageCompat.js +22 -0
- package/dist/compat/workspaceSyncV3OperationCompat.d.ts +7 -0
- package/dist/compat/workspaceSyncV3OperationCompat.js +30 -0
- package/dist/components/activity/EntityActivityTimeline.d.ts +10 -2
- package/dist/components/activity/EntityActivityTimeline.js +73 -35
- package/dist/components/context/AttachmentPreviewHost.d.ts +6 -0
- package/dist/components/context/AttachmentPreviewHost.js +222 -0
- package/dist/components/context/ContextAttachmentManager.d.ts +4 -0
- package/dist/components/context/ContextAttachmentManager.js +418 -208
- package/dist/components/features/AiProfilesModule.d.ts +24 -0
- package/dist/components/features/AiProfilesModule.js +744 -0
- package/dist/components/features/AnnotatedAttachmentWorkspace.d.ts +4 -1
- package/dist/components/features/AnnotatedAttachmentWorkspace.js +351 -79
- package/dist/components/features/DocumentGenerateModal.js +23 -5
- package/dist/components/features/DocumentIndex.d.ts +19 -1
- package/dist/components/features/DocumentIndex.js +104 -15
- package/dist/components/features/DocumentViewer.d.ts +9 -1
- package/dist/components/features/DocumentViewer.js +721 -100
- package/dist/components/features/DocumentWorkspace.d.ts +37 -2
- package/dist/components/features/DocumentWorkspace.js +21 -6
- package/dist/components/features/TaskSettings.d.ts +6 -27
- package/dist/components/features/TaskSettings.js +257 -151
- package/dist/components/features/TaskforceAgentsModule.d.ts +36 -0
- package/dist/components/features/TaskforceAgentsModule.js +1782 -0
- package/dist/components/features/agentBehavior/AgentBehaviorManagerShared.d.ts +94 -0
- package/dist/components/features/agentBehavior/AgentBehaviorManagerShared.js +70 -0
- package/dist/components/features/agentCapabilities/AgentCapabilitiesPrototype.d.ts +65 -0
- package/dist/components/features/agentCapabilities/AgentCapabilitiesPrototype.js +115 -0
- package/dist/components/features/agentRoles/RoleManagerPanel.d.ts +4 -0
- package/dist/components/features/agentRoles/RoleManagerPanel.js +382 -0
- package/dist/components/features/agentSkills/SkillManagerPanel.d.ts +5 -0
- package/dist/components/features/agentSkills/SkillManagerPanel.js +355 -0
- package/dist/components/features/documentWorkspaceModel.d.ts +16 -4
- package/dist/components/features/documentWorkspaceModel.js +30 -5
- package/dist/components/features/planning/PlanningArchiveConfirmation.d.ts +9 -0
- package/dist/components/features/planning/PlanningArchiveConfirmation.js +19 -0
- package/dist/components/features/planning/PlanningCardIdentity.d.ts +12 -0
- package/dist/components/features/planning/PlanningCardIdentity.js +44 -0
- package/dist/components/features/planning/PlanningEntityDetails.d.ts +36 -0
- package/dist/components/features/planning/PlanningEntityDetails.js +131 -0
- package/dist/components/features/planning/PlanningEntitySummary.d.ts +44 -0
- package/dist/components/features/planning/PlanningEntitySummary.js +97 -0
- package/dist/components/features/planning/PlanningLinkPicker.d.ts +9 -0
- package/dist/components/features/planning/PlanningLinkPicker.js +26 -0
- package/dist/components/features/planning/PlanningModule.d.ts +6 -0
- package/dist/components/features/planning/PlanningModule.js +571 -0
- package/dist/components/features/planning/PlanningOwnerDropdown.d.ts +27 -0
- package/dist/components/features/planning/PlanningOwnerDropdown.js +80 -0
- package/dist/components/features/planning/PlanningTaskArrangeControl.d.ts +5 -0
- package/dist/components/features/planning/PlanningTaskArrangeControl.js +11 -0
- package/dist/components/features/planning/PlanningTaskCard.d.ts +20 -0
- package/dist/components/features/planning/PlanningTaskCard.js +26 -0
- package/dist/components/features/planning/PlanningTaskOrderList.d.ts +10 -0
- package/dist/components/features/planning/PlanningTaskOrderList.js +52 -0
- package/dist/components/features/planning/PlanningUnlinkConfirmation.d.ts +15 -0
- package/dist/components/features/planning/PlanningUnlinkConfirmation.js +7 -0
- package/dist/components/features/planning/planningCreateIntent.d.ts +10 -0
- package/dist/components/features/planning/planningCreateIntent.js +16 -0
- package/dist/components/features/planning/planningNavigator.d.ts +33 -0
- package/dist/components/features/planning/planningNavigator.js +96 -0
- package/dist/components/features/planning/planningTaskArrangement.d.ts +18 -0
- package/dist/components/features/planning/planningTaskArrangement.js +106 -0
- package/dist/components/features/planning/planningWorkspaceModel.d.ts +121 -0
- package/dist/components/features/planning/planningWorkspaceModel.js +5 -0
- package/dist/components/features/settings/CategoryManager.js +2 -2
- package/dist/components/features/settings/TaxonomyEditor.js +1 -1
- package/dist/components/features/settings/TaxonomyManager.js +1 -1
- package/dist/components/features/settings/TypeManager.js +1 -1
- package/dist/components/features/taskforceAgentAssignments/AgentBehaviorAssignments.d.ts +10 -0
- package/dist/components/features/taskforceAgentAssignments/AgentBehaviorAssignments.js +175 -0
- package/dist/components/features/taskforceAgentAssignments/agentBehaviorCatalogApi.d.ts +27 -0
- package/dist/components/features/taskforceAgentAssignments/agentBehaviorCatalogApi.js +24 -0
- package/dist/components/features/taskforceAgentEditorModel.d.ts +109 -0
- package/dist/components/features/taskforceAgentEditorModel.js +145 -0
- package/dist/components/features/useDocumentWorkspaceController.d.ts +20 -1
- package/dist/components/features/useDocumentWorkspaceController.js +106 -21
- package/dist/components/features/workflowManager/WorkflowManagerModule.d.ts +11 -0
- package/dist/components/features/workflowManager/WorkflowManagerModule.js +313 -0
- package/dist/components/features/workflowManager/WorkflowPublishDialog.d.ts +11 -0
- package/dist/components/features/workflowManager/WorkflowPublishDialog.js +8 -0
- package/dist/components/features/workflowManager/types.d.ts +74 -0
- package/dist/components/features/workflowManager/types.js +1 -0
- package/dist/components/features/workflowManager/useWorkflowManager.d.ts +30 -0
- package/dist/components/features/workflowManager/useWorkflowManager.js +213 -0
- package/dist/components/features/workflowManager/workflowManagerApi.d.ts +52 -0
- package/dist/components/features/workflowManager/workflowManagerApi.js +142 -0
- package/dist/components/task/TaskActionHeader.d.ts +6 -3
- package/dist/components/task/TaskActionHeader.js +46 -53
- package/dist/components/task/TaskCard.d.ts +10 -2
- package/dist/components/task/TaskCard.js +103 -54
- package/dist/components/task/TaskContextUpload.d.ts +1 -0
- package/dist/components/task/TaskContextUpload.js +3 -2
- package/dist/components/task/TaskForm.d.ts +12 -17
- package/dist/components/task/TaskForm.js +544 -199
- package/dist/components/task/TaskImageReviews.d.ts +8 -0
- package/dist/components/task/TaskImageReviews.js +47 -0
- package/dist/components/task/TaskKanban.d.ts +11 -12
- package/dist/components/task/TaskKanban.js +70 -18
- package/dist/components/task/TaskList.d.ts +9 -8
- package/dist/components/task/TaskList.js +46 -32
- package/dist/components/task/TaskReferenceBadge.d.ts +2 -1
- package/dist/components/task/TaskReferenceBadge.js +3 -2
- package/dist/components/task/TaskStatusActions.d.ts +3 -1
- package/dist/components/task/TaskStatusActions.js +17 -6
- package/dist/components/task/TaskWorkflowAssignmentField.d.ts +18 -0
- package/dist/components/task/TaskWorkflowAssignmentField.js +362 -0
- package/dist/components/task/TaskWorkstreamPicker.d.ts +8 -0
- package/dist/components/task/TaskWorkstreamPicker.js +24 -0
- package/dist/components/task/TrashRestoreControls.d.ts +18 -0
- package/dist/components/task/TrashRestoreControls.js +71 -0
- package/dist/components/ui/AiIdentityRosterCard.d.ts +20 -0
- package/dist/components/ui/AiIdentityRosterCard.js +5 -0
- package/dist/components/ui/AssetTraySortControl.d.ts +10 -0
- package/dist/components/ui/AssetTraySortControl.js +38 -0
- package/dist/components/ui/AssigneeIdentity.d.ts +12 -0
- package/dist/components/ui/AssigneeIdentity.js +41 -0
- package/dist/components/ui/DiscardChangesDialog.d.ts +10 -0
- package/dist/components/ui/DiscardChangesDialog.js +7 -0
- package/dist/components/ui/DisclosureSectionHeader.d.ts +4 -1
- package/dist/components/ui/DisclosureSectionHeader.js +2 -2
- package/dist/components/ui/EditableAvatarButton.d.ts +6 -1
- package/dist/components/ui/EditableAvatarButton.js +6 -5
- package/dist/components/ui/HierarchyActionBadge.d.ts +2 -1
- package/dist/components/ui/HierarchyActionBadge.js +2 -2
- package/dist/components/ui/Markdown.d.ts +13 -3
- package/dist/components/ui/Markdown.fixture.d.ts +1 -0
- package/dist/components/ui/Markdown.fixture.js +23 -0
- package/dist/components/ui/Markdown.js +158 -68
- package/dist/components/ui/Modal.d.ts +3 -1
- package/dist/components/ui/Modal.js +85 -19
- package/dist/components/ui/MultiSelectFilter.d.ts +9 -2
- package/dist/components/ui/MultiSelectFilter.js +26 -5
- package/dist/components/ui/ReferenceBadgeButton.js +2 -3
- package/dist/components/ui/TaxonomyDropdown.d.ts +10 -1
- package/dist/components/ui/TaxonomyDropdown.js +149 -58
- package/dist/components/ui/TopNoticeLayer.d.ts +2 -1
- package/dist/components/ui/TopNoticeLayer.js +5 -2
- package/dist/components/ui/useFallbackImageUrl.d.ts +4 -0
- package/dist/components/ui/useFallbackImageUrl.js +20 -0
- package/dist/components/views/AppShellHeader.js +2 -2
- package/dist/components/views/StandaloneLayout.d.ts +1 -0
- package/dist/components/views/StandaloneLayout.js +1684 -620
- package/dist/components/views/WidgetView.d.ts +1 -0
- package/dist/components/views/WidgetView.js +95 -30
- package/dist/components/views/chrome/WorkspaceChromeSections.d.ts +4 -2
- package/dist/components/views/chrome/WorkspaceChromeSections.js +3 -6
- package/dist/components/views/chrome/workspaceChrome.d.ts +5 -8
- package/dist/components/views/chrome/workspaceChrome.js +62 -27
- package/dist/components/views/panels/FilterToolbar.d.ts +4 -3
- package/dist/components/views/panels/FilterToolbar.js +8 -5
- package/dist/components/views/panels/FilterToolbarControls.d.ts +11 -2
- package/dist/components/views/panels/FilterToolbarControls.js +35 -20
- package/dist/components/views/panels/PlanningDrawer.d.ts +62 -51
- package/dist/components/views/panels/PlanningDrawer.js +993 -314
- package/dist/components/views/planningScope.d.ts +4 -0
- package/dist/components/views/planningScope.js +12 -1
- package/dist/components/views/standalone/modals/AccountSettingsModal.d.ts +62 -0
- package/dist/components/views/standalone/modals/AccountSettingsModal.js +197 -0
- package/dist/components/views/standalone/modals/AvatarImageManagerModal.d.ts +7 -2
- package/dist/components/views/standalone/modals/AvatarImageManagerModal.js +56 -9
- package/dist/components/views/standalone/modals/HelpModal.d.ts +1 -2
- package/dist/components/views/standalone/modals/HelpModal.js +3 -4
- package/dist/components/views/standalone/modals/SyncStatusModal.d.ts +8 -9
- package/dist/components/views/standalone/modals/SyncStatusModal.js +85 -25
- package/dist/components/views/standalone/modals/TeamManagementModal.js +1 -1
- package/dist/config/applicationBaseUrl.d.ts +2 -0
- package/dist/config/applicationBaseUrl.js +23 -0
- package/dist/config/envSchema.d.ts +1 -1
- package/dist/config/envSchema.js +166 -5
- package/dist/core/AdminAuditRetentionService.d.ts +43 -0
- package/dist/core/AdminAuditRetentionService.js +126 -0
- package/dist/core/AiProfileService.d.ts +34 -0
- package/dist/core/AiProfileService.js +516 -252
- package/dist/core/AttachmentLinkService.d.ts +10 -2
- package/dist/core/AttachmentLinkService.js +44 -12
- package/dist/core/AuthIdentityService.d.ts +6 -0
- package/dist/core/AuthIdentityService.js +38 -0
- package/dist/core/AuthTokenService.d.ts +1 -0
- package/dist/core/AuthTokenService.js +13 -0
- package/dist/core/DeletedTaskLifecycleService.d.ts +4 -2
- package/dist/core/DeletedTaskLifecycleService.js +124 -38
- package/dist/core/GlobalSettingsService.d.ts +3 -1
- package/dist/core/GlobalSettingsService.js +30 -4
- package/dist/core/InitiativeDurableMutationService.d.ts +89 -0
- package/dist/core/InitiativeDurableMutationService.js +187 -0
- package/dist/core/McpTokenService.d.ts +1 -0
- package/dist/core/McpTokenService.js +39 -13
- package/dist/core/PlanningCommandPreparationService.d.ts +60 -0
- package/dist/core/PlanningCommandPreparationService.js +149 -0
- package/dist/core/ScheduleCommandService.d.ts +76 -0
- package/dist/core/ScheduleCommandService.js +165 -0
- package/dist/core/SyncReconciliationService.d.ts +29 -6
- package/dist/core/SyncReconciliationService.js +256 -84
- package/dist/core/TaskActivityService.d.ts +22 -2
- package/dist/core/TaskActivityService.js +177 -29
- package/dist/core/TaskAttachmentLinksDurableMutationService.d.ts +31 -0
- package/dist/core/TaskAttachmentLinksDurableMutationService.js +231 -0
- package/dist/core/TaskChecklistCommandService.d.ts +50 -0
- package/dist/core/TaskChecklistCommandService.js +111 -0
- package/dist/core/TaskDurableCreateMutationService.d.ts +38 -0
- package/dist/core/TaskDurableCreateMutationService.js +85 -0
- package/dist/core/TaskDurableDeleteMutationService.d.ts +47 -0
- package/dist/core/TaskDurableDeleteMutationService.js +54 -0
- package/dist/core/TaskDurableLifecycleMutationService.d.ts +38 -0
- package/dist/core/TaskDurableLifecycleMutationService.js +42 -0
- package/dist/core/TaskDurableRelationshipMutationService.d.ts +58 -0
- package/dist/core/TaskDurableRelationshipMutationService.js +66 -0
- package/dist/core/TaskDurableRestoreMutationService.d.ts +31 -0
- package/dist/core/TaskDurableRestoreMutationService.js +33 -0
- package/dist/core/TaskDurableStatusMutationService.d.ts +74 -0
- package/dist/core/TaskDurableStatusMutationService.js +247 -0
- package/dist/core/TaskDurableSyncMutationService.d.ts +34 -0
- package/dist/core/TaskDurableSyncMutationService.js +70 -0
- package/dist/core/TaskDurableWorkflowMutationService.d.ts +48 -0
- package/dist/core/TaskDurableWorkflowMutationService.js +59 -0
- package/dist/core/TaskLifecycleCommandService.d.ts +101 -0
- package/dist/core/TaskLifecycleCommandService.js +161 -0
- package/dist/core/TaskRootCommandPreparationService.d.ts +35 -0
- package/dist/core/TaskRootCommandPreparationService.js +103 -0
- package/dist/core/Taskforce.d.ts +479 -59
- package/dist/core/Taskforce.js +3671 -841
- package/dist/core/WorkflowAssignmentService.d.ts +40 -0
- package/dist/core/WorkflowAssignmentService.js +158 -0
- package/dist/core/WorkflowExecutionService.d.ts +69 -0
- package/dist/core/WorkflowExecutionService.js +342 -0
- package/dist/core/WorkflowTaskActivationService.d.ts +32 -0
- package/dist/core/WorkflowTaskActivationService.js +63 -0
- package/dist/core/WorkflowTemplateService.d.ts +64 -0
- package/dist/core/WorkflowTemplateService.js +223 -0
- package/dist/core/WorkspaceLifecycleService.d.ts +1 -0
- package/dist/core/WorkspaceLifecycleService.js +18 -0
- package/dist/core/WorkstreamDurableMutationService.d.ts +90 -0
- package/dist/core/WorkstreamDurableMutationService.js +184 -0
- package/dist/core/planningReferencePolicy.d.ts +14 -0
- package/dist/core/planningReferencePolicy.js +53 -0
- package/dist/core/taskReferencePolicy.js +24 -3
- package/dist/core/types.d.ts +10 -10
- package/dist/documentReviews/DocumentReviewCommentStore.d.ts +22 -2
- package/dist/documentReviews/DocumentReviewCommentStore.js +92 -8
- package/dist/documentReviews/commandService.d.ts +51 -0
- package/dist/documentReviews/commandService.js +63 -0
- package/dist/documentReviews/service.d.ts +20 -1
- package/dist/documentReviews/service.js +234 -24
- package/dist/documentReviews/types.d.ts +18 -1
- package/dist/hooks/sync/bootstrap.d.ts +3 -7
- package/dist/hooks/sync/bootstrap.js +6 -14
- package/dist/hooks/sync/browserSyncAuthority.d.ts +21 -0
- package/dist/hooks/sync/browserSyncAuthority.js +70 -0
- package/dist/hooks/sync/browserSyncRemoteServices.d.ts +29 -0
- package/dist/hooks/sync/browserSyncRemoteServices.js +58 -0
- package/dist/hooks/sync/controlPlane.d.ts +1 -37
- package/dist/hooks/sync/controlPlane.js +1 -78
- package/dist/hooks/sync/lifecyclePolicy.d.ts +1 -45
- package/dist/hooks/sync/lifecyclePolicy.js +1 -93
- package/dist/hooks/sync/orchestratorShared.d.ts +9 -3
- package/dist/hooks/sync/orchestratorShared.js +70 -96
- package/dist/hooks/sync/pullLifecycle.d.ts +1 -31
- package/dist/hooks/sync/pullLifecycle.js +1 -24
- package/dist/hooks/sync/realtime.d.ts +4 -1
- package/dist/hooks/sync/realtime.js +103 -3
- package/dist/hooks/sync/recovery.d.ts +1 -84
- package/dist/hooks/sync/recovery.js +1 -245
- package/dist/hooks/sync/transfers.d.ts +8 -129
- package/dist/hooks/sync/transfers.js +19 -581
- package/dist/hooks/sync/useDataVersionRefresh.d.ts +6 -1
- package/dist/hooks/sync/useDataVersionRefresh.js +127 -12
- package/dist/hooks/sync/useDurableLocalOutboxDrain.d.ts +14 -0
- package/dist/hooks/sync/useDurableLocalOutboxDrain.js +208 -0
- package/dist/hooks/sync/useDurableTaskCreateMutation.d.ts +15 -0
- package/dist/hooks/sync/useDurableTaskCreateMutation.js +152 -0
- package/dist/hooks/sync/useDurableTaskDeleteMutation.d.ts +11 -0
- package/dist/hooks/sync/useDurableTaskDeleteMutation.js +21 -0
- package/dist/hooks/sync/useDurableTaskLifecycleMutation.d.ts +12 -0
- package/dist/hooks/sync/useDurableTaskLifecycleMutation.js +22 -0
- package/dist/hooks/sync/useDurableTaskMetadataMutation.d.ts +14 -0
- package/dist/hooks/sync/useDurableTaskMetadataMutation.js +24 -0
- package/dist/hooks/sync/useDurableTaskRestoreMutation.d.ts +12 -0
- package/dist/hooks/sync/useDurableTaskRestoreMutation.js +24 -0
- package/dist/hooks/sync/useDurableTaskStatusMutation.d.ts +18 -0
- package/dist/hooks/sync/useDurableTaskStatusMutation.js +23 -0
- package/dist/hooks/sync/useLocalSyncCoordinatorSnapshot.d.ts +23 -0
- package/dist/hooks/sync/useLocalSyncCoordinatorSnapshot.js +414 -0
- package/dist/hooks/sync/useSyncStatusActions.d.ts +2 -1
- package/dist/hooks/sync/useSyncStatusActions.js +8 -3
- package/dist/hooks/tasks/taskHttpMutation.d.ts +25 -0
- package/dist/hooks/tasks/taskHttpMutation.js +134 -0
- package/dist/hooks/tasks/useCurrentTaskRelations.d.ts +6 -1
- package/dist/hooks/tasks/useCurrentTaskRelations.js +32 -6
- package/dist/hooks/tasks/useTaskEditorNavigation.d.ts +4 -3
- package/dist/hooks/tasks/useTaskEditorNavigation.js +9 -13
- package/dist/hooks/tasks/useTaskFormActions.d.ts +17 -2
- package/dist/hooks/tasks/useTaskFormActions.js +309 -55
- package/dist/hooks/tasks/useTaskReferenceContract.d.ts +5 -0
- package/dist/hooks/tasks/useTaskReferenceContract.js +17 -0
- package/dist/hooks/tasks/useTaskRelationships.d.ts +1 -3
- package/dist/hooks/tasks/useTaskRelationships.js +5 -25
- package/dist/hooks/tasks/useTrashSelection.d.ts +12 -0
- package/dist/hooks/tasks/useTrashSelection.js +49 -0
- package/dist/hooks/ui/useInitiativeTemplates.d.ts +24 -0
- package/dist/hooks/ui/useInitiativeTemplates.js +22 -0
- package/dist/hooks/ui/useSettingsModel.d.ts +5 -29
- package/dist/hooks/ui/useSettingsModel.js +31 -15
- package/dist/hooks/ui/useSettingsPersistence.d.ts +0 -1
- package/dist/hooks/ui/useSettingsPersistence.js +4 -8
- package/dist/hooks/ui/useSettingsTaxonomyManagement.js +31 -0
- package/dist/hooks/useFilterSort.d.ts +2 -2
- package/dist/hooks/useFilterSort.js +19 -15
- package/dist/hooks/useRealtimeSync.d.ts +10 -0
- package/dist/hooks/useRealtimeSync.js +57 -4
- package/dist/hooks/useSyncOrchestrator.d.ts +32 -1
- package/dist/hooks/useSyncOrchestrator.js +963 -287
- package/dist/hooks/useTaskData.d.ts +11 -2
- package/dist/hooks/useTaskData.js +59 -26
- package/dist/hooks/useTaskMutations.d.ts +42 -5
- package/dist/hooks/useTaskMutations.js +750 -125
- package/dist/hooks/useTaskforce.d.ts +114 -118
- package/dist/hooks/useTaskforce.js +1106 -396
- package/dist/hooks/useUiNotice.d.ts +5 -1
- package/dist/hooks/useUiNotice.js +13 -2
- package/dist/hooks/useWorkspaceSyncController.d.ts +9 -0
- package/dist/hooks/useWorkspaceSyncController.js +159 -17
- package/dist/hooks/workspace/usePersistedAppUiState.d.ts +74 -0
- package/dist/hooks/workspace/usePersistedAppUiState.js +325 -0
- package/dist/hooks/workspace/usePersistedLayoutUiState.d.ts +76 -0
- package/dist/hooks/workspace/usePersistedLayoutUiState.js +479 -0
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.d.ts +2 -7
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.js +42 -31
- package/dist/hooks/workspace/workspaceLocalState.d.ts +42 -6
- package/dist/hooks/workspace/workspaceLocalState.js +213 -5
- package/dist/hooks/workstreams/workstreamHttpMutation.d.ts +23 -0
- package/dist/hooks/workstreams/workstreamHttpMutation.js +134 -0
- package/dist/localization/locales/en-US.d.ts +3 -3
- package/dist/localization/locales/en-US.js +3 -3
- package/dist/localization/locales/es-419.js +3 -3
- package/dist/localization/locales/pt-BR.js +3 -3
- package/dist/mcp/adminWorkspaceRegistrar.js +2 -40
- package/dist/mcp/aiProfileBootstrap.d.ts +3 -0
- package/dist/mcp/aiProfileBootstrap.js +4 -0
- package/dist/mcp/canonicalAssetHelpers.d.ts +16 -4
- package/dist/mcp/canonicalAssetHelpers.js +104 -35
- package/dist/mcp/clientIntegrations.d.ts +4 -2
- package/dist/mcp/clientIntegrations.js +104 -53
- package/dist/mcp/clientRegistry.d.ts +30 -0
- package/dist/mcp/clientRegistry.js +134 -0
- package/dist/mcp/collaborationRegistrar.js +21 -7
- package/dist/mcp/documentAssetRegistrar.js +227 -107
- package/dist/mcp/documentContentCommand.d.ts +94 -0
- package/dist/mcp/documentContentCommand.js +226 -0
- package/dist/mcp/documentHelpers.d.ts +14 -59
- package/dist/mcp/documentHelpers.js +52 -61
- package/dist/mcp/durableTaskMutationRouter.d.ts +65 -0
- package/dist/mcp/durableTaskMutationRouter.js +217 -0
- package/dist/mcp/durableTaskRelationshipMutationRouter.d.ts +38 -0
- package/dist/mcp/durableTaskRelationshipMutationRouter.js +168 -0
- package/dist/mcp/durableTaskRootMutationRouter.d.ts +64 -0
- package/dist/mcp/durableTaskRootMutationRouter.js +226 -0
- package/dist/mcp/gitWorktreeRoots.d.ts +2 -0
- package/dist/mcp/gitWorktreeRoots.js +19 -0
- package/dist/mcp/legacyServer.d.ts +1 -0
- package/dist/mcp/legacyServer.js +42 -0
- package/dist/mcp/localCliHealth.d.ts +56 -0
- package/dist/mcp/localCliHealth.js +170 -0
- package/dist/mcp/localServiceProxy.d.ts +23 -0
- package/dist/mcp/localServiceProxy.js +255 -0
- package/dist/mcp/mcpInputValidator.d.ts +17 -0
- package/dist/mcp/mcpInputValidator.js +58 -0
- package/dist/mcp/planningAttachmentCommandAdapter.d.ts +127 -0
- package/dist/mcp/planningAttachmentCommandAdapter.js +188 -0
- package/dist/mcp/programScaffoldCommandAdapter.d.ts +6 -0
- package/dist/mcp/programScaffoldCommandAdapter.js +39 -0
- package/dist/mcp/proxyServer.d.ts +1 -0
- package/dist/mcp/proxyServer.js +2 -0
- package/dist/mcp/runtime.d.ts +86 -1
- package/dist/mcp/runtime.js +4562 -2270
- package/dist/mcp/server.js +29 -2
- package/dist/mcp/sharedLocalServiceGateD.d.ts +115 -0
- package/dist/mcp/sharedLocalServiceGateD.js +344 -0
- package/dist/mcp/stdioLifecycle.d.ts +22 -0
- package/dist/mcp/stdioLifecycle.js +54 -0
- package/dist/mcp/taskAttachmentCommandAdapter.d.ts +190 -0
- package/dist/mcp/taskAttachmentCommandAdapter.js +464 -0
- package/dist/mcp/taskAttachmentHelpers.d.ts +8 -6
- package/dist/mcp/taskAttachmentHelpers.js +74 -2
- package/dist/mcp/taskAttachmentTypes.d.ts +26 -5
- package/dist/mcp/taskPlanCommand.d.ts +64 -0
- package/dist/mcp/taskPlanCommand.js +98 -0
- package/dist/mcp/taskPlanningRegistrar.js +253 -101
- package/dist/mcp/toolCallCompatibility.d.ts +6 -0
- package/dist/mcp/toolCallCompatibility.js +16 -0
- package/dist/mcp/toolCatalog.d.ts +3 -1
- package/dist/mcp/toolProfiles.d.ts +18 -0
- package/dist/mcp/toolProfiles.js +79 -0
- package/dist/mcp/toolRegistry.d.ts +102 -609
- package/dist/mcp/toolRegistry.js +108 -88
- package/dist/mcp/workflowExecutionRegistrar.d.ts +2 -0
- package/dist/mcp/workflowExecutionRegistrar.js +51 -0
- package/dist/migrations/taskSchemaMigrations.d.ts +35 -0
- package/dist/migrations/taskSchemaMigrations.js +1797 -4
- package/dist/migrations/taskUpdatedAtSyncDriftMigration.d.ts +20 -0
- package/dist/migrations/taskUpdatedAtSyncDriftMigration.js +153 -0
- package/dist/migrations/taskforceAgentDefinitionMigration.d.ts +26 -0
- package/dist/migrations/taskforceAgentDefinitionMigration.js +116 -0
- package/dist/plugins/vite.js +48 -17
- package/dist/public/Taskforce_Van.webp +0 -0
- package/dist/runtime/appGateDefinitions.d.ts +16 -10
- package/dist/runtime/appGateDefinitions.js +16 -10
- package/dist/runtime/appGates.d.ts +5 -4
- package/dist/runtime/appGates.js +4 -3
- package/dist/server/aiProfileAvatarAssets.d.ts +11 -8
- package/dist/server/aiProfileAvatarAssets.js +159 -70
- package/dist/server/auth.js +15 -1
- package/dist/server/cors.d.ts +2 -1
- package/dist/server/cors.js +45 -8
- package/dist/server/email.d.ts +3 -1
- package/dist/server/email.js +46 -8
- package/dist/server/index.d.ts +24 -1
- package/dist/server/index.js +342 -46
- package/dist/server/localDataOwnerPermit.d.ts +18 -0
- package/dist/server/localDataOwnerPermit.js +58 -0
- package/dist/server/localDatabaseIdentity.d.ts +14 -0
- package/dist/server/localDatabaseIdentity.js +69 -0
- package/dist/server/localRealtimeFileInvalidation.d.ts +1 -0
- package/dist/server/localRealtimeFileInvalidation.js +7 -0
- package/dist/server/localServiceLease.d.ts +62 -0
- package/dist/server/localServiceLease.js +477 -0
- package/dist/server/localServiceOwnershipBootstrap.d.ts +19 -0
- package/dist/server/localServiceOwnershipBootstrap.js +84 -0
- package/dist/server/localServiceSessions.d.ts +87 -0
- package/dist/server/localServiceSessions.js +309 -0
- package/dist/server/localServiceWindowsAcl.d.ts +8 -0
- package/dist/server/localServiceWindowsAcl.js +60 -0
- package/dist/server/localSyncProcessLockBootstrap.d.ts +3 -0
- package/dist/server/localSyncProcessLockBootstrap.js +16 -0
- package/dist/server/localWorkspaceSyncServerComposition.d.ts +59 -0
- package/dist/server/localWorkspaceSyncServerComposition.js +91 -0
- package/dist/server/localWorkspaceSyncServerRuntime.d.ts +119 -0
- package/dist/server/localWorkspaceSyncServerRuntime.js +1163 -0
- package/dist/server/rateLimit.d.ts +1 -0
- package/dist/server/rateLimit.js +16 -0
- package/dist/server/routes/admin.d.ts +2 -4
- package/dist/server/routes/admin.js +199 -337
- package/dist/server/routes/agentRoles.d.ts +13 -0
- package/dist/server/routes/agentRoles.js +273 -0
- package/dist/server/routes/agentSkills.d.ts +16 -0
- package/dist/server/routes/agentSkills.js +291 -0
- package/dist/server/routes/agents.d.ts +49 -0
- package/dist/server/routes/agents.js +1455 -0
- package/dist/server/routes/annotatedAttachments.js +46 -9
- package/dist/server/routes/assetAccess.d.ts +36 -0
- package/dist/server/routes/assetAccess.js +93 -0
- package/dist/server/routes/auth.d.ts +4 -3
- package/dist/server/routes/auth.js +236 -21
- package/dist/server/routes/authSupport.d.ts +3 -1
- package/dist/server/routes/authSupport.js +22 -8
- package/dist/server/routes/documentReviews.d.ts +2 -0
- package/dist/server/routes/documentReviews.js +155 -15
- package/dist/server/routes/documents.d.ts +1 -0
- package/dist/server/routes/documents.js +335 -141
- package/dist/server/routes/durableTaskHttpRouters.d.ts +165 -0
- package/dist/server/routes/durableTaskHttpRouters.js +89 -0
- package/dist/server/routes/localMcpHealth.d.ts +11 -0
- package/dist/server/routes/localMcpHealth.js +29 -0
- package/dist/server/routes/localService.d.ts +13 -0
- package/dist/server/routes/localService.js +444 -0
- package/dist/server/routes/localUpdate.d.ts +11 -0
- package/dist/server/routes/localUpdate.js +154 -0
- package/dist/server/routes/primitives.d.ts +27 -0
- package/dist/server/routes/primitives.js +18 -0
- package/dist/server/routes/resources.d.ts +1 -10
- package/dist/server/routes/resources.js +1 -153
- package/dist/server/routes/shared.d.ts +31 -2
- package/dist/server/routes/shared.js +394 -0
- package/dist/server/routes/sync.d.ts +2 -0
- package/dist/server/routes/sync.js +184 -272
- package/dist/server/routes/syncAuxRoutes.d.ts +3 -1
- package/dist/server/routes/syncAuxRoutes.js +9 -4
- package/dist/server/routes/syncCoordinatorLocalRoutes.d.ts +6 -0
- package/dist/server/routes/syncCoordinatorLocalRoutes.js +867 -0
- package/dist/server/routes/syncPullApplyRoutes.d.ts +29 -1
- package/dist/server/routes/syncPullApplyRoutes.js +520 -17
- package/dist/server/routes/syncPushRoutes.d.ts +33 -4
- package/dist/server/routes/syncPushRoutes.js +251 -62
- package/dist/server/routes/syncRouteTypes.d.ts +1 -1
- package/dist/server/routes/syncSnapshotRoutes.d.ts +15 -7
- package/dist/server/routes/syncSnapshotRoutes.js +95 -17
- package/dist/server/routes/syncV3DiagnosticsRoutes.d.ts +14 -0
- package/dist/server/routes/syncV3DiagnosticsRoutes.js +72 -0
- package/dist/server/routes/syncV3FeedRoutes.d.ts +20 -0
- package/dist/server/routes/syncV3FeedRoutes.js +462 -0
- package/dist/server/routes/syncV3LocalCaptureRoutes.d.ts +37 -0
- package/dist/server/routes/syncV3LocalCaptureRoutes.js +897 -0
- package/dist/server/routes/syncV3LocalDispatchRoutes.d.ts +17 -0
- package/dist/server/routes/syncV3LocalDispatchRoutes.js +280 -0
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.d.ts +17 -0
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.js +493 -0
- package/dist/server/routes/syncV3LocalOwnershipRoutes.d.ts +10 -0
- package/dist/server/routes/syncV3LocalOwnershipRoutes.js +51 -0
- package/dist/server/routes/syncV3LocalRecoveryRoutes.d.ts +12 -0
- package/dist/server/routes/syncV3LocalRecoveryRoutes.js +78 -0
- package/dist/server/routes/syncV3OperationRoutes.d.ts +35 -0
- package/dist/server/routes/syncV3OperationRoutes.js +1136 -0
- package/dist/server/routes/tasks.d.ts +0 -2
- package/dist/server/routes/tasks.js +932 -195
- package/dist/server/routes/workflows.d.ts +26 -0
- package/dist/server/routes/workflows.js +500 -0
- package/dist/server/routes.d.ts +1 -6
- package/dist/server/routes.js +148 -339
- package/dist/server/smtpTransport.d.ts +11 -3
- package/dist/server/smtpTransport.js +9 -2
- package/dist/server/start.js +42 -10
- package/dist/service/localServiceCli.d.ts +33 -0
- package/dist/service/localServiceCli.js +365 -0
- package/dist/service/localServiceClientLifecycle.d.ts +25 -0
- package/dist/service/localServiceClientLifecycle.js +128 -0
- package/dist/service/localServiceOpen.d.ts +17 -0
- package/dist/service/localServiceOpen.js +27 -0
- package/dist/services/agentRoleResolver.d.ts +4 -0
- package/dist/services/agentRoleResolver.js +7 -0
- package/dist/services/aiProfileAvatarGenerationService.d.ts +41 -0
- package/dist/services/aiProfileAvatarGenerationService.js +158 -0
- package/dist/services/avatarImageProvider.d.ts +33 -0
- package/dist/services/avatarImageProvider.js +140 -0
- package/dist/services/bedrockAnthropicMessagesModelGateway.d.ts +24 -0
- package/dist/services/bedrockAnthropicMessagesModelGateway.js +95 -0
- package/dist/services/bedrockMantleModelGateway.d.ts +43 -0
- package/dist/services/bedrockMantleModelGateway.js +81 -0
- package/dist/services/bedrockModelGateway.d.ts +26 -0
- package/dist/services/bedrockModelGateway.js +94 -0
- package/dist/services/modelGateway.d.ts +82 -0
- package/dist/services/modelGateway.js +61 -0
- package/dist/services/taskforceAgentAvatarImageProvider.d.ts +8 -0
- package/dist/services/taskforceAgentAvatarImageProvider.js +24 -0
- package/dist/services/taskforceAgentMcpBridge.d.ts +77 -0
- package/dist/services/taskforceAgentMcpBridge.js +527 -0
- package/dist/shared/agentRoleDefinition.d.ts +34 -0
- package/dist/shared/agentRoleDefinition.js +207 -0
- package/dist/shared/aiProfileAvatarEligibility.d.ts +10 -0
- package/dist/shared/aiProfileAvatarEligibility.js +27 -0
- package/dist/shared/aiProfileColors.d.ts +7 -0
- package/dist/shared/aiProfileColors.js +33 -0
- package/dist/shared/colorPalette.d.ts +3 -0
- package/dist/shared/colorPalette.js +20 -0
- package/dist/shared/commentProvenance.d.ts +4 -0
- package/dist/shared/commentProvenance.js +6 -0
- package/dist/shared/deletedTaskRetention.d.ts +2 -0
- package/dist/shared/deletedTaskRetention.js +7 -0
- package/dist/shared/passwordPolicy.d.ts +2 -1
- package/dist/shared/passwordPolicy.js +9 -0
- package/dist/shared/taskDeepLinks.d.ts +28 -0
- package/dist/shared/taskDeepLinks.js +48 -0
- package/dist/shared/taskRestoreDestination.d.ts +2 -0
- package/dist/shared/taskRestoreDestination.js +5 -0
- package/dist/shared/taskforceAgentDefinition.d.ts +88 -0
- package/dist/shared/taskforceAgentDefinition.js +434 -0
- package/dist/shared/taskforceAgentExecutionSnapshot.d.ts +50 -0
- package/dist/shared/taskforceAgentExecutionSnapshot.js +68 -0
- package/dist/shared/taskforceAgentModels.d.ts +56 -0
- package/dist/shared/taskforceAgentModels.js +314 -0
- package/dist/shared/taskforceAgentRunContext.d.ts +23 -0
- package/dist/shared/taskforceAgentRunContext.js +21 -0
- package/dist/shared/taskforceAgentRuntimeResolution.d.ts +31 -0
- package/dist/shared/taskforceAgentRuntimeResolution.js +72 -0
- package/dist/shared/taskforceAgentSkill.d.ts +33 -0
- package/dist/shared/taskforceAgentSkill.js +149 -0
- package/dist/shared/taxonomyLibrary.js +1 -1
- package/dist/storage/agentRoleStore.d.ts +91 -0
- package/dist/storage/agentRoleStore.js +385 -0
- package/dist/storage/databaseAdapter.d.ts +1 -0
- package/dist/storage/databaseAdapter.js +7 -1
- package/dist/storage/documentIntegrity.d.ts +12 -3
- package/dist/storage/documentIntegrity.js +105 -27
- package/dist/storage/objectStorageClient.d.ts +10 -4
- package/dist/storage/objectStorageClient.js +73 -43
- package/dist/storage/postgresAdapter.d.ts +2 -1
- package/dist/storage/postgresAdapter.js +38 -6
- package/dist/storage/postgresWorker.js +65 -1
- package/dist/storage/sqliteAdapter.d.ts +1 -1
- package/dist/storage/sqliteAdapter.js +7 -1
- package/dist/storage/sqliteWalHealth.d.ts +71 -0
- package/dist/storage/sqliteWalHealth.js +176 -0
- package/dist/storage/taskDataPath.d.ts +1 -0
- package/dist/storage/taskDataPath.js +20 -0
- package/dist/storage/taskforceAgentConversationStore.d.ts +66 -0
- package/dist/storage/taskforceAgentConversationStore.js +264 -0
- package/dist/storage/taskforceAgentSkillStore.d.ts +93 -0
- package/dist/storage/taskforceAgentSkillStore.js +355 -0
- package/dist/storage/taskforceAgentStore.d.ts +105 -0
- package/dist/storage/taskforceAgentStore.js +549 -0
- package/dist/storage/workflowStore.d.ts +223 -0
- package/dist/storage/workflowStore.js +1032 -0
- package/dist/storage/workspaceAssetStore.d.ts +70 -0
- package/dist/storage/workspaceAssetStore.js +418 -25
- package/dist/sync/aiProfileAvatarSyncPaths.d.ts +14 -0
- package/dist/sync/aiProfileAvatarSyncPaths.js +56 -0
- package/dist/sync/cloudSyncApi.d.ts +329 -0
- package/dist/sync/cloudSyncApi.js +596 -4
- package/dist/sync/collaborationSyncPayload.d.ts +5 -1
- package/dist/sync/collaborationSyncPayload.js +213 -1
- package/dist/sync/collaborationSyncState.d.ts +23 -3
- package/dist/sync/collaborationSyncState.js +92 -3
- package/dist/sync/contentSyncPayload.d.ts +9 -0
- package/dist/sync/contentSyncPayload.js +29 -0
- package/dist/sync/contentSyncState.d.ts +79 -4
- package/dist/sync/contentSyncState.js +1113 -313
- package/dist/sync/coordinator/localSyncBrowserApplyPermitContext.d.ts +39 -0
- package/dist/sync/coordinator/localSyncBrowserApplyPermitContext.js +234 -0
- package/dist/sync/coordinator/localSyncBrowserAuthorityCapability.d.ts +7 -0
- package/dist/sync/coordinator/localSyncBrowserAuthorityCapability.js +10 -0
- package/dist/sync/coordinator/localSyncCommittedApplyPolicy.d.ts +7 -0
- package/dist/sync/coordinator/localSyncCommittedApplyPolicy.js +41 -0
- package/dist/sync/coordinator/localSyncCoordinatorBrowserClient.d.ts +178 -0
- package/dist/sync/coordinator/localSyncCoordinatorBrowserClient.js +131 -0
- package/dist/sync/coordinator/localSyncCoordinatorCommandLifecycle.d.ts +25 -0
- package/dist/sync/coordinator/localSyncCoordinatorCommandLifecycle.js +200 -0
- package/dist/sync/coordinator/localSyncCoordinatorHost.d.ts +84 -0
- package/dist/sync/coordinator/localSyncCoordinatorHost.js +435 -0
- package/dist/sync/coordinator/localSyncCoordinatorRouteServices.d.ts +33 -0
- package/dist/sync/coordinator/localSyncCoordinatorRouteServices.js +1 -0
- package/dist/sync/coordinator/localSyncCoordinatorStore.d.ts +122 -0
- package/dist/sync/coordinator/localSyncCoordinatorStore.js +1039 -0
- package/dist/sync/coordinator/localSyncCoordinatorTypes.d.ts +82 -0
- package/dist/sync/coordinator/localSyncCoordinatorTypes.js +9 -0
- package/dist/sync/coordinator/localSyncDispatchTracker.d.ts +15 -0
- package/dist/sync/coordinator/localSyncDispatchTracker.js +68 -0
- package/dist/sync/coordinator/localSyncExecutionPermitStore.d.ts +200 -0
- package/dist/sync/coordinator/localSyncExecutionPermitStore.js +1388 -0
- package/dist/sync/coordinator/localSyncExecutionPermitTypes.d.ts +52 -0
- package/dist/sync/coordinator/localSyncExecutionPermitTypes.js +8 -0
- package/dist/sync/coordinator/localSyncOwnershipDrainBarrier.d.ts +33 -0
- package/dist/sync/coordinator/localSyncOwnershipDrainBarrier.js +83 -0
- package/dist/sync/coordinator/localSyncPermitTransactionHooks.d.ts +9 -0
- package/dist/sync/coordinator/localSyncPermitTransactionHooks.js +27 -0
- package/dist/sync/coordinator/localSyncProcessLock.d.ts +12 -0
- package/dist/sync/coordinator/localSyncProcessLock.js +212 -0
- package/dist/sync/coordinator/localSyncV3DispatchRecoveryReconciler.d.ts +17 -0
- package/dist/sync/coordinator/localSyncV3DispatchRecoveryReconciler.js +82 -0
- package/dist/sync/coordinator/localWorkspaceSyncRunner.d.ts +134 -0
- package/dist/sync/coordinator/localWorkspaceSyncRunner.js +981 -0
- package/dist/sync/coordinator/localWorkspaceSyncRunnerState.d.ts +189 -0
- package/dist/sync/coordinator/localWorkspaceSyncRunnerState.js +961 -0
- package/dist/sync/coordinator/workspaceSyncCloudCredentialValidator.d.ts +19 -0
- package/dist/sync/coordinator/workspaceSyncCloudCredentialValidator.js +83 -0
- package/dist/sync/coordinator/workspaceSyncCredentialBroker.d.ts +117 -0
- package/dist/sync/coordinator/workspaceSyncCredentialBroker.js +323 -0
- package/dist/sync/coordinator/workspaceSyncLocalAccessBootstrap.d.ts +11 -0
- package/dist/sync/coordinator/workspaceSyncLocalAccessBootstrap.js +51 -0
- package/dist/sync/coordinator/workspaceSyncTransportGateway.d.ts +139 -0
- package/dist/sync/coordinator/workspaceSyncTransportGateway.js +738 -0
- package/dist/sync/engine/localWorkspaceContentManifestService.d.ts +21 -0
- package/dist/sync/engine/localWorkspaceContentManifestService.js +44 -0
- package/dist/sync/engine/workspaceSyncAtomicLocalPublisher.d.ts +36 -0
- package/dist/sync/engine/workspaceSyncAtomicLocalPublisher.js +203 -0
- package/dist/sync/engine/workspaceSyncContentLifecycleAdapter.d.ts +21 -0
- package/dist/sync/engine/workspaceSyncContentLifecycleAdapter.js +13 -0
- package/dist/sync/engine/workspaceSyncContentPullObligationStore.d.ts +65 -0
- package/dist/sync/engine/workspaceSyncContentPullObligationStore.js +160 -0
- package/dist/sync/engine/workspaceSyncContentVersionStore.d.ts +216 -0
- package/dist/sync/engine/workspaceSyncContentVersionStore.js +1068 -0
- package/dist/sync/engine/workspaceSyncEngineBrowserGatewayRemoteServices.d.ts +28 -0
- package/dist/sync/engine/workspaceSyncEngineBrowserGatewayRemoteServices.js +543 -0
- package/dist/sync/engine/workspaceSyncEngineContracts.d.ts +78 -0
- package/dist/sync/engine/workspaceSyncEngineContracts.js +1 -0
- package/dist/sync/engine/workspaceSyncEngineControlPlane.d.ts +37 -0
- package/dist/sync/engine/workspaceSyncEngineControlPlane.js +79 -0
- package/dist/sync/engine/workspaceSyncEngineIdentity.d.ts +1 -0
- package/dist/sync/engine/workspaceSyncEngineIdentity.js +4 -0
- package/dist/sync/engine/workspaceSyncEngineLifecyclePolicy.d.ts +68 -0
- package/dist/sync/engine/workspaceSyncEngineLifecyclePolicy.js +180 -0
- package/dist/sync/engine/workspaceSyncEngineLocalApply.d.ts +72 -0
- package/dist/sync/engine/workspaceSyncEngineLocalApply.js +132 -0
- package/dist/sync/engine/workspaceSyncEngineLocalServices.d.ts +70 -0
- package/dist/sync/engine/workspaceSyncEngineLocalServices.js +25 -0
- package/dist/sync/engine/workspaceSyncEngineParity.d.ts +8 -0
- package/dist/sync/engine/workspaceSyncEngineParity.js +7 -0
- package/dist/sync/engine/workspaceSyncEnginePullPolicy.d.ts +32 -0
- package/dist/sync/engine/workspaceSyncEnginePullPolicy.js +27 -0
- package/dist/sync/engine/workspaceSyncEnginePushCompletion.d.ts +20 -0
- package/dist/sync/engine/workspaceSyncEnginePushCompletion.js +87 -0
- package/dist/sync/engine/workspaceSyncEngineRecovery.d.ts +56 -0
- package/dist/sync/engine/workspaceSyncEngineRecovery.js +288 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.d.ts +104 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.js +21 -0
- package/dist/sync/engine/workspaceSyncEngineRuntime.d.ts +61 -0
- package/dist/sync/engine/workspaceSyncEngineRuntime.js +59 -0
- package/dist/sync/engine/workspaceSyncEngineServerApplyBoundary.d.ts +28 -0
- package/dist/sync/engine/workspaceSyncEngineServerApplyBoundary.js +86 -0
- package/dist/sync/engine/workspaceSyncEngineServerLocalServices.d.ts +73 -0
- package/dist/sync/engine/workspaceSyncEngineServerLocalServices.js +452 -0
- package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.d.ts +23 -0
- package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.js +451 -0
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.d.ts +125 -0
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.js +1124 -0
- package/dist/sync/engine/workspaceSyncEngineServerSnapshotReader.d.ts +63 -0
- package/dist/sync/engine/workspaceSyncEngineServerSnapshotReader.js +276 -0
- package/dist/sync/engine/workspaceSyncEngineTransferCompletion.d.ts +20 -0
- package/dist/sync/engine/workspaceSyncEngineTransferCompletion.js +37 -0
- package/dist/sync/engine/workspaceSyncEngineTransferTypes.d.ts +7 -0
- package/dist/sync/engine/workspaceSyncEngineTransferTypes.js +1 -0
- package/dist/sync/engine/workspaceSyncEngineTransfers.d.ts +240 -0
- package/dist/sync/engine/workspaceSyncEngineTransfers.js +1184 -0
- package/dist/sync/engine/workspaceSyncEngineV3LocalFeedApply.d.ts +39 -0
- package/dist/sync/engine/workspaceSyncEngineV3LocalFeedApply.js +39 -0
- package/dist/sync/engine/workspaceSyncImmutableContentGcRunner.d.ts +25 -0
- package/dist/sync/engine/workspaceSyncImmutableContentGcRunner.js +83 -0
- package/dist/sync/engine/workspaceSyncImmutableContentProvider.d.ts +71 -0
- package/dist/sync/engine/workspaceSyncImmutableContentProvider.js +209 -0
- package/dist/sync/engine/workspaceSyncImmutableContentStager.d.ts +32 -0
- package/dist/sync/engine/workspaceSyncImmutableContentStager.js +202 -0
- package/dist/sync/engine/workspaceSyncPublishedContentResolver.d.ts +43 -0
- package/dist/sync/engine/workspaceSyncPublishedContentResolver.js +142 -0
- package/dist/sync/engine/workspaceSyncServerContentRuntime.d.ts +26 -0
- package/dist/sync/engine/workspaceSyncServerContentRuntime.js +41 -0
- package/dist/sync/engine/workspaceSyncServerDataServices.d.ts +44 -0
- package/dist/sync/engine/workspaceSyncServerDataServices.js +143 -0
- package/dist/sync/engine/workspaceSyncTransferEvidence.d.ts +39 -0
- package/dist/sync/engine/workspaceSyncTransferEvidence.js +45 -0
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.d.ts +44 -0
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.js +990 -0
- package/dist/sync/engine/workspaceSyncV2PreparedContent.d.ts +82 -0
- package/dist/sync/engine/workspaceSyncV2PreparedContent.js +219 -0
- package/dist/sync/planningCanonicalFields.d.ts +41 -0
- package/dist/sync/planningCanonicalFields.js +211 -0
- package/dist/sync/planningSyncPayload.d.ts +5 -1
- package/dist/sync/planningSyncPayload.js +88 -4
- package/dist/sync/syncApplyHandlers.d.ts +98 -8
- package/dist/sync/syncApplyHandlers.js +816 -78
- package/dist/sync/syncResourceAdapters.d.ts +10 -0
- package/dist/sync/syncResourceAdapters.js +21 -1
- package/dist/sync/syncService.d.ts +57 -1
- package/dist/sync/syncService.js +1085 -138
- package/dist/sync/taskNestedContent.d.ts +2 -0
- package/dist/sync/taskNestedContent.js +8 -0
- package/dist/sync/taskSyncChangeKey.js +0 -1
- package/dist/sync/taskSyncPayload.d.ts +0 -1
- package/dist/sync/taskSyncPayload.js +14 -3
- package/dist/sync/v3/canonicalWorkspaceSyncJson.d.ts +2 -0
- package/dist/sync/v3/canonicalWorkspaceSyncJson.js +26 -0
- package/dist/sync/v3/combinedFeedCapability.d.ts +21 -0
- package/dist/sync/v3/combinedFeedCapability.js +80 -0
- package/dist/sync/v3/combinedFeedPrerequisites.d.ts +18 -0
- package/dist/sync/v3/combinedFeedPrerequisites.js +184 -0
- package/dist/sync/v3/durableInitiativeMutationRouter.d.ts +61 -0
- package/dist/sync/v3/durableInitiativeMutationRouter.js +287 -0
- package/dist/sync/v3/durableOperationReplay.d.ts +36 -0
- package/dist/sync/v3/durableOperationReplay.js +103 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.d.ts +49 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.js +198 -0
- package/dist/sync/v3/durableTaskChecklistMutationRouter.d.ts +47 -0
- package/dist/sync/v3/durableTaskChecklistMutationRouter.js +182 -0
- package/dist/sync/v3/durableTaskCommentMutationRouter.d.ts +47 -0
- package/dist/sync/v3/durableTaskCommentMutationRouter.js +191 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.d.ts +60 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.js +320 -0
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.d.ts +40 -0
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.js +518 -0
- package/dist/sync/v3/durableTaxonomyMutationRouter.d.ts +63 -0
- package/dist/sync/v3/durableTaxonomyMutationRouter.js +289 -0
- package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.d.ts +77 -0
- package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.js +361 -0
- package/dist/sync/v3/durableWorkstreamMutationRouter.d.ts +61 -0
- package/dist/sync/v3/durableWorkstreamMutationRouter.js +287 -0
- package/dist/sync/v3/durableWorkstreamTaskOrderMutationRouter.d.ts +42 -0
- package/dist/sync/v3/durableWorkstreamTaskOrderMutationRouter.js +122 -0
- package/dist/sync/v3/entityEventLegacyAdoptionContract.d.ts +6 -0
- package/dist/sync/v3/entityEventLegacyAdoptionContract.js +6 -0
- package/dist/sync/v3/entityEventLegacyAdoptionService.d.ts +62 -0
- package/dist/sync/v3/entityEventLegacyAdoptionService.js +180 -0
- package/dist/sync/v3/initiativeActivityAuthoritativeRevision.d.ts +11 -0
- package/dist/sync/v3/initiativeActivityAuthoritativeRevision.js +23 -0
- package/dist/sync/v3/initiativeActivityIdentity.d.ts +8 -0
- package/dist/sync/v3/initiativeActivityIdentity.js +14 -0
- package/dist/sync/v3/initiativeCoexistence.d.ts +26 -0
- package/dist/sync/v3/initiativeCoexistence.js +148 -0
- package/dist/sync/v3/initiativeFeedActivationCapability.d.ts +6 -0
- package/dist/sync/v3/initiativeFeedActivationCapability.js +16 -0
- package/dist/sync/v3/initiativeMutationPayload.d.ts +26 -0
- package/dist/sync/v3/initiativeMutationPayload.js +144 -0
- package/dist/sync/v3/initiativeMutationService.d.ts +62 -0
- package/dist/sync/v3/initiativeMutationService.js +206 -0
- package/dist/sync/v3/localEntityEventLegacyAdoption.d.ts +31 -0
- package/dist/sync/v3/localEntityEventLegacyAdoption.js +607 -0
- package/dist/sync/v3/localInitiativeOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localInitiativeOutboxHandler.js +88 -0
- package/dist/sync/v3/localInitiativeOutboxService.d.ts +50 -0
- package/dist/sync/v3/localInitiativeOutboxService.js +495 -0
- package/dist/sync/v3/localOperationIdentityStore.d.ts +81 -0
- package/dist/sync/v3/localOperationIdentityStore.js +388 -0
- package/dist/sync/v3/localOutboxDispatchCapability.d.ts +7 -0
- package/dist/sync/v3/localOutboxDispatchCapability.js +13 -0
- package/dist/sync/v3/localOutboxDispatchRuntime.d.ts +16 -0
- package/dist/sync/v3/localOutboxDispatchRuntime.js +269 -0
- package/dist/sync/v3/localOutboxDispatcher.d.ts +53 -0
- package/dist/sync/v3/localOutboxDispatcher.js +362 -0
- package/dist/sync/v3/localOutboxDrainClient.d.ts +50 -0
- package/dist/sync/v3/localOutboxDrainClient.js +250 -0
- package/dist/sync/v3/localOutboxOperationHandler.d.ts +31 -0
- package/dist/sync/v3/localOutboxOperationHandler.js +10 -0
- package/dist/sync/v3/localOutboxRecoveryClient.d.ts +14 -0
- package/dist/sync/v3/localOutboxRecoveryClient.js +45 -0
- package/dist/sync/v3/localOutboxRecoveryPreparationService.d.ts +12 -0
- package/dist/sync/v3/localOutboxRecoveryPreparationService.js +151 -0
- package/dist/sync/v3/localSyncIdentityStore.d.ts +9 -0
- package/dist/sync/v3/localSyncIdentityStore.js +43 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxHandler.d.ts +10 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxHandler.js +70 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.d.ts +45 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.js +291 -0
- package/dist/sync/v3/localTaskChecklistOutboxHandler.d.ts +10 -0
- package/dist/sync/v3/localTaskChecklistOutboxHandler.js +54 -0
- package/dist/sync/v3/localTaskChecklistOutboxService.d.ts +47 -0
- package/dist/sync/v3/localTaskChecklistOutboxService.js +221 -0
- package/dist/sync/v3/localTaskCommentOutboxHandler.d.ts +10 -0
- package/dist/sync/v3/localTaskCommentOutboxHandler.js +94 -0
- package/dist/sync/v3/localTaskCommentOutboxService.d.ts +75 -0
- package/dist/sync/v3/localTaskCommentOutboxService.js +391 -0
- package/dist/sync/v3/localTaskCreateClient.d.ts +27 -0
- package/dist/sync/v3/localTaskCreateClient.js +209 -0
- package/dist/sync/v3/localTaskCreateOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskCreateOutboxHandler.js +147 -0
- package/dist/sync/v3/localTaskCreateOutboxService.d.ts +77 -0
- package/dist/sync/v3/localTaskCreateOutboxService.js +397 -0
- package/dist/sync/v3/localTaskDeleteClient.d.ts +10 -0
- package/dist/sync/v3/localTaskDeleteClient.js +23 -0
- package/dist/sync/v3/localTaskDeleteOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskDeleteOutboxHandler.js +54 -0
- package/dist/sync/v3/localTaskDeleteOutboxService.d.ts +38 -0
- package/dist/sync/v3/localTaskDeleteOutboxService.js +235 -0
- package/dist/sync/v3/localTaskLegacyRootAdoption.d.ts +28 -0
- package/dist/sync/v3/localTaskLegacyRootAdoption.js +219 -0
- package/dist/sync/v3/localTaskLifecycleClient.d.ts +49 -0
- package/dist/sync/v3/localTaskLifecycleClient.js +57 -0
- package/dist/sync/v3/localTaskLifecycleOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskLifecycleOutboxHandler.js +94 -0
- package/dist/sync/v3/localTaskLifecycleOutboxService.d.ts +60 -0
- package/dist/sync/v3/localTaskLifecycleOutboxService.js +304 -0
- package/dist/sync/v3/localTaskMetadataClient.d.ts +13 -0
- package/dist/sync/v3/localTaskMetadataClient.js +30 -0
- package/dist/sync/v3/localTaskMetadataOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskMetadataOutboxHandler.js +70 -0
- package/dist/sync/v3/localTaskMetadataOutboxService.d.ts +48 -0
- package/dist/sync/v3/localTaskMetadataOutboxService.js +229 -0
- package/dist/sync/v3/localTaskOperationClient.d.ts +72 -0
- package/dist/sync/v3/localTaskOperationClient.js +195 -0
- package/dist/sync/v3/localTaskRelationshipOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskRelationshipOutboxHandler.js +114 -0
- package/dist/sync/v3/localTaskRelationshipOutboxService.d.ts +45 -0
- package/dist/sync/v3/localTaskRelationshipOutboxService.js +192 -0
- package/dist/sync/v3/localTaskRestoreClient.d.ts +13 -0
- package/dist/sync/v3/localTaskRestoreClient.js +32 -0
- package/dist/sync/v3/localTaskRestoreOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskRestoreOutboxHandler.js +41 -0
- package/dist/sync/v3/localTaskRestoreOutboxService.d.ts +56 -0
- package/dist/sync/v3/localTaskRestoreOutboxService.js +323 -0
- package/dist/sync/v3/localTaskStatusClient.d.ts +17 -0
- package/dist/sync/v3/localTaskStatusClient.js +35 -0
- package/dist/sync/v3/localTaskStatusOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localTaskStatusOutboxHandler.js +75 -0
- package/dist/sync/v3/localTaskStatusOutboxService.d.ts +53 -0
- package/dist/sync/v3/localTaskStatusOutboxService.js +422 -0
- package/dist/sync/v3/localTaxonomyCompositeOutboxService.d.ts +34 -0
- package/dist/sync/v3/localTaxonomyCompositeOutboxService.js +290 -0
- package/dist/sync/v3/localTaxonomyOutboxHandler.d.ts +9 -0
- package/dist/sync/v3/localTaxonomyOutboxHandler.js +106 -0
- package/dist/sync/v3/localTaxonomyOutboxService.d.ts +30 -0
- package/dist/sync/v3/localTaxonomyOutboxService.js +181 -0
- package/dist/sync/v3/localWorkflowRuntimeOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localWorkflowRuntimeOutboxHandler.js +113 -0
- package/dist/sync/v3/localWorkflowRuntimeOutboxService.d.ts +37 -0
- package/dist/sync/v3/localWorkflowRuntimeOutboxService.js +330 -0
- package/dist/sync/v3/localWorkspaceSyncServerOutboxDispatcher.d.ts +63 -0
- package/dist/sync/v3/localWorkspaceSyncServerOutboxDispatcher.js +264 -0
- package/dist/sync/v3/localWorkstreamOutboxHandler.d.ts +8 -0
- package/dist/sync/v3/localWorkstreamOutboxHandler.js +102 -0
- package/dist/sync/v3/localWorkstreamOutboxService.d.ts +52 -0
- package/dist/sync/v3/localWorkstreamOutboxService.js +579 -0
- package/dist/sync/v3/localWorkstreamTaskOrderOutboxHandler.d.ts +10 -0
- package/dist/sync/v3/localWorkstreamTaskOrderOutboxHandler.js +57 -0
- package/dist/sync/v3/localWorkstreamTaskOrderOutboxService.d.ts +30 -0
- package/dist/sync/v3/localWorkstreamTaskOrderOutboxService.js +128 -0
- package/dist/sync/v3/planningActivation.d.ts +13 -0
- package/dist/sync/v3/planningActivation.js +33 -0
- package/dist/sync/v3/planningAttachmentActivityValidation.d.ts +9 -0
- package/dist/sync/v3/planningAttachmentActivityValidation.js +87 -0
- package/dist/sync/v3/programScaffoldService.d.ts +143 -0
- package/dist/sync/v3/programScaffoldService.js +478 -0
- package/dist/sync/v3/syncDurabilityStore.d.ts +773 -0
- package/dist/sync/v3/syncDurabilityStore.js +4635 -0
- package/dist/sync/v3/taskActivityAuthoritativeRevision.d.ts +16 -0
- package/dist/sync/v3/taskActivityAuthoritativeRevision.js +67 -0
- package/dist/sync/v3/taskActivityJournal.d.ts +20 -0
- package/dist/sync/v3/taskActivityJournal.js +195 -0
- package/dist/sync/v3/taskAttachmentLinksActivityIdentity.d.ts +6 -0
- package/dist/sync/v3/taskAttachmentLinksActivityIdentity.js +14 -0
- package/dist/sync/v3/taskAttachmentLinksMutationService.d.ts +111 -0
- package/dist/sync/v3/taskAttachmentLinksMutationService.js +202 -0
- package/dist/sync/v3/taskChecklistActivityIdentity.d.ts +6 -0
- package/dist/sync/v3/taskChecklistActivityIdentity.js +14 -0
- package/dist/sync/v3/taskChecklistMutationService.d.ts +92 -0
- package/dist/sync/v3/taskChecklistMutationService.js +156 -0
- package/dist/sync/v3/taskCommentActivityIdentity.d.ts +7 -0
- package/dist/sync/v3/taskCommentActivityIdentity.js +15 -0
- package/dist/sync/v3/taskCommentMutationService.d.ts +150 -0
- package/dist/sync/v3/taskCommentMutationService.js +392 -0
- package/dist/sync/v3/taskCommentReconcileProvenance.d.ts +58 -0
- package/dist/sync/v3/taskCommentReconcileProvenance.js +170 -0
- package/dist/sync/v3/taskCreateActivation.d.ts +19 -0
- package/dist/sync/v3/taskCreateActivation.js +84 -0
- package/dist/sync/v3/taskCreateActivityIdentity.d.ts +7 -0
- package/dist/sync/v3/taskCreateActivityIdentity.js +18 -0
- package/dist/sync/v3/taskCreateMutationService.d.ts +103 -0
- package/dist/sync/v3/taskCreateMutationService.js +283 -0
- package/dist/sync/v3/taskDeleteActivation.d.ts +7 -0
- package/dist/sync/v3/taskDeleteActivation.js +14 -0
- package/dist/sync/v3/taskDeleteMutationService.d.ts +35 -0
- package/dist/sync/v3/taskDeleteMutationService.js +133 -0
- package/dist/sync/v3/taskLegacyRootAdoptionService.d.ts +78 -0
- package/dist/sync/v3/taskLegacyRootAdoptionService.js +175 -0
- package/dist/sync/v3/taskLifecycleActivityIdentity.d.ts +9 -0
- package/dist/sync/v3/taskLifecycleActivityIdentity.js +18 -0
- package/dist/sync/v3/taskLifecycleMutationPayload.d.ts +5 -0
- package/dist/sync/v3/taskLifecycleMutationPayload.js +28 -0
- package/dist/sync/v3/taskLifecycleMutationService.d.ts +66 -0
- package/dist/sync/v3/taskLifecycleMutationService.js +92 -0
- package/dist/sync/v3/taskMetadataActivation.d.ts +12 -0
- package/dist/sync/v3/taskMetadataActivation.js +38 -0
- package/dist/sync/v3/taskMetadataActivityIdentity.d.ts +7 -0
- package/dist/sync/v3/taskMetadataActivityIdentity.js +18 -0
- package/dist/sync/v3/taskMetadataCoexistence.d.ts +37 -0
- package/dist/sync/v3/taskMetadataCoexistence.js +134 -0
- package/dist/sync/v3/taskMetadataMutationService.d.ts +71 -0
- package/dist/sync/v3/taskMetadataMutationService.js +199 -0
- package/dist/sync/v3/taskRelationshipLegacyAdoptionService.d.ts +48 -0
- package/dist/sync/v3/taskRelationshipLegacyAdoptionService.js +164 -0
- package/dist/sync/v3/taskRelationshipMutationService.d.ts +50 -0
- package/dist/sync/v3/taskRelationshipMutationService.js +148 -0
- package/dist/sync/v3/taskRestoreMutationService.d.ts +90 -0
- package/dist/sync/v3/taskRestoreMutationService.js +179 -0
- package/dist/sync/v3/taskStatusActivation.d.ts +7 -0
- package/dist/sync/v3/taskStatusActivation.js +15 -0
- package/dist/sync/v3/taskStatusMutationService.d.ts +76 -0
- package/dist/sync/v3/taskStatusMutationService.js +308 -0
- package/dist/sync/v3/taskWorkflowMutationPayload.d.ts +4 -0
- package/dist/sync/v3/taskWorkflowMutationPayload.js +22 -0
- package/dist/sync/v3/taskWorkflowMutationService.d.ts +64 -0
- package/dist/sync/v3/taskWorkflowMutationService.js +102 -0
- package/dist/sync/v3/taxonomyCoexistence.d.ts +10 -0
- package/dist/sync/v3/taxonomyCoexistence.js +19 -0
- package/dist/sync/v3/taxonomyCompositeMutationService.d.ts +110 -0
- package/dist/sync/v3/taxonomyCompositeMutationService.js +304 -0
- package/dist/sync/v3/taxonomyMutationService.d.ts +57 -0
- package/dist/sync/v3/taxonomyMutationService.js +106 -0
- package/dist/sync/v3/taxonomyStateMutation.d.ts +22 -0
- package/dist/sync/v3/taxonomyStateMutation.js +49 -0
- package/dist/sync/v3/taxonomySyncPayload.d.ts +9 -0
- package/dist/sync/v3/taxonomySyncPayload.js +199 -0
- package/dist/sync/v3/workflowAssignmentSync.d.ts +22 -0
- package/dist/sync/v3/workflowAssignmentSync.js +213 -0
- package/dist/sync/v3/workflowRuntimeMutationService.d.ts +89 -0
- package/dist/sync/v3/workflowRuntimeMutationService.js +359 -0
- package/dist/sync/v3/workflowRuntimeOperationIdentity.d.ts +13 -0
- package/dist/sync/v3/workflowRuntimeOperationIdentity.js +35 -0
- package/dist/sync/v3/workflowRuntimeSync.d.ts +141 -0
- package/dist/sync/v3/workflowRuntimeSync.js +485 -0
- package/dist/sync/v3/workspaceSyncJournalReader.d.ts +43 -0
- package/dist/sync/v3/workspaceSyncJournalReader.js +45 -0
- package/dist/sync/v3/workspaceSyncLocalOwnershipSnapshot.d.ts +28 -0
- package/dist/sync/v3/workspaceSyncLocalOwnershipSnapshot.js +81 -0
- package/dist/sync/v3/workspaceSyncPayloadFingerprint.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncPayloadFingerprint.js +5 -0
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.d.ts +16 -0
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.js +161 -0
- package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.d.ts +83 -0
- package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.js +161 -0
- package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.d.ts +16 -0
- package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.js +90 -0
- package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.d.ts +65 -0
- package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.js +356 -0
- package/dist/sync/v3/workspaceSyncV3CombinedCoverage.d.ts +51 -0
- package/dist/sync/v3/workspaceSyncV3CombinedCoverage.js +171 -0
- package/dist/sync/v3/workspaceSyncV3CombinedFeedOrchestrator.d.ts +43 -0
- package/dist/sync/v3/workspaceSyncV3CombinedFeedOrchestrator.js +535 -0
- package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.d.ts +50 -0
- package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.js +1149 -0
- package/dist/sync/v3/workspaceSyncV3CombinedProjectionState.d.ts +96 -0
- package/dist/sync/v3/workspaceSyncV3CombinedProjectionState.js +672 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.d.ts +42 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.js +598 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.d.ts +65 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.js +505 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.d.ts +78 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.js +511 -0
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.d.ts +45 -0
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.js +125 -0
- package/dist/sync/v3/workspaceSyncV3CoverageRegistry.d.ts +13 -0
- package/dist/sync/v3/workspaceSyncV3CoverageRegistry.js +34 -0
- package/dist/sync/v3/workspaceSyncV3CursorEncoding.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3CursorEncoding.js +6 -0
- package/dist/sync/v3/workspaceSyncV3DomainAdmission.d.ts +43 -0
- package/dist/sync/v3/workspaceSyncV3DomainAdmission.js +118 -0
- package/dist/sync/v3/workspaceSyncV3Feed.d.ts +95 -0
- package/dist/sync/v3/workspaceSyncV3Feed.js +243 -0
- package/dist/sync/v3/workspaceSyncV3FeedApply.d.ts +13 -0
- package/dist/sync/v3/workspaceSyncV3FeedApply.js +67 -0
- package/dist/sync/v3/workspaceSyncV3FeedClientContract.d.ts +3 -0
- package/dist/sync/v3/workspaceSyncV3FeedClientContract.js +46 -0
- package/dist/sync/v3/workspaceSyncV3FeedCursorKeys.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3FeedCursorKeys.js +58 -0
- package/dist/sync/v3/workspaceSyncV3FeedOrchestrator.d.ts +31 -0
- package/dist/sync/v3/workspaceSyncV3FeedOrchestrator.js +228 -0
- package/dist/sync/v3/workspaceSyncV3FeedProfile.d.ts +32 -0
- package/dist/sync/v3/workspaceSyncV3FeedProfile.js +21 -0
- package/dist/sync/v3/workspaceSyncV3InitiativeLocalApply.d.ts +36 -0
- package/dist/sync/v3/workspaceSyncV3InitiativeLocalApply.js +163 -0
- package/dist/sync/v3/workspaceSyncV3InitiativeRepair.d.ts +33 -0
- package/dist/sync/v3/workspaceSyncV3InitiativeRepair.js +118 -0
- package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.js +45 -0
- package/dist/sync/v3/workspaceSyncV3LocalOutboxStatus.d.ts +27 -0
- package/dist/sync/v3/workspaceSyncV3LocalOutboxStatus.js +83 -0
- package/dist/sync/v3/workspaceSyncV3NestedCoverage.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3NestedCoverage.js +40 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskApply.d.ts +83 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskApply.js +325 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.d.ts +59 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.js +302 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.d.ts +47 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.js +329 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.d.ts +19 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.js +41 -0
- package/dist/sync/v3/workspaceSyncV3NestedWireContract.d.ts +6 -0
- package/dist/sync/v3/workspaceSyncV3NestedWireContract.js +16 -0
- package/dist/sync/v3/workspaceSyncV3OperationProjection.d.ts +8 -0
- package/dist/sync/v3/workspaceSyncV3OperationProjection.js +52 -0
- package/dist/sync/v3/workspaceSyncV3OperationProtocol.d.ts +229 -0
- package/dist/sync/v3/workspaceSyncV3OperationProtocol.js +1 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.d.ts +165 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.js +414 -0
- package/dist/sync/v3/workspaceSyncV3OriginActor.d.ts +36 -0
- package/dist/sync/v3/workspaceSyncV3OriginActor.js +61 -0
- package/dist/sync/v3/workspaceSyncV3OriginAssertion.d.ts +46 -0
- package/dist/sync/v3/workspaceSyncV3OriginAssertion.js +121 -0
- package/dist/sync/v3/workspaceSyncV3OriginAssertionHeader.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3OriginAssertionHeader.js +1 -0
- package/dist/sync/v3/workspaceSyncV3PlanningOrderCoverage.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3PlanningOrderCoverage.js +34 -0
- package/dist/sync/v3/workspaceSyncV3PlanningOrderWireContract.d.ts +6 -0
- package/dist/sync/v3/workspaceSyncV3PlanningOrderWireContract.js +10 -0
- package/dist/sync/v3/workspaceSyncV3ProjectionState.d.ts +105 -0
- package/dist/sync/v3/workspaceSyncV3ProjectionState.js +467 -0
- package/dist/sync/v3/workspaceSyncV3TaskCommentAudit.d.ts +56 -0
- package/dist/sync/v3/workspaceSyncV3TaskCommentAudit.js +250 -0
- package/dist/sync/v3/workspaceSyncV3TaskRelationshipProjection.d.ts +30 -0
- package/dist/sync/v3/workspaceSyncV3TaskRelationshipProjection.js +142 -0
- package/dist/sync/v3/workspaceSyncV3TaskRootProjection.d.ts +40 -0
- package/dist/sync/v3/workspaceSyncV3TaskRootProjection.js +246 -0
- package/dist/sync/v3/workspaceSyncV3TaxonomyFeedProjection.d.ts +39 -0
- package/dist/sync/v3/workspaceSyncV3TaxonomyFeedProjection.js +185 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowCoverage.d.ts +10 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowCoverage.js +36 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeApply.d.ts +17 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeApply.js +143 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeProjection.d.ts +9 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowRuntimeProjection.js +195 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowWireContract.d.ts +11 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowWireContract.js +12 -0
- package/dist/sync/v3/workspaceSyncV3WorkstreamProjection.d.ts +4 -0
- package/dist/sync/v3/workspaceSyncV3WorkstreamProjection.js +98 -0
- package/dist/sync/v3/workspaceSyncV3WorkstreamTaskOrderProjection.d.ts +9 -0
- package/dist/sync/v3/workspaceSyncV3WorkstreamTaskOrderProjection.js +72 -0
- package/dist/sync/v3/workstreamActivityAuthoritativeRevision.d.ts +11 -0
- package/dist/sync/v3/workstreamActivityAuthoritativeRevision.js +23 -0
- package/dist/sync/v3/workstreamActivityIdentity.d.ts +8 -0
- package/dist/sync/v3/workstreamActivityIdentity.js +14 -0
- package/dist/sync/v3/workstreamCoexistence.d.ts +19 -0
- package/dist/sync/v3/workstreamCoexistence.js +64 -0
- package/dist/sync/v3/workstreamMutationPayload.d.ts +27 -0
- package/dist/sync/v3/workstreamMutationPayload.js +147 -0
- package/dist/sync/v3/workstreamMutationService.d.ts +72 -0
- package/dist/sync/v3/workstreamMutationService.js +256 -0
- package/dist/sync/v3/workstreamTaskOrderMutationService.d.ts +55 -0
- package/dist/sync/v3/workstreamTaskOrderMutationService.js +110 -0
- package/dist/sync/v3/workstreamTaskOrderSync.d.ts +14 -0
- package/dist/sync/v3/workstreamTaskOrderSync.js +25 -0
- package/dist/sync/workspaceContentManifest.d.ts +86 -0
- package/dist/sync/workspaceContentManifest.js +123 -0
- package/dist/sync/workspacePullFeed.d.ts +186 -2
- package/dist/sync/workspacePullFeed.js +513 -136
- package/dist/sync/workspacePushPreparedPlan.d.ts +21 -0
- package/dist/sync/workspacePushPreparedPlan.js +1 -0
- package/dist/sync/workspaceRepair.d.ts +17 -25
- package/dist/sync/workspaceRepair.js +348 -25
- package/dist/sync/workspaceSyncContentDecryption.d.ts +6 -0
- package/dist/sync/workspaceSyncContentDecryption.js +11 -0
- package/dist/sync/workspaceSyncModel.d.ts +216 -5
- package/dist/sync/workspaceSyncModel.js +371 -35
- package/dist/sync/workspaceSyncSnapshotProjection.d.ts +11 -0
- package/dist/sync/workspaceSyncSnapshotProjection.js +101 -0
- package/dist/sync/workspaceSyncState.d.ts +13 -0
- package/dist/sync/workspaceSyncState.js +36 -0
- package/dist/sync/workspaceSyncV2SnapshotBuilder.d.ts +106 -0
- package/dist/sync/workspaceSyncV2SnapshotBuilder.js +193 -0
- package/dist/types.d.ts +23 -15
- package/dist/types.js +2 -4
- package/dist/ui/ai-profile-clients/amazon-nova.svg +1 -0
- package/dist/ui/ai-profile-clients/antigravity.png +0 -0
- package/dist/ui/ai-profile-clients/chatgpt.svg +10 -0
- package/dist/ui/ai-profile-clients/claude-chat.svg +1 -0
- package/dist/ui/ai-profile-clients/claude-code.svg +15 -0
- package/dist/ui/ai-profile-clients/cline-app-icon-light.png +0 -0
- package/dist/ui/ai-profile-clients/cline.svg +16 -0
- package/dist/ui/ai-profile-clients/codex.svg +1 -0
- package/dist/ui/ai-profile-clients/copilot.png +0 -0
- package/dist/ui/ai-profile-clients/cursor.svg +1 -0
- package/dist/ui/ai-profile-clients/deepseek.svg +1 -0
- package/dist/ui/ai-profile-clients/gemini-cli-icon.png +0 -0
- package/dist/ui/ai-profile-clients/gemini.svg +10 -0
- package/dist/ui/ai-profile-clients/grok.svg +31 -0
- package/dist/ui/ai-profile-clients/kiro.svg +11 -0
- package/dist/ui/ai-profile-clients/llama.svg +1 -0
- package/dist/ui/ai-profile-clients/mistral.svg +1 -0
- package/dist/ui/ai-profile-clients/ms_copilot.jpeg +0 -0
- package/dist/ui/ai-profile-clients/openclaw.png +0 -0
- package/dist/ui/ai-profile-clients/perplexity.svg +1 -0
- package/dist/ui/ai-profile-clients/vscode.svg +41 -0
- package/dist/ui/ai-profile-clients/windsurf.svg +11 -0
- package/dist/ui/assets/AiIdentityRosterCard-DB1BLO_j.js +1 -0
- package/dist/ui/assets/AiProfilesModule-DPxQeF9N.js +1 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-CBRZ8rca.css +1 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-DHNYaNg6.js +3 -0
- package/dist/ui/assets/AssetTraySortControl-B9k5caQW.css +1 -0
- package/dist/ui/assets/AssetTraySortControl-DphbyHVc.js +1 -0
- package/dist/ui/assets/ContextAttachmentManager-CMxSzHqc.js +3 -0
- package/dist/ui/assets/DocumentWorkspace-BC7sy5TG.js +261 -0
- package/dist/ui/assets/DocumentWorkspace-BIBGBfd7.css +1 -0
- package/dist/ui/assets/EntityActivityTimeline-BfJbZRdl.css +1 -0
- package/dist/ui/assets/EntityActivityTimeline-pJ2ZjZ-k.js +1 -0
- package/dist/ui/assets/PlanningModule-CeTqXMMz.css +1 -0
- package/dist/ui/assets/PlanningModule-t5GbvVR9.js +1 -0
- package/dist/ui/assets/PlansPage-BVH_NfgT.js +1 -0
- package/dist/ui/assets/PlansPage-C2nkK2Bp.css +1 -0
- package/dist/ui/assets/TaskContextUpload-Ds4LnDzV.css +1 -0
- package/dist/ui/assets/TaskContextUpload-bl4fOOUz.js +1 -0
- package/dist/ui/assets/TaskSettings-xVsxSa0g.js +12 -0
- package/dist/ui/assets/TaskforceAgentsModule-CkAxW19K.js +21 -0
- package/dist/ui/assets/TaskforceAgentsModule-D6IC0S7Q.css +1 -0
- package/dist/ui/assets/WorkflowManagerModule-BKqIGVnF.js +1 -0
- package/dist/ui/assets/WorkflowManagerModule-DF10XENz.css +1 -0
- package/dist/ui/assets/antigravity-DRKQga2U.png +0 -0
- package/dist/ui/assets/cursor-BM_3k4Y4.svg +1 -0
- package/dist/ui/assets/gemini-cli-icon-dBAVjCcn.png +0 -0
- package/dist/ui/assets/grok-BuodbWaG.svg +31 -0
- package/dist/ui/assets/index-BzJlVnNS.css +1 -0
- package/dist/ui/assets/index-Cx7vZJHL.js +7 -0
- package/dist/ui/assets/{vendor-dnd-DRzYolkg.js → vendor-dnd-CJ-AjP-Y.js} +1 -1
- package/dist/ui/assets/{vendor-icons-CLnehDTw.js → vendor-icons-B8ZNsH1g.js} +1 -1
- package/dist/ui/assets/{vendor-markdown-BUxTU7dS.js → vendor-markdown-_lhNCyq-.js} +9 -9
- package/dist/ui/assets/vendor-router-AqJMU8Lz.js +3 -0
- package/dist/ui/assets/vscode-C_7wk1WI.svg +41 -0
- package/dist/ui/branding/logos/logo_dark_bg.png +0 -0
- package/dist/ui/branding/logos/logo_favicon_dark.png +0 -0
- package/dist/ui/branding/logos/logo_favicon_dark.svg +56 -0
- package/dist/ui/branding/logos/logo_favicon_light.png +0 -0
- package/dist/ui/branding/logos/logo_light_bg.png +0 -0
- package/dist/ui/images/Taskforce_Van.webp +0 -0
- package/dist/ui/index.html +6 -6
- package/dist/update/uiUpdateService.d.ts +43 -0
- package/dist/update/uiUpdateService.js +149 -0
- package/dist/update/updateCli.d.ts +15 -0
- package/dist/update/updateCli.js +76 -0
- package/dist/update/updateExecutor.d.ts +40 -0
- package/dist/update/updateExecutor.js +474 -0
- package/dist/update/updateStatus.d.ts +83 -0
- package/dist/update/updateStatus.js +703 -0
- package/dist/utils/aiProfileAvatarPaths.d.ts +14 -0
- package/dist/utils/aiProfileAvatarPaths.js +52 -0
- package/dist/utils/aiProfileDefaultLogo.d.ts +7 -0
- package/dist/utils/aiProfileDefaultLogo.js +84 -0
- package/dist/utils/aiProfileEvents.d.ts +9 -1
- package/dist/utils/annotatedAttachments.d.ts +8 -0
- package/dist/utils/annotatedAttachments.js +17 -1
- package/dist/utils/assetTraySorting.d.ts +25 -0
- package/dist/utils/assetTraySorting.js +83 -0
- package/dist/utils/assignees.d.ts +5 -0
- package/dist/utils/assignees.js +14 -9
- package/dist/utils/authLogin.d.ts +10 -0
- package/dist/utils/authLogin.js +8 -0
- package/dist/utils/authSessionEvents.d.ts +2 -0
- package/dist/utils/authSessionEvents.js +6 -0
- package/dist/utils/avatarUpload.js +5 -5
- package/dist/utils/canonicalReferenceAttachments.d.ts +12 -0
- package/dist/utils/canonicalReferenceAttachments.js +42 -0
- package/dist/utils/cloudAssetDisplay.d.ts +2 -0
- package/dist/utils/cloudAssetDisplay.js +8 -0
- package/dist/utils/constants.d.ts +4 -11
- package/dist/utils/constants.js +5 -64
- package/dist/utils/contextAttachmentPreview.d.ts +11 -0
- package/dist/utils/contextAttachmentPreview.js +8 -0
- package/dist/utils/contextAttachmentUpload.d.ts +8 -0
- package/dist/utils/contextAttachmentUpload.js +144 -0
- package/dist/utils/documentNames.js +6 -4
- package/dist/utils/entityReferences.d.ts +14 -0
- package/dist/utils/entityReferences.js +21 -0
- package/dist/utils/httpSetCookie.d.ts +3 -0
- package/dist/utils/httpSetCookie.js +22 -0
- package/dist/utils/imageNoteStoragePaths.d.ts +3 -0
- package/dist/utils/imageNoteStoragePaths.js +19 -0
- package/dist/utils/imageReferences.d.ts +6 -0
- package/dist/utils/imageReferences.js +1 -0
- package/dist/utils/planningArchiveOrchestrator.d.ts +23 -0
- package/dist/utils/planningArchiveOrchestrator.js +37 -0
- package/dist/utils/planningArchivePresentation.d.ts +20 -0
- package/dist/utils/planningArchivePresentation.js +23 -0
- package/dist/utils/planningArchiveReadiness.d.ts +26 -0
- package/dist/utils/planningArchiveReadiness.js +30 -0
- package/dist/utils/planningFavorites.d.ts +7 -0
- package/dist/utils/planningFavorites.js +34 -0
- package/dist/utils/syncEventPresentation.js +53 -0
- package/dist/utils/syncStatusPresentation.d.ts +25 -0
- package/dist/utils/syncStatusPresentation.js +86 -5
- package/dist/utils/taskActivity.d.ts +9 -2
- package/dist/utils/taskActivity.js +61 -0
- package/dist/utils/taskDraftDefaults.d.ts +0 -8
- package/dist/utils/taskDraftDefaults.js +0 -4
- package/dist/utils/taskEvents.d.ts +11 -0
- package/dist/utils/taskEvents.js +6 -0
- package/dist/utils/taskHeaderQuickFilter.d.ts +14 -0
- package/dist/utils/taskHeaderQuickFilter.js +32 -0
- package/dist/utils/taskInvalidation.d.ts +23 -0
- package/dist/utils/taskInvalidation.js +67 -0
- package/dist/utils/taskNormalization.d.ts +2 -1
- package/dist/utils/taskNormalization.js +44 -18
- package/dist/utils/taskReferences.d.ts +16 -0
- package/dist/utils/taskReferences.js +63 -0
- package/dist/utils/taskforceAgentEvents.d.ts +8 -0
- package/dist/utils/taskforceAgentEvents.js +6 -0
- package/dist/utils/taskforceAgentSkillEvents.d.ts +7 -0
- package/dist/utils/taskforceAgentSkillEvents.js +8 -0
- package/dist/utils/theme.js +1 -1
- package/dist/utils/uiNotice.d.ts +3 -0
- package/dist/utils/uiNotice.js +1 -1
- package/dist/utils/workspaceResourceEvents.d.ts +7 -0
- package/dist/utils/workspaceResourceEvents.js +6 -0
- package/dist/utils/workspaceSyncPresentation.d.ts +24 -0
- package/dist/utils/workspaceSyncPresentation.js +243 -6
- package/package.json +69 -21
- package/dist/components/features/AgentsModule.d.ts +0 -18
- package/dist/components/features/AgentsModule.js +0 -479
- package/dist/components/features/InitiativesModule.d.ts +0 -22
- package/dist/components/features/InitiativesModule.js +0 -33
- package/dist/components/features/WorkflowsModule.d.ts +0 -27
- package/dist/components/features/WorkflowsModule.js +0 -21
- package/dist/components/features/settings/WorkflowEditor.d.ts +0 -15
- package/dist/components/features/settings/WorkflowEditor.js +0 -245
- package/dist/components/views/panels/DocumentFilterToolbar.d.ts +0 -10
- package/dist/components/views/panels/DocumentFilterToolbar.js +0 -7
- package/dist/components/views/standalone/modals/AccountHubModal.d.ts +0 -61
- package/dist/components/views/standalone/modals/AccountHubModal.js +0 -108
- package/dist/components/views/standalone/modals/EditProfileModal.d.ts +0 -19
- package/dist/components/views/standalone/modals/EditProfileModal.js +0 -11
- package/dist/hooks/ui/useResourceExport.d.ts +0 -21
- package/dist/hooks/ui/useResourceExport.js +0 -87
- package/dist/hooks/ui/useWorkflowTemplates.d.ts +0 -37
- package/dist/hooks/ui/useWorkflowTemplates.js +0 -116
- package/dist/mcp/clientProfileDefaults.d.ts +0 -12
- package/dist/mcp/clientProfileDefaults.js +0 -37
- package/dist/resources/templates/WORKFLOW_V2_POLICY.md +0 -55
- package/dist/resources/templates/environments/aider.yaml +0 -14
- package/dist/resources/templates/environments/antigravity.yaml +0 -10
- package/dist/resources/templates/environments/claude.yaml +0 -10
- package/dist/resources/templates/environments/cline.yaml +0 -10
- package/dist/resources/templates/environments/codex.yaml +0 -13
- package/dist/resources/templates/environments/copilot.yaml +0 -10
- package/dist/resources/templates/environments/cursor.yaml +0 -9
- package/dist/resources/templates/environments/gemini.yaml +0 -9
- package/dist/resources/templates/environments/windsurf.yaml +0 -10
- package/dist/resources/templates/workflow-sources/README.md +0 -9
- package/dist/resources/templates/workflow-sources/workflowDocs.mjs +0 -530
- package/dist/resources/templates/workflow-sources/workflowEditorOverrides.json +0 -1
- package/dist/resources/templates/workflows/collaborate.yaml +0 -110
- package/dist/resources/templates/workflows/do.yaml +0 -88
- package/dist/resources/templates/workflows/evaluate.yaml +0 -117
- package/dist/resources/templates/workflows/execute.yaml +0 -159
- package/dist/resources/templates/workflows/plan.yaml +0 -119
- package/dist/resources/templates/workflows/review.yaml +0 -115
- package/dist/services/formatTransformers.d.ts +0 -29
- package/dist/services/formatTransformers.js +0 -56
- package/dist/services/templateEngine.d.ts +0 -46
- package/dist/services/templateEngine.js +0 -148
- package/dist/shared/workflowDefaults.d.ts +0 -9
- package/dist/shared/workflowDefaults.js +0 -11
- package/dist/ui/agent-logos/Gemini CLI.jpeg +0 -0
- package/dist/ui/agent-logos/antigravity.jpeg +0 -0
- package/dist/ui/agent-logos/chatgpt.png +0 -0
- package/dist/ui/agent-logos/claude-code.jpeg +0 -0
- package/dist/ui/agent-logos/codex.jpeg +0 -0
- package/dist/ui/agent-logos/cursor.png +0 -0
- package/dist/ui/agent-logos/openclaw.jpeg +0 -0
- package/dist/ui/agent-logos/windsurf.png +0 -0
- package/dist/ui/assets/AgentsModule-DvkbUHi0.js +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-BVKew-mH.css +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-jhOhxqHT.js +0 -3
- package/dist/ui/assets/ContextAttachmentManager-BAmEyLHL.js +0 -3
- package/dist/ui/assets/DocumentWorkspace-D4rJKXzd.css +0 -1
- package/dist/ui/assets/DocumentWorkspace-X-CpD5OO.js +0 -252
- package/dist/ui/assets/EntityActivityTimeline-DD33onAC.js +0 -1
- package/dist/ui/assets/EntityActivityTimeline-DyqvvhuF.css +0 -1
- package/dist/ui/assets/InitiativesModule-5nDXtIjf.js +0 -1
- package/dist/ui/assets/PlansPage-B8nDR1hQ.js +0 -1
- package/dist/ui/assets/PlansPage-DeAzWYTb.css +0 -1
- package/dist/ui/assets/TaskContextUpload-DrGrXJHm.js +0 -1
- package/dist/ui/assets/TaskSettings-BXVvZZwH.js +0 -9
- package/dist/ui/assets/WorkflowsModule-DWCGhEWT.js +0 -5
- package/dist/ui/assets/documentReferences-Crup321p.js +0 -1
- package/dist/ui/assets/index-B9k24Aym.js +0 -5
- package/dist/ui/assets/index-DNeR5dYW.css +0 -1
- package/dist/ui/assets/vendor-router-BbWMxlnO.js +0 -3
- package/dist/ui/branding/logos/logo_black_01.png +0 -0
- package/dist/ui/branding/logos/logo_black_02.png +0 -0
- package/dist/ui/branding/logos/logo_white_01.png +0 -0
- package/dist/ui/branding/logos/logo_white_02.png +0 -0
- package/scripts/generate-workflow-templates.mjs +0 -134
- package/src/resources/templates/WORKFLOW_V2_POLICY.md +0 -55
- package/src/resources/templates/environments/aider.yaml +0 -14
- package/src/resources/templates/environments/antigravity.yaml +0 -10
- package/src/resources/templates/environments/claude.yaml +0 -10
- package/src/resources/templates/environments/cline.yaml +0 -10
- package/src/resources/templates/environments/codex.yaml +0 -13
- package/src/resources/templates/environments/copilot.yaml +0 -10
- package/src/resources/templates/environments/cursor.yaml +0 -9
- package/src/resources/templates/environments/gemini.yaml +0 -9
- package/src/resources/templates/environments/windsurf.yaml +0 -10
- package/src/resources/templates/workflow-sources/README.md +0 -9
- package/src/resources/templates/workflow-sources/workflowDocs.mjs +0 -530
- package/src/resources/templates/workflow-sources/workflowEditorOverrides.json +0 -1
- package/src/resources/templates/workflows/collaborate.yaml +0 -110
- package/src/resources/templates/workflows/do.yaml +0 -88
- package/src/resources/templates/workflows/evaluate.yaml +0 -117
- package/src/resources/templates/workflows/execute.yaml +0 -159
- package/src/resources/templates/workflows/plan.yaml +0 -119
- package/src/resources/templates/workflows/review.yaml +0 -115
- /package/dist/ui/branding/logos/{logo_dark.svg → logo_dark_no_bg.svg} +0 -0
- /package/dist/ui/branding/logos/{logo_favicon.svg → logo_favicon_light.svg} +0 -0
- /package/dist/ui/branding/logos/{logo_light.svg → logo_light_no_bg.svg} +0 -0
|
@@ -2,90 +2,95 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useDndContext, useDraggable, useDroppable } from '@dnd-kit/core';
|
|
4
4
|
import { CSS } from '@dnd-kit/utilities';
|
|
5
|
-
import {
|
|
5
|
+
import { ArrowUpDown, Archive, ChevronDown, ChevronLeft, ChevronRight, Eye, EyeOff, Filter, GripVertical, Kanban, Link2, Pencil, Plus, RotateCcw, Search, Star, Unlink, X, } from 'lucide-react';
|
|
6
6
|
import styles from '../../../Taskforce.module.css';
|
|
7
7
|
import panelStyles from './PlanningDrawer.module.css';
|
|
8
|
-
import { ReferenceBadgeButton } from '../../ui/ReferenceBadgeButton';
|
|
9
8
|
import { HierarchyActionBadge } from '../../ui/HierarchyActionBadge';
|
|
9
|
+
import { TaxonomyDropdown } from '../../ui/TaxonomyDropdown';
|
|
10
10
|
import { DisclosureSectionHeader } from '../../ui/DisclosureSectionHeader';
|
|
11
|
-
import {
|
|
11
|
+
import { getStatusDefinition } from '../../../utils/constants';
|
|
12
12
|
import { formatInitiativeReference, formatWorkstreamReference, } from '../../../utils/planningReferences.js';
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
13
|
+
import { resolvePlanningArchiveDetailState } from '../../../utils/planningArchivePresentation';
|
|
14
|
+
import { getTaskReferenceLabel, } from '../../../utils/taskReferences';
|
|
15
|
+
import { getPlanningFavoriteKey, } from '../../../utils/planningFavorites';
|
|
16
|
+
import { TASK_ASSIGNEE_UNASSIGNED_COLOR, TASK_ASSIGNEE_UNASSIGNED_ICON, } from '../../../utils/assignees';
|
|
17
|
+
import { PlanningEntityActivity, PlanningEntityContext, PlanningEntityDescription, } from '../../features/planning/PlanningEntityDetails';
|
|
18
|
+
import { PlanningEntitySummary, PlanningNoTasks, PlanningProgress, PlanningReferenceBadge, PlanningSummaryMeta, } from '../../features/planning/PlanningEntitySummary';
|
|
19
|
+
import { PlanningTaskCard } from '../../features/planning/PlanningTaskCard';
|
|
20
|
+
import { PlanningTaskArrangeControl } from '../../features/planning/PlanningTaskArrangeControl';
|
|
21
|
+
import planningDropdownStyles from '../../features/planning/PlanningDropdownControl.module.css';
|
|
22
|
+
import { PlanningTaskOrderList } from '../../features/planning/PlanningTaskOrderList';
|
|
23
|
+
import { arrangePlanningTasks, mergeVisiblePlanningTaskOrder, } from '../../features/planning/planningTaskArrangement';
|
|
24
|
+
import { PlanningArchiveConfirmation } from '../../features/planning/PlanningArchiveConfirmation';
|
|
25
|
+
import { PlanningUnlinkConfirmation, } from '../../features/planning/PlanningUnlinkConfirmation';
|
|
26
|
+
import { PlanningLinkPicker } from '../../features/planning/PlanningLinkPicker';
|
|
27
|
+
import { PlanningOwnerDropdown, normalizePlanningOwnerOptions, toPlanningAssigneeOption, } from '../../features/planning/PlanningOwnerDropdown';
|
|
28
|
+
import { buildPlanningNavigatorResults, matchesPlanningNavigatorItem, PLANNING_NAVIGATOR_SORT_OPTIONS, } from '../../features/planning/planningNavigator';
|
|
29
|
+
export { normalizePlanningOwnerOptions } from '../../features/planning/PlanningOwnerDropdown';
|
|
30
|
+
export const PLANNING_DRAWER_TREE_WIDTH_PX = 392;
|
|
21
31
|
export const PLANNING_DRAWER_DETAIL_WIDTH_PX = 392;
|
|
22
32
|
export const PLANNING_DRAWER_COLLAPSED_PANE_WIDTH_PX = 56;
|
|
33
|
+
export const PLANNING_DRAWER_WIDE_MIN_AVAILABLE_PX = 1280;
|
|
34
|
+
export const PLANNING_DRAWER_MEDIUM_MIN_AVAILABLE_PX = PLANNING_DRAWER_TREE_WIDTH_PX + PLANNING_DRAWER_DETAIL_WIDTH_PX;
|
|
35
|
+
export function resolvePlanningDrawerLayoutMode(viewportWidth, leftOffset = 0) {
|
|
36
|
+
const availableWidth = Math.max(0, viewportWidth - leftOffset);
|
|
37
|
+
if (availableWidth >= PLANNING_DRAWER_WIDE_MIN_AVAILABLE_PX)
|
|
38
|
+
return 'wide';
|
|
39
|
+
if (availableWidth >= PLANNING_DRAWER_MEDIUM_MIN_AVAILABLE_PX)
|
|
40
|
+
return 'medium';
|
|
41
|
+
return 'narrow';
|
|
42
|
+
}
|
|
43
|
+
function usePlanningDrawerViewport(leftOffset) {
|
|
44
|
+
const readViewportWidth = React.useCallback(() => (typeof window === 'undefined' ? PLANNING_DRAWER_WIDE_MIN_AVAILABLE_PX + leftOffset : window.innerWidth), [leftOffset]);
|
|
45
|
+
const [viewportWidth, setViewportWidth] = React.useState(readViewportWidth);
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
const handleResize = () => setViewportWidth(readViewportWidth());
|
|
48
|
+
handleResize();
|
|
49
|
+
window.addEventListener('resize', handleResize);
|
|
50
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
51
|
+
}, [readViewportWidth]);
|
|
52
|
+
return {
|
|
53
|
+
viewportWidth,
|
|
54
|
+
availableWidth: Math.max(0, viewportWidth - leftOffset),
|
|
55
|
+
layoutMode: resolvePlanningDrawerLayoutMode(viewportWidth, leftOffset),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
23
58
|
export function getPlanningDrawerWidthPx(treeCollapsed, hasPrimaryPane, primaryCollapsed, hasSecondaryPane, secondaryCollapsed) {
|
|
24
59
|
return (treeCollapsed ? PLANNING_DRAWER_COLLAPSED_PANE_WIDTH_PX : PLANNING_DRAWER_TREE_WIDTH_PX)
|
|
25
60
|
+ (hasPrimaryPane ? (primaryCollapsed ? PLANNING_DRAWER_COLLAPSED_PANE_WIDTH_PX : PLANNING_DRAWER_DETAIL_WIDTH_PX) : 0)
|
|
26
61
|
+ (hasSecondaryPane ? (secondaryCollapsed ? PLANNING_DRAWER_COLLAPSED_PANE_WIDTH_PX : PLANNING_DRAWER_DETAIL_WIDTH_PX) : 0);
|
|
27
62
|
}
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
const value = String(option?.value || '').trim();
|
|
33
|
-
if (!value || value === 'unassigned')
|
|
34
|
-
continue;
|
|
35
|
-
if (typeof option.archivedAt === 'string' && option.archivedAt.trim().length > 0)
|
|
36
|
-
continue;
|
|
37
|
-
const label = String(option.label || value).trim() || value;
|
|
38
|
-
const kind = String(option.kind || '').trim().toLowerCase();
|
|
39
|
-
const username = String(option.username || '').trim().toLowerCase();
|
|
40
|
-
const identity = kind === 'agent'
|
|
41
|
-
? `agent:${username || label.toLowerCase()}`
|
|
42
|
-
: `value:${value}`;
|
|
43
|
-
if (!byIdentity.has(identity) || value === selected) {
|
|
44
|
-
byIdentity.set(identity, { ...option, value, label });
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return Array.from(byIdentity.values()).sort((left, right) => (left.label.localeCompare(right.label, undefined, { sensitivity: 'base' })));
|
|
48
|
-
}
|
|
49
|
-
function formatTaskStatusLabel(status) {
|
|
50
|
-
if (!status)
|
|
51
|
-
return 'No status';
|
|
52
|
-
return status
|
|
53
|
-
.split(/[-_\s]+/g)
|
|
54
|
-
.filter(Boolean)
|
|
55
|
-
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
56
|
-
.join(' ');
|
|
63
|
+
function ArchiveVisibilityToggle({ visible, disabled, disabledLabel, itemLabel, onToggle, }) {
|
|
64
|
+
const actionLabel = visible ? `Hide archived ${itemLabel}` : `Show archived ${itemLabel}`;
|
|
65
|
+
const label = disabled ? (disabledLabel || `No archived ${itemLabel}`) : actionLabel;
|
|
66
|
+
return (_jsx("button", { type: "button", className: `tf-control-icon ${panelStyles.archiveVisibilityToggle} ${visible ? panelStyles.toggleActive : ''}`.trim(), title: label, "aria-label": label, "aria-pressed": visible, disabled: disabled, onClick: onToggle, children: visible ? _jsx(EyeOff, { size: 15, "aria-hidden": "true" }) : _jsx(Eye, { size: 15, "aria-hidden": "true" }) }));
|
|
57
67
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
await navigator.clipboard.writeText(label);
|
|
64
|
-
setCopied(true);
|
|
65
|
-
window.setTimeout(() => setCopied(false), 1200);
|
|
66
|
-
}
|
|
67
|
-
catch {
|
|
68
|
-
setCopied(false);
|
|
69
|
-
}
|
|
70
|
-
}, [label]);
|
|
71
|
-
if (!interactive) {
|
|
72
|
-
return (_jsx("span", { className: `${styles.taskIdBadge} ${panelStyles.referenceBadgeStatic}`.trim(), children: _jsx("span", { children: label }) }));
|
|
68
|
+
function countArchivedDetailChildren(detail) {
|
|
69
|
+
if (detail.type === 'initiative') {
|
|
70
|
+
return (detail.item.allWorkstreams || detail.item.workstreams)
|
|
71
|
+
.filter((workstream) => Boolean(workstream.isArchived)).length;
|
|
73
72
|
}
|
|
74
|
-
return (
|
|
73
|
+
return (detail.item.tasks || []).filter((task) => Boolean(task.isArchived)).length;
|
|
75
74
|
}
|
|
76
|
-
function PlanningRow({ rowId, rowType, referenceLabel,
|
|
75
|
+
function PlanningRow({ rowId, rowType, referenceLabel, item, ownerOption, ownerOptions, workstreamCount, active, isArchived = false, detailOpen = false, canExpand = false, expanded = false, controlsId, onToggleExpand, onToggleScope, onOpenDetails, onChangeOwner, initiativeLinkOptions = [], onLinkInitiative, favorite, favoriteReady, onToggleFavorite, onArchiveReady, hierarchyInteractions = true, }) {
|
|
76
|
+
const { title } = item;
|
|
77
|
+
const [archiveConfirmationVisible, setArchiveConfirmationVisible] = React.useState(false);
|
|
78
|
+
const [archiveBusy, setArchiveBusy] = React.useState(false);
|
|
79
|
+
const [initiativePickerVisible, setInitiativePickerVisible] = React.useState(false);
|
|
80
|
+
const [initiativeLinkBusy, setInitiativeLinkBusy] = React.useState(false);
|
|
77
81
|
const { active: dndActive } = useDndContext();
|
|
78
82
|
const dragType = String(dndActive?.data?.current?.type || '');
|
|
79
|
-
const canDropTask = rowType === 'workstream' && dragType === 'task-card';
|
|
80
|
-
const canDropWorkstream = rowType === 'initiative' && dragType === 'planning-workstream';
|
|
83
|
+
const canDropTask = hierarchyInteractions && rowType === 'workstream' && dragType === 'task-card';
|
|
84
|
+
const canDropWorkstream = hierarchyInteractions && rowType === 'initiative' && dragType === 'planning-workstream';
|
|
81
85
|
const droppableType = rowType === 'workstream' ? 'planning-workstream-target' : 'planning-initiative-target';
|
|
82
86
|
const { setNodeRef: setDropRef, isOver, } = useDroppable({
|
|
83
87
|
id: `${droppableType}:${rowId}`,
|
|
84
88
|
data: rowType === 'workstream'
|
|
85
89
|
? { type: droppableType, workstreamId: rowId }
|
|
86
90
|
: { type: droppableType, initiativeId: rowId },
|
|
91
|
+
disabled: !hierarchyInteractions,
|
|
87
92
|
});
|
|
88
|
-
const draggable = rowType === 'workstream';
|
|
93
|
+
const draggable = hierarchyInteractions && rowType === 'workstream';
|
|
89
94
|
const { attributes, listeners, setNodeRef: setDragRef, transform, isDragging, } = useDraggable({
|
|
90
95
|
id: `planning-workstream:${rowId}`,
|
|
91
96
|
data: { type: 'planning-workstream', workstreamId: rowId },
|
|
@@ -95,78 +100,443 @@ function PlanningRow({ rowId, rowType, referenceLabel, title, meta, active, deta
|
|
|
95
100
|
? { transform: CSS.Translate.toString(transform) }
|
|
96
101
|
: undefined;
|
|
97
102
|
const showDropReady = canDropTask || canDropWorkstream;
|
|
98
|
-
|
|
103
|
+
const childType = rowType === 'initiative' ? 'workstreams' : 'tasks';
|
|
104
|
+
const expansionEnabled = canExpand && Boolean(onToggleExpand);
|
|
105
|
+
const expansionLabel = !canExpand
|
|
106
|
+
? `No ${childType} for ${title}`
|
|
107
|
+
: `${expanded ? 'Collapse' : 'Expand'} ${childType} for ${title}`;
|
|
108
|
+
const archiveActionVisible = Boolean(item.archiveReady && !isArchived && onArchiveReady);
|
|
109
|
+
const rowActionRefs = React.useRef({});
|
|
110
|
+
const [activeRowActionId, setActiveRowActionId] = React.useState('favorite');
|
|
111
|
+
const enabledRowActionIds = React.useMemo(() => [
|
|
112
|
+
...(favoriteReady ? ['favorite'] : []),
|
|
113
|
+
...(archiveActionVisible ? ['archive'] : []),
|
|
114
|
+
'scope',
|
|
115
|
+
...(expansionEnabled ? ['disclosure'] : []),
|
|
116
|
+
], [archiveActionVisible, expansionEnabled, favoriteReady]);
|
|
117
|
+
const effectiveActiveRowActionId = enabledRowActionIds.includes(activeRowActionId)
|
|
118
|
+
? activeRowActionId
|
|
119
|
+
: enabledRowActionIds[0];
|
|
120
|
+
React.useEffect(() => {
|
|
121
|
+
if (effectiveActiveRowActionId && effectiveActiveRowActionId !== activeRowActionId) {
|
|
122
|
+
setActiveRowActionId(effectiveActiveRowActionId);
|
|
123
|
+
}
|
|
124
|
+
}, [activeRowActionId, effectiveActiveRowActionId]);
|
|
125
|
+
const handleRowActionFocus = React.useCallback((actionId) => {
|
|
126
|
+
setActiveRowActionId(actionId);
|
|
127
|
+
}, []);
|
|
128
|
+
const handleRowActionKeyDown = React.useCallback((event) => {
|
|
129
|
+
if (!['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key))
|
|
130
|
+
return;
|
|
131
|
+
const actionButton = event.target.closest('[data-planning-row-action]');
|
|
132
|
+
const currentActionId = actionButton?.dataset.planningRowAction;
|
|
133
|
+
if (!currentActionId || !enabledRowActionIds.includes(currentActionId))
|
|
134
|
+
return;
|
|
135
|
+
event.preventDefault();
|
|
136
|
+
const currentIndex = enabledRowActionIds.indexOf(currentActionId);
|
|
137
|
+
const nextIndex = event.key === 'Home'
|
|
138
|
+
? 0
|
|
139
|
+
: event.key === 'End'
|
|
140
|
+
? enabledRowActionIds.length - 1
|
|
141
|
+
: event.key === 'ArrowRight'
|
|
142
|
+
? (currentIndex + 1) % enabledRowActionIds.length
|
|
143
|
+
: (currentIndex - 1 + enabledRowActionIds.length) % enabledRowActionIds.length;
|
|
144
|
+
const nextActionId = enabledRowActionIds[nextIndex];
|
|
145
|
+
setActiveRowActionId(nextActionId);
|
|
146
|
+
rowActionRefs.current[nextActionId]?.focus();
|
|
147
|
+
}, [enabledRowActionIds]);
|
|
148
|
+
const handleConfirmArchive = async () => {
|
|
149
|
+
if (!onArchiveReady || archiveBusy)
|
|
150
|
+
return;
|
|
151
|
+
setArchiveBusy(true);
|
|
152
|
+
try {
|
|
153
|
+
const archived = await onArchiveReady();
|
|
154
|
+
if (archived)
|
|
155
|
+
setArchiveConfirmationVisible(false);
|
|
156
|
+
}
|
|
157
|
+
finally {
|
|
158
|
+
setArchiveBusy(false);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const handleLinkInitiative = async (option) => {
|
|
162
|
+
if (!onLinkInitiative || initiativeLinkBusy)
|
|
163
|
+
return;
|
|
164
|
+
setInitiativeLinkBusy(true);
|
|
165
|
+
try {
|
|
166
|
+
const result = await onLinkInitiative(option);
|
|
167
|
+
if (result !== false)
|
|
168
|
+
setInitiativePickerVisible(false);
|
|
169
|
+
}
|
|
170
|
+
finally {
|
|
171
|
+
setInitiativeLinkBusy(false);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
const canLinkInitiative = rowType === 'workstream' && Boolean(onLinkInitiative);
|
|
175
|
+
const initiativeLinkDisabled = isArchived || initiativeLinkBusy || initiativeLinkOptions.length === 0;
|
|
176
|
+
const initiativeLinkTitle = isArchived
|
|
177
|
+
? 'Unarchive this workstream before linking an initiative'
|
|
178
|
+
: initiativeLinkOptions.length === 0
|
|
179
|
+
? 'No initiatives available'
|
|
180
|
+
: 'Link initiative';
|
|
181
|
+
return (_jsx("div", { ref: setDropRef, style: dragStyle, className: `${panelStyles.treeRow} ${isArchived ? panelStyles.treeRowArchived : ''} ${detailOpen ? panelStyles.treeRowDetailOpen : ''} ${showDropReady ? panelStyles.treeRowDropReady : ''} ${isOver ? panelStyles.treeRowDropActive : ''} ${isDragging ? panelStyles.treeRowDragging : ''} ${showDropReady ? panelStyles.treeRowDropMode : ''}`, "data-board-scoped": active || undefined, children: _jsxs("div", { className: panelStyles.rowContent, children: [_jsxs("div", { className: panelStyles.rowTopRow, children: [_jsxs("div", { className: panelStyles.rowReferenceActions, children: [canLinkInitiative ? (_jsx(HierarchyActionBadge, { disabled: initiativeLinkDisabled, onClick: (event) => {
|
|
182
|
+
event.stopPropagation();
|
|
183
|
+
setInitiativePickerVisible((current) => !current);
|
|
184
|
+
}, title: initiativeLinkTitle, ariaLabel: "Link initiative", ariaExpanded: initiativePickerVisible, children: _jsx(Link2, { size: 14, "aria-hidden": "true" }) })) : null, _jsx(PlanningReferenceBadge, { label: referenceLabel || 'Reference pending', entityType: rowType, entityName: title, pending: !referenceLabel })] }), _jsxs("div", { className: panelStyles.rowActions, role: "toolbar", "aria-label": `${rowType === 'initiative' ? 'Initiative' : 'Workstream'} actions for ${title}`, "aria-orientation": "horizontal", onKeyDown: handleRowActionKeyDown, children: [_jsx("button", { type: "button", ref: (node) => {
|
|
185
|
+
rowActionRefs.current.favorite = node;
|
|
186
|
+
}, className: `tf-control-icon tf-control-icon-compact ${panelStyles.favoriteButton} ${favorite ? 'tf-control-icon-active' : ''}`.trim(), onClick: onToggleFavorite, onFocus: () => handleRowActionFocus('favorite'), disabled: !favoriteReady, tabIndex: effectiveActiveRowActionId === 'favorite' ? 0 : -1, "data-planning-row-action": "favorite", title: !favoriteReady
|
|
187
|
+
? 'Loading Favorites'
|
|
188
|
+
: favorite ? `Remove ${rowType} from Favorites` : `Add ${rowType} to Favorites`, "aria-label": !favoriteReady
|
|
189
|
+
? `Loading Favorites for ${rowType} ${title}`
|
|
190
|
+
: favorite ? `Remove ${rowType} ${title} from Favorites` : `Add ${rowType} ${title} to Favorites`, "aria-pressed": favorite, children: _jsx(Star, { size: 14, fill: favorite ? 'currentColor' : 'none', "aria-hidden": "true" }) }), archiveActionVisible ? (_jsx("button", { type: "button", ref: (node) => {
|
|
191
|
+
rowActionRefs.current.archive = node;
|
|
192
|
+
}, className: "tf-control-icon tf-control-icon-compact", onClick: () => setArchiveConfirmationVisible(true), onFocus: () => handleRowActionFocus('archive'), tabIndex: effectiveActiveRowActionId === 'archive' ? 0 : -1, "data-planning-row-action": "archive", title: `Archive completed ${rowType}`, "aria-label": `Archive completed ${rowType} ${title}`, "aria-expanded": archiveConfirmationVisible, children: _jsx(Archive, { size: 14, "aria-hidden": "true" }) })) : null, _jsx("button", { type: "button", ref: (node) => {
|
|
193
|
+
rowActionRefs.current.scope = node;
|
|
194
|
+
}, className: `tf-control-icon tf-control-icon-compact ${panelStyles.scopeButton} ${active ? 'tf-control-icon-active' : ''}`.trim(), onClick: onToggleScope, onFocus: () => handleRowActionFocus('scope'), tabIndex: effectiveActiveRowActionId === 'scope' ? 0 : -1, "data-planning-row-action": "scope", title: active ? 'Clear board scope' : 'Scope board to this item', "aria-label": active ? `Clear board scope for ${title}` : `Scope board to ${title}`, "aria-pressed": active, children: _jsx(Kanban, { size: 14, "aria-hidden": "true" }) }), _jsx("button", { type: "button", ref: (node) => {
|
|
195
|
+
rowActionRefs.current.disclosure = node;
|
|
196
|
+
}, className: `tf-control-icon tf-control-icon-compact ${panelStyles.treeChevron}`.trim(), onClick: expansionEnabled ? onToggleExpand : undefined, onFocus: () => handleRowActionFocus('disclosure'), tabIndex: effectiveActiveRowActionId === 'disclosure' ? 0 : -1, "data-planning-row-action": "disclosure", title: expansionLabel, "aria-label": expansionLabel, "aria-expanded": expansionEnabled ? expanded : false, "aria-controls": expansionEnabled && expanded ? controlsId : undefined, disabled: !expansionEnabled, children: expanded && expansionEnabled
|
|
197
|
+
? _jsx(ChevronDown, { size: 14, "aria-hidden": "true" })
|
|
198
|
+
: _jsx(ChevronRight, { size: 14, "aria-hidden": "true" }) })] })] }), canLinkInitiative && initiativePickerVisible ? (_jsxs("div", { className: `${panelStyles.relationshipPickerRow} ${panelStyles.rowRelationshipPicker}`.trim(), role: "group", "aria-label": `Link ${title} to initiative`, children: [_jsx(PlanningLinkPicker, { options: initiativeLinkOptions, entityLabel: "initiative", onSelect: (option) => void handleLinkInitiative(option), disabled: initiativeLinkBusy }), _jsx("button", { type: "button", className: "tf-control-icon tf-control-icon-compact", disabled: initiativeLinkBusy, onClick: () => setInitiativePickerVisible(false), title: "Cancel initiative link", "aria-label": "Cancel initiative link", children: _jsx(X, { size: 14, "aria-hidden": "true" }) })] })) : null, _jsxs("div", { className: panelStyles.rowBody, children: [draggable ? (_jsx("div", { className: panelStyles.rowLeadingActions, "data-planning-leading-actions": "true", children: _jsx("button", { type: "button", ref: setDragRef, className: panelStyles.dragHandle, title: "Drag workstream", "aria-label": `Drag workstream ${title}`, "data-planning-drag-handle": "true", ...attributes, ...listeners, children: _jsx(GripVertical, { size: 15, "aria-hidden": "true" }) }) })) : null, _jsx("div", { role: "button", tabIndex: 0, className: `${panelStyles.rowButton} ${draggable ? panelStyles.rowButtonWithGrip : ''}`.trim(), onClick: onOpenDetails, onKeyDown: (event) => {
|
|
199
|
+
if (event.key !== 'Enter' && event.key !== ' ')
|
|
200
|
+
return;
|
|
201
|
+
event.preventDefault();
|
|
202
|
+
onOpenDetails();
|
|
203
|
+
}, "aria-label": `View ${rowType} details for ${title}`, "aria-pressed": detailOpen, children: _jsx(PlanningEntitySummary, { item: item, entityType: rowType, workstreamCount: workstreamCount, ownerOption: ownerOption ? toPlanningAssigneeOption(ownerOption) : undefined, ownerOptions: ownerOptions.map(toPlanningAssigneeOption), onChangeOwner: onChangeOwner }) })] }), archiveConfirmationVisible ? (_jsx(PlanningArchiveConfirmation, { entityType: rowType, title: title, activeTaskCount: item.archiveActiveTaskCount, activeWorkstreamCount: item.archiveActiveWorkstreamCount, busy: archiveBusy, onCancel: () => setArchiveConfirmationVisible(false), onConfirm: () => void handleConfirmArchive() })) : null] }) }));
|
|
99
204
|
}
|
|
100
|
-
function
|
|
101
|
-
|
|
205
|
+
function PlanningTreeTaskCard({ task, assigneeOption, assigneeOptions, showTaskCardStatusLabel, onOpenTaskById, onChangeTaskAssignee, onSetTaskStatus, onArchivePlanningTask, }) {
|
|
206
|
+
const [archiveBusy, setArchiveBusy] = React.useState(false);
|
|
207
|
+
const status = getStatusDefinition(task.status).value;
|
|
208
|
+
const canArchive = !task.isArchived
|
|
209
|
+
&& (status === 'done' || status === 'cancelled')
|
|
210
|
+
&& Boolean(onArchivePlanningTask);
|
|
211
|
+
return (_jsx("div", { className: `${panelStyles.listItemButton} ${panelStyles.detailCardButton}`.trim(), children: _jsx(PlanningTaskCard, { task: task, assigneeOption: assigneeOption ? toPlanningAssigneeOption(assigneeOption) : undefined, assigneeOptions: assigneeOptions.map(toPlanningAssigneeOption), showStatusLabel: showTaskCardStatusLabel, onOpen: onOpenTaskById ? () => onOpenTaskById(task.id) : undefined, onAssigneeChange: onChangeTaskAssignee
|
|
212
|
+
? (assignee) => onChangeTaskAssignee(task.id, assignee)
|
|
213
|
+
: undefined, onStatusChange: onSetTaskStatus ? (status) => onSetTaskStatus(task.id, status) : undefined, actions: canArchive ? (_jsx("button", { type: "button", className: "tf-control-icon tf-control-icon-compact", disabled: archiveBusy, onClick: async (event) => {
|
|
214
|
+
event.stopPropagation();
|
|
215
|
+
setArchiveBusy(true);
|
|
216
|
+
try {
|
|
217
|
+
await onArchivePlanningTask?.(task.id);
|
|
218
|
+
}
|
|
219
|
+
finally {
|
|
220
|
+
setArchiveBusy(false);
|
|
221
|
+
}
|
|
222
|
+
}, title: "Archive task", "aria-label": `Archive task ${getTaskReferenceLabel(task) || task.title}`, children: _jsx(Archive, { size: 14, "aria-hidden": "true" }) })) : undefined, compact: true }) }));
|
|
102
223
|
}
|
|
103
|
-
function
|
|
104
|
-
return (
|
|
224
|
+
function CollapsedPane({ label, onExpand, muted = false, }) {
|
|
225
|
+
return (_jsx("div", { className: `${panelStyles.paneShell} ${panelStyles.collapsedPaneShell} ${muted ? panelStyles.collapsedPaneMuted : ''}`.trim(), "data-relationship-state": muted ? 'missing' : undefined, children: _jsxs("div", { className: panelStyles.collapsedPaneHeader, children: [_jsx("button", { type: "button", className: "tf-control-icon", onClick: onExpand, title: `Expand ${label}`, "aria-label": `Expand ${label} pane`, children: _jsx(ChevronRight, { size: 16, "aria-hidden": "true" }) }), _jsx("span", { className: panelStyles.collapsedPaneLabel, children: label })] }) }));
|
|
105
226
|
}
|
|
106
|
-
function
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
227
|
+
function RelationshipPane({ label, title, description, onCollapse, action, paneRef, }) {
|
|
228
|
+
const isEmptyState = !description && !action;
|
|
229
|
+
return (_jsxs("div", { ref: paneRef, "data-planning-pane": `${label.toLowerCase()}-relationship`, className: `${panelStyles.paneShell} ${styles.appScrollbar} tf-scrollbar ${panelStyles.detailPane}`.trim(), style: {
|
|
230
|
+
flex: `0 0 ${PLANNING_DRAWER_DETAIL_WIDTH_PX}px`,
|
|
231
|
+
width: `${PLANNING_DRAWER_DETAIL_WIDTH_PX}px`,
|
|
232
|
+
minWidth: `${PLANNING_DRAWER_DETAIL_WIDTH_PX}px`,
|
|
233
|
+
maxWidth: `${PLANNING_DRAWER_DETAIL_WIDTH_PX}px`,
|
|
234
|
+
}, children: [_jsxs("div", { className: panelStyles.paneHeader, children: [_jsx("h2", { className: panelStyles.paneHeaderLabel, tabIndex: -1, "data-planning-pane-heading": true, children: label }), _jsx("button", { type: "button", className: "tf-control-icon", onClick: onCollapse, "aria-label": `Collapse ${label} pane`, title: `Collapse ${label} pane`, children: _jsx(ChevronLeft, { size: 16, "aria-hidden": "true" }) })] }), _jsx("div", { className: `${panelStyles.paneContent} ${isEmptyState ? panelStyles.relationshipPaneContentEmpty : ''}`.trim(), children: _jsxs("div", { className: `${panelStyles.relationshipState} ${isEmptyState ? panelStyles.relationshipStateEmpty : ''}`.trim(), "data-relationship-display": isEmptyState ? 'empty' : 'detail', children: [_jsx("span", { className: panelStyles.relationshipStateTitle, children: title }), description ? _jsx("p", { className: panelStyles.relationshipStateText, children: description }) : null, action ? (_jsx("button", { type: "button", className: "tf-button-secondary tf-button-compact", onClick: action.onClick, children: action.label })) : null] }) })] }));
|
|
235
|
+
}
|
|
236
|
+
function PlanningDrawerList({ initiatives, standaloneWorkstreams, planningLoadState, taskScope, showArchivedPlanning, currentOwnerId, assigneeOptions, showTaskCardStatusLabel = false, taskArrangeMode = 'execution', activeInitiativeId, activeWorkstreamId, navigatorSort, navigatorSortReady, onNavigatorSortChange, planningFavorites, onTogglePlanningFavorite, favoritesSectionCollapsed, initiativesSectionCollapsed, workstreamsSectionCollapsed, onToggleFavoritesSection, onToggleInitiativesSection, onToggleWorkstreamsSection, expandedInitiativeIds, detail, secondaryPane, onCreateInitiative, onCreateWorkstream, onToggleInitiative, onSelectInitiative, onSelectWorkstream, onOpenInitiativeDetails, onOpenWorkstreamDetails, onOpenNestedWorkstreamDetails, onOpenTaskById, onSetTaskStatus, onChangePlanningOwner, onChangeTaskAssignee, onArchivePlanningTask, onArchiveResolvedWorkstream, onArchiveResolvedInitiative, linkOptions, onAssignInitiativeToWorkstream, onRetryPlanning, }) {
|
|
237
|
+
const [searchQuery, setSearchQuery] = React.useState('');
|
|
238
|
+
const [ownerFilter, setOwnerFilter] = React.useState('all');
|
|
239
|
+
const [filtersExpanded, setFiltersExpanded] = React.useState(false);
|
|
240
|
+
const [expandedWorkstreamIds, setExpandedWorkstreamIds] = React.useState(() => new Set());
|
|
241
|
+
const [expandedFavoriteBranchKeys, setExpandedFavoriteBranchKeys] = React.useState(() => new Set());
|
|
242
|
+
const assigneeOptionByValue = React.useMemo(() => new Map(assigneeOptions
|
|
243
|
+
.filter((option) => !String(option.archivedAt || '').trim())
|
|
244
|
+
.map((option) => [String(option.value || '').trim(), option])), [assigneeOptions]);
|
|
245
|
+
const ownerFilterLeadingOptions = React.useMemo(() => {
|
|
246
|
+
const normalizedCurrentOwnerId = String(currentOwnerId || '').trim();
|
|
247
|
+
const currentOwnerOption = normalizedCurrentOwnerId
|
|
248
|
+
? normalizePlanningOwnerOptions(assigneeOptions, normalizedCurrentOwnerId)
|
|
249
|
+
.find((option) => option.value === normalizedCurrentOwnerId)
|
|
250
|
+
: undefined;
|
|
251
|
+
return [
|
|
252
|
+
{
|
|
253
|
+
value: 'all',
|
|
254
|
+
label: 'All owners',
|
|
255
|
+
icon: 'Users',
|
|
256
|
+
color: 'var(--text-secondary)',
|
|
257
|
+
kind: 'unassigned',
|
|
258
|
+
},
|
|
259
|
+
...(normalizedCurrentOwnerId ? [{
|
|
260
|
+
...currentOwnerOption,
|
|
261
|
+
value: 'mine',
|
|
262
|
+
label: 'Owned by me',
|
|
263
|
+
icon: currentOwnerOption?.icon || 'User',
|
|
264
|
+
color: currentOwnerOption?.color || 'var(--text-secondary)',
|
|
265
|
+
kind: currentOwnerOption?.kind || 'member',
|
|
266
|
+
}] : []),
|
|
267
|
+
{
|
|
268
|
+
value: 'unassigned',
|
|
269
|
+
label: 'Unassigned',
|
|
270
|
+
icon: TASK_ASSIGNEE_UNASSIGNED_ICON,
|
|
271
|
+
color: TASK_ASSIGNEE_UNASSIGNED_COLOR,
|
|
272
|
+
kind: 'unassigned',
|
|
273
|
+
},
|
|
274
|
+
];
|
|
275
|
+
}, [assigneeOptions, currentOwnerId]);
|
|
276
|
+
const navigatorResults = React.useMemo(() => buildPlanningNavigatorResults({
|
|
277
|
+
initiatives,
|
|
278
|
+
standaloneWorkstreams,
|
|
279
|
+
showArchivedPlanning,
|
|
280
|
+
searchQuery,
|
|
281
|
+
ownerFilter,
|
|
282
|
+
currentOwnerId: String(currentOwnerId || ''),
|
|
283
|
+
sort: navigatorSort,
|
|
284
|
+
}), [currentOwnerId, initiatives, navigatorSort, ownerFilter, searchQuery, showArchivedPlanning, standaloneWorkstreams]);
|
|
285
|
+
const planningFavoriteKeys = React.useMemo(() => new Set(planningFavorites.map(getPlanningFavoriteKey)), [planningFavorites]);
|
|
286
|
+
const visibleFavorites = React.useMemo(() => {
|
|
287
|
+
const initiativeById = new Map(initiatives
|
|
288
|
+
.filter((initiative) => matchesPlanningNavigatorItem({
|
|
289
|
+
item: initiative,
|
|
290
|
+
entityType: 'initiative',
|
|
291
|
+
showArchivedPlanning,
|
|
292
|
+
searchQuery,
|
|
293
|
+
ownerFilter,
|
|
294
|
+
currentOwnerId: String(currentOwnerId || ''),
|
|
295
|
+
}))
|
|
296
|
+
.map((initiative) => [initiative.id, initiative]));
|
|
297
|
+
const workstreamById = new Map();
|
|
298
|
+
initiatives.forEach((initiative) => {
|
|
299
|
+
(initiative.allWorkstreams || initiative.workstreams).forEach((workstream) => {
|
|
300
|
+
if (!matchesPlanningNavigatorItem({
|
|
301
|
+
item: workstream,
|
|
302
|
+
entityType: 'workstream',
|
|
303
|
+
showArchivedPlanning,
|
|
304
|
+
searchQuery,
|
|
305
|
+
ownerFilter,
|
|
306
|
+
currentOwnerId: String(currentOwnerId || ''),
|
|
307
|
+
}))
|
|
308
|
+
return;
|
|
309
|
+
workstreamById.set(workstream.id, {
|
|
310
|
+
item: workstream,
|
|
311
|
+
parentInitiativeId: initiative.id,
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
standaloneWorkstreams.forEach((workstream) => {
|
|
316
|
+
if (!matchesPlanningNavigatorItem({
|
|
317
|
+
item: workstream,
|
|
318
|
+
entityType: 'workstream',
|
|
319
|
+
showArchivedPlanning,
|
|
320
|
+
searchQuery,
|
|
321
|
+
ownerFilter,
|
|
322
|
+
currentOwnerId: String(currentOwnerId || ''),
|
|
323
|
+
}))
|
|
324
|
+
return;
|
|
325
|
+
workstreamById.set(workstream.id, {
|
|
326
|
+
item: workstream,
|
|
327
|
+
parentInitiativeId: null,
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
return planningFavorites.reduce((favorites, favorite) => {
|
|
331
|
+
if (favorite.type === 'initiative') {
|
|
332
|
+
const item = initiativeById.get(favorite.id);
|
|
333
|
+
if (item)
|
|
334
|
+
favorites.push({ favorite, item, parentInitiativeId: null });
|
|
335
|
+
return favorites;
|
|
336
|
+
}
|
|
337
|
+
const match = workstreamById.get(favorite.id);
|
|
338
|
+
if (match)
|
|
339
|
+
favorites.push({ favorite, ...match });
|
|
340
|
+
return favorites;
|
|
341
|
+
}, []);
|
|
342
|
+
}, [
|
|
343
|
+
currentOwnerId,
|
|
344
|
+
initiatives,
|
|
345
|
+
ownerFilter,
|
|
346
|
+
planningFavorites,
|
|
347
|
+
searchQuery,
|
|
348
|
+
showArchivedPlanning,
|
|
349
|
+
standaloneWorkstreams,
|
|
350
|
+
]);
|
|
351
|
+
if (taskScope === 'deleted') {
|
|
352
|
+
return (_jsxs("div", { className: panelStyles.scopeSummary, role: "status", children: [_jsx("strong", { children: "Planning is not shown in Trash" }), _jsx("span", { children: "Switch the task scope away from Trash to manage initiatives and workstreams." })] }));
|
|
353
|
+
}
|
|
354
|
+
if (planningLoadState.status === 'loading') {
|
|
355
|
+
return _jsx(PlanningLoadingState, {});
|
|
356
|
+
}
|
|
357
|
+
if (planningLoadState.status === 'error') {
|
|
358
|
+
return (_jsx(PlanningFailureState, { title: "Planning unavailable", message: planningLoadState.error || 'Planning could not be loaded.', retrying: planningLoadState.isRefreshing, onRetry: onRetryPlanning }));
|
|
359
|
+
}
|
|
360
|
+
const archivedInitiativeCount = initiatives.filter((initiative) => Boolean(initiative.isArchived)).length;
|
|
361
|
+
const archivedStandaloneWorkstreamCount = standaloneWorkstreams
|
|
362
|
+
.filter((workstream) => Boolean(workstream.isArchived)).length;
|
|
363
|
+
const hasPlanningEntities = initiatives.length > 0 || standaloneWorkstreams.length > 0;
|
|
364
|
+
const hasAdjustedNavigator = navigatorResults.hasCriteria || navigatorSort !== 'default';
|
|
365
|
+
const clearNavigator = () => {
|
|
366
|
+
setSearchQuery('');
|
|
367
|
+
setOwnerFilter('all');
|
|
368
|
+
if (navigatorSortReady)
|
|
369
|
+
onNavigatorSortChange('default');
|
|
370
|
+
};
|
|
371
|
+
const toggleWorkstreamTasks = (workstreamId) => {
|
|
372
|
+
setExpandedWorkstreamIds((current) => {
|
|
373
|
+
const next = new Set(current);
|
|
374
|
+
if (next.has(workstreamId))
|
|
375
|
+
next.delete(workstreamId);
|
|
376
|
+
else
|
|
377
|
+
next.add(workstreamId);
|
|
378
|
+
return next;
|
|
379
|
+
});
|
|
380
|
+
};
|
|
381
|
+
const toggleFavoriteBranch = (branchKey) => {
|
|
382
|
+
setExpandedFavoriteBranchKeys((current) => {
|
|
383
|
+
const next = new Set(current);
|
|
384
|
+
if (next.has(branchKey))
|
|
385
|
+
next.delete(branchKey);
|
|
386
|
+
else
|
|
387
|
+
next.add(branchKey);
|
|
388
|
+
return next;
|
|
389
|
+
});
|
|
390
|
+
};
|
|
391
|
+
const renderWorkstreamTasks = (workstream, expanded = expandedWorkstreamIds.has(workstream.id), controlsId = `planning-tasks-${workstream.id}`, ariaLabel = `Tasks in ${workstream.title}`) => {
|
|
392
|
+
if (!expanded)
|
|
393
|
+
return null;
|
|
394
|
+
const allTasks = workstream.tasks || [];
|
|
395
|
+
const visibleTasks = arrangePlanningTasks(showArchivedPlanning
|
|
396
|
+
? allTasks
|
|
397
|
+
: allTasks.filter((task) => !task.isArchived), taskArrangeMode);
|
|
398
|
+
return (_jsx("ul", { id: controlsId, className: `${panelStyles.treeChildren} ${panelStyles.treeTaskChildren}`.trim(), "aria-label": ariaLabel, children: visibleTasks.length > 0 ? visibleTasks.map((task) => (_jsx("li", { children: _jsx(PlanningTreeTaskCard, { task: task, assigneeOption: task.assignee ? assigneeOptionByValue.get(task.assignee) : undefined, assigneeOptions: assigneeOptions, showTaskCardStatusLabel: showTaskCardStatusLabel, onOpenTaskById: onOpenTaskById, onSetTaskStatus: onSetTaskStatus, onChangeTaskAssignee: onChangeTaskAssignee, onArchivePlanningTask: onArchivePlanningTask }) }, task.id))) : (_jsx("li", { className: panelStyles.passiveGuidance, children: "Archived tasks are hidden." })) }));
|
|
399
|
+
};
|
|
400
|
+
const initiativeEmptyTitle = navigatorResults.hasCriteria
|
|
401
|
+
? 'No matching initiatives'
|
|
402
|
+
: archivedInitiativeCount > 0 ? 'No active initiatives' : 'No initiatives yet';
|
|
403
|
+
const initiativeEmptyText = navigatorResults.hasCriteria
|
|
404
|
+
? 'No initiatives match the current planning search and owner filter.'
|
|
405
|
+
: archivedInitiativeCount > 0
|
|
406
|
+
? `${archivedInitiativeCount} archived ${archivedInitiativeCount === 1 ? 'initiative is' : 'initiatives are'} hidden. Use the archive visibility control above to view ${archivedInitiativeCount === 1 ? 'it' : 'them'}.`
|
|
407
|
+
: _jsxs(_Fragment, { children: ["Initiatives give larger efforts a clear home without crowding the task board. Use the ", _jsx("code", { children: "+" }), " action above to create the first one."] });
|
|
408
|
+
const workstreamEmptyTitle = navigatorResults.hasCriteria
|
|
409
|
+
? 'No matching standalone workstreams'
|
|
410
|
+
: archivedStandaloneWorkstreamCount > 0 ? 'No active standalone workstreams' : 'No standalone workstreams yet';
|
|
411
|
+
const workstreamEmptyText = navigatorResults.hasCriteria
|
|
412
|
+
? 'No standalone workstreams match the current planning search and owner filter.'
|
|
413
|
+
: archivedStandaloneWorkstreamCount > 0
|
|
414
|
+
? `${archivedStandaloneWorkstreamCount} archived standalone ${archivedStandaloneWorkstreamCount === 1 ? 'workstream is' : 'workstreams are'} hidden. Use the archive visibility control above to view ${archivedStandaloneWorkstreamCount === 1 ? 'it' : 'them'}.`
|
|
415
|
+
: _jsxs(_Fragment, { children: ["Smaller projects can still use workstreams without needing initiative-level structure. Use the ", _jsx("code", { children: "+" }), " action above to add one."] });
|
|
416
|
+
return (_jsxs(_Fragment, { children: [planningLoadState.status === 'partial'
|
|
417
|
+
&& planningLoadState.collections.initiatives === 'ready'
|
|
418
|
+
&& planningLoadState.collections.workstreams === 'ready' ? (_jsx(PlanningFailureState, { compact: true, title: "Planning may be incomplete", message: planningLoadState.error || 'The latest planning refresh did not finish. Existing data is still shown.', retrying: planningLoadState.isRefreshing, onRetry: onRetryPlanning })) : null, hasPlanningEntities ? (_jsxs("div", { className: panelStyles.navigatorControls, children: [_jsxs("div", { className: panelStyles.navigatorSearchRow, children: [_jsxs("div", { className: panelStyles.navigatorSearch, children: [_jsx(Search, { size: 14, "aria-hidden": "true" }), _jsx("span", { className: panelStyles.visuallyHidden, children: "Search planning" }), _jsx("input", { type: "search", value: searchQuery, onChange: (event) => setSearchQuery(event.target.value), placeholder: "Search initiatives and workstreams", "aria-label": "Search planning" }), searchQuery ? (_jsx("button", { type: "button", className: panelStyles.navigatorClearSearch, onClick: () => setSearchQuery(''), "aria-label": "Clear planning search", title: "Clear search", children: _jsx(X, { size: 13, "aria-hidden": "true" }) })) : null] }), _jsx("button", { type: "button", className: `tf-control-icon ${filtersExpanded || ownerFilter !== 'all' || navigatorSort !== 'default' ? panelStyles.toggleActive : ''}`.trim(), "aria-label": "Filter and sort planning", title: "Filter and sort planning", "aria-expanded": filtersExpanded, "aria-controls": "planning-navigator-options", onClick: () => setFiltersExpanded((current) => !current), children: _jsx(Filter, { size: 15, "aria-hidden": "true" }) })] }), filtersExpanded ? (_jsxs("div", { id: "planning-navigator-options", className: panelStyles.navigatorOptions, children: [_jsxs("div", { className: panelStyles.navigatorOptionField, children: [_jsx("span", { className: panelStyles.navigatorOptionLabel, children: "Owner" }), _jsx(PlanningOwnerDropdown, { value: ownerFilter, options: assigneeOptions, leadingOptions: ownerFilterLeadingOptions, includeUnassigned: false, onChange: setOwnerFilter, disabled: false, ariaLabel: "Filter planning by owner", className: panelStyles.navigatorDropdown })] }), _jsxs("div", { className: panelStyles.navigatorOptionField, children: [_jsx("span", { className: panelStyles.navigatorOptionLabel, children: "Sort" }), _jsx(TaxonomyDropdown, { value: navigatorSort, options: PLANNING_NAVIGATOR_SORT_OPTIONS, onChange: (value) => onNavigatorSortChange(String(value)), disabled: !navigatorSortReady, ariaLabel: "Sort planning", className: panelStyles.navigatorDropdown, portalPanel: true, panelAlign: "start", triggerContent: (_jsxs("span", { className: panelStyles.navigatorDropdownTrigger, children: [_jsx(ArrowUpDown, { size: 14, "aria-hidden": "true" }), _jsx("span", { children: PLANNING_NAVIGATOR_SORT_OPTIONS.find((option) => option.value === navigatorSort)?.label })] })), renderOptionContent: (option) => option.label })] }), _jsx("button", { type: "button", className: "tf-control-icon", onClick: clearNavigator, disabled: !hasAdjustedNavigator, "aria-label": "Reset planning filters and sort", title: "Reset planning filters and sort", children: _jsx(RotateCcw, { size: 14, "aria-hidden": "true" }) })] })) : null, _jsxs("span", { className: panelStyles.visuallyHidden, role: "status", "aria-live": "polite", children: [navigatorResults.resultCount, " planning ", navigatorResults.resultCount === 1 ? 'result' : 'results'] })] })) : null, navigatorResults.hasCriteria && navigatorResults.resultCount === 0 ? (_jsxs("div", { className: panelStyles.navigatorEmpty, role: "status", children: [_jsx("strong", { children: "No planning matches" }), _jsx("span", { children: "Try another title or reference, or clear the owner filter." }), _jsx("button", { type: "button", onClick: clearNavigator, children: "Clear search and filters" })] })) : (_jsxs(_Fragment, { children: [visibleFavorites.length > 0 ? (_jsxs("div", { className: panelStyles.sectionGroup, children: [_jsx(DisclosureSectionHeader, { label: "Favorites", count: visibleFavorites.length, expanded: !favoritesSectionCollapsed, expandedTitle: "Collapse favorites", collapsedTitle: "Expand favorites", onToggle: onToggleFavoritesSection, controlsId: "planning-favorites-section" }), _jsx("ul", { id: "planning-favorites-section", className: panelStyles.treeList, "aria-label": "Favorite planning items", hidden: favoritesSectionCollapsed, children: visibleFavorites.map(({ favorite, item, parentInitiativeId }) => {
|
|
419
|
+
const detailOpen = favorite.type === 'initiative'
|
|
420
|
+
? detail?.type === 'initiative' && detail.item.id === item.id
|
|
421
|
+
: (detail?.type === 'workstream' && detail.item.id === item.id)
|
|
422
|
+
|| (secondaryPane?.kind === 'detail' && secondaryPane.detail.item.id === item.id);
|
|
423
|
+
const favoriteInitiative = favorite.type === 'initiative'
|
|
424
|
+
? item
|
|
425
|
+
: null;
|
|
426
|
+
const favoriteWorkstream = favorite.type === 'workstream'
|
|
427
|
+
? item
|
|
428
|
+
: null;
|
|
429
|
+
const initiativeWorkstreams = favoriteInitiative
|
|
430
|
+
? favoriteInitiative.allWorkstreams || favoriteInitiative.workstreams
|
|
431
|
+
: [];
|
|
432
|
+
const visibleInitiativeWorkstreams = initiativeWorkstreams.filter((workstream) => (showArchivedPlanning || !workstream.isArchived));
|
|
433
|
+
const favoriteBranchKey = `favorite:${favorite.type}:${item.id}`;
|
|
434
|
+
const favoriteExpanded = expandedFavoriteBranchKeys.has(favoriteBranchKey);
|
|
435
|
+
const favoriteControlsId = `planning-${favoriteBranchKey.replaceAll(':', '-')}-children`;
|
|
436
|
+
return (_jsxs("li", { children: [_jsx(PlanningRow, { rowId: `favorite:${favorite.type}:${item.id}`, rowType: favorite.type, referenceLabel: favorite.type === 'initiative'
|
|
437
|
+
? formatInitiativeReference(item)
|
|
438
|
+
: formatWorkstreamReference(item), item: item, ownerOption: item.ownerId ? assigneeOptionByValue.get(item.ownerId) : undefined, ownerOptions: assigneeOptions, onChangeOwner: (ownerId) => onChangePlanningOwner(favorite.type, item.id, ownerId === 'unassigned' ? '' : ownerId), workstreamCount: favoriteInitiative
|
|
439
|
+
? visibleInitiativeWorkstreams.length
|
|
440
|
+
: undefined, active: favorite.type === 'initiative'
|
|
441
|
+
? activeInitiativeId === item.id && !activeWorkstreamId
|
|
442
|
+
: activeWorkstreamId === item.id, isArchived: Boolean(item.isArchived), detailOpen: detailOpen, canExpand: favorite.type === 'initiative'
|
|
443
|
+
? initiativeWorkstreams.length > 0
|
|
444
|
+
: Boolean(favoriteWorkstream?.tasks?.length), expanded: favoriteExpanded, controlsId: favoriteControlsId, onToggleExpand: () => toggleFavoriteBranch(favoriteBranchKey), onToggleScope: () => {
|
|
445
|
+
if (favorite.type === 'initiative') {
|
|
446
|
+
onSelectInitiative(item.id);
|
|
447
|
+
}
|
|
448
|
+
else {
|
|
449
|
+
onSelectWorkstream(item.id, parentInitiativeId);
|
|
450
|
+
}
|
|
451
|
+
}, favoriteReady: navigatorSortReady, onOpenDetails: () => {
|
|
452
|
+
if (favorite.type === 'initiative') {
|
|
453
|
+
onOpenInitiativeDetails(item.id);
|
|
454
|
+
}
|
|
455
|
+
else if (parentInitiativeId) {
|
|
456
|
+
onOpenInitiativeDetails(parentInitiativeId);
|
|
457
|
+
onOpenNestedWorkstreamDetails(item.id);
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
onOpenWorkstreamDetails(item.id);
|
|
461
|
+
}
|
|
462
|
+
}, favorite: true, onToggleFavorite: () => onTogglePlanningFavorite(favorite), onArchiveReady: favorite.type === 'initiative'
|
|
463
|
+
? onArchiveResolvedInitiative
|
|
464
|
+
? () => onArchiveResolvedInitiative(item.id)
|
|
465
|
+
: undefined
|
|
466
|
+
: onArchiveResolvedWorkstream
|
|
467
|
+
? () => onArchiveResolvedWorkstream(item.id)
|
|
468
|
+
: undefined, hierarchyInteractions: false, initiativeLinkOptions: favorite.type === 'workstream' && !parentInitiativeId
|
|
469
|
+
? linkOptions.initiatives
|
|
470
|
+
: undefined, onLinkInitiative: favorite.type === 'workstream' && !parentInitiativeId
|
|
471
|
+
? (option) => onAssignInitiativeToWorkstream(item.id, option.referenceLabel)
|
|
472
|
+
: undefined }), favoriteInitiative && favoriteExpanded ? (_jsx("ul", { id: favoriteControlsId, className: panelStyles.treeChildren, "aria-label": `Workstreams in favorite ${favoriteInitiative.title}`, children: visibleInitiativeWorkstreams.length > 0
|
|
473
|
+
? visibleInitiativeWorkstreams.map((workstream) => {
|
|
474
|
+
const childBranchKey = `${favoriteBranchKey}:workstream:${workstream.id}`;
|
|
475
|
+
const childExpanded = expandedFavoriteBranchKeys.has(childBranchKey);
|
|
476
|
+
const childControlsId = `planning-${childBranchKey.replaceAll(':', '-')}-children`;
|
|
477
|
+
return (_jsxs("li", { children: [_jsx(PlanningRow, { rowId: childBranchKey, rowType: "workstream", referenceLabel: formatWorkstreamReference(workstream), item: workstream, ownerOption: workstream.ownerId
|
|
478
|
+
? assigneeOptionByValue.get(workstream.ownerId)
|
|
479
|
+
: undefined, ownerOptions: assigneeOptions, onChangeOwner: (ownerId) => onChangePlanningOwner('workstream', workstream.id, ownerId === 'unassigned' ? '' : ownerId), active: activeWorkstreamId === workstream.id, isArchived: Boolean(workstream.isArchived), detailOpen: (detail?.type === 'workstream' && detail.item.id === workstream.id)
|
|
480
|
+
|| (secondaryPane?.kind === 'detail'
|
|
481
|
+
&& secondaryPane.detail.item.id === workstream.id), canExpand: Boolean(workstream.tasks?.length), expanded: childExpanded, controlsId: childControlsId, onToggleExpand: () => toggleFavoriteBranch(childBranchKey), onToggleScope: () => onSelectWorkstream(workstream.id, favoriteInitiative.id), onOpenDetails: () => {
|
|
482
|
+
onOpenInitiativeDetails(favoriteInitiative.id);
|
|
483
|
+
onOpenNestedWorkstreamDetails(workstream.id);
|
|
484
|
+
}, favorite: planningFavoriteKeys.has(getPlanningFavoriteKey({
|
|
485
|
+
type: 'workstream',
|
|
486
|
+
id: workstream.id,
|
|
487
|
+
})), favoriteReady: navigatorSortReady, onToggleFavorite: () => onTogglePlanningFavorite({
|
|
488
|
+
type: 'workstream',
|
|
489
|
+
id: workstream.id,
|
|
490
|
+
}), onArchiveReady: onArchiveResolvedWorkstream
|
|
491
|
+
? () => onArchiveResolvedWorkstream(workstream.id)
|
|
492
|
+
: undefined, hierarchyInteractions: false }), renderWorkstreamTasks(workstream, childExpanded, childControlsId, `Tasks in favorite ${favoriteInitiative.title} / ${workstream.title}`)] }, workstream.id));
|
|
493
|
+
})
|
|
494
|
+
: (_jsx("li", { className: panelStyles.passiveGuidance, children: "Archived workstreams are hidden." })) })) : null, favoriteWorkstream
|
|
495
|
+
? renderWorkstreamTasks(favoriteWorkstream, favoriteExpanded, favoriteControlsId, `Tasks in favorite ${favoriteWorkstream.title}`)
|
|
496
|
+
: null] }, getPlanningFavoriteKey(favorite)));
|
|
497
|
+
}) })] })) : null, _jsxs("div", { className: panelStyles.sectionGroup, children: [_jsx(DisclosureSectionHeader, { label: "Initiatives", count: navigatorResults.initiatives.length, showZeroCount: true, actions: (planningLoadState.collections.initiatives === 'ready' ? (_jsx("button", { type: "button", className: "tf-control-icon", title: "Create initiative", "aria-label": "Create initiative", onClick: onCreateInitiative, children: _jsx(Plus, { size: 15 }) })) : null), expanded: !initiativesSectionCollapsed, expandedTitle: "Collapse initiatives", collapsedTitle: "Expand initiatives", onToggle: onToggleInitiativesSection, controlsId: !initiativesSectionCollapsed ? 'planning-initiatives-section' : undefined }), !initiativesSectionCollapsed ? (_jsx("ul", { id: "planning-initiatives-section", className: panelStyles.treeList, "aria-label": "Initiatives", children: planningLoadState.collections.initiatives === 'error' ? (_jsx("li", { children: _jsx(PlanningFailureState, { compact: true, title: "Initiatives unavailable", message: "Initiatives could not be loaded.", retrying: planningLoadState.isRefreshing, onRetry: onRetryPlanning }) })) : navigatorResults.initiatives.length === 0 ? (_jsxs("li", { className: panelStyles.emptyPanel, children: [_jsx("div", { className: panelStyles.emptyPanelTitle, children: initiativeEmptyTitle }), _jsx("div", { className: panelStyles.emptyPanelText, children: initiativeEmptyText })] })) : navigatorResults.initiatives.map(({ initiative, workstreams: resultWorkstreams }) => {
|
|
498
|
+
const allWorkstreams = initiative.allWorkstreams || initiative.workstreams;
|
|
499
|
+
const treeWorkstreams = showArchivedPlanning
|
|
500
|
+
? allWorkstreams
|
|
501
|
+
: allWorkstreams.filter((workstream) => !workstream.isArchived);
|
|
502
|
+
const displayedWorkstreams = resultWorkstreams;
|
|
503
|
+
const expanded = navigatorResults.hasCriteria
|
|
504
|
+
? displayedWorkstreams.length > 0
|
|
505
|
+
: expandedInitiativeIds.has(initiative.id);
|
|
506
|
+
return (_jsxs("li", { children: [_jsx(PlanningRow, { rowId: initiative.id, rowType: "initiative", referenceLabel: formatInitiativeReference(initiative), item: initiative, ownerOption: initiative.ownerId ? assigneeOptionByValue.get(initiative.ownerId) : undefined, ownerOptions: assigneeOptions, onChangeOwner: (ownerId) => onChangePlanningOwner('initiative', initiative.id, ownerId === 'unassigned' ? '' : ownerId), workstreamCount: treeWorkstreams.length, active: activeInitiativeId === initiative.id && !activeWorkstreamId, isArchived: Boolean(initiative.isArchived), detailOpen: detail?.type === 'initiative' && detail.item.id === initiative.id, canExpand: allWorkstreams.length > 0, expanded: expanded, controlsId: `planning-children-${initiative.id}`, onToggleExpand: () => onToggleInitiative(initiative.id), onToggleScope: () => onSelectInitiative(initiative.id), onOpenDetails: () => onOpenInitiativeDetails(initiative.id), favorite: planningFavoriteKeys.has(getPlanningFavoriteKey({ type: 'initiative', id: initiative.id })), favoriteReady: navigatorSortReady, onToggleFavorite: () => onTogglePlanningFavorite({ type: 'initiative', id: initiative.id }), onArchiveReady: onArchiveResolvedInitiative
|
|
507
|
+
? () => onArchiveResolvedInitiative(initiative.id)
|
|
508
|
+
: undefined }), expanded && displayedWorkstreams.length > 0 && (_jsx("ul", { id: `planning-children-${initiative.id}`, className: panelStyles.treeChildren, "aria-label": `Workstreams in ${initiative.title}`, children: displayedWorkstreams.map((workstream) => (_jsxs("li", { children: [_jsx(PlanningRow, { rowId: workstream.id, rowType: "workstream", referenceLabel: formatWorkstreamReference(workstream), item: workstream, ownerOption: workstream.ownerId ? assigneeOptionByValue.get(workstream.ownerId) : undefined, ownerOptions: assigneeOptions, onChangeOwner: (ownerId) => onChangePlanningOwner('workstream', workstream.id, ownerId === 'unassigned' ? '' : ownerId), active: activeWorkstreamId === workstream.id, isArchived: Boolean(workstream.isArchived), detailOpen: (detail?.type === 'workstream' && detail.item.id === workstream.id)
|
|
509
|
+
|| (secondaryPane?.kind === 'detail' && secondaryPane.detail.item.id === workstream.id), canExpand: (workstream.tasks || []).length > 0, expanded: expandedWorkstreamIds.has(workstream.id), controlsId: `planning-tasks-${workstream.id}`, onToggleExpand: () => toggleWorkstreamTasks(workstream.id), onToggleScope: () => onSelectWorkstream(workstream.id, initiative.id), onOpenDetails: () => {
|
|
510
|
+
onOpenInitiativeDetails(initiative.id);
|
|
511
|
+
onOpenNestedWorkstreamDetails(workstream.id);
|
|
512
|
+
}, favorite: planningFavoriteKeys.has(getPlanningFavoriteKey({ type: 'workstream', id: workstream.id })), favoriteReady: navigatorSortReady, onToggleFavorite: () => onTogglePlanningFavorite({ type: 'workstream', id: workstream.id }), onArchiveReady: onArchiveResolvedWorkstream
|
|
513
|
+
? () => onArchiveResolvedWorkstream(workstream.id)
|
|
514
|
+
: undefined }), renderWorkstreamTasks(workstream)] }, workstream.id))) }))] }, initiative.id));
|
|
515
|
+
}) })) : null] }), _jsxs("div", { className: panelStyles.sectionGroup, children: [_jsx(DisclosureSectionHeader, { label: "Workstreams", count: navigatorResults.standaloneWorkstreams.length, showZeroCount: true, actions: (planningLoadState.collections.workstreams === 'ready' ? (_jsx("button", { type: "button", className: "tf-control-icon", title: "Create workstream", "aria-label": "Create workstream", onClick: onCreateWorkstream, children: _jsx(Plus, { size: 15 }) })) : null), expanded: !workstreamsSectionCollapsed, expandedTitle: "Collapse workstreams", collapsedTitle: "Expand workstreams", onToggle: onToggleWorkstreamsSection, controlsId: !workstreamsSectionCollapsed ? 'planning-workstreams-section' : undefined }), !workstreamsSectionCollapsed ? (_jsx("ul", { id: "planning-workstreams-section", className: panelStyles.treeList, "aria-label": "Standalone workstreams", children: planningLoadState.collections.workstreams === 'error' ? (_jsx("li", { children: _jsx(PlanningFailureState, { compact: true, title: "Workstreams unavailable", message: "Workstreams could not be loaded.", retrying: planningLoadState.isRefreshing, onRetry: onRetryPlanning }) })) : navigatorResults.standaloneWorkstreams.length === 0 ? (_jsxs("li", { className: panelStyles.emptyPanel, children: [_jsx("div", { className: panelStyles.emptyPanelTitle, children: workstreamEmptyTitle }), _jsx("div", { className: panelStyles.emptyPanelText, children: workstreamEmptyText })] })) : navigatorResults.standaloneWorkstreams.map((workstream) => (_jsxs("li", { children: [_jsx(PlanningRow, { rowId: workstream.id, rowType: "workstream", referenceLabel: formatWorkstreamReference(workstream), item: workstream, ownerOption: workstream.ownerId ? assigneeOptionByValue.get(workstream.ownerId) : undefined, ownerOptions: assigneeOptions, onChangeOwner: (ownerId) => onChangePlanningOwner('workstream', workstream.id, ownerId === 'unassigned' ? '' : ownerId), active: activeWorkstreamId === workstream.id, isArchived: Boolean(workstream.isArchived), detailOpen: (detail?.type === 'workstream' && detail.item.id === workstream.id)
|
|
516
|
+
|| (secondaryPane?.kind === 'detail' && secondaryPane.detail.item.id === workstream.id), canExpand: (workstream.tasks || []).length > 0, expanded: expandedWorkstreamIds.has(workstream.id), controlsId: `planning-tasks-${workstream.id}`, onToggleExpand: () => toggleWorkstreamTasks(workstream.id), onToggleScope: () => onSelectWorkstream(workstream.id, null), onOpenDetails: () => onOpenWorkstreamDetails(workstream.id), favorite: planningFavoriteKeys.has(getPlanningFavoriteKey({ type: 'workstream', id: workstream.id })), favoriteReady: navigatorSortReady, onToggleFavorite: () => onTogglePlanningFavorite({ type: 'workstream', id: workstream.id }), onArchiveReady: onArchiveResolvedWorkstream
|
|
517
|
+
? () => onArchiveResolvedWorkstream(workstream.id)
|
|
518
|
+
: undefined, initiativeLinkOptions: linkOptions.initiatives, onLinkInitiative: (option) => onAssignInitiativeToWorkstream(workstream.id, option.referenceLabel) }), renderWorkstreamTasks(workstream)] }, workstream.id))) })) : null] })] }))] }));
|
|
165
519
|
}
|
|
166
|
-
function
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
520
|
+
function PlanningLoadingState() {
|
|
521
|
+
return (_jsxs("div", { className: panelStyles.loadingState, role: "status", "aria-live": "polite", children: [_jsx("span", { className: panelStyles.visuallyHidden, children: "Loading planning" }), [0, 1, 2].map((index) => (_jsxs("div", { className: panelStyles.loadingRow, "aria-hidden": "true", children: [_jsx("span", { className: panelStyles.loadingBadge }), _jsx("span", { className: panelStyles.loadingTitle }), _jsx("span", { className: panelStyles.loadingMeta })] }, index)))] }));
|
|
522
|
+
}
|
|
523
|
+
function PlanningFailureState({ title, message, retrying, onRetry, compact = false, }) {
|
|
524
|
+
return (_jsxs("div", { className: `${panelStyles.failureState} ${compact ? panelStyles.failureStateCompact : ''} tf-surface-inset`.trim(), role: "alert", children: [_jsxs("div", { className: panelStyles.failureCopy, children: [_jsx("strong", { children: title }), _jsx("span", { children: message })] }), _jsx("button", { type: "button", className: "tf-button-ghost tf-button-compact", disabled: retrying, onClick: onRetry, children: retrying ? 'Retrying…' : 'Retry' })] }));
|
|
525
|
+
}
|
|
526
|
+
function PlanningDrawerDetailView({ detail, showArchivedChildren, inlineEditor, selectedChildWorkstreamId, currentWorkspaceId, currentActorId, theme, onOpenNestedWorkstreamDetails, onArchivePlanningTask, onArchiveResolvedWorkstream, onArchiveResolvedEntity, onEdit, onChangeOwner, onChangePlanningOwner, onArchive, onUnarchive, onCreateTaskInWorkstream, onCreateWorkstreamInInitiative, onOpenTaskById, onChangeTaskAssignee, taskReferences, onAssignTaskToWorkstream, onAssignInitiativeToWorkstream, onAttachTaskToWorkstreamByReference, onAttachWorkstreamToInitiativeByReference, onAddPlanningContextFile, onRemovePlanningContextFile, onUpdatePlanningContextCaption, parentInitiative = null, assigneeOptions, linkOptions, showTaskCardStatusLabel = false, taskArrangeMode = 'execution', onTaskArrangeModeChange = () => { }, onReorderWorkstreamTasks, onSetTaskStatus, hydrationState, onRetryHydration, }) {
|
|
527
|
+
const inlineEditorFormId = React.useId();
|
|
528
|
+
const [isAttachingReference, setIsAttachingReference] = React.useState(false);
|
|
529
|
+
const [showParentLinkPicker, setShowParentLinkPicker] = React.useState(false);
|
|
530
|
+
const [pendingUnlink, setPendingUnlink] = React.useState(null);
|
|
531
|
+
const [relationshipRecovery, setRelationshipRecovery] = React.useState(null);
|
|
532
|
+
const [isChangingRelationship, setIsChangingRelationship] = React.useState(false);
|
|
533
|
+
const [pendingArchiveWorkstreamId, setPendingArchiveWorkstreamId] = React.useState(null);
|
|
534
|
+
const [archiveWorkstreamBusy, setArchiveWorkstreamBusy] = React.useState(false);
|
|
535
|
+
const [archiveEntityConfirmationVisible, setArchiveEntityConfirmationVisible] = React.useState(false);
|
|
536
|
+
const [archiveEntityBusy, setArchiveEntityBusy] = React.useState(false);
|
|
537
|
+
const [archivingTaskId, setArchivingTaskId] = React.useState(null);
|
|
538
|
+
const [ownerValue, setOwnerValue] = React.useState(String(detail.item.ownerId || ''));
|
|
539
|
+
const [isSavingOwner, setIsSavingOwner] = React.useState(false);
|
|
170
540
|
const { active } = useDndContext();
|
|
171
541
|
const dragType = String(active?.data?.current?.type || '');
|
|
172
542
|
const canDropTask = detail.type === 'workstream' && dragType === 'task-card';
|
|
@@ -192,232 +562,522 @@ function PlanningDrawerDetailView({ detail, currentWorkspaceId, onOpenNestedWork
|
|
|
192
562
|
return [];
|
|
193
563
|
return detail.item.tasks || [];
|
|
194
564
|
}, [detail.item, detail.type]);
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
565
|
+
const assigneeOptionByValue = React.useMemo(() => new Map(assigneeOptions
|
|
566
|
+
.filter((option) => !String(option.archivedAt || '').trim())
|
|
567
|
+
.map((option) => [String(option.value || '').trim(), option])), [assigneeOptions]);
|
|
198
568
|
const visibleChildItems = showArchivedChildren
|
|
199
569
|
? childItems
|
|
200
570
|
: childItems.filter((workstream) => !workstream.isArchived);
|
|
201
|
-
const visibleTaskItems = showArchivedChildren
|
|
571
|
+
const visibleTaskItems = arrangePlanningTasks(showArchivedChildren
|
|
202
572
|
? taskItems
|
|
203
|
-
: taskItems.filter((task) => !task.isArchived);
|
|
573
|
+
: taskItems.filter((task) => !task.isArchived), taskArrangeMode);
|
|
574
|
+
const visibleChildCount = detail.type === 'initiative'
|
|
575
|
+
? visibleChildItems.length
|
|
576
|
+
: visibleTaskItems.length;
|
|
204
577
|
const detailLabel = detail.type === 'initiative' ? 'Initiative' : 'Workstream';
|
|
205
578
|
const detailReferenceLabel = detail.type === 'initiative'
|
|
206
579
|
? formatInitiativeReference(detail.item)
|
|
207
580
|
: formatWorkstreamReference(detail.item);
|
|
581
|
+
const archiveDetailState = resolvePlanningArchiveDetailState({
|
|
582
|
+
entityType: detail.type,
|
|
583
|
+
isArchived: detail.item.isArchived,
|
|
584
|
+
taskCount: detail.item.taskCount,
|
|
585
|
+
completedTaskCount: detail.item.completedTaskCount,
|
|
586
|
+
archiveReady: detail.item.archiveReady,
|
|
587
|
+
activeWorkstreamCount: detail.item.archiveActiveWorkstreamCount,
|
|
588
|
+
});
|
|
589
|
+
const archiveActionLabel = archiveDetailState.mode === 'archived'
|
|
590
|
+
? `Unarchive ${detailLabel.toLowerCase()}`
|
|
591
|
+
: archiveDetailState.mode === 'blocked'
|
|
592
|
+
? `Archive unavailable — active ${archiveDetailState.remainingKind === 'task' ? 'tasks' : 'workstreams'} remain`
|
|
593
|
+
: archiveDetailState.mode === 'checking'
|
|
594
|
+
? 'Archive availability is still loading'
|
|
595
|
+
: `Archive ${detailLabel.toLowerCase()}`;
|
|
208
596
|
React.useEffect(() => {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
597
|
+
setIsAttachingReference(false);
|
|
598
|
+
setShowParentLinkPicker(false);
|
|
599
|
+
setPendingUnlink(null);
|
|
600
|
+
setRelationshipRecovery(null);
|
|
601
|
+
setIsChangingRelationship(false);
|
|
602
|
+
setArchiveEntityConfirmationVisible(false);
|
|
212
603
|
}, [detail.item.id, detail.type]);
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
604
|
+
React.useEffect(() => {
|
|
605
|
+
setOwnerValue(String(detail.item.ownerId || ''));
|
|
606
|
+
}, [detail.item.id, detail.item.ownerId, detail.type]);
|
|
607
|
+
const handleOwnerChange = React.useCallback(async (nextOwnerId) => {
|
|
608
|
+
if (!onChangeOwner || isSavingOwner || nextOwnerId === ownerValue)
|
|
609
|
+
return;
|
|
610
|
+
const previousOwnerId = ownerValue;
|
|
611
|
+
setOwnerValue(nextOwnerId);
|
|
612
|
+
setIsSavingOwner(true);
|
|
613
|
+
try {
|
|
614
|
+
await onChangeOwner(nextOwnerId);
|
|
615
|
+
}
|
|
616
|
+
catch {
|
|
617
|
+
setOwnerValue(previousOwnerId);
|
|
618
|
+
}
|
|
619
|
+
finally {
|
|
620
|
+
setIsSavingOwner(false);
|
|
621
|
+
}
|
|
622
|
+
}, [isSavingOwner, onChangeOwner, ownerValue]);
|
|
623
|
+
const handleConfirmArchiveEntity = React.useCallback(async () => {
|
|
624
|
+
if (!onArchiveResolvedEntity || archiveEntityBusy)
|
|
216
625
|
return;
|
|
217
|
-
|
|
218
|
-
|
|
626
|
+
setArchiveEntityBusy(true);
|
|
627
|
+
try {
|
|
628
|
+
const archived = await onArchiveResolvedEntity(detail.item.id);
|
|
629
|
+
if (archived)
|
|
630
|
+
setArchiveEntityConfirmationVisible(false);
|
|
219
631
|
}
|
|
220
|
-
|
|
221
|
-
|
|
632
|
+
finally {
|
|
633
|
+
setArchiveEntityBusy(false);
|
|
634
|
+
}
|
|
635
|
+
}, [archiveEntityBusy, detail.item.id, onArchiveResolvedEntity]);
|
|
636
|
+
const hasAttachReferenceHandler = detail.type === 'initiative'
|
|
637
|
+
? Boolean(onAttachWorkstreamToInitiativeByReference)
|
|
638
|
+
: Boolean(onAttachTaskToWorkstreamByReference);
|
|
639
|
+
const handleAttachReference = React.useCallback(async (option) => {
|
|
640
|
+
if (isAttachingReference)
|
|
641
|
+
return;
|
|
642
|
+
const attach = detail.type === 'initiative'
|
|
643
|
+
? onAttachWorkstreamToInitiativeByReference
|
|
644
|
+
: onAttachTaskToWorkstreamByReference;
|
|
645
|
+
if (!attach)
|
|
646
|
+
return;
|
|
647
|
+
setIsAttachingReference(true);
|
|
648
|
+
try {
|
|
649
|
+
await attach(detail.item.id, option.referenceLabel);
|
|
650
|
+
}
|
|
651
|
+
finally {
|
|
652
|
+
setIsAttachingReference(false);
|
|
222
653
|
}
|
|
223
|
-
setAttachReference('');
|
|
224
654
|
}, [
|
|
225
|
-
attachReference,
|
|
226
655
|
detail.item.id,
|
|
227
656
|
detail.type,
|
|
657
|
+
isAttachingReference,
|
|
228
658
|
onAttachTaskToWorkstreamByReference,
|
|
229
659
|
onAttachWorkstreamToInitiativeByReference,
|
|
230
660
|
]);
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
661
|
+
const handleLinkInitiative = React.useCallback(async (option) => {
|
|
662
|
+
if (!onAssignInitiativeToWorkstream || detail.type !== 'workstream' || isChangingRelationship)
|
|
663
|
+
return;
|
|
664
|
+
setIsChangingRelationship(true);
|
|
665
|
+
try {
|
|
666
|
+
const result = await onAssignInitiativeToWorkstream(detail.item.id, option.referenceLabel);
|
|
667
|
+
if (result !== false)
|
|
668
|
+
setShowParentLinkPicker(false);
|
|
669
|
+
}
|
|
670
|
+
finally {
|
|
671
|
+
setIsChangingRelationship(false);
|
|
672
|
+
}
|
|
673
|
+
}, [detail.item.id, detail.type, isChangingRelationship, onAssignInitiativeToWorkstream]);
|
|
235
674
|
const parentInitiativeReferenceLabel = detail.type === 'workstream' && parentInitiative
|
|
236
675
|
? formatInitiativeReference(parentInitiative)
|
|
237
676
|
: '';
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
677
|
+
const linkedChildIds = React.useMemo(() => new Set(detail.type === 'initiative'
|
|
678
|
+
? childItems.map((workstream) => workstream.id)
|
|
679
|
+
: taskItems.map((task) => task.id)), [childItems, detail.type, taskItems]);
|
|
680
|
+
const availableLinkOptions = React.useMemo(() => (detail.type === 'initiative' ? linkOptions.workstreams : linkOptions.tasks).filter((option) => !linkedChildIds.has(option.id)), [detail.type, linkOptions.tasks, linkOptions.workstreams, linkedChildIds]);
|
|
681
|
+
const handleConfirmUnlink = React.useCallback(async () => {
|
|
682
|
+
if (!pendingUnlink || isChangingRelationship)
|
|
683
|
+
return;
|
|
684
|
+
setIsChangingRelationship(true);
|
|
685
|
+
try {
|
|
686
|
+
if (pendingUnlink.entityType === 'workstream') {
|
|
687
|
+
if (!onAssignInitiativeToWorkstream)
|
|
688
|
+
return;
|
|
689
|
+
const restoreInitiativeReference = detail.type === 'initiative'
|
|
690
|
+
? detailReferenceLabel
|
|
691
|
+
: parentInitiativeReferenceLabel;
|
|
692
|
+
const result = await onAssignInitiativeToWorkstream?.(pendingUnlink.id, null);
|
|
693
|
+
if (result === false)
|
|
694
|
+
return;
|
|
695
|
+
setRelationshipRecovery({
|
|
696
|
+
entityType: pendingUnlink.entityType,
|
|
697
|
+
id: pendingUnlink.id,
|
|
698
|
+
message: `${pendingUnlink.referenceLabel} removed from its initiative.`,
|
|
699
|
+
onUndo: async () => {
|
|
700
|
+
if (!restoreInitiativeReference)
|
|
701
|
+
return;
|
|
702
|
+
const undoResult = await onAssignInitiativeToWorkstream?.(pendingUnlink.id, restoreInitiativeReference);
|
|
703
|
+
if (undoResult !== false)
|
|
704
|
+
setRelationshipRecovery(null);
|
|
705
|
+
},
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
if (!onAssignTaskToWorkstream)
|
|
710
|
+
return;
|
|
711
|
+
const result = await onAssignTaskToWorkstream(pendingUnlink.id, null);
|
|
712
|
+
if (result === false)
|
|
713
|
+
return;
|
|
714
|
+
setRelationshipRecovery({
|
|
715
|
+
entityType: pendingUnlink.entityType,
|
|
716
|
+
id: pendingUnlink.id,
|
|
717
|
+
message: `${pendingUnlink.referenceLabel} removed from this workstream.`,
|
|
718
|
+
onUndo: async () => {
|
|
719
|
+
const undoResult = await onAssignTaskToWorkstream(pendingUnlink.id, detail.item.id);
|
|
720
|
+
if (undoResult !== false)
|
|
721
|
+
setRelationshipRecovery(null);
|
|
722
|
+
},
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
setPendingUnlink(null);
|
|
246
726
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
const resolveActorLabel = React.useCallback((actorId, actorType, actorLabel) => {
|
|
250
|
-
if (actorLabel && actorLabel.trim())
|
|
251
|
-
return actorLabel.trim();
|
|
252
|
-
const raw = String(actorId || '').trim();
|
|
253
|
-
if (!raw)
|
|
254
|
-
return actorType === 'ai' ? 'AI Agent' : 'You';
|
|
255
|
-
const option = actorOptionByValue.get(raw) || actorOptionByValue.get(raw.toLowerCase());
|
|
256
|
-
if (option?.label)
|
|
257
|
-
return option.label;
|
|
258
|
-
if (actorType === 'ai')
|
|
259
|
-
return raw;
|
|
260
|
-
return raw;
|
|
261
|
-
}, [actorOptionByValue]);
|
|
262
|
-
const resolveActivityActorPresentation = React.useCallback((input) => {
|
|
263
|
-
const actorRef = String(input.actorId || '').trim();
|
|
264
|
-
const option = actorOptionByValue.get(actorRef) || actorOptionByValue.get(actorRef.toLowerCase());
|
|
265
|
-
const resolvedActor = input.actorProfile || option || null;
|
|
266
|
-
const resolvedKind = input.actorType === 'system'
|
|
267
|
-
? 'system'
|
|
268
|
-
: input.actorType === 'ai' || resolvedActor?.kind === 'ai' || option?.kind === 'agent'
|
|
269
|
-
? 'agent'
|
|
270
|
-
: input.actorType === 'human' || resolvedActor?.kind === 'human' || option?.kind === 'member'
|
|
271
|
-
? 'member'
|
|
272
|
-
: input.fallbackKind || 'member';
|
|
273
|
-
const iconName = String(resolvedActor && 'icon' in resolvedActor && resolvedActor.icon
|
|
274
|
-
? resolvedActor.icon
|
|
275
|
-
: resolvedKind === 'agent'
|
|
276
|
-
? 'Bot'
|
|
277
|
-
: resolvedKind === 'member'
|
|
278
|
-
? 'User'
|
|
279
|
-
: 'ClipboardList');
|
|
280
|
-
const ActorIcon = IconMap[iconName]
|
|
281
|
-
|| (resolvedKind === 'agent' ? Bot : resolvedKind === 'member' ? User : ClipboardList);
|
|
282
|
-
return {
|
|
283
|
-
kind: resolvedKind,
|
|
284
|
-
label: resolvedKind === 'system'
|
|
285
|
-
? 'System'
|
|
286
|
-
: resolveActorLabel(actorRef, resolvedKind === 'agent' ? 'ai' : 'human', resolvedActor && 'label' in resolvedActor ? resolvedActor.label || null : null),
|
|
287
|
-
color: resolvedActor && 'color' in resolvedActor ? resolvedActor.color || undefined : undefined,
|
|
288
|
-
ActorIcon,
|
|
289
|
-
};
|
|
290
|
-
}, [actorOptionByValue, resolveActorLabel]);
|
|
291
|
-
const formatActivityFieldValue = React.useCallback((field, value) => {
|
|
292
|
-
const normalizedValue = String(value || '').trim();
|
|
293
|
-
if (!normalizedValue)
|
|
294
|
-
return undefined;
|
|
295
|
-
if (field === 'ownerId') {
|
|
296
|
-
return actorOptionByValue.get(normalizedValue)?.label
|
|
297
|
-
|| actorOptionByValue.get(normalizedValue.toLowerCase())?.label
|
|
298
|
-
|| normalizedValue;
|
|
727
|
+
finally {
|
|
728
|
+
setIsChangingRelationship(false);
|
|
299
729
|
}
|
|
300
|
-
|
|
301
|
-
|
|
730
|
+
}, [
|
|
731
|
+
detail.item.id,
|
|
732
|
+
detail.type,
|
|
733
|
+
detailReferenceLabel,
|
|
734
|
+
isChangingRelationship,
|
|
735
|
+
onAssignInitiativeToWorkstream,
|
|
736
|
+
onAssignTaskToWorkstream,
|
|
737
|
+
parentInitiativeReferenceLabel,
|
|
738
|
+
pendingUnlink,
|
|
739
|
+
]);
|
|
740
|
+
const handleUndoRelationship = React.useCallback(async () => {
|
|
741
|
+
if (!relationshipRecovery || isChangingRelationship)
|
|
742
|
+
return;
|
|
743
|
+
setIsChangingRelationship(true);
|
|
744
|
+
try {
|
|
745
|
+
await relationshipRecovery.onUndo();
|
|
302
746
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
747
|
+
finally {
|
|
748
|
+
setIsChangingRelationship(false);
|
|
749
|
+
}
|
|
750
|
+
}, [isChangingRelationship, relationshipRecovery]);
|
|
751
|
+
const renderRelationshipFeedback = React.useCallback((entityType, entityId) => {
|
|
752
|
+
if (relationshipRecovery?.entityType === entityType && relationshipRecovery.id === entityId) {
|
|
753
|
+
return (_jsxs("div", { className: panelStyles.relationshipRecovery, role: "status", children: [_jsx("span", { children: relationshipRecovery.message }), _jsx("button", { type: "button", className: "tf-button-ghost tf-button-compact", disabled: isChangingRelationship, onClick: () => void handleUndoRelationship(), children: isChangingRelationship ? 'Restoring…' : 'Undo' })] }));
|
|
754
|
+
}
|
|
755
|
+
return null;
|
|
756
|
+
}, [handleUndoRelationship, isChangingRelationship, relationshipRecovery]);
|
|
757
|
+
const detachedRelationshipRecovery = relationshipRecovery && !linkedChildIds.has(relationshipRecovery.id) ? (_jsxs("div", { className: panelStyles.relationshipRecovery, role: "status", children: [_jsx("span", { children: relationshipRecovery.message }), _jsx("button", { type: "button", className: "tf-button-ghost tf-button-compact", disabled: isChangingRelationship, onClick: () => void handleUndoRelationship(), children: isChangingRelationship ? 'Restoring…' : 'Undo' })] })) : null;
|
|
758
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: panelStyles.detailHero, children: [_jsxs("div", { className: panelStyles.detailTopRow, children: [_jsxs("div", { className: panelStyles.detailReferenceRow, children: [detail.type === 'workstream' ? (_jsx(_Fragment, { children: parentInitiativeReferenceLabel ? (_jsxs(_Fragment, { children: [_jsx(PlanningReferenceBadge, { label: parentInitiativeReferenceLabel, entityType: "initiative", entityName: parentInitiative?.title }), _jsx("span", { className: styles.taskHierarchyDivider, children: "/" }), !inlineEditor ? (_jsx(HierarchyActionBadge, { disabled: !onAssignInitiativeToWorkstream, onClick: () => {
|
|
759
|
+
setPendingUnlink({
|
|
760
|
+
entityType: 'workstream',
|
|
761
|
+
id: detail.item.id,
|
|
762
|
+
referenceLabel: detailReferenceLabel,
|
|
763
|
+
title: detail.item.title,
|
|
764
|
+
parentLabel: parentInitiative
|
|
765
|
+
? `${formatInitiativeReference(parentInitiative)} ${parentInitiative.title}`.trim()
|
|
766
|
+
: parentInitiativeReferenceLabel,
|
|
767
|
+
});
|
|
768
|
+
}, title: "Unlink workstream from initiative", ariaLabel: "Unlink workstream from initiative", children: _jsx(Unlink, { size: 14, "aria-hidden": "true" }) })) : null] })) : null })) : null, detail.type === 'workstream'
|
|
769
|
+
&& !parentInitiativeReferenceLabel
|
|
770
|
+
&& !inlineEditor ? (_jsx(HierarchyActionBadge, { disabled: !onAssignInitiativeToWorkstream, onClick: () => setShowParentLinkPicker(true), title: "Link initiative", ariaLabel: "Link initiative", ariaExpanded: showParentLinkPicker, children: _jsx(Link2, { size: 14, "aria-hidden": "true" }) })) : null, _jsx(PlanningReferenceBadge, { label: detailReferenceLabel || 'Reference pending', entityType: detail.type, entityName: detail.item.title, pending: !detailReferenceLabel })] }), _jsx("div", { className: panelStyles.detailTopActions, children: inlineEditor ? (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: "tf-button-ghost tf-button-compact", onClick: inlineEditor.onCancel, disabled: inlineEditor.isSubmitting, children: "Cancel" }), _jsx("button", { type: "submit", form: inlineEditorFormId, className: "tf-button-primary tf-button-compact", disabled: inlineEditor.isSubmitting, children: inlineEditor.isSubmitting ? 'Saving…' : 'Save' })] })) : (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: "tf-control-icon", disabled: archiveDetailState.mode === 'blocked' || archiveDetailState.mode === 'checking', onClick: () => {
|
|
771
|
+
if (archiveDetailState.mode === 'archived') {
|
|
772
|
+
onUnarchive?.();
|
|
773
|
+
}
|
|
774
|
+
else if (archiveDetailState.mode === 'empty') {
|
|
775
|
+
onArchive?.();
|
|
776
|
+
}
|
|
777
|
+
else if (archiveDetailState.mode === 'ready') {
|
|
778
|
+
setArchiveEntityConfirmationVisible(true);
|
|
779
|
+
}
|
|
780
|
+
}, title: archiveActionLabel, "aria-label": archiveActionLabel, "aria-expanded": archiveDetailState.mode === 'ready'
|
|
781
|
+
? archiveEntityConfirmationVisible
|
|
782
|
+
: undefined, children: archiveDetailState.mode === 'archived'
|
|
783
|
+
? _jsx(RotateCcw, { size: 14, "aria-hidden": "true" })
|
|
784
|
+
: _jsx(Archive, { size: 14, "aria-hidden": "true" }) }), _jsx("button", { type: "button", className: "tf-control-icon", onClick: () => {
|
|
785
|
+
setShowParentLinkPicker(false);
|
|
786
|
+
onEdit();
|
|
787
|
+
}, title: `Edit ${detailLabel.toLowerCase()} details`, "aria-label": `Edit ${detailLabel.toLowerCase()} details`, children: _jsx(Pencil, { size: 14, "aria-hidden": "true" }) })] })) })] }), archiveEntityConfirmationVisible && archiveDetailState.mode === 'ready' ? (_jsx(PlanningArchiveConfirmation, { entityType: detail.type, title: detail.item.title, activeTaskCount: detail.item.archiveActiveTaskCount, activeWorkstreamCount: detail.item.archiveActiveWorkstreamCount, busy: archiveEntityBusy, onCancel: () => setArchiveEntityConfirmationVisible(false), onConfirm: () => void handleConfirmArchiveEntity() })) : null, detail.type === 'workstream' ? renderRelationshipFeedback('workstream', detail.item.id) : null, detail.type === 'workstream' && !parentInitiativeReferenceLabel && showParentLinkPicker ? (_jsxs("div", { className: panelStyles.relationshipPickerRow, role: "group", "aria-label": "Link workstream to initiative", children: [_jsx(PlanningLinkPicker, { options: linkOptions.initiatives, entityLabel: "initiative", onSelect: handleLinkInitiative, disabled: !onAssignInitiativeToWorkstream || isChangingRelationship }), _jsx("button", { type: "button", className: "tf-control-icon tf-control-icon-compact", disabled: isChangingRelationship, onClick: () => setShowParentLinkPicker(false), title: "Cancel initiative link", "aria-label": "Cancel initiative link", children: _jsx(X, { size: 14, "aria-hidden": "true" }) })] })) : null, inlineEditor ? (_jsx(PlanningDrawerEditor, { editor: inlineEditor.editor, draftTitle: inlineEditor.draftTitle, draftDescription: inlineEditor.draftDescription, draftOwner: inlineEditor.draftOwner, draftInitiativeId: inlineEditor.draftInitiativeId, assigneeOptions: assigneeOptions, initiativeLinkOptions: linkOptions.initiatives, draftInitiativeSummary: inlineEditor.draftInitiativeSummary, onChangeDraftTitle: inlineEditor.onChangeDraftTitle, onChangeDraftDescription: inlineEditor.onChangeDraftDescription, onChangeDraftOwner: inlineEditor.onChangeDraftOwner, onChangeDraftInitiativeId: inlineEditor.onChangeDraftInitiativeId, onCancel: inlineEditor.onCancel, onSubmit: inlineEditor.onSubmit, isSubmitting: inlineEditor.isSubmitting, inline: true, formId: inlineEditorFormId })) : (_jsxs(_Fragment, { children: [_jsx("h3", { className: panelStyles.detailTitle, children: detail.item.title }), _jsx(PlanningEntityDescription, { description: detail.item.description, label: detailLabel, taskReferences: taskReferences, className: `${panelStyles.detailDescription} ${styles.appScrollbar} tf-scrollbar`.trim(), markdownClassName: panelStyles.detailDescriptionMarkdown })] })), _jsxs("div", { className: panelStyles.detailOwnerField, children: [_jsx("span", { className: panelStyles.detailOwnerLabel, children: "Owner" }), _jsx(PlanningOwnerDropdown, { value: ownerValue, disabled: !onChangeOwner || isSavingOwner, onChange: (nextOwnerId) => void handleOwnerChange(nextOwnerId), ariaLabel: `${detailLabel} owner`, options: assigneeOptions, className: `${planningDropdownStyles.control} ${panelStyles.ownerSelect}` })] }), detail.item.taskCount > 0 ? (_jsx(PlanningProgress, { value: detail.item.progressPercent, label: `${detail.item.progressPercent}% resolved`, statusCounts: detail.item.statusCounts })) : (_jsx(PlanningNoTasks, {})), _jsx(PlanningSummaryMeta, { item: detail.item, workstreamCount: detail.type === 'initiative'
|
|
788
|
+
? detail.item.workstreamCount ?? detail.item.workstreams.length
|
|
789
|
+
: undefined, className: panelStyles.detailSummaryMeta }), detail.item.taskCount > 0 ? (_jsx("span", { className: panelStyles.passiveGuidance, children: "Lifetime progress includes archived tasks." })) : null] }), _jsxs("div", { ref: setChildDropRef, className: `${panelStyles.listCard} ${canDropTask || canDropWorkstream ? panelStyles.sectionDropReady : ''} ${isChildDropOver ? panelStyles.sectionDropActive : ''} ${canDropTask || canDropWorkstream ? panelStyles.sectionDropMode : ''}`.trim(), children: [_jsxs("div", { className: panelStyles.sectionHeaderRow, children: [_jsxs("div", { className: panelStyles.sectionTitle, children: [childLabel, " (", visibleChildCount, ")"] }), _jsx("div", { className: panelStyles.headerActionGroup, children: detail.type === 'initiative' ? (_jsx("button", { type: "button", className: "tf-control-icon", title: "Create workstream in this initiative", "aria-label": "Create workstream in this initiative", onClick: () => onCreateWorkstreamInInitiative?.(detail.item.id), children: _jsx(Plus, { size: 15 }) })) : (_jsx("button", { type: "button", className: "tf-control-icon", title: "Create task in this workstream", "aria-label": "Create task in this workstream", onClick: () => onCreateTaskInWorkstream?.(detail.item.id), children: _jsx(Plus, { size: 15 }) })) })] }), _jsx("div", { className: panelStyles.linkPickerRow, children: _jsx(PlanningLinkPicker, { options: availableLinkOptions, entityLabel: detail.type === 'initiative' ? 'workstream' : 'task', onSelect: handleAttachReference, disabled: !hasAttachReferenceHandler || isAttachingReference }) }), detail.type === 'workstream' ? (_jsx(PlanningTaskArrangeControl, { value: taskArrangeMode, onChange: onTaskArrangeModeChange })) : null, detail.type === 'initiative' ? (visibleChildItems.length > 0 ? visibleChildItems.map((workstream) => {
|
|
330
790
|
const workstreamReferenceLabel = formatWorkstreamReference(workstream);
|
|
331
791
|
const handleOpenWorkstream = () => onOpenNestedWorkstreamDetails?.(workstream.id);
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
return
|
|
348
|
-
})
|
|
349
|
-
.map((task) => {
|
|
350
|
-
const referenceLabel = task.referenceNumber ? `T-${task.referenceNumber}` : '';
|
|
351
|
-
const statusDefinition = getStatusDefinition(task.status);
|
|
352
|
-
const StatusIcon = IconMap[statusDefinition.icon || 'Square'];
|
|
353
|
-
const statusColor = resolveColor(statusDefinition.color) || 'var(--text-secondary)';
|
|
354
|
-
const handleOpenTask = () => onOpenTaskById?.(task.id);
|
|
355
|
-
const taskMeta = `${formatTaskStatusLabel(task.status)}${task.isArchived ? ' • archived' : ''}`;
|
|
356
|
-
return (_jsx("div", { className: `${panelStyles.listItemButton} ${panelStyles.detailCardButton}`.trim(), children: _jsxs("div", { className: `${panelStyles.listItem} ${panelStyles.detailChildCard} ${task.isArchived ? panelStyles.detailChildCardArchived : ''}`.trim(), children: [_jsxs("div", { className: panelStyles.detailChildCardTopRow, children: [_jsxs("div", { className: panelStyles.detailChildReferenceRow, children: [_jsx(HierarchyActionBadge, { onClick: (event) => {
|
|
792
|
+
const isSelected = selectedChildWorkstreamId === workstream.id;
|
|
793
|
+
const archiveConfirmationVisible = pendingArchiveWorkstreamId === workstream.id;
|
|
794
|
+
const handleConfirmArchiveWorkstream = async () => {
|
|
795
|
+
if (!onArchiveResolvedWorkstream || archiveWorkstreamBusy)
|
|
796
|
+
return;
|
|
797
|
+
setArchiveWorkstreamBusy(true);
|
|
798
|
+
try {
|
|
799
|
+
const archived = await onArchiveResolvedWorkstream(workstream.id);
|
|
800
|
+
if (archived)
|
|
801
|
+
setPendingArchiveWorkstreamId(null);
|
|
802
|
+
}
|
|
803
|
+
finally {
|
|
804
|
+
setArchiveWorkstreamBusy(false);
|
|
805
|
+
}
|
|
806
|
+
};
|
|
807
|
+
return (_jsx("div", { className: `${panelStyles.listItemButton} ${panelStyles.detailCardButton}`.trim(), children: _jsxs("div", { className: `${panelStyles.listItem} ${panelStyles.detailChildCard} ${isSelected ? panelStyles.detailChildCardSelected : ''} ${workstream.isArchived ? panelStyles.detailChildCardArchived : ''}`.trim(), children: [_jsxs("div", { className: panelStyles.detailChildCardTopRow, children: [_jsxs("div", { className: panelStyles.detailChildReferenceRow, children: [_jsx(HierarchyActionBadge, { disabled: !onAssignInitiativeToWorkstream, onClick: (event) => {
|
|
357
808
|
event.stopPropagation();
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
809
|
+
setPendingUnlink({
|
|
810
|
+
entityType: 'workstream',
|
|
811
|
+
id: workstream.id,
|
|
812
|
+
referenceLabel: workstreamReferenceLabel,
|
|
813
|
+
title: workstream.title,
|
|
814
|
+
parentLabel: `${detailReferenceLabel} ${detail.item.title}`.trim(),
|
|
815
|
+
});
|
|
816
|
+
}, title: `Unlink ${workstreamReferenceLabel || workstream.title} from initiative`, ariaLabel: `Unlink ${workstreamReferenceLabel || workstream.title} from initiative`, children: _jsx(Unlink, { size: 14, "aria-hidden": "true" }) }), workstreamReferenceLabel ? (_jsx(PlanningReferenceBadge, { label: workstreamReferenceLabel, entityType: "workstream", entityName: workstream.title })) : _jsx("span", { "aria-hidden": "true" })] }), _jsx("div", { className: panelStyles.detailChildActions, onClick: (event) => event.stopPropagation(), children: workstream.archiveReady && !workstream.isArchived && onArchiveResolvedWorkstream ? (_jsx("button", { type: "button", className: "tf-control-icon", onClick: () => setPendingArchiveWorkstreamId(workstream.id), title: "Archive completed workstream", "aria-label": `Archive completed workstream ${workstream.title}`, "aria-expanded": archiveConfirmationVisible, children: _jsx(Archive, { size: 14, "aria-hidden": "true" }) })) : null })] }), renderRelationshipFeedback('workstream', workstream.id), archiveConfirmationVisible ? (_jsx(PlanningArchiveConfirmation, { entityType: "workstream", title: workstream.title, activeTaskCount: workstream.archiveActiveTaskCount, busy: archiveWorkstreamBusy, onCancel: () => setPendingArchiveWorkstreamId(null), onConfirm: () => void handleConfirmArchiveWorkstream() })) : null, _jsx("div", { role: "button", tabIndex: 0, "aria-current": isSelected ? 'true' : undefined, className: panelStyles.listItemText, onClick: handleOpenWorkstream, onKeyDown: (event) => {
|
|
362
817
|
if (event.key !== 'Enter' && event.key !== ' ')
|
|
363
818
|
return;
|
|
364
819
|
event.preventDefault();
|
|
365
|
-
|
|
366
|
-
}, children:
|
|
367
|
-
|
|
820
|
+
handleOpenWorkstream();
|
|
821
|
+
}, children: _jsx(PlanningEntitySummary, { item: workstream, entityType: "workstream", ownerOption: workstream.ownerId && assigneeOptionByValue.has(workstream.ownerId)
|
|
822
|
+
? toPlanningAssigneeOption(assigneeOptionByValue.get(workstream.ownerId))
|
|
823
|
+
: undefined, ownerOptions: assigneeOptions.map(toPlanningAssigneeOption), onChangeOwner: onChangePlanningOwner
|
|
824
|
+
? (ownerId) => onChangePlanningOwner('workstream', workstream.id, ownerId === 'unassigned' ? '' : ownerId)
|
|
825
|
+
: undefined }) })] }) }, workstream.id));
|
|
826
|
+
}) : (_jsx("div", { className: panelStyles.passiveGuidance, children: "No workstreams are linked to this initiative." }))) : (visibleTaskItems.length > 0 ? (_jsx(PlanningTaskOrderList, { tasks: visibleTaskItems, mode: taskArrangeMode, onReorder: onReorderWorkstreamTasks
|
|
827
|
+
? (taskIds) => onReorderWorkstreamTasks(detail.item.id, mergeVisiblePlanningTaskOrder(arrangePlanningTasks(taskItems, 'execution'), taskIds))
|
|
828
|
+
: undefined, children: (task) => {
|
|
829
|
+
const referenceLabel = getTaskReferenceLabel(task) || task.id;
|
|
830
|
+
const statusDefinition = getStatusDefinition(task.status);
|
|
831
|
+
return (_jsx("div", { className: `${panelStyles.listItemButton} ${panelStyles.detailCardButton}`.trim(), children: _jsx(PlanningTaskCard, { task: task, assigneeOption: task.assignee && assigneeOptionByValue.has(task.assignee)
|
|
832
|
+
? toPlanningAssigneeOption(assigneeOptionByValue.get(task.assignee))
|
|
833
|
+
: undefined, assigneeOptions: assigneeOptions.map(toPlanningAssigneeOption), showStatusLabel: showTaskCardStatusLabel, onOpen: onOpenTaskById ? () => onOpenTaskById(task.id) : undefined, onAssigneeChange: onChangeTaskAssignee
|
|
834
|
+
? (assignee) => onChangeTaskAssignee(task.id, assignee)
|
|
835
|
+
: undefined, onStatusChange: onSetTaskStatus ? (status) => onSetTaskStatus(task.id, status) : undefined, feedback: renderRelationshipFeedback('task', task.id), referenceAction: (_jsx(HierarchyActionBadge, { disabled: !onAssignTaskToWorkstream, onClick: (event) => {
|
|
836
|
+
event.stopPropagation();
|
|
837
|
+
setPendingUnlink({
|
|
838
|
+
entityType: 'task',
|
|
839
|
+
id: task.id,
|
|
840
|
+
referenceLabel,
|
|
841
|
+
title: task.title,
|
|
842
|
+
parentLabel: `${detailReferenceLabel} ${detail.item.title}`.trim(),
|
|
843
|
+
});
|
|
844
|
+
}, title: `Unlink ${referenceLabel || task.title} from workstream`, ariaLabel: `Unlink ${referenceLabel || task.title} from workstream`, children: _jsx(Unlink, { size: 14, "aria-hidden": "true" }) })), actions: !task.isArchived
|
|
845
|
+
&& (statusDefinition.value === 'done' || statusDefinition.value === 'cancelled')
|
|
846
|
+
&& onArchivePlanningTask ? (_jsx("button", { type: "button", className: "tf-control-icon", disabled: archivingTaskId === task.id, onClick: async (event) => {
|
|
847
|
+
event.stopPropagation();
|
|
848
|
+
setArchivingTaskId(task.id);
|
|
849
|
+
try {
|
|
850
|
+
await onArchivePlanningTask(task.id);
|
|
851
|
+
}
|
|
852
|
+
finally {
|
|
853
|
+
setArchivingTaskId(null);
|
|
854
|
+
}
|
|
855
|
+
}, title: "Archive task", "aria-label": `Archive task ${referenceLabel || task.title}`, children: _jsx(Archive, { size: 14, "aria-hidden": "true" }) })) : undefined }) }, task.id));
|
|
856
|
+
} })) : (_jsx("div", { className: panelStyles.passiveGuidance, children: "No tasks are linked to this workstream." }))), detachedRelationshipRecovery] }), _jsx("div", { className: panelStyles.listCard, children: _jsx(PlanningEntityContext, { entityType: detail.type, entityId: detail.item.id, referenceLabel: detailReferenceLabel, workspaceId: currentWorkspaceId, attachments: detail.item.attachments, readOnly: Boolean(detail.item.isArchived), onAddAttachment: (file) => onAddPlanningContextFile?.(detail.type, detail.item.id, file), onRemoveAttachment: (index) => onRemovePlanningContextFile?.(detail.type, detail.item.id, index), onUpdateAttachmentCaption: (index, caption) => (onUpdatePlanningContextCaption?.(detail.type, detail.item.id, index, caption)) }) }), _jsx("div", { className: panelStyles.listCard, children: _jsx(PlanningEntityActivity, { entityType: detail.type, item: detail.item, assigneeOptions: assigneeOptions.map(toPlanningAssigneeOption), currentActorId: currentActorId, taskReferences: taskReferences, parentInitiative: parentInitiative, listClassName: panelStyles.activityTimelineList, emptyClassName: panelStyles.activityTimelineEmpty, hydrationState: hydrationState, onRetryHydration: onRetryHydration }) }), _jsx(PlanningUnlinkConfirmation, { item: pendingUnlink, busy: isChangingRelationship, theme: theme, onCancel: () => setPendingUnlink(null), onConfirm: () => void handleConfirmUnlink() })] }));
|
|
368
857
|
}
|
|
369
|
-
function PlanningDrawerEditor({ editor, draftTitle, draftDescription, draftOwner, draftInitiativeId, assigneeOptions, draftInitiativeSummary, onChangeDraftTitle, onChangeDraftDescription, onChangeDraftOwner, onChangeDraftInitiativeId, onCancel, onSubmit, isSubmitting,
|
|
858
|
+
function PlanningDrawerEditor({ editor, draftTitle, draftDescription, draftOwner, draftInitiativeId, assigneeOptions, initiativeLinkOptions, draftInitiativeSummary, onChangeDraftTitle, onChangeDraftDescription, onChangeDraftOwner, onChangeDraftInitiativeId, onCancel, onSubmit, isSubmitting, inline = false, formId, }) {
|
|
370
859
|
const entityLabel = editor.entityType === 'initiative' ? 'Initiative' : 'Workstream';
|
|
860
|
+
const titleInputId = React.useId();
|
|
861
|
+
const titleErrorId = React.useId();
|
|
862
|
+
const descriptionInputId = React.useId();
|
|
863
|
+
const titleInputRef = React.useRef(null);
|
|
864
|
+
const [titleError, setTitleError] = React.useState(null);
|
|
371
865
|
const submitLabel = isSubmitting
|
|
372
866
|
? (editor.mode === 'create' ? `Creating ${entityLabel}...` : `Saving ${entityLabel}...`)
|
|
373
867
|
: (editor.mode === 'create' ? `Create ${entityLabel}` : `Save ${entityLabel}`);
|
|
374
|
-
const ownerOptions = React.useMemo(() => normalizePlanningOwnerOptions(assigneeOptions, draftOwner), [assigneeOptions, draftOwner]);
|
|
375
868
|
const handleSubmit = React.useCallback((event) => {
|
|
376
869
|
event.preventDefault();
|
|
870
|
+
if (!draftTitle.trim()) {
|
|
871
|
+
setTitleError(`${entityLabel} title is required.`);
|
|
872
|
+
titleInputRef.current?.focus();
|
|
873
|
+
return;
|
|
874
|
+
}
|
|
875
|
+
setTitleError(null);
|
|
377
876
|
onSubmit();
|
|
378
|
-
}, [onSubmit]);
|
|
379
|
-
const
|
|
380
|
-
if (
|
|
877
|
+
}, [draftTitle, entityLabel, onSubmit]);
|
|
878
|
+
const handleKeyDown = React.useCallback((event) => {
|
|
879
|
+
if (!inline || event.key !== 'Escape' || isSubmitting)
|
|
381
880
|
return;
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
881
|
+
event.preventDefault();
|
|
882
|
+
onCancel();
|
|
883
|
+
}, [inline, isSubmitting, onCancel]);
|
|
884
|
+
return (_jsxs("form", { id: formId, className: `${panelStyles.editorCard} ${inline ? panelStyles.inlineEditorCard : ''}`.trim(), onSubmit: handleSubmit, onKeyDown: handleKeyDown, noValidate: true, children: [_jsxs("div", { className: panelStyles.editorField, children: [_jsxs("label", { className: panelStyles.editorLabel, htmlFor: titleInputId, children: [entityLabel, " title"] }), _jsx("input", { ref: titleInputRef, id: titleInputId, "data-planning-editor-title": true, className: styles.input, disabled: isSubmitting, required: true, "aria-invalid": titleError ? 'true' : undefined, "aria-describedby": titleError ? titleErrorId : undefined, value: draftTitle, onChange: (event) => {
|
|
885
|
+
if (titleError)
|
|
886
|
+
setTitleError(null);
|
|
887
|
+
onChangeDraftTitle(event.target.value);
|
|
888
|
+
}, placeholder: editor.entityType === 'initiative' ? 'Enter initiative title' : 'Enter workstream title' }), titleError ? _jsx("p", { id: titleErrorId, className: "tf-text-error", children: titleError }) : null] }), _jsxs("div", { className: panelStyles.editorField, children: [_jsxs("label", { className: panelStyles.editorLabel, htmlFor: descriptionInputId, children: [entityLabel, " description"] }), _jsx("textarea", { id: descriptionInputId, className: styles.textarea, disabled: isSubmitting, value: draftDescription, onChange: (event) => onChangeDraftDescription(event.target.value), placeholder: editor.entityType === 'initiative'
|
|
385
889
|
? 'Describe the broader outcome this initiative is meant to achieve.'
|
|
386
|
-
: 'Describe the lane of work this workstream will coordinate.', rows: 5 })] }), editor.entityType === 'workstream' && (_jsxs("div", { className: panelStyles.editorField, children: [_jsx("
|
|
387
|
-
event.stopPropagation();
|
|
388
|
-
handleSetInitiative();
|
|
389
|
-
}, disabled: isSubmitting || !draftInitiativeId.trim(), title: "Attach workstream to initiative", ariaLabel: "Attach workstream to initiative", children: _jsx(Link2, { size: 13 }) }), _jsx("span", { className: styles.taskHierarchyDivider, children: "/" })] })), _jsx("input", { type: "text", className: `${styles.input} ${panelStyles.attachReferenceInput}`.trim(), disabled: isSubmitting, placeholder: "Paste initiative reference (e.g. IN-123)", value: draftInitiativeId, onChange: (event) => onChangeDraftInitiativeId(event.target.value), onKeyDown: (event) => {
|
|
390
|
-
if (event.key !== 'Enter')
|
|
391
|
-
return;
|
|
392
|
-
event.preventDefault();
|
|
393
|
-
handleSetInitiative();
|
|
394
|
-
} })] })] })), _jsxs("div", { className: panelStyles.editorField, children: [_jsx("label", { className: panelStyles.editorLabel, children: "Owner" }), _jsxs("select", { className: `${styles.select} ${styles.groupBySelect}`, disabled: isSubmitting, value: draftOwner, onChange: (event) => onChangeDraftOwner(event.target.value), children: [_jsx("option", { value: "", children: "Unassigned" }), ownerOptions.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value)))] })] }), _jsxs("div", { className: panelStyles.editorActions, children: [_jsx("button", { type: "button", className: styles.secondaryHeaderBtn, onClick: onCancel, disabled: isSubmitting, children: "Cancel" }), _jsx("button", { type: "submit", className: styles.primaryUpdateBtn, disabled: isSubmitting, children: submitLabel })] })] }));
|
|
890
|
+
: 'Describe the lane of work this workstream will coordinate.', rows: 5 })] }), editor.entityType === 'workstream' && (_jsxs("div", { className: panelStyles.editorField, children: [_jsx("span", { className: panelStyles.editorLabel, children: "Initiative" }), _jsxs("div", { className: panelStyles.editorRelationshipRow, children: [_jsx(PlanningLinkPicker, { options: initiativeLinkOptions, selectedId: draftInitiativeSummary?.id || '', entityLabel: "initiative", disabled: isSubmitting, onSelect: (option) => onChangeDraftInitiativeId(option.referenceLabel) }), draftInitiativeId.trim() ? (_jsx("button", { type: "button", className: "tf-button-ghost tf-button-compact", disabled: isSubmitting, onClick: () => onChangeDraftInitiativeId(''), children: "Remove" })) : null] })] })), !inline ? _jsxs("div", { className: panelStyles.editorField, children: [_jsxs("span", { className: panelStyles.editorLabel, children: [entityLabel, " owner"] }), _jsx(PlanningOwnerDropdown, { disabled: isSubmitting, value: draftOwner, onChange: onChangeDraftOwner, ariaLabel: `${entityLabel} owner`, options: assigneeOptions, className: panelStyles.editorSelect })] }) : null, !inline ? _jsxs("div", { className: panelStyles.editorActions, children: [_jsx("button", { type: "button", className: styles.secondaryHeaderBtn, onClick: onCancel, disabled: isSubmitting, children: "Cancel" }), _jsx("button", { type: "submit", className: styles.primaryUpdateBtn, disabled: isSubmitting, children: submitLabel })] }) : null] }));
|
|
395
891
|
}
|
|
396
|
-
export function PlanningDrawer({ open, leftOffset = 0, initiatives, standaloneWorkstreams,
|
|
397
|
-
const
|
|
892
|
+
export function PlanningDrawer({ open, leftOffset = 0, returnFocusRef, onWidthChange, initiatives, standaloneWorkstreams, planningLoadState, onRetryPlanning, taskScope, activeInitiativeId, activeWorkstreamId, navigatorSort, navigatorSortReady, onNavigatorSortChange, taskArrangeMode = 'execution', onTaskArrangeModeChange = () => { }, onReorderWorkstreamTasks, planningFavorites, onTogglePlanningFavorite, favoritesSectionCollapsed, initiativesSectionCollapsed, workstreamsSectionCollapsed, onToggleFavoritesSection, onToggleInitiativesSection, onToggleWorkstreamsSection, expandedInitiativeIds, detail, editor, secondaryEditor = null, secondaryPane, primaryHydrationState, secondaryHydrationState, onRetryPrimaryHydration, onRetrySecondaryHydration, currentWorkspaceId, currentOwnerId, theme, assigneeOptions, linkOptions, showTaskCardStatusLabel = false, draftInitiativeSummary, draftTitle, draftDescription, draftOwner, draftInitiativeId, onChangeDraftTitle, onChangeDraftDescription, onChangeDraftOwner, onChangeDraftInitiativeId, onCollapseTreePane, onExpandTreePane, onCollapsePrimaryPane, onExpandPrimaryPane, onCollapseSecondaryPane, onExpandSecondaryPane, onBackFromSecondary, treeCollapsed, primaryCollapsed, secondaryCollapsed, onCancelEditor, onCancelSecondaryEditor, onSubmitEditor, isSubmittingEditor, onCreateInitiative, onCreateWorkstream, onToggleInitiative, onSelectInitiative, onSelectWorkstream, onOpenInitiativeDetails, onOpenWorkstreamDetails, onOpenNestedWorkstreamDetails, onEditInitiative, onEditWorkstream, onChangePlanningOwner, onChangeTaskAssignee, onArchiveInitiative, onUnarchiveInitiative, onArchiveWorkstream, onUnarchiveWorkstream, onArchivePlanningTask, onArchiveResolvedWorkstream, onArchiveResolvedInitiative, onCreateTaskInWorkstream, onCreateWorkstreamInInitiative, onAssignInitiativeToWorkstream, onOpenTaskById, onSetTaskStatus, taskReferences, onAssignTaskToWorkstream, onAttachTaskToWorkstreamByReference, onAttachWorkstreamToInitiativeByReference, onAddPlanningContextFile, onRemovePlanningContextFile, onUpdatePlanningContextCaption, }) {
|
|
893
|
+
const primaryInlineEditor = editor?.mode === 'edit'
|
|
894
|
+
&& detail
|
|
895
|
+
&& editor.entityType === detail.type
|
|
896
|
+
&& editor.targetId === detail.item.id
|
|
897
|
+
? editor
|
|
898
|
+
: null;
|
|
899
|
+
const secondaryInlineEditor = secondaryEditor?.mode === 'edit'
|
|
900
|
+
&& secondaryPane?.kind === 'detail'
|
|
901
|
+
&& secondaryEditor.entityType === secondaryPane.detail.type
|
|
902
|
+
&& secondaryEditor.targetId === secondaryPane.detail.item.id
|
|
903
|
+
? secondaryEditor
|
|
904
|
+
: null;
|
|
905
|
+
const dedicatedPrimaryEditor = editor && !primaryInlineEditor ? editor : null;
|
|
906
|
+
const hasPrimaryPane = Boolean(detail || dedicatedPrimaryEditor);
|
|
398
907
|
const hasSecondaryPane = Boolean(secondaryPane);
|
|
399
|
-
const
|
|
400
|
-
const
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
908
|
+
const primaryEntityType = dedicatedPrimaryEditor?.entityType || detail?.type || null;
|
|
909
|
+
const primaryIsInitiative = primaryEntityType === 'initiative';
|
|
910
|
+
const primaryIsWorkstream = primaryEntityType === 'workstream';
|
|
911
|
+
const [initiativeRelationshipExpanded, setInitiativeRelationshipExpanded] = React.useState(false);
|
|
912
|
+
const [workstreamRelationshipExpanded, setWorkstreamRelationshipExpanded] = React.useState(false);
|
|
913
|
+
const [showArchivedPlanning, setShowArchivedPlanning] = React.useState(false);
|
|
914
|
+
const [archivedDetailVisibility, setArchivedDetailVisibility] = React.useState({ initiative: false, workstream: false });
|
|
915
|
+
const archivedPlanningItemCount = React.useMemo(() => {
|
|
916
|
+
const allWorkstreams = [
|
|
917
|
+
...initiatives.flatMap((initiative) => initiative.allWorkstreams || initiative.workstreams),
|
|
918
|
+
...standaloneWorkstreams,
|
|
919
|
+
];
|
|
920
|
+
return initiatives.filter((initiative) => Boolean(initiative.isArchived)).length
|
|
921
|
+
+ allWorkstreams.filter((workstream) => Boolean(workstream.isArchived)).length
|
|
922
|
+
+ allWorkstreams.reduce((count, workstream) => (count + (workstream.tasks || []).filter((task) => Boolean(task.isArchived)).length), 0);
|
|
923
|
+
}, [initiatives, standaloneWorkstreams]);
|
|
924
|
+
const { availableWidth, layoutMode } = usePlanningDrawerViewport(leftOffset);
|
|
925
|
+
const wideLayout = layoutMode === 'wide';
|
|
926
|
+
const effectiveTreeCollapsed = wideLayout && treeCollapsed;
|
|
927
|
+
const effectivePrimaryCollapsed = wideLayout && primaryCollapsed;
|
|
928
|
+
const effectiveSecondaryCollapsed = wideLayout && secondaryCollapsed;
|
|
929
|
+
const initiativeSlotCollapsed = primaryIsInitiative
|
|
930
|
+
? effectivePrimaryCollapsed
|
|
931
|
+
: !initiativeRelationshipExpanded;
|
|
932
|
+
const workstreamSlotCollapsed = primaryIsWorkstream
|
|
933
|
+
? effectivePrimaryCollapsed
|
|
934
|
+
: hasSecondaryPane
|
|
935
|
+
? effectiveSecondaryCollapsed
|
|
936
|
+
: !workstreamRelationshipExpanded;
|
|
937
|
+
const wideDrawerWidth = getPlanningDrawerWidthPx(effectiveTreeCollapsed, true, initiativeSlotCollapsed, true, workstreamSlotCollapsed);
|
|
938
|
+
const showTreePane = layoutMode !== 'narrow' || (!hasPrimaryPane && !hasSecondaryPane);
|
|
939
|
+
const showPrimaryPane = hasPrimaryPane && (wideLayout || !hasSecondaryPane);
|
|
940
|
+
const showSecondaryPane = hasSecondaryPane;
|
|
941
|
+
const adaptiveHasDetailPane = showPrimaryPane || showSecondaryPane;
|
|
942
|
+
const requestedDrawerWidth = wideLayout
|
|
943
|
+
? wideDrawerWidth
|
|
944
|
+
: layoutMode === 'medium'
|
|
945
|
+
? PLANNING_DRAWER_TREE_WIDTH_PX + (adaptiveHasDetailPane ? PLANNING_DRAWER_DETAIL_WIDTH_PX : 0)
|
|
946
|
+
: availableWidth;
|
|
947
|
+
const drawerWidth = Math.max(0, Math.min(requestedDrawerWidth, availableWidth));
|
|
948
|
+
const adaptiveDetailWidth = Math.max(0, drawerWidth - (showTreePane ? PLANNING_DRAWER_TREE_WIDTH_PX : 0));
|
|
949
|
+
const primaryPaneLabel = dedicatedPrimaryEditor
|
|
950
|
+
? (dedicatedPrimaryEditor.entityType === 'initiative'
|
|
951
|
+
? (dedicatedPrimaryEditor.mode === 'create' ? 'New Initiative' : 'Edit Initiative')
|
|
952
|
+
: (dedicatedPrimaryEditor.mode === 'create' ? 'New Workstream' : 'Edit Workstream'))
|
|
404
953
|
: (detail?.type === 'initiative' ? 'Initiative' : 'Workstream');
|
|
405
954
|
const secondaryPaneLabel = secondaryPane?.kind === 'editor'
|
|
406
955
|
? (secondaryPane.editor.mode === 'create' ? 'New Workstream' : 'Edit Workstream')
|
|
407
956
|
: 'Workstream';
|
|
957
|
+
const primaryArchiveDetail = dedicatedPrimaryEditor ? null : detail;
|
|
958
|
+
const secondaryArchiveDetail = secondaryPane?.kind === 'detail' ? secondaryPane.detail : null;
|
|
959
|
+
const toggleArchivedDetailVisibility = React.useCallback((entityType) => {
|
|
960
|
+
setArchivedDetailVisibility((current) => ({
|
|
961
|
+
...current,
|
|
962
|
+
[entityType]: !current[entityType],
|
|
963
|
+
}));
|
|
964
|
+
}, []);
|
|
408
965
|
const resolveParentInitiative = React.useCallback((workstream) => {
|
|
409
966
|
const initiativeId = String(workstream.initiativeId || '').trim();
|
|
410
967
|
if (!initiativeId)
|
|
411
968
|
return null;
|
|
412
969
|
return initiatives.find((initiative) => initiative.id === initiativeId) || null;
|
|
413
970
|
}, [initiatives]);
|
|
414
|
-
|
|
971
|
+
const treePaneRef = React.useRef(null);
|
|
972
|
+
const primaryPaneRef = React.useRef(null);
|
|
973
|
+
const secondaryPaneRef = React.useRef(null);
|
|
974
|
+
const initiativeRelationshipPaneRef = React.useRef(null);
|
|
975
|
+
const workstreamRelationshipPaneRef = React.useRef(null);
|
|
976
|
+
const previousOpenRef = React.useRef(open);
|
|
977
|
+
const previousFocusKeyRef = React.useRef('');
|
|
978
|
+
const focusKey = secondaryInlineEditor
|
|
979
|
+
? `secondary:inline-editor:${secondaryInlineEditor.targetId}`
|
|
980
|
+
: secondaryPane
|
|
981
|
+
? `secondary:${secondaryPane.kind}:${secondaryPane.kind === 'detail' ? secondaryPane.detail.item.id : `${secondaryPane.editor.mode}:${secondaryPane.editor.entityType}:${secondaryPane.editor.mode === 'edit' ? secondaryPane.editor.targetId : ''}`}`
|
|
982
|
+
: primaryInlineEditor
|
|
983
|
+
? `primary:inline-editor:${primaryInlineEditor.targetId}`
|
|
984
|
+
: dedicatedPrimaryEditor
|
|
985
|
+
? `primary:editor:${dedicatedPrimaryEditor.mode}:${dedicatedPrimaryEditor.entityType}:${dedicatedPrimaryEditor.mode === 'edit' ? dedicatedPrimaryEditor.targetId : ''}`
|
|
986
|
+
: detail
|
|
987
|
+
? `primary:detail:${detail.type}:${detail.item.id}`
|
|
988
|
+
: 'tree';
|
|
989
|
+
React.useEffect(() => {
|
|
990
|
+
const wasOpen = previousOpenRef.current;
|
|
991
|
+
previousOpenRef.current = open;
|
|
992
|
+
if (wasOpen && !open) {
|
|
993
|
+
returnFocusRef?.current?.focus();
|
|
994
|
+
previousFocusKeyRef.current = '';
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
if (!open || (wasOpen && previousFocusKeyRef.current === focusKey))
|
|
998
|
+
return;
|
|
999
|
+
previousFocusKeyRef.current = focusKey;
|
|
1000
|
+
const pane = showSecondaryPane
|
|
1001
|
+
? secondaryPaneRef.current
|
|
1002
|
+
: showPrimaryPane
|
|
1003
|
+
? primaryPaneRef.current
|
|
1004
|
+
: treePaneRef.current;
|
|
1005
|
+
const frame = window.requestAnimationFrame(() => {
|
|
1006
|
+
const target = pane?.querySelector('[data-planning-editor-title]')
|
|
1007
|
+
|| pane?.querySelector('[data-planning-pane-heading]');
|
|
1008
|
+
target?.focus();
|
|
1009
|
+
});
|
|
1010
|
+
return () => window.cancelAnimationFrame(frame);
|
|
1011
|
+
}, [focusKey, open, returnFocusRef, showPrimaryPane, showSecondaryPane]);
|
|
1012
|
+
const handleBackFromPrimary = React.useCallback(() => {
|
|
1013
|
+
if (editor) {
|
|
1014
|
+
onCancelEditor();
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
if (detail?.type === 'initiative')
|
|
1018
|
+
onOpenInitiativeDetails('');
|
|
1019
|
+
if (detail?.type === 'workstream')
|
|
1020
|
+
onOpenWorkstreamDetails('');
|
|
1021
|
+
}, [detail, editor, onCancelEditor, onOpenInitiativeDetails, onOpenWorkstreamDetails]);
|
|
1022
|
+
const paneWidthStyle = React.useCallback((width) => ({
|
|
1023
|
+
flex: `0 0 ${width}px`,
|
|
1024
|
+
width: `${width}px`,
|
|
1025
|
+
minWidth: `${width}px`,
|
|
1026
|
+
maxWidth: `${width}px`,
|
|
1027
|
+
}), []);
|
|
1028
|
+
React.useEffect(() => {
|
|
1029
|
+
onWidthChange?.(drawerWidth);
|
|
1030
|
+
}, [drawerWidth, onWidthChange]);
|
|
1031
|
+
React.useEffect(() => {
|
|
1032
|
+
if (!initiativeRelationshipExpanded)
|
|
1033
|
+
return;
|
|
1034
|
+
initiativeRelationshipPaneRef.current
|
|
1035
|
+
?.querySelector('[data-planning-pane-heading]')
|
|
1036
|
+
?.focus();
|
|
1037
|
+
}, [initiativeRelationshipExpanded]);
|
|
1038
|
+
React.useEffect(() => {
|
|
1039
|
+
if (!workstreamRelationshipExpanded)
|
|
1040
|
+
return;
|
|
1041
|
+
workstreamRelationshipPaneRef.current
|
|
1042
|
+
?.querySelector('[data-planning-pane-heading]')
|
|
1043
|
+
?.focus();
|
|
1044
|
+
}, [workstreamRelationshipExpanded]);
|
|
1045
|
+
const directWorkstream = detail?.type === 'workstream' ? detail.item : null;
|
|
1046
|
+
const parentInitiative = directWorkstream ? resolveParentInitiative(directWorkstream) : draftInitiativeSummary;
|
|
1047
|
+
const hasInitiativeRelationship = Boolean(parentInitiative || String(directWorkstream?.initiativeId || '').trim());
|
|
1048
|
+
const initiativeRelationship = parentInitiative
|
|
1049
|
+
? {
|
|
1050
|
+
title: parentInitiative.title,
|
|
1051
|
+
description: directWorkstream
|
|
1052
|
+
? `${directWorkstream.title} belongs to this initiative.`
|
|
1053
|
+
: 'This workstream will belong to the selected initiative.',
|
|
1054
|
+
action: directWorkstream
|
|
1055
|
+
? { label: 'Open initiative', onClick: () => onOpenInitiativeDetails(parentInitiative.id) }
|
|
1056
|
+
: undefined,
|
|
1057
|
+
}
|
|
1058
|
+
: directWorkstream && hasInitiativeRelationship
|
|
1059
|
+
? {
|
|
1060
|
+
title: 'Initiative unavailable',
|
|
1061
|
+
description: `${directWorkstream.title} is assigned to an initiative that is not available in the current planning data.`,
|
|
1062
|
+
}
|
|
1063
|
+
: directWorkstream
|
|
1064
|
+
? {
|
|
1065
|
+
title: 'Not linked to an initiative',
|
|
1066
|
+
}
|
|
1067
|
+
: {
|
|
1068
|
+
title: 'No initiative selected',
|
|
1069
|
+
};
|
|
1070
|
+
const workstreamRelationship = {
|
|
1071
|
+
title: 'No workstream selected',
|
|
1072
|
+
};
|
|
1073
|
+
return (_jsx("aside", { className: panelStyles.drawer, "aria-label": "Planning", "aria-hidden": !open, inert: !open, "data-layout": layoutMode, style: {
|
|
415
1074
|
position: 'absolute',
|
|
416
1075
|
top: 0,
|
|
417
1076
|
left: open ? `${leftOffset}px` : `${leftOffset - drawerWidth - 24}px`,
|
|
418
1077
|
bottom: 0,
|
|
419
1078
|
width: `${drawerWidth}px`,
|
|
420
|
-
minWidth:
|
|
1079
|
+
minWidth: 0,
|
|
1080
|
+
maxWidth: `calc(100vw - ${leftOffset}px)`,
|
|
421
1081
|
borderRight: '1px solid var(--border-color)',
|
|
422
1082
|
background: 'var(--bg-secondary)',
|
|
423
1083
|
boxSizing: 'border-box',
|
|
@@ -428,26 +1088,45 @@ export function PlanningDrawer({ open, leftOffset = 0, initiatives, standaloneWo
|
|
|
428
1088
|
pointerEvents: open ? 'auto' : 'none',
|
|
429
1089
|
transition: 'left 220ms cubic-bezier(0.4, 0, 0.2, 1)',
|
|
430
1090
|
willChange: 'left',
|
|
431
|
-
}, children: _jsxs("div", { className: panelStyles.drawerBody, children: [
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
1091
|
+
}, children: _jsxs("div", { className: panelStyles.drawerBody, children: [showTreePane && (effectiveTreeCollapsed ? (_jsx(CollapsedPane, { label: "Planning", onExpand: onExpandTreePane })) : (_jsxs("div", { ref: treePaneRef, "data-planning-pane": "tree", className: `${panelStyles.paneShell} ${styles.appScrollbar} tf-scrollbar ${panelStyles.treePane} ${hasPrimaryPane && !primaryCollapsed ? panelStyles.treePaneSplit : ''}`.trim(), style: paneWidthStyle(layoutMode === 'narrow' ? drawerWidth : PLANNING_DRAWER_TREE_WIDTH_PX), children: [_jsxs("div", { className: panelStyles.paneHeader, children: [_jsx("h2", { className: panelStyles.paneHeaderLabel, tabIndex: -1, "data-planning-pane-heading": true, children: "Planning" }), _jsxs("div", { className: panelStyles.headerActionGroup, children: [_jsx(ArchiveVisibilityToggle, { visible: showArchivedPlanning, disabled: taskScope === 'deleted' || archivedPlanningItemCount === 0, disabledLabel: taskScope === 'deleted' ? 'Archive visibility unavailable in Trash' : undefined, itemLabel: "planning items", onToggle: () => setShowArchivedPlanning((current) => !current) }), wideLayout ? (_jsx("button", { type: "button", className: "tf-control-icon", onClick: onCollapseTreePane, "aria-label": "Collapse Planning pane", title: "Collapse Planning pane", children: _jsx(ChevronLeft, { size: 16, "aria-hidden": "true" }) })) : null] })] }), _jsx("div", { className: panelStyles.paneContent, "aria-busy": planningLoadState.status === 'loading' || planningLoadState.isRefreshing, children: _jsx(PlanningDrawerList, { initiatives: initiatives, standaloneWorkstreams: standaloneWorkstreams, planningLoadState: planningLoadState, taskScope: taskScope, showArchivedPlanning: showArchivedPlanning, currentOwnerId: currentOwnerId, assigneeOptions: assigneeOptions, showTaskCardStatusLabel: showTaskCardStatusLabel, taskArrangeMode: taskArrangeMode, activeInitiativeId: activeInitiativeId, activeWorkstreamId: activeWorkstreamId, navigatorSort: navigatorSort, navigatorSortReady: navigatorSortReady, onNavigatorSortChange: onNavigatorSortChange, planningFavorites: planningFavorites, onTogglePlanningFavorite: onTogglePlanningFavorite, favoritesSectionCollapsed: favoritesSectionCollapsed, initiativesSectionCollapsed: initiativesSectionCollapsed, workstreamsSectionCollapsed: workstreamsSectionCollapsed, onToggleFavoritesSection: onToggleFavoritesSection, onToggleInitiativesSection: onToggleInitiativesSection, onToggleWorkstreamsSection: onToggleWorkstreamsSection, expandedInitiativeIds: expandedInitiativeIds, detail: detail, secondaryPane: secondaryPane, onCreateInitiative: onCreateInitiative, onCreateWorkstream: onCreateWorkstream, onToggleInitiative: onToggleInitiative, onSelectInitiative: onSelectInitiative, onSelectWorkstream: onSelectWorkstream, onOpenInitiativeDetails: onOpenInitiativeDetails, onOpenWorkstreamDetails: onOpenWorkstreamDetails, onOpenNestedWorkstreamDetails: onOpenNestedWorkstreamDetails, onOpenTaskById: onOpenTaskById, onSetTaskStatus: onSetTaskStatus, onChangePlanningOwner: onChangePlanningOwner, onChangeTaskAssignee: onChangeTaskAssignee, onArchivePlanningTask: onArchivePlanningTask, onArchiveResolvedWorkstream: onArchiveResolvedWorkstream, onArchiveResolvedInitiative: onArchiveResolvedInitiative, linkOptions: linkOptions, onAssignInitiativeToWorkstream: onAssignInitiativeToWorkstream, onRetryPlanning: onRetryPlanning }) })] }))), wideLayout && !primaryIsInitiative && (initiativeRelationshipExpanded ? (_jsx(RelationshipPane, { label: "Initiative", title: initiativeRelationship.title, description: initiativeRelationship.description, action: initiativeRelationship.action, onCollapse: () => setInitiativeRelationshipExpanded(false), paneRef: initiativeRelationshipPaneRef })) : (_jsx(CollapsedPane, { label: "Initiative", muted: !hasInitiativeRelationship, onExpand: () => setInitiativeRelationshipExpanded(true) }))), showPrimaryPane && (effectivePrimaryCollapsed ? (_jsx(CollapsedPane, { label: primaryEntityType === 'initiative' ? 'Initiative' : 'Workstream', onExpand: onExpandPrimaryPane })) : (_jsxs("div", { ref: primaryPaneRef, "data-planning-pane": "primary", className: `${panelStyles.paneShell} ${styles.appScrollbar} tf-scrollbar ${panelStyles.detailPane}`.trim(), style: paneWidthStyle(wideLayout ? PLANNING_DRAWER_DETAIL_WIDTH_PX : adaptiveDetailWidth), children: [_jsxs("div", { className: panelStyles.paneHeader, children: [layoutMode === 'narrow' ? (_jsx("button", { type: "button", className: "tf-control-icon", onClick: handleBackFromPrimary, "aria-label": "Back to Planning", title: "Back to Planning", children: _jsx(ChevronLeft, { size: 16, "aria-hidden": "true" }) })) : null, _jsx("h2", { className: panelStyles.paneHeaderLabel, tabIndex: -1, "data-planning-pane-heading": true, children: primaryPaneLabel }), _jsxs("div", { className: panelStyles.headerActionGroup, children: [primaryArchiveDetail ? (_jsx(ArchiveVisibilityToggle, { visible: archivedDetailVisibility[primaryArchiveDetail.type], disabled: countArchivedDetailChildren(primaryArchiveDetail) === 0, itemLabel: primaryArchiveDetail.type === 'initiative' ? 'workstreams' : 'tasks', onToggle: () => toggleArchivedDetailVisibility(primaryArchiveDetail.type) })) : null, wideLayout ? (_jsx("button", { type: "button", className: "tf-control-icon", onClick: onCollapsePrimaryPane, "aria-label": `Collapse ${primaryPaneLabel} pane`, title: `Collapse ${primaryPaneLabel} pane`, children: _jsx(ChevronLeft, { size: 16, "aria-hidden": "true" }) })) : null] })] }), _jsx("div", { className: panelStyles.paneContent, "aria-busy": primaryHydrationState?.status === 'loading', children: dedicatedPrimaryEditor ? (_jsx(PlanningDrawerEditor, { editor: dedicatedPrimaryEditor, draftTitle: draftTitle, draftDescription: draftDescription, draftOwner: draftOwner, draftInitiativeId: draftInitiativeId, assigneeOptions: assigneeOptions, initiativeLinkOptions: linkOptions.initiatives, draftInitiativeSummary: draftInitiativeSummary, onChangeDraftTitle: onChangeDraftTitle, onChangeDraftDescription: onChangeDraftDescription, onChangeDraftOwner: onChangeDraftOwner, onChangeDraftInitiativeId: onChangeDraftInitiativeId, onCancel: onCancelEditor, onSubmit: onSubmitEditor, isSubmitting: isSubmittingEditor })) : detail ? (_jsx(PlanningDrawerDetailView, { detail: detail, showArchivedChildren: archivedDetailVisibility[detail.type], inlineEditor: primaryInlineEditor ? {
|
|
1092
|
+
editor: primaryInlineEditor,
|
|
1093
|
+
draftTitle,
|
|
1094
|
+
draftDescription,
|
|
1095
|
+
draftOwner,
|
|
1096
|
+
draftInitiativeId,
|
|
1097
|
+
draftInitiativeSummary,
|
|
1098
|
+
onChangeDraftTitle,
|
|
1099
|
+
onChangeDraftDescription,
|
|
1100
|
+
onChangeDraftOwner,
|
|
1101
|
+
onChangeDraftInitiativeId,
|
|
1102
|
+
onCancel: onCancelEditor,
|
|
1103
|
+
onSubmit: onSubmitEditor,
|
|
1104
|
+
isSubmitting: isSubmittingEditor,
|
|
1105
|
+
} : null, selectedChildWorkstreamId: secondaryPane?.kind === 'detail'
|
|
1106
|
+
? secondaryPane.detail.item.id
|
|
1107
|
+
: null, currentWorkspaceId: currentWorkspaceId, currentActorId: currentOwnerId, theme: theme, assigneeOptions: assigneeOptions, linkOptions: linkOptions, showTaskCardStatusLabel: showTaskCardStatusLabel, taskArrangeMode: taskArrangeMode, onTaskArrangeModeChange: onTaskArrangeModeChange, onReorderWorkstreamTasks: onReorderWorkstreamTasks, hydrationState: primaryHydrationState, onRetryHydration: onRetryPrimaryHydration, onSetTaskStatus: detail.type === 'workstream' ? onSetTaskStatus : undefined, onArchivePlanningTask: detail.type === 'workstream' ? onArchivePlanningTask : undefined, onArchiveResolvedWorkstream: detail.type === 'initiative' ? onArchiveResolvedWorkstream : undefined, onArchiveResolvedEntity: detail.type === 'initiative'
|
|
1108
|
+
? onArchiveResolvedInitiative
|
|
1109
|
+
: onArchiveResolvedWorkstream, onOpenNestedWorkstreamDetails: detail.type === 'initiative' ? onOpenNestedWorkstreamDetails : undefined, onCreateTaskInWorkstream: detail.type === 'workstream' ? onCreateTaskInWorkstream : undefined, onCreateWorkstreamInInitiative: detail.type === 'initiative' ? onCreateWorkstreamInInitiative : undefined, onOpenTaskById: detail.type === 'workstream' ? onOpenTaskById : undefined, onChangeTaskAssignee: detail.type === 'workstream' ? onChangeTaskAssignee : undefined, taskReferences: taskReferences, onAssignTaskToWorkstream: detail.type === 'workstream' ? onAssignTaskToWorkstream : undefined, onAssignInitiativeToWorkstream: onAssignInitiativeToWorkstream, onAttachTaskToWorkstreamByReference: detail.type === 'workstream' ? onAttachTaskToWorkstreamByReference : undefined, onAttachWorkstreamToInitiativeByReference: detail.type === 'initiative' ? onAttachWorkstreamToInitiativeByReference : undefined, parentInitiative: detail.type === 'workstream' ? resolveParentInitiative(detail.item) : null, onEdit: () => detail.type === 'initiative'
|
|
442
1110
|
? onEditInitiative(detail.item.id)
|
|
443
|
-
: onEditWorkstream(detail.item.id), onArchive: () => detail.type === 'initiative'
|
|
1111
|
+
: onEditWorkstream(detail.item.id), onChangeOwner: (ownerId) => onChangePlanningOwner(detail.type, detail.item.id, ownerId), onChangePlanningOwner: onChangePlanningOwner, onArchive: () => detail.type === 'initiative'
|
|
444
1112
|
? onArchiveInitiative(detail.item.id)
|
|
445
1113
|
: onArchiveWorkstream(detail.item.id), onUnarchive: () => detail.type === 'initiative'
|
|
446
1114
|
? onUnarchiveInitiative(detail.item.id)
|
|
447
|
-
: onUnarchiveWorkstream(detail.item.id), onAddPlanningContextFile: onAddPlanningContextFile, onRemovePlanningContextFile: onRemovePlanningContextFile, onUpdatePlanningContextCaption: onUpdatePlanningContextCaption })) : null })] }))), hasSecondaryPane && (
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
1115
|
+
: onUnarchiveWorkstream(detail.item.id), onAddPlanningContextFile: onAddPlanningContextFile, onRemovePlanningContextFile: onRemovePlanningContextFile, onUpdatePlanningContextCaption: onUpdatePlanningContextCaption })) : null })] }))), wideLayout && !primaryIsWorkstream && !hasSecondaryPane && (workstreamRelationshipExpanded ? (_jsx(RelationshipPane, { label: "Workstream", title: workstreamRelationship.title, description: workstreamRelationship.description, action: workstreamRelationship.action, onCollapse: () => setWorkstreamRelationshipExpanded(false), paneRef: workstreamRelationshipPaneRef })) : (_jsx(CollapsedPane, { label: "Workstream", muted: true, onExpand: () => setWorkstreamRelationshipExpanded(true) }))), showSecondaryPane && (effectiveSecondaryCollapsed ? (_jsx(CollapsedPane, { label: "Workstream", onExpand: onExpandSecondaryPane })) : (_jsxs("div", { ref: secondaryPaneRef, "data-planning-pane": "secondary", className: `${panelStyles.paneShell} ${styles.appScrollbar} tf-scrollbar ${panelStyles.detailPane}`.trim(), style: paneWidthStyle(wideLayout ? PLANNING_DRAWER_DETAIL_WIDTH_PX : adaptiveDetailWidth), children: [_jsxs("div", { className: panelStyles.paneHeader, children: [!wideLayout ? (_jsx("button", { type: "button", className: "tf-control-icon", onClick: secondaryInlineEditor
|
|
1116
|
+
? (onCancelSecondaryEditor || onBackFromSecondary)
|
|
1117
|
+
: onBackFromSecondary, "aria-label": secondaryInlineEditor ? 'Cancel workstream editing' : `Back to ${primaryPaneLabel}`, title: secondaryInlineEditor ? 'Cancel workstream editing' : `Back to ${primaryPaneLabel}`, children: _jsx(ChevronLeft, { size: 16, "aria-hidden": "true" }) })) : null, _jsx("h2", { className: panelStyles.paneHeaderLabel, tabIndex: -1, "data-planning-pane-heading": true, children: secondaryPaneLabel }), _jsxs("div", { className: panelStyles.headerActionGroup, children: [secondaryArchiveDetail ? (_jsx(ArchiveVisibilityToggle, { visible: archivedDetailVisibility.workstream, disabled: countArchivedDetailChildren(secondaryArchiveDetail) === 0, itemLabel: "tasks", onToggle: () => toggleArchivedDetailVisibility('workstream') })) : null, wideLayout ? (_jsx("button", { type: "button", className: "tf-control-icon", onClick: onCollapseSecondaryPane, "aria-label": `Collapse ${secondaryPaneLabel} pane`, title: `Collapse ${secondaryPaneLabel} pane`, children: _jsx(ChevronLeft, { size: 16, "aria-hidden": "true" }) })) : null] })] }), _jsx("div", { className: panelStyles.paneContent, "aria-busy": secondaryHydrationState?.status === 'loading', children: secondaryPane?.kind === 'editor' ? (_jsx(PlanningDrawerEditor, { editor: secondaryPane.editor, draftTitle: draftTitle, draftDescription: draftDescription, draftOwner: draftOwner, draftInitiativeId: draftInitiativeId, assigneeOptions: assigneeOptions, initiativeLinkOptions: linkOptions.initiatives, draftInitiativeSummary: draftInitiativeSummary, onChangeDraftTitle: onChangeDraftTitle, onChangeDraftDescription: onChangeDraftDescription, onChangeDraftOwner: onChangeDraftOwner, onChangeDraftInitiativeId: onChangeDraftInitiativeId, onCancel: onBackFromSecondary, onSubmit: onSubmitEditor, isSubmitting: isSubmittingEditor })) : secondaryPane ? (_jsx(PlanningDrawerDetailView, { detail: secondaryPane.detail, showArchivedChildren: archivedDetailVisibility.workstream, inlineEditor: secondaryInlineEditor ? {
|
|
1118
|
+
editor: secondaryInlineEditor,
|
|
1119
|
+
draftTitle,
|
|
1120
|
+
draftDescription,
|
|
1121
|
+
draftOwner,
|
|
1122
|
+
draftInitiativeId,
|
|
1123
|
+
draftInitiativeSummary,
|
|
1124
|
+
onChangeDraftTitle,
|
|
1125
|
+
onChangeDraftDescription,
|
|
1126
|
+
onChangeDraftOwner,
|
|
1127
|
+
onChangeDraftInitiativeId,
|
|
1128
|
+
onCancel: onCancelSecondaryEditor || onBackFromSecondary,
|
|
1129
|
+
onSubmit: onSubmitEditor,
|
|
1130
|
+
isSubmitting: isSubmittingEditor,
|
|
1131
|
+
} : null, currentWorkspaceId: currentWorkspaceId, currentActorId: currentOwnerId, theme: theme, assigneeOptions: assigneeOptions, linkOptions: linkOptions, showTaskCardStatusLabel: showTaskCardStatusLabel, taskArrangeMode: taskArrangeMode, onTaskArrangeModeChange: onTaskArrangeModeChange, onReorderWorkstreamTasks: onReorderWorkstreamTasks, hydrationState: secondaryHydrationState, onRetryHydration: onRetrySecondaryHydration, onSetTaskStatus: onSetTaskStatus, onArchivePlanningTask: onArchivePlanningTask, onArchiveResolvedEntity: onArchiveResolvedWorkstream, onCreateTaskInWorkstream: onCreateTaskInWorkstream, onOpenTaskById: onOpenTaskById, onChangeTaskAssignee: onChangeTaskAssignee, taskReferences: taskReferences, onAssignTaskToWorkstream: onAssignTaskToWorkstream, onAssignInitiativeToWorkstream: onAssignInitiativeToWorkstream, onAttachTaskToWorkstreamByReference: onAttachTaskToWorkstreamByReference, parentInitiative: resolveParentInitiative(secondaryPane.detail.item), onEdit: () => onEditWorkstream(secondaryPane.detail.item.id), onChangeOwner: (ownerId) => onChangePlanningOwner('workstream', secondaryPane.detail.item.id, ownerId), onChangePlanningOwner: onChangePlanningOwner, onArchive: () => onArchiveWorkstream(secondaryPane.detail.item.id), onUnarchive: () => onUnarchiveWorkstream(secondaryPane.detail.item.id), onAddPlanningContextFile: onAddPlanningContextFile, onRemovePlanningContextFile: onRemovePlanningContextFile, onUpdatePlanningContextCaption: onUpdatePlanningContextCaption })) : null })] })))] }) }));
|
|
453
1132
|
}
|