@taskforcehq/taskforce 0.3.328 → 0.3.330
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/dist/Taskforce.module.css +523 -79
- package/dist/TaskforceCore.js +237 -230
- package/dist/annotatedAttachments/AnnotatedAttachmentSessionStore.js +1 -1
- package/dist/cli.js +34 -0
- package/dist/cliCloudTargetGuard.d.ts +5 -0
- package/dist/cliCloudTargetGuard.js +11 -0
- package/dist/components/features/AiProfilesModule.js +3 -5
- package/dist/components/features/AnnotatedAttachmentWorkspace.js +24 -8
- package/dist/components/features/TaskSettings.d.ts +12 -1
- package/dist/components/features/TaskSettings.js +217 -54
- package/dist/components/features/TaskforceAgentsModule.d.ts +1 -2
- package/dist/components/features/TaskforceAgentsModule.js +586 -116
- package/dist/components/features/agentCapabilities/AgentCapabilitiesPrototype.d.ts +1 -1
- package/dist/components/features/agentConnections/AgentConnectionControl.d.ts +15 -0
- package/dist/components/features/agentConnections/AgentConnectionControl.js +125 -0
- package/dist/components/features/agentConnections/ModelConnectionsPanel.d.ts +18 -0
- package/dist/components/features/agentConnections/ModelConnectionsPanel.js +393 -0
- package/dist/components/features/agentConnections/modelConnectionsApi.d.ts +65 -0
- package/dist/components/features/agentConnections/modelConnectionsApi.js +129 -0
- package/dist/components/features/planning/PlanningModule.js +2 -5
- package/dist/components/features/planning/PlanningTaskOrderList.d.ts +1 -1
- package/dist/components/features/planning/PlanningTaskOrderList.js +17 -6
- package/dist/components/features/planning/planningTaskArrangement.d.ts +1 -0
- package/dist/components/features/planning/planningTaskArrangement.js +5 -5
- package/dist/components/features/taskforceAgentAssignments/AgentBehaviorAssignments.js +15 -24
- package/dist/components/features/taskforceAgentEditorModel.d.ts +2 -1
- package/dist/components/features/taskforceAgentEditorModel.js +5 -1
- package/dist/components/features/workflowManager/workflowManagerApi.d.ts +1 -1
- package/dist/components/features/workflowManager/workflowManagerApi.js +3 -0
- package/dist/components/task/TaskCard.d.ts +5 -0
- package/dist/components/task/TaskCard.js +65 -10
- package/dist/components/task/TaskImageReviews.js +14 -5
- package/dist/components/task/TaskKanban.d.ts +6 -1
- package/dist/components/task/TaskKanban.js +152 -6
- package/dist/components/task/TaskList.d.ts +5 -0
- package/dist/components/task/TaskList.js +3 -3
- package/dist/components/task/TaskWorkflowAssignmentField.js +68 -10
- package/dist/components/ui/PasswordInput.d.ts +6 -0
- package/dist/components/ui/PasswordInput.js +11 -0
- package/dist/components/ui/TopNoticeLayer.js +1 -1
- package/dist/components/views/AppShellHeader.js +32 -11
- package/dist/components/views/PlanComparisonPage.js +12 -0
- package/dist/components/views/StandaloneLayout.js +32 -55
- package/dist/components/views/WidgetView.js +3 -3
- package/dist/components/views/panels/PlanningDrawer.js +5 -12
- package/dist/components/views/standalone/modals/AccountSettingsModal.js +26 -17
- package/dist/components/views/standalone/modals/SyncStatusModal.d.ts +4 -3
- package/dist/components/views/standalone/modals/SyncStatusModal.js +33 -38
- package/dist/config/envSchema.js +60 -1
- package/dist/config/localServiceRuntimeContract.d.ts +13 -0
- package/dist/config/localServiceRuntimeContract.js +135 -0
- package/dist/core/AiProfileService.js +46 -8
- package/dist/core/DeletedTaskLifecycleService.d.ts +1 -0
- package/dist/core/DeletedTaskLifecycleService.js +37 -6
- package/dist/core/McpTokenService.d.ts +23 -1
- package/dist/core/McpTokenService.js +93 -10
- package/dist/core/TaskAttachmentLinksDurableMutationService.d.ts +3 -2
- package/dist/core/TaskAttachmentLinksDurableMutationService.js +33 -9
- package/dist/core/TaskChecklistCommandService.d.ts +27 -0
- package/dist/core/TaskChecklistCommandService.js +83 -5
- package/dist/core/TaskLifecycleCommandService.d.ts +3 -1
- package/dist/core/TaskLifecycleCommandService.js +6 -2
- package/dist/core/Taskforce.d.ts +94 -2
- package/dist/core/Taskforce.js +760 -36
- package/dist/core/types.d.ts +14 -0
- package/dist/documentReviews/commandService.d.ts +2 -1
- package/dist/documentReviews/commandService.js +6 -3
- package/dist/hooks/sync/orchestratorShared.d.ts +1 -0
- package/dist/hooks/sync/orchestratorShared.js +2 -0
- package/dist/hooks/sync/useDurableLocalOutboxDrain.d.ts +1 -1
- package/dist/hooks/sync/useDurableTaskCreateMutation.js +1 -1
- package/dist/hooks/sync/useDurableTaskMetadataMutation.d.ts +1 -0
- package/dist/hooks/sync/useDurableTaskMetadataMutation.js +1 -0
- package/dist/hooks/sync/useDurableTaskStatusMutation.d.ts +1 -0
- package/dist/hooks/sync/useLocalSyncCoordinatorSnapshot.d.ts +3 -0
- package/dist/hooks/sync/useLocalSyncCoordinatorSnapshot.js +85 -9
- package/dist/hooks/sync/useSyncStatusControls.d.ts +4 -1
- package/dist/hooks/sync/useSyncStatusControls.js +47 -11
- package/dist/hooks/tasks/taskHttpMutation.js +1 -0
- package/dist/hooks/tasks/useCloudTaskSearch.d.ts +12 -0
- package/dist/hooks/tasks/useCloudTaskSearch.js +71 -0
- package/dist/hooks/tasks/useTaskDescriptionImageDraftRecovery.d.ts +16 -0
- package/dist/hooks/tasks/useTaskDescriptionImageDraftRecovery.js +197 -0
- package/dist/hooks/tasks/useTaskEditorNavigation.d.ts +16 -3
- package/dist/hooks/tasks/useTaskEditorNavigation.js +72 -13
- package/dist/hooks/tasks/useTaskFormActions.d.ts +6 -0
- package/dist/hooks/tasks/useTaskFormActions.js +65 -12
- package/dist/hooks/ui/useSettingsModel.d.ts +24 -2
- package/dist/hooks/ui/useSettingsModel.js +13 -2
- package/dist/hooks/ui/useSettingsPersistence.d.ts +12 -1
- package/dist/hooks/ui/useSettingsPersistence.js +74 -47
- package/dist/hooks/useFilterSort.d.ts +7 -3
- package/dist/hooks/useFilterSort.js +15 -5
- package/dist/hooks/useSyncOrchestrator.d.ts +3 -0
- package/dist/hooks/useSyncOrchestrator.js +111 -2
- package/dist/hooks/useTaskData.d.ts +40 -1
- package/dist/hooks/useTaskData.js +240 -9
- package/dist/hooks/useTaskMutations.d.ts +12 -2
- package/dist/hooks/useTaskMutations.js +266 -52
- package/dist/hooks/useTaskforce.d.ts +39 -9
- package/dist/hooks/useTaskforce.js +359 -40
- package/dist/hooks/useUiNotice.d.ts +4 -0
- package/dist/hooks/useUiNotice.js +4 -0
- package/dist/mcp/adminWorkspaceRegistrar.js +3 -3
- package/dist/mcp/clientRegistry.d.ts +2 -2
- package/dist/mcp/clientRegistry.js +1 -1
- package/dist/mcp/documentAssetRegistrar.js +53 -41
- package/dist/mcp/documentHelpers.d.ts +1 -0
- package/dist/mcp/documentHelpers.js +7 -3
- package/dist/mcp/durableTaskMutationRouter.d.ts +4 -1
- package/dist/mcp/durableTaskMutationRouter.js +10 -0
- package/dist/mcp/durableTaskRelationshipMutationRouter.js +4 -0
- package/dist/mcp/httpProtocolRouting.d.ts +10 -0
- package/dist/mcp/httpProtocolRouting.js +19 -0
- package/dist/mcp/localCliHealth.d.ts +2 -2
- package/dist/mcp/localCliHealth.js +2 -2
- package/dist/mcp/localServiceProxy.d.ts +1 -0
- package/dist/mcp/localServiceProxy.js +530 -68
- package/dist/mcp/planningAttachmentCommandAdapter.d.ts +3 -1
- package/dist/mcp/planningAttachmentCommandAdapter.js +20 -2
- package/dist/mcp/runtime.d.ts +54 -79
- package/dist/mcp/runtime.js +556 -139
- package/dist/mcp/taskPlanningRegistrar.js +64 -42
- package/dist/mcp/toolCallCompatibility.js +38 -1
- package/dist/mcp/toolCatalog.d.ts +1 -0
- package/dist/mcp/toolProfiles.d.ts +2 -0
- package/dist/mcp/toolProfiles.js +10 -0
- package/dist/mcp/toolRegistry.d.ts +1 -0
- package/dist/mcp/toolRegistry.js +1 -0
- package/dist/mcp/workflowExecutionRegistrar.js +4 -4
- package/dist/migrations/taskSchemaMigrations.d.ts +5 -0
- package/dist/migrations/taskSchemaMigrations.js +427 -0
- package/dist/runtime/appGateDefinitions.d.ts +30 -6
- package/dist/runtime/appGateDefinitions.js +6 -6
- package/dist/runtime/appGates.d.ts +13 -13
- package/dist/runtime/appGates.js +36 -13
- package/dist/runtime/nodeAppGates.d.ts +8 -0
- package/dist/runtime/nodeAppGates.js +27 -0
- package/dist/server/cloudCollectionRead.d.ts +1 -1
- package/dist/server/cloudCollectionRead.js +2 -2
- package/dist/server/index.d.ts +6 -0
- package/dist/server/index.js +123 -14
- package/dist/server/localDatabaseIdentity.js +4 -1
- package/dist/server/localServiceLease.d.ts +3 -0
- package/dist/server/localServiceLease.js +11 -2
- package/dist/server/localServiceSessions.d.ts +14 -17
- package/dist/server/localServiceSessions.js +308 -94
- package/dist/server/localWorkspaceSyncServerRuntime.js +12 -7
- package/dist/server/rateLimit.d.ts +1 -0
- package/dist/server/rateLimit.js +4 -0
- package/dist/server/realtimeSyncWs.js +36 -12
- package/dist/server/routes/admin.d.ts +4 -0
- package/dist/server/routes/admin.js +113 -3
- package/dist/server/routes/agentRoles.js +3 -2
- package/dist/server/routes/agentSkills.js +3 -2
- package/dist/server/routes/agents.d.ts +7 -0
- package/dist/server/routes/agents.js +394 -39
- package/dist/server/routes/annotatedAttachments.js +3 -2
- package/dist/server/routes/auth.js +3 -1
- package/dist/server/routes/billing.js +5 -1
- package/dist/server/routes/durableTaskHttpRouters.d.ts +11 -2
- package/dist/server/routes/executorPhaseAApprovals.d.ts +19 -0
- package/dist/server/routes/executorPhaseAApprovals.js +140 -0
- package/dist/server/routes/executorPhaseAIssuerRedemptions.d.ts +11 -0
- package/dist/server/routes/executorPhaseAIssuerRedemptions.js +24 -0
- package/dist/server/routes/githubReviewEvidence.d.ts +19 -0
- package/dist/server/routes/githubReviewEvidence.js +116 -0
- package/dist/server/routes/localService.d.ts +15 -4
- package/dist/server/routes/localService.js +138 -40
- package/dist/server/routes/modelConnections.d.ts +24 -0
- package/dist/server/routes/modelConnections.js +205 -0
- package/dist/server/routes/primitives.d.ts +2 -0
- package/dist/server/routes/shared.d.ts +19 -0
- package/dist/server/routes/shared.js +95 -19
- package/dist/server/routes/sync.js +1 -0
- package/dist/server/routes/syncAuxRoutes.js +9 -2
- package/dist/server/routes/syncPullApplyRoutes.js +23 -4
- package/dist/server/routes/syncPushRoutes.d.ts +1 -0
- package/dist/server/routes/syncPushRoutes.js +1 -0
- package/dist/server/routes/syncV3FeedRoutes.js +27 -16
- package/dist/server/routes/syncV3LocalCaptureRoutes.js +28 -2
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.d.ts +1 -0
- package/dist/server/routes/syncV3LocalFeedApplyRoutes.js +26 -0
- package/dist/server/routes/syncV3OperationRoutes.js +45 -9
- package/dist/server/routes/tasks.js +124 -13
- package/dist/server/routes/workflows.js +9 -1
- package/dist/server/routes/workspaces.js +43 -1
- package/dist/server/routes.js +59 -0
- package/dist/server/workspaceDeletionAdmission.d.ts +23 -0
- package/dist/server/workspaceDeletionAdmission.js +50 -0
- package/dist/service/localServiceCli.js +16 -0
- package/dist/service/localServiceClientLifecycle.js +36 -10
- package/dist/services/codexAppServerModelGateway.d.ts +161 -0
- package/dist/services/codexAppServerModelGateway.js +663 -0
- package/dist/services/codexDeviceCodeLoginManager.d.ts +39 -0
- package/dist/services/codexDeviceCodeLoginManager.js +265 -0
- package/dist/services/codexModelProviderConnectionLifecycle.d.ts +8 -0
- package/dist/services/codexModelProviderConnectionLifecycle.js +73 -0
- package/dist/services/executorPhaseAApprovalRuntime.d.ts +14 -0
- package/dist/services/executorPhaseAApprovalRuntime.js +24 -0
- package/dist/services/executorPhaseAApprovalService.d.ts +40 -0
- package/dist/services/executorPhaseAApprovalService.js +609 -0
- package/dist/services/executorPhaseADriftEvaluator.d.ts +78 -0
- package/dist/services/executorPhaseADriftEvaluator.js +93 -0
- package/dist/services/executorPhaseAIssuerCore.d.ts +126 -0
- package/dist/services/executorPhaseAIssuerCore.js +295 -0
- package/dist/services/executorPhaseAIssuerRedemptionService.d.ts +34 -0
- package/dist/services/executorPhaseAIssuerRedemptionService.js +158 -0
- package/dist/services/githubReviewEvidenceRuntime.d.ts +14 -0
- package/dist/services/githubReviewEvidenceRuntime.js +30 -0
- package/dist/services/githubReviewEvidenceService.d.ts +93 -0
- package/dist/services/githubReviewEvidenceService.js +336 -0
- package/dist/services/modelGateway.d.ts +7 -0
- package/dist/services/modelProviderConnectionService.d.ts +71 -0
- package/dist/services/modelProviderConnectionService.js +279 -0
- package/dist/services/modelProviderCredentialHome.d.ts +32 -0
- package/dist/services/modelProviderCredentialHome.js +271 -0
- package/dist/services/ownerScopedModelConnectionGateway.d.ts +12 -0
- package/dist/services/ownerScopedModelConnectionGateway.js +30 -0
- package/dist/services/taskforceAgentConnectionBindingService.d.ts +66 -0
- package/dist/services/taskforceAgentConnectionBindingService.js +185 -0
- package/dist/services/taskforceAgentMcpBridge.d.ts +8 -2
- package/dist/services/taskforceAgentMcpBridge.js +30 -27
- package/dist/shared/adminEdgeProxy.d.ts +5 -0
- package/dist/shared/adminEdgeProxy.js +94 -0
- package/dist/shared/adminProxySessionCookies.d.ts +16 -0
- package/dist/shared/adminProxySessionCookies.js +86 -0
- package/dist/shared/aiProfileColors.d.ts +31 -1
- package/dist/shared/aiProfileColors.js +14 -6
- package/dist/shared/executorPhaseAApprovalGoldenVector.json +269 -0
- package/dist/shared/executorPhaseAApprovalReceipt.d.ts +112 -0
- package/dist/shared/executorPhaseAApprovalReceipt.js +58 -0
- package/dist/shared/executorPhaseAApprovalTrustPolicy.json +10 -0
- package/dist/shared/executorPhaseADriftContracts.d.ts +37 -0
- package/dist/shared/executorPhaseADriftContracts.js +63 -0
- package/dist/shared/executorPhaseAIssuerContracts.d.ts +75 -0
- package/dist/shared/executorPhaseAIssuerContracts.js +90 -0
- package/dist/shared/executorPhaseARunAuthorization.d.ts +120 -0
- package/dist/shared/executorPhaseARunAuthorization.js +232 -0
- package/dist/shared/executorPhaseASchemaValidation.d.ts +7 -0
- package/dist/shared/executorPhaseASchemaValidation.js +53 -0
- package/dist/shared/executorPhaseASchemas/approval-receipt.schema.json +106 -0
- package/dist/shared/executorPhaseASchemas/drift-attestation.schema.json +54 -0
- package/dist/shared/executorPhaseASchemas/drift-request.schema.json +47 -0
- package/dist/shared/executorPhaseASchemas/foundation-manifest.schema.json +29 -0
- package/dist/shared/executorPhaseASchemas/issuer-audit-record.schema.json +24 -0
- package/dist/shared/executorPhaseASchemas/issuer-proof.schema.json +43 -0
- package/dist/shared/executorPhaseASchemas/issuer-redemption-request.schema.json +18 -0
- package/dist/shared/executorPhaseASchemas/issuer-redemption-response.schema.json +39 -0
- package/dist/shared/executorPhaseASchemas/logical-envelope.schema.json +149 -0
- package/dist/shared/executorPhaseASchemas/preflight-report.schema.json +216 -0
- package/dist/shared/executorPhaseASchemas/run-capability.schema.json +111 -0
- package/dist/shared/executorPhaseASchemas/sender-proof.schema.json +37 -0
- package/dist/shared/executorPhaseASchemas/workload-grant.schema.json +68 -0
- package/dist/shared/executorPhaseASchemas/workload-jwt-claims.schema.json +67 -0
- package/dist/shared/executorPhaseATiming.d.ts +1 -0
- package/dist/shared/executorPhaseATiming.js +1 -0
- package/dist/shared/planningIdentity.js +1 -1
- package/dist/shared/productLogoKeys.d.ts +2 -0
- package/dist/shared/productLogoKeys.js +18 -0
- package/dist/shared/taskforceAgentDefinition.d.ts +0 -1
- package/dist/shared/taskforceAgentDefinition.js +6 -3
- package/dist/shared/taskforceAgentModels.d.ts +1 -0
- package/dist/shared/taskforceAgentModels.js +36 -3
- package/dist/shared/userFeatureGrants.d.ts +4 -0
- package/dist/shared/userFeatureGrants.js +7 -0
- package/dist/storage/executorPhaseAApprovalReceiptStore.d.ts +37 -0
- package/dist/storage/executorPhaseAApprovalReceiptStore.js +81 -0
- package/dist/storage/executorPhaseARunAuthorizationStore.d.ts +103 -0
- package/dist/storage/executorPhaseARunAuthorizationStore.js +492 -0
- package/dist/storage/githubReviewEvidenceInstallationStore.d.ts +26 -0
- package/dist/storage/githubReviewEvidenceInstallationStore.js +89 -0
- package/dist/storage/modelProviderConnectionStore.d.ts +99 -0
- package/dist/storage/modelProviderConnectionStore.js +446 -0
- package/dist/storage/postgresAdapter.d.ts +24 -3
- package/dist/storage/postgresAdapter.js +117 -14
- package/dist/storage/postgresWorker.js +22 -5
- package/dist/storage/postgresWorkerProtocol.d.ts +30 -0
- package/dist/storage/postgresWorkerProtocol.js +30 -0
- package/dist/storage/taskforceAgentConnectionBindingStore.d.ts +31 -0
- package/dist/storage/taskforceAgentConnectionBindingStore.js +84 -0
- package/dist/sync/cloudSyncApi.d.ts +4 -1
- package/dist/sync/cloudSyncApi.js +7 -2
- package/dist/sync/contentSyncState.d.ts +1 -1
- package/dist/sync/coordinator/localSyncExecutionPermitStore.d.ts +1 -0
- package/dist/sync/coordinator/localSyncExecutionPermitStore.js +67 -30
- package/dist/sync/coordinator/localWorkspaceSyncPendingV2PushProgress.d.ts +10 -0
- package/dist/sync/coordinator/localWorkspaceSyncPendingV2PushProgress.js +29 -0
- package/dist/sync/coordinator/localWorkspaceSyncRunner.js +6 -2
- package/dist/sync/coordinator/localWorkspaceSyncRunnerState.d.ts +15 -1
- package/dist/sync/coordinator/localWorkspaceSyncRunnerState.js +99 -2
- package/dist/sync/coordinator/workspaceSyncCredentialBroker.d.ts +1 -0
- package/dist/sync/coordinator/workspaceSyncCredentialBroker.js +33 -4
- package/dist/sync/engine/workspaceSyncContentLifecycleAdapter.d.ts +2 -1
- package/dist/sync/engine/workspaceSyncContentVersionStore.d.ts +38 -0
- package/dist/sync/engine/workspaceSyncContentVersionStore.js +50 -1
- package/dist/sync/engine/workspaceSyncEngineBrowserGatewayRemoteServices.js +20 -2
- package/dist/sync/engine/workspaceSyncEngineLifecyclePolicy.js +6 -6
- package/dist/sync/engine/workspaceSyncEngineLocalServices.d.ts +4 -0
- package/dist/sync/engine/workspaceSyncEngineLocalServices.js +11 -0
- package/dist/sync/engine/workspaceSyncEnginePushCompletion.d.ts +14 -0
- package/dist/sync/engine/workspaceSyncEnginePushCompletion.js +84 -0
- package/dist/sync/engine/workspaceSyncEngineRecovery.js +1 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.d.ts +11 -0
- package/dist/sync/engine/workspaceSyncEngineRemoteServices.js +2 -1
- package/dist/sync/engine/workspaceSyncEngineRuntime.d.ts +1 -0
- package/dist/sync/engine/workspaceSyncEngineRuntime.js +1 -0
- package/dist/sync/engine/workspaceSyncEngineServerRemoteServices.js +31 -4
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.d.ts +3 -1
- package/dist/sync/engine/workspaceSyncEngineServerRunnerOperations.js +134 -43
- package/dist/sync/engine/workspaceSyncEngineServerSnapshotReader.js +6 -0
- package/dist/sync/engine/workspaceSyncEngineTransfers.d.ts +1 -1
- package/dist/sync/engine/workspaceSyncEngineTransfers.js +11 -4
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.d.ts +1 -0
- package/dist/sync/engine/workspaceSyncV2ChangeDispatcher.js +29 -0
- package/dist/sync/syncApplyHandlers.d.ts +2 -0
- package/dist/sync/syncApplyHandlers.js +10 -1
- package/dist/sync/syncService.d.ts +17 -0
- package/dist/sync/syncService.js +87 -19
- package/dist/sync/taskforceAgentSyncAuthorization.d.ts +16 -0
- package/dist/sync/taskforceAgentSyncAuthorization.js +20 -0
- package/dist/sync/v3/combinedFeedCapability.js +8 -0
- package/dist/sync/v3/durableInitiativeMutationRouter.js +18 -10
- package/dist/sync/v3/durableOperationReplay.d.ts +14 -0
- package/dist/sync/v3/durableOperationReplay.js +18 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.d.ts +2 -0
- package/dist/sync/v3/durableTaskAttachmentLinksMutationRouter.js +14 -1
- package/dist/sync/v3/durableTaskChecklistMutationRouter.d.ts +4 -1
- package/dist/sync/v3/durableTaskChecklistMutationRouter.js +62 -15
- package/dist/sync/v3/durableTaskCommentMutationRouter.js +3 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.d.ts +1 -0
- package/dist/sync/v3/durableTaskHttpBulkMutationRouter.js +30 -8
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.d.ts +5 -3
- package/dist/sync/v3/durableTaskHttpRootMutationRouter.js +37 -2
- package/dist/sync/v3/durableTaxonomyMutationRouter.js +5 -0
- package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.d.ts +11 -0
- package/dist/sync/v3/durableWorkflowRuntimeMutationRouter.js +39 -10
- package/dist/sync/v3/durableWorkstreamMutationRouter.js +18 -10
- package/dist/sync/v3/durableWorkstreamTaskOrderMutationRouter.js +16 -5
- package/dist/sync/v3/localOutboxDispatchRuntime.js +2 -2
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.d.ts +2 -0
- package/dist/sync/v3/localTaskAttachmentLinksOutboxService.js +47 -7
- package/dist/sync/v3/localTaskChecklistOutboxHandler.js +16 -2
- package/dist/sync/v3/localTaskChecklistOutboxService.d.ts +4 -0
- package/dist/sync/v3/localTaskChecklistOutboxService.js +14 -1
- package/dist/sync/v3/localTaskCreateOutboxService.js +15 -6
- package/dist/sync/v3/localTaskMetadataClient.d.ts +1 -0
- package/dist/sync/v3/localTaskMetadataClient.js +1 -0
- package/dist/sync/v3/localTaskMetadataOutboxHandler.js +5 -1
- package/dist/sync/v3/localTaskMetadataOutboxService.d.ts +2 -0
- package/dist/sync/v3/localTaskMetadataOutboxService.js +7 -0
- package/dist/sync/v3/localTaskRestoreOutboxService.js +14 -6
- package/dist/sync/v3/localTaskStatusClient.d.ts +1 -0
- package/dist/sync/v3/localTaskStatusClient.js +6 -1
- package/dist/sync/v3/localTaskStatusOutboxService.d.ts +10 -0
- package/dist/sync/v3/localTaskStatusOutboxService.js +272 -24
- package/dist/sync/v3/syncDurabilityStore.d.ts +41 -0
- package/dist/sync/v3/syncDurabilityStore.js +199 -13
- package/dist/sync/v3/taskAttachmentLinksMutationService.d.ts +6 -4
- package/dist/sync/v3/taskAttachmentLinksMutationService.js +19 -10
- package/dist/sync/v3/taskChecklistMutationService.d.ts +15 -2
- package/dist/sync/v3/taskChecklistMutationService.js +48 -1
- package/dist/sync/v3/taskCreateMutationService.d.ts +2 -2
- package/dist/sync/v3/taskCreateMutationService.js +7 -4
- package/dist/sync/v3/taskMetadataMutationService.d.ts +3 -0
- package/dist/sync/v3/taskMetadataMutationService.js +4 -0
- package/dist/sync/v3/taskRestoreMutationService.d.ts +2 -2
- package/dist/sync/v3/taskRestoreMutationService.js +7 -4
- package/dist/sync/v3/taskStatusMutationService.d.ts +31 -1
- package/dist/sync/v3/taskStatusMutationService.js +123 -3
- package/dist/sync/v3/workflowAssignmentSync.d.ts +6 -0
- package/dist/sync/v3/workflowAssignmentSync.js +30 -0
- package/dist/sync/v3/workspaceSyncJournalReader.js +1 -1
- package/dist/sync/v3/workspaceSyncOperationRetentionService.d.ts +16 -0
- package/dist/sync/v3/workspaceSyncOperationRetentionService.js +83 -0
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.d.ts +1 -1
- package/dist/sync/v3/workspaceSyncV2ProjectionExclusions.js +13 -3
- package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.d.ts +11 -0
- package/dist/sync/v3/workspaceSyncV3AttachmentApplyObligationStore.js +27 -10
- package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.d.ts +2 -1
- package/dist/sync/v3/workspaceSyncV3AttachmentAssetHydration.js +52 -10
- package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3CloudOperationHandler.js +18 -3
- package/dist/sync/v3/workspaceSyncV3CombinedFeedOrchestrator.js +8 -3
- package/dist/sync/v3/workspaceSyncV3CombinedLocalApply.js +51 -10
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.d.ts +14 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairBaseline.js +49 -25
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.d.ts +13 -4
- package/dist/sync/v3/workspaceSyncV3CombinedRepairMaterialization.js +124 -57
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.d.ts +20 -0
- package/dist/sync/v3/workspaceSyncV3CombinedRepairSnapshot.js +106 -30
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.d.ts +4 -1
- package/dist/sync/v3/workspaceSyncV3CombinedWireContract.js +34 -0
- package/dist/sync/v3/workspaceSyncV3CoverageRegistry.js +12 -0
- package/dist/sync/v3/workspaceSyncV3FeedProfile.d.ts +1 -1
- package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.d.ts +1 -0
- package/dist/sync/v3/workspaceSyncV3LegacyBoundaryAttestation.js +23 -10
- package/dist/sync/v3/workspaceSyncV3NestedTaskApply.d.ts +3 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskApply.js +64 -13
- package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.d.ts +9 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskCodecs.js +26 -0
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.d.ts +15 -5
- package/dist/sync/v3/workspaceSyncV3NestedTaskProjection.js +50 -14
- package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.d.ts +2 -1
- package/dist/sync/v3/workspaceSyncV3NestedTaskRepairSnapshot.js +11 -3
- package/dist/sync/v3/workspaceSyncV3OperationProtocol.d.ts +5 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.d.ts +7 -0
- package/dist/sync/v3/workspaceSyncV3OperatorDiagnostics.js +55 -9
- package/dist/sync/v3/workspaceSyncV3RepairSnapshotRetentionService.d.ts +17 -0
- package/dist/sync/v3/workspaceSyncV3RepairSnapshotRetentionService.js +64 -0
- package/dist/sync/v3/workspaceSyncV3TaskCommentAudit.js +9 -2
- package/dist/sync/v3/workspaceSyncV3TaskCoverCoverage.d.ts +7 -0
- package/dist/sync/v3/workspaceSyncV3TaskCoverCoverage.js +37 -0
- package/dist/sync/v3/workspaceSyncV3TaskCoverWireContract.d.ts +6 -0
- package/dist/sync/v3/workspaceSyncV3TaskCoverWireContract.js +9 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowTaskCoverCoverage.d.ts +7 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowTaskCoverCoverage.js +33 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowTaskCoverWireContract.d.ts +7 -0
- package/dist/sync/v3/workspaceSyncV3WorkflowTaskCoverWireContract.js +8 -0
- package/dist/sync/workspacePullFeed.js +2 -1
- package/dist/sync/workspaceRepair.d.ts +8 -2
- package/dist/sync/workspaceRepair.js +222 -6
- package/dist/sync/workspaceSyncModel.d.ts +21 -0
- package/dist/sync/workspaceSyncModel.js +35 -7
- package/dist/sync/workspaceSyncState.d.ts +1 -0
- package/dist/sync/workspaceSyncV2SnapshotBuilder.d.ts +6 -0
- package/dist/sync/workspaceSyncV2SnapshotBuilder.js +5 -0
- package/dist/types.d.ts +47 -1
- package/dist/types.js +6 -0
- package/dist/ui/assets/AiIdentityRosterCard-OcSz1PkK.js +1 -0
- package/dist/ui/assets/AiProfilesModule-ByhYW5Xi.js +1 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-BTM6nIg_.js +3 -0
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-TzYu7pkG.css +1 -0
- package/dist/ui/assets/{AssetTraySortControl-Kf1pelSy.js → AssetTraySortControl-DabEG8L4.js} +1 -1
- package/dist/ui/assets/{ContextAttachmentManager-B8boOs6Q.js → ContextAttachmentManager-Coa8yVGM.js} +2 -2
- package/dist/ui/assets/{DocumentWorkspace-DXH4XUsB.js → DocumentWorkspace-BB0qhdix.js} +1 -1
- package/dist/ui/assets/{EntityActivityTimeline-BtSTq0ON.js → EntityActivityTimeline-CZ8x4UJE.js} +1 -1
- package/dist/ui/assets/PlanningModule-pRPjR7v5.js +1 -0
- package/dist/ui/assets/PlansPage-D86pZSSl.js +1 -0
- package/dist/ui/assets/TaskContextUpload-BVIkU9yT.js +1 -0
- package/dist/ui/assets/TaskSettings-Cv1mNhv_.js +12 -0
- package/dist/ui/assets/TaskforceAgentsModule-b-8R25cJ.css +1 -0
- package/dist/ui/assets/TaskforceAgentsModule-gmH-PD2q.js +24 -0
- package/dist/ui/assets/{WorkflowManagerModule-DWFspC-o.js → WorkflowManagerModule-DbfnHJ-f.js} +1 -1
- package/dist/ui/assets/index-BZ-hdZSk.css +1 -0
- package/dist/ui/assets/index-CTsDBaef.js +7 -0
- package/dist/ui/assets/{vendor-icons-BkFLXavV.js → vendor-icons-Bsq-mcEn.js} +1 -1
- package/dist/ui/branding/logos/letterhead_dark.png +0 -0
- package/dist/ui/branding/logos/letterhead_light.png +0 -0
- package/dist/ui/branding/logos/signature_dark.png +0 -0
- package/dist/ui/branding/logos/signature_light.png +0 -0
- package/dist/ui/index.html +3 -3
- package/dist/utils/aiProfileDefaultLogo.js +16 -48
- package/dist/utils/httpSetCookie.d.ts +1 -0
- package/dist/utils/httpSetCookie.js +4 -1
- package/dist/utils/localRuntimeUrl.d.ts +1 -0
- package/dist/utils/localRuntimeUrl.js +14 -0
- package/dist/utils/productLogoRegistry.d.ts +2 -0
- package/dist/utils/productLogoRegistry.js +36 -0
- package/dist/utils/syncStatusPresentation.d.ts +4 -0
- package/dist/utils/syncStatusPresentation.js +17 -0
- package/dist/utils/taskActivity.d.ts +3 -2
- package/dist/utils/taskActivity.js +19 -2
- package/dist/utils/taskEditorReconciliation.d.ts +40 -0
- package/dist/utils/taskEditorReconciliation.js +217 -0
- package/dist/utils/taskEvents.d.ts +2 -0
- package/dist/utils/taskNormalization.d.ts +1 -0
- package/dist/utils/taskNormalization.js +39 -0
- package/dist/utils/taskSearch.js +2 -2
- package/dist/utils/uiNotice.d.ts +4 -0
- package/dist/utils/workspaceSyncPresentation.d.ts +1 -1
- package/dist/utils/workspaceSyncPresentation.js +23 -17
- package/package.json +36 -6
- package/dist/ui/assets/AiIdentityRosterCard-MZs7lVED.js +0 -1
- package/dist/ui/assets/AiProfilesModule-C3i0LOxe.js +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-CBRZ8rca.css +0 -1
- package/dist/ui/assets/AnnotatedAttachmentWorkspace-DVZk5Tln.js +0 -3
- package/dist/ui/assets/PlanningModule-BPVyEa-f.js +0 -1
- package/dist/ui/assets/PlansPage-ChqgxALc.js +0 -1
- package/dist/ui/assets/TaskContextUpload-CB3ol0sN.js +0 -1
- package/dist/ui/assets/TaskSettings-g4ECKNOz.js +0 -12
- package/dist/ui/assets/TaskforceAgentsModule-BazdUwxZ.js +0 -21
- package/dist/ui/assets/TaskforceAgentsModule-D6IC0S7Q.css +0 -1
- package/dist/ui/assets/index-BUplSsv_.js +0 -7
- package/dist/ui/assets/index-gz2EXuoK.css +0 -1
|
@@ -3,33 +3,42 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import { Image, Loader2, MessageSquareText } from 'lucide-react';
|
|
4
4
|
import { fetchTaskforceApi } from '../../utils/taskforceApiClient';
|
|
5
5
|
import { dispatchOpenAnnotatedAttachment } from '../../utils/annotatedAttachments';
|
|
6
|
+
import { formatDate } from '../../utils/formatting';
|
|
6
7
|
import styles from './TaskImageReviews.module.css';
|
|
7
8
|
function reviewTitle(review) {
|
|
8
9
|
return String(review.title || '').trim() || review.image?.displayName || 'Image review';
|
|
9
10
|
}
|
|
10
11
|
export function TaskImageReviews({ taskId, taskReferenceLabel, workspaceId, apiBaseUrl }) {
|
|
11
12
|
const [reviews, setReviews] = useState(null);
|
|
13
|
+
const [loadError, setLoadError] = useState(false);
|
|
12
14
|
useEffect(() => {
|
|
13
15
|
let active = true;
|
|
14
16
|
setReviews(null);
|
|
17
|
+
setLoadError(false);
|
|
15
18
|
const params = new URLSearchParams({ workspaceId, taskId });
|
|
16
19
|
void fetchTaskforceApi(`/api/taskforce/annotated-attachments/sessions?${params.toString()}`, {
|
|
17
20
|
credentials: 'include',
|
|
18
21
|
}, apiBaseUrl)
|
|
19
|
-
.then(async (response) =>
|
|
22
|
+
.then(async (response) => {
|
|
23
|
+
if (!response.ok)
|
|
24
|
+
throw new Error('Failed to load image reviews.');
|
|
25
|
+
return response.json();
|
|
26
|
+
})
|
|
20
27
|
.then((data) => {
|
|
21
28
|
if (active)
|
|
22
29
|
setReviews(Array.isArray(data?.sessions) ? data.sessions : []);
|
|
23
30
|
})
|
|
24
31
|
.catch(() => {
|
|
25
|
-
if (active)
|
|
32
|
+
if (active) {
|
|
26
33
|
setReviews([]);
|
|
34
|
+
setLoadError(true);
|
|
35
|
+
}
|
|
27
36
|
});
|
|
28
37
|
return () => { active = false; };
|
|
29
38
|
}, [apiBaseUrl, taskId, workspaceId]);
|
|
30
|
-
if (reviews !== null && reviews.length === 0)
|
|
39
|
+
if (reviews !== null && reviews.length === 0 && !loadError)
|
|
31
40
|
return null;
|
|
32
|
-
return (_jsx("section", { className: styles.group, "aria-label": "Image reviews", children: reviews === null ? (_jsxs("div", { className: styles.loading, "aria-live": "polite", children: [_jsx(Loader2, { size: 14 }), " Loading image reviews"] })) : (_jsx("div", { className: styles.list, children: reviews.map((review) => {
|
|
41
|
+
return (_jsx("section", { className: styles.group, "aria-label": "Image reviews", children: reviews === null ? (_jsxs("div", { className: styles.loading, "aria-live": "polite", children: [_jsx(Loader2, { size: 14 }), " Loading image reviews"] })) : loadError ? (_jsx("div", { className: styles.loading, role: "status", children: "Unable to load image reviews." })) : (_jsx("div", { className: styles.list, children: reviews.map((review) => {
|
|
33
42
|
const image = review.image;
|
|
34
43
|
const markerCount = review.annotations.length;
|
|
35
44
|
const canOpen = Boolean(image?.assetId && image.apiUrl);
|
|
@@ -42,6 +51,6 @@ export function TaskImageReviews({ taskId, taskReferenceLabel, workspaceId, apiB
|
|
|
42
51
|
displayName: image.displayName,
|
|
43
52
|
referenceLabel: image.referenceLabel || undefined,
|
|
44
53
|
}, { taskId, taskReferenceLabel, sessionId: review.id });
|
|
45
|
-
}, children: [_jsx("span", { className: styles.icon, children: _jsx(Image, { size: 14 }) }), _jsxs("span", { className: styles.copy, children: [_jsx("span", { className: styles.kindLabel, children: "Image review session" }), _jsx("span", { className: `${styles.title} tf-heading-card`, children: reviewTitle(review) }), _jsxs("span", { className: "tf-text-meta", children: [markerCount, " ", markerCount === 1 ? 'marker' : 'markers'] })] }), _jsx(MessageSquareText, { className: styles.openIcon, size: 14, "aria-hidden": "true" })] }, review.id));
|
|
54
|
+
}, children: [_jsx("span", { className: styles.icon, children: _jsx(Image, { size: 14 }) }), _jsxs("span", { className: styles.copy, children: [_jsx("span", { className: styles.kindLabel, children: "Image review session" }), _jsx("span", { className: `${styles.title} tf-heading-card`, children: reviewTitle(review) }), _jsxs("span", { className: "tf-text-meta", children: [[image?.referenceLabel, image?.displayName].filter(Boolean).join(' · ') || 'Image', review.updatedAt ? ` · Updated ${formatDate(review.updatedAt, { month: 'short', day: 'numeric', year: 'numeric' })}` : ''] }), _jsxs("span", { className: "tf-text-meta", children: [markerCount, " ", markerCount === 1 ? 'marker' : 'markers'] })] }), _jsx(MessageSquareText, { className: styles.openIcon, size: 14, "aria-hidden": "true" })] }, review.id));
|
|
46
55
|
}) })) }));
|
|
47
56
|
}
|
|
@@ -64,6 +64,11 @@ interface TaskKanbanProps {
|
|
|
64
64
|
onAssignTaskToWorkstream?: (taskId: string, workstreamId: string | null) => boolean | void | Promise<boolean | void>;
|
|
65
65
|
onAssignWorkstreamToInitiative?: (workstreamId: string, initiativeId: string | null) => boolean | void | Promise<boolean | void>;
|
|
66
66
|
showTaskCardStatusLabel?: boolean;
|
|
67
|
+
showTaskCardDescription?: boolean;
|
|
68
|
+
showTaskCardAttachments?: boolean;
|
|
69
|
+
showTaskCardChecklistProgress?: boolean;
|
|
70
|
+
showTaskCardLatestActivity?: boolean;
|
|
71
|
+
tintTaskCardActivityBackground?: boolean;
|
|
67
72
|
workstreams?: WorkstreamItem[];
|
|
68
73
|
initiatives?: InitiativeItem[];
|
|
69
74
|
workspaceId?: string | null;
|
|
@@ -71,5 +76,5 @@ interface TaskKanbanProps {
|
|
|
71
76
|
selectedDeletedRecordIds?: Set<string>;
|
|
72
77
|
onDeletedSelectionChange?: (deletedRecordId: string, selected: boolean) => void;
|
|
73
78
|
}
|
|
74
|
-
export declare function TaskKanban({ tasks, columns: kanbanColumns, groupBy, searchQuery, copiedId, taxonomies, types, priorities, assigneeOptions, onUpdateTask, onTaskClick, taskReferences, onCopyId, onToggleInProgress, onToggleReview, onToggleComplete, onToggleCancel, onSetStatus, onArchiveTask, onUnarchive, onDelete, allTasks, onAddTaskToColumn, emptyColumnMode, filterCategories, filterTypes, filterPriorities, filterStatus, filterAssignees, filtersReady, scheduleFilteredTaskIds, categories, compressed, readOnlyMode, recentlyChangedTaskIds, scheduleDates, onScheduleDaySelected, persistedScrollLeft, onScrollLeftChange, sortBy, sortOrder, planningDropTargets, onAssignTaskToWorkstream, onAssignWorkstreamToInitiative, showTaskCardStatusLabel, workstreams, initiatives, workspaceId, deletedTaskRecordByTaskId, selectedDeletedRecordIds, onDeletedSelectionChange, }: TaskKanbanProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
export declare function TaskKanban({ tasks, columns: kanbanColumns, groupBy, searchQuery, copiedId, taxonomies, types, priorities, assigneeOptions, onUpdateTask, onTaskClick, taskReferences, onCopyId, onToggleInProgress, onToggleReview, onToggleComplete, onToggleCancel, onSetStatus, onArchiveTask, onUnarchive, onDelete, allTasks, onAddTaskToColumn, emptyColumnMode, filterCategories, filterTypes, filterPriorities, filterStatus, filterAssignees, filtersReady, scheduleFilteredTaskIds, categories, compressed, readOnlyMode, recentlyChangedTaskIds, scheduleDates, onScheduleDaySelected, persistedScrollLeft, onScrollLeftChange, sortBy, sortOrder, planningDropTargets, onAssignTaskToWorkstream, onAssignWorkstreamToInitiative, showTaskCardStatusLabel, showTaskCardDescription, showTaskCardAttachments, showTaskCardChecklistProgress, showTaskCardLatestActivity, tintTaskCardActivityBackground, workstreams, initiatives, workspaceId, deletedTaskRecordByTaskId, selectedDeletedRecordIds, onDeletedSelectionChange, }: TaskKanbanProps): import("react/jsx-runtime").JSX.Element;
|
|
75
80
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React, { useMemo, useState, useRef, useEffect, useCallback } from 'react';
|
|
2
|
+
import React, { startTransition, useMemo, useState, useRef, useEffect, useCallback } from 'react';
|
|
3
3
|
import { DndContext, DragOverlay, closestCorners, KeyboardSensor, PointerSensor, useSensor, useSensors, pointerWithin, defaultDropAnimationSideEffects, useDroppable } from '@dnd-kit/core';
|
|
4
4
|
import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy, useSortable } from '@dnd-kit/sortable';
|
|
5
5
|
import { CSS } from '@dnd-kit/utilities';
|
|
@@ -14,7 +14,107 @@ import { AssigneeAvatar } from '../ui/AssigneeIdentity';
|
|
|
14
14
|
const EXPIRED_CARD_ID_PREFIX = 'expired::';
|
|
15
15
|
const EMPTY_DELETED_RECORD_MAP = new Map();
|
|
16
16
|
const EMPTY_SELECTED_DELETED_IDS = new Set();
|
|
17
|
-
|
|
17
|
+
const KANBAN_VIRTUALIZATION_TASK_THRESHOLD = 250;
|
|
18
|
+
const KANBAN_VIRTUALIZATION_COLUMN_THRESHOLD = 24;
|
|
19
|
+
const KANBAN_VIRTUAL_CARD_ESTIMATE_PX = 180;
|
|
20
|
+
const KANBAN_VIRTUAL_CARD_GAP_PX = 8;
|
|
21
|
+
const KANBAN_VIRTUAL_OVERSCAN_PX = 600;
|
|
22
|
+
const KANBAN_VIRTUAL_FALLBACK_VIEWPORT_PX = 720;
|
|
23
|
+
function useVirtualKanbanRows({ tasks, enabled, scrollRef, initialScrollTop, onScrollTopChange, }) {
|
|
24
|
+
const measuredHeightsRef = useRef(new Map());
|
|
25
|
+
const [measurementVersion, setMeasurementVersion] = useState(0);
|
|
26
|
+
const [viewport, setViewport] = useState(() => ({
|
|
27
|
+
scrollTop: initialScrollTop,
|
|
28
|
+
height: KANBAN_VIRTUAL_FALLBACK_VIEWPORT_PX,
|
|
29
|
+
}));
|
|
30
|
+
const measureRow = useCallback((taskId, height) => {
|
|
31
|
+
if (!Number.isFinite(height) || height <= 0)
|
|
32
|
+
return;
|
|
33
|
+
const normalizedHeight = Math.ceil(height);
|
|
34
|
+
const previousHeight = measuredHeightsRef.current.get(taskId) ?? KANBAN_VIRTUAL_CARD_ESTIMATE_PX;
|
|
35
|
+
if (previousHeight === normalizedHeight)
|
|
36
|
+
return;
|
|
37
|
+
const taskIndex = tasks.findIndex((task) => task.id === taskId);
|
|
38
|
+
let rowTop = 0;
|
|
39
|
+
for (let index = 0; index < taskIndex; index += 1) {
|
|
40
|
+
rowTop += measuredHeightsRef.current.get(tasks[index].id) ?? KANBAN_VIRTUAL_CARD_ESTIMATE_PX;
|
|
41
|
+
rowTop += KANBAN_VIRTUAL_CARD_GAP_PX;
|
|
42
|
+
}
|
|
43
|
+
measuredHeightsRef.current.set(taskId, normalizedHeight);
|
|
44
|
+
const element = scrollRef.current;
|
|
45
|
+
const heightDelta = normalizedHeight - previousHeight;
|
|
46
|
+
const previousRowBottom = rowTop + previousHeight;
|
|
47
|
+
if (element && taskIndex >= 0 && previousRowBottom <= element.scrollTop && heightDelta !== 0) {
|
|
48
|
+
const scrollTop = Math.max(0, element.scrollTop + heightDelta);
|
|
49
|
+
element.scrollTop = scrollTop;
|
|
50
|
+
setViewport((current) => ({ ...current, scrollTop }));
|
|
51
|
+
onScrollTopChange(scrollTop);
|
|
52
|
+
}
|
|
53
|
+
setMeasurementVersion((version) => version + 1);
|
|
54
|
+
}, [onScrollTopChange, scrollRef, tasks]);
|
|
55
|
+
const layout = useMemo(() => {
|
|
56
|
+
let top = 0;
|
|
57
|
+
const rows = tasks.map((task, index) => {
|
|
58
|
+
const row = { task, index, top };
|
|
59
|
+
const height = measuredHeightsRef.current.get(task.id) ?? KANBAN_VIRTUAL_CARD_ESTIMATE_PX;
|
|
60
|
+
top += height;
|
|
61
|
+
if (index < tasks.length - 1)
|
|
62
|
+
top += KANBAN_VIRTUAL_CARD_GAP_PX;
|
|
63
|
+
return row;
|
|
64
|
+
});
|
|
65
|
+
return { rows, totalHeight: top };
|
|
66
|
+
}, [measurementVersion, tasks]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
const element = scrollRef.current;
|
|
69
|
+
if (!element)
|
|
70
|
+
return;
|
|
71
|
+
if (initialScrollTop > 0 && element.scrollTop !== initialScrollTop) {
|
|
72
|
+
element.scrollTop = initialScrollTop;
|
|
73
|
+
}
|
|
74
|
+
const updateViewport = (deferred = false) => {
|
|
75
|
+
const scrollTop = Math.max(0, element.scrollTop);
|
|
76
|
+
const height = element.clientHeight || KANBAN_VIRTUAL_FALLBACK_VIEWPORT_PX;
|
|
77
|
+
const commitViewport = () => setViewport((current) => (current.scrollTop === scrollTop && current.height === height
|
|
78
|
+
? current
|
|
79
|
+
: { scrollTop, height }));
|
|
80
|
+
if (deferred)
|
|
81
|
+
startTransition(commitViewport);
|
|
82
|
+
else
|
|
83
|
+
commitViewport();
|
|
84
|
+
onScrollTopChange(scrollTop);
|
|
85
|
+
};
|
|
86
|
+
const handleScroll = () => updateViewport(true);
|
|
87
|
+
const handleLayoutChange = () => updateViewport(false);
|
|
88
|
+
handleLayoutChange();
|
|
89
|
+
element.addEventListener('scroll', handleScroll, { passive: true });
|
|
90
|
+
const resizeObserver = typeof ResizeObserver === 'undefined'
|
|
91
|
+
? null
|
|
92
|
+
: new ResizeObserver(handleLayoutChange);
|
|
93
|
+
resizeObserver?.observe(element);
|
|
94
|
+
window.addEventListener('resize', handleLayoutChange);
|
|
95
|
+
return () => {
|
|
96
|
+
element.removeEventListener('scroll', handleScroll);
|
|
97
|
+
resizeObserver?.disconnect();
|
|
98
|
+
window.removeEventListener('resize', handleLayoutChange);
|
|
99
|
+
};
|
|
100
|
+
}, [initialScrollTop, onScrollTopChange, scrollRef]);
|
|
101
|
+
const visibleRows = useMemo(() => {
|
|
102
|
+
if (!enabled)
|
|
103
|
+
return layout.rows;
|
|
104
|
+
const minimumTop = Math.max(0, viewport.scrollTop - KANBAN_VIRTUAL_OVERSCAN_PX);
|
|
105
|
+
const maximumBottom = viewport.scrollTop + viewport.height + KANBAN_VIRTUAL_OVERSCAN_PX;
|
|
106
|
+
return layout.rows.filter((row) => {
|
|
107
|
+
const height = measuredHeightsRef.current.get(row.task.id) ?? KANBAN_VIRTUAL_CARD_ESTIMATE_PX;
|
|
108
|
+
return row.top + height >= minimumTop && row.top <= maximumBottom;
|
|
109
|
+
});
|
|
110
|
+
}, [enabled, layout.rows, measurementVersion, viewport.height, viewport.scrollTop]);
|
|
111
|
+
return {
|
|
112
|
+
measureRow,
|
|
113
|
+
rows: visibleRows,
|
|
114
|
+
totalHeight: layout.totalHeight,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export function TaskKanban({ tasks, columns: kanbanColumns, groupBy, searchQuery, copiedId, taxonomies, types, priorities, assigneeOptions = [], onUpdateTask, onTaskClick, taskReferences, onCopyId, onToggleInProgress, onToggleReview, onToggleComplete, onToggleCancel, onSetStatus, onArchiveTask, onUnarchive, onDelete, allTasks = [], onAddTaskToColumn, emptyColumnMode = 'show', filterCategories = [], filterTypes = [], filterPriorities = [], filterStatus = [], filterAssignees = [], filtersReady = true, scheduleFilteredTaskIds, categories = [], compressed = false, readOnlyMode = null, recentlyChangedTaskIds = [], scheduleDates, onScheduleDaySelected, persistedScrollLeft, onScrollLeftChange, sortBy = 'created', sortOrder = 'desc', planningDropTargets = null, onAssignTaskToWorkstream, onAssignWorkstreamToInitiative, showTaskCardStatusLabel = false, showTaskCardDescription = true, showTaskCardAttachments = true, showTaskCardChecklistProgress = true, showTaskCardLatestActivity = true, tintTaskCardActivityBackground = false, workstreams = [], initiatives = [], workspaceId = null, deletedTaskRecordByTaskId = EMPTY_DELETED_RECORD_MAP, selectedDeletedRecordIds = EMPTY_SELECTED_DELETED_IDS, onDeletedSelectionChange, }) {
|
|
18
118
|
const [activeId, setActiveId] = useState(null);
|
|
19
119
|
const [isHeaderPanning, setIsHeaderPanning] = useState(false);
|
|
20
120
|
const [headerPanEnabled, setHeaderPanEnabled] = useState(false);
|
|
@@ -33,6 +133,10 @@ export function TaskKanban({ tasks, columns: kanbanColumns, groupBy, searchQuery
|
|
|
33
133
|
const isTaskCardId = useCallback((id) => taskIdSet.has(getTaskIdFromCardId(id)), [taskIdSet, getTaskIdFromCardId]);
|
|
34
134
|
const scheduleFilteredTaskIdSet = useMemo(() => new Set(scheduleFilteredTaskIds || []), [scheduleFilteredTaskIds]);
|
|
35
135
|
const lastPlanningOverRef = useRef(null);
|
|
136
|
+
const columnScrollTopRef = useRef(new Map());
|
|
137
|
+
const rememberColumnScrollTop = useCallback((columnId, scrollTop) => {
|
|
138
|
+
columnScrollTopRef.current.set(columnId, scrollTop);
|
|
139
|
+
}, []);
|
|
36
140
|
const resolveActiveDragMeta = useCallback((activeLike) => {
|
|
37
141
|
const current = activeLike?.data?.current || {};
|
|
38
142
|
const activeId = String(activeLike?.id || '');
|
|
@@ -317,6 +421,9 @@ export function TaskKanban({ tasks, columns: kanbanColumns, groupBy, searchQuery
|
|
|
317
421
|
}, [tasks, effectiveKanbanColumns, groupBy, columnLookup, scheduleFilteredTaskIdSet, todayDateOnly, sortBy, sortOrder, taxonomies]);
|
|
318
422
|
const activeTaskId = activeId ? getTaskIdFromCardId(activeId) : null;
|
|
319
423
|
const activeTaskOverlay = activeTaskId ? tasks.find(t => t.id === activeTaskId) : null;
|
|
424
|
+
const virtualizeLargeBoard = tasks.length > KANBAN_VIRTUALIZATION_TASK_THRESHOLD
|
|
425
|
+
&& groupBy !== 'schedule'
|
|
426
|
+
&& !readOnlyMode;
|
|
320
427
|
// Scroll Syncing Refs and Logic
|
|
321
428
|
const containerRef = useRef(null);
|
|
322
429
|
const topScrollRef = useRef(null);
|
|
@@ -762,6 +869,11 @@ export function TaskKanban({ tasks, columns: kanbanColumns, groupBy, searchQuery
|
|
|
762
869
|
resolveTaskHierarchy,
|
|
763
870
|
groupBy,
|
|
764
871
|
showStatusLabel: showTaskCardStatusLabel,
|
|
872
|
+
showDescription: showTaskCardDescription,
|
|
873
|
+
showAttachments: showTaskCardAttachments,
|
|
874
|
+
showChecklistProgress: showTaskCardChecklistProgress,
|
|
875
|
+
showLatestActivity: showTaskCardLatestActivity,
|
|
876
|
+
tintActivityBackground: tintTaskCardActivityBackground,
|
|
765
877
|
deletedTaskRecordByTaskId,
|
|
766
878
|
selectedDeletedRecordIds,
|
|
767
879
|
onDeletedSelectionChange,
|
|
@@ -788,7 +900,12 @@ export function TaskKanban({ tasks, columns: kanbanColumns, groupBy, searchQuery
|
|
|
788
900
|
resolveTaskHierarchy,
|
|
789
901
|
searchQuery,
|
|
790
902
|
selectedDeletedRecordIds,
|
|
903
|
+
showTaskCardAttachments,
|
|
904
|
+
showTaskCardChecklistProgress,
|
|
905
|
+
showTaskCardDescription,
|
|
791
906
|
showTaskCardStatusLabel,
|
|
907
|
+
showTaskCardLatestActivity,
|
|
908
|
+
tintTaskCardActivityBackground,
|
|
792
909
|
taskReferences,
|
|
793
910
|
taxonomies,
|
|
794
911
|
types,
|
|
@@ -815,13 +932,13 @@ export function TaskKanban({ tasks, columns: kanbanColumns, groupBy, searchQuery
|
|
|
815
932
|
return null;
|
|
816
933
|
return (_jsx(KanbanColumn, { id: String(column.value), title: column.label, color: column.color, icon: column.icon, assigneeOption: groupBy === 'assignee'
|
|
817
934
|
? assigneeOptions.find((option) => String(option.value) === String(column.value))
|
|
818
|
-
: undefined, tasks: columnTasks, activeId: activeId, activeTaskId: activeTaskId, totalCount: columnTotals[String(column.value)], onAddTask: () => onAddTaskToColumn?.(groupBy, column.value), onTaskClick: onTaskClick, commonCardProps: commonCardProps, changedTaskIdSet: changedTaskIdSet, collapseEmpty: emptyColumnMode === 'collapse', compressed: compressed, onHeaderPointerDown: handleHeaderPointerDown, isHeaderPanning: isHeaderPanning, headerPanEnabled: headerPanEnabled, stickyLeft: stickyLeft, stickyZIndex: stickyZIndex, isPast: !!column.isPast, isSelected: !!column.isSelected, isWeekend: !!column.isWeekend, disableSorting: false, scheduleDate: groupBy === 'schedule' ? scheduleContext.dates[String(column.value)] : undefined, onScheduleDaySelected: onScheduleDaySelected }, String(column.value)));
|
|
935
|
+
: undefined, tasks: columnTasks, activeId: activeId, activeTaskId: activeTaskId, totalCount: columnTotals[String(column.value)], onAddTask: () => onAddTaskToColumn?.(groupBy, column.value), onTaskClick: onTaskClick, commonCardProps: commonCardProps, changedTaskIdSet: changedTaskIdSet, collapseEmpty: emptyColumnMode === 'collapse', compressed: compressed, onHeaderPointerDown: handleHeaderPointerDown, isHeaderPanning: isHeaderPanning, headerPanEnabled: headerPanEnabled, stickyLeft: stickyLeft, stickyZIndex: stickyZIndex, isPast: !!column.isPast, isSelected: !!column.isSelected, isWeekend: !!column.isWeekend, disableSorting: false, scheduleDate: groupBy === 'schedule' ? scheduleContext.dates[String(column.value)] : undefined, onScheduleDaySelected: onScheduleDaySelected, virtualize: virtualizeLargeBoard, initialScrollTop: columnScrollTopRef.current.get(String(column.value)) || 0, onScrollTopChange: rememberColumnScrollTop }, String(column.value)));
|
|
819
936
|
}) })] }), createPortal(_jsx(DragOverlay, { dropAnimation: dropAnimation, children: activeTaskOverlay ? ((() => {
|
|
820
937
|
const { taskWorkstream, taskInitiative } = resolveTaskHierarchy(activeTaskOverlay);
|
|
821
938
|
return (_jsx(TaskCard, { task: activeTaskOverlay, taskWorkstream: taskWorkstream, taskInitiative: taskInitiative, isOverlay: true, ...commonCardProps, isArchived: activeTaskOverlay.isArchived, categories: categories, compressed: compressed, isRecentlyChanged: changedTaskIdSet.has(activeTaskOverlay.id) }));
|
|
822
939
|
})()) : null }), document.body)] }));
|
|
823
940
|
}
|
|
824
|
-
const KanbanColumn = React.memo(function KanbanColumn({ id, title, color, icon, assigneeOption, tasks, activeId = null, activeTaskId = null, totalCount, onAddTask, onTaskClick, commonCardProps, changedTaskIdSet, collapseEmpty, compressed, onHeaderPointerDown, isHeaderPanning = false, headerPanEnabled = false, stickyLeft, stickyZIndex, isPast = false, isSelected = false, isWeekend = false, disableSorting = false, scheduleDate, onScheduleDaySelected }) {
|
|
941
|
+
const KanbanColumn = React.memo(function KanbanColumn({ id, title, color, icon, assigneeOption, tasks, activeId = null, activeTaskId = null, totalCount, onAddTask, onTaskClick, commonCardProps, changedTaskIdSet, collapseEmpty, compressed, onHeaderPointerDown, isHeaderPanning = false, headerPanEnabled = false, stickyLeft, stickyZIndex, isPast = false, isSelected = false, isWeekend = false, disableSorting = false, scheduleDate, onScheduleDaySelected, virtualize = false, initialScrollTop = 0, onScrollTopChange, }) {
|
|
825
942
|
const { setNodeRef } = useDroppable({
|
|
826
943
|
id: id,
|
|
827
944
|
data: {
|
|
@@ -832,6 +949,19 @@ const KanbanColumn = React.memo(function KanbanColumn({ id, title, color, icon,
|
|
|
832
949
|
const visibleTasks = activeTaskId ? tasks.filter((t) => t.id !== activeTaskId) : tasks;
|
|
833
950
|
const isSticky = typeof stickyLeft === 'number';
|
|
834
951
|
const scrollRef = useRef(null);
|
|
952
|
+
const virtualizationEnabled = virtualize
|
|
953
|
+
&& !disableSorting
|
|
954
|
+
&& visibleTasks.length > KANBAN_VIRTUALIZATION_COLUMN_THRESHOLD;
|
|
955
|
+
const handleScrollTopChange = useCallback((scrollTop) => {
|
|
956
|
+
onScrollTopChange?.(id, scrollTop);
|
|
957
|
+
}, [id, onScrollTopChange]);
|
|
958
|
+
const virtualRows = useVirtualKanbanRows({
|
|
959
|
+
tasks: visibleTasks,
|
|
960
|
+
enabled: virtualizationEnabled,
|
|
961
|
+
scrollRef,
|
|
962
|
+
initialScrollTop,
|
|
963
|
+
onScrollTopChange: handleScrollTopChange,
|
|
964
|
+
});
|
|
835
965
|
const toSortableId = (taskId) => (id === 'expired' ? `${EXPIRED_CARD_ID_PREFIX}${taskId}` : taskId);
|
|
836
966
|
const handleColumnClick = (event) => {
|
|
837
967
|
if (!scheduleDate || !onScheduleDaySelected)
|
|
@@ -847,13 +977,29 @@ const KanbanColumn = React.memo(function KanbanColumn({ id, title, color, icon,
|
|
|
847
977
|
const IconComp = icon && IconMap[icon] ? IconMap[icon] : Icons.Folder;
|
|
848
978
|
const resolvedColor = resolveColor(color) || 'var(--color-purple)';
|
|
849
979
|
return _jsx(IconComp, { size: 16, style: { color: resolvedColor } });
|
|
850
|
-
})(), !isCollapsed && _jsx("span", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }, children: title })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '8px', flexShrink: 0 }, children: [(!isCollapsed || totalCount > 0) && (_jsx("span", { className: styles.kanbanCount, children: isCollapsed ? totalCount : `${tasks.length} / ${totalCount}` })), !commonCardProps.readOnlyMode && (_jsx("button", { className: "tf-control-icon tf-control-icon-compact", onClick: (e) => { e.stopPropagation(); onAddTask(); }, title: `Add task to ${title}`, "aria-label": `Add task to ${title}`, "data-no-header-pan": "true", children: _jsx(Icons.Plus, { size: 14 }) }))] })] }), _jsx("div", { className: styles.kanbanDroppable, children: _jsx("div", { className: `${styles.kanbanDroppableScroll} ${styles.appScrollbar} tf-scrollbar`, ref: scrollRef, children: disableSorting ? (visibleTasks.map((task) => (_jsx("div", { className: styles.kanbanCardWrapper, children: (() => {
|
|
980
|
+
})(), !isCollapsed && _jsx("span", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }, children: title })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '8px', flexShrink: 0 }, children: [(!isCollapsed || totalCount > 0) && (_jsx("span", { className: styles.kanbanCount, children: isCollapsed ? totalCount : `${tasks.length} / ${totalCount}` })), !commonCardProps.readOnlyMode && (_jsx("button", { className: "tf-control-icon tf-control-icon-compact", onClick: (e) => { e.stopPropagation(); onAddTask(); }, title: `Add task to ${title}`, "aria-label": `Add task to ${title}`, "data-no-header-pan": "true", children: _jsx(Icons.Plus, { size: 14 }) }))] })] }), _jsx("div", { className: styles.kanbanDroppable, children: _jsx("div", { className: `${styles.kanbanDroppableScroll} ${virtualizationEnabled ? styles.kanbanDroppableScrollVirtualized : ''} ${styles.appScrollbar} tf-scrollbar`, ref: scrollRef, "data-kanban-column-scroll": id, children: disableSorting ? (visibleTasks.map((task) => (_jsx("div", { className: styles.kanbanCardWrapper, children: (() => {
|
|
851
981
|
const { taskWorkstream, taskInitiative } = commonCardProps.resolveTaskHierarchy?.(task) || {};
|
|
852
982
|
const deletedRecord = commonCardProps.deletedTaskRecordByTaskId?.get(task.id);
|
|
853
983
|
return (_jsx(TaskCard, { task: task, taskWorkstream: taskWorkstream, taskInitiative: taskInitiative, onClick: onTaskClick, ...commonCardProps, isArchived: task.isArchived, readOnlyMode: commonCardProps.readOnlyMode || null, compressed: compressed, isRecentlyChanged: false, selectable: Boolean(deletedRecord && commonCardProps.onDeletedSelectionChange), selected: Boolean(deletedRecord && commonCardProps.selectedDeletedRecordIds?.has(deletedRecord.id)), onSelectionChange: deletedRecord
|
|
854
984
|
? (selected) => commonCardProps.onDeletedSelectionChange?.(deletedRecord.id, selected)
|
|
855
985
|
: undefined }));
|
|
856
|
-
})() }, task.id)))) : (_jsx(SortableContext, { id: id, items: visibleTasks.map((t) => toSortableId(t.id)), strategy: verticalListSortingStrategy, children: visibleTasks.map((task) => (_jsx(SortableTaskCard, { sortableId: toSortableId(task.id), task: task, onClick: onTaskClick, commonCardProps: commonCardProps, compressed: compressed, isRecentlyChanged: changedTaskIdSet.has(task.id) }, toSortableId(task.id)))) })) }) })] }));
|
|
986
|
+
})() }, task.id)))) : (_jsx(SortableContext, { id: id, items: visibleTasks.map((t) => toSortableId(t.id)), strategy: verticalListSortingStrategy, children: virtualizationEnabled ? (_jsx("div", { className: styles.kanbanVirtualCanvas, style: { height: `${virtualRows.totalHeight}px` }, children: virtualRows.rows.map((row) => (_jsx(VirtualizedSortableTaskCard, { top: row.top, sortableId: toSortableId(row.task.id), task: row.task, onClick: onTaskClick, commonCardProps: commonCardProps, compressed: compressed, isRecentlyChanged: changedTaskIdSet.has(row.task.id), onMeasure: virtualRows.measureRow }, toSortableId(row.task.id)))) })) : visibleTasks.map((task) => (_jsx(SortableTaskCard, { sortableId: toSortableId(task.id), task: task, onClick: onTaskClick, commonCardProps: commonCardProps, compressed: compressed, isRecentlyChanged: changedTaskIdSet.has(task.id) }, toSortableId(task.id)))) })) }) })] }));
|
|
987
|
+
});
|
|
988
|
+
const VirtualizedSortableTaskCard = React.memo(function VirtualizedSortableTaskCard({ top, onMeasure, ...cardProps }) {
|
|
989
|
+
const rowRef = useRef(null);
|
|
990
|
+
useEffect(() => {
|
|
991
|
+
const element = rowRef.current;
|
|
992
|
+
if (!element)
|
|
993
|
+
return;
|
|
994
|
+
const reportHeight = () => onMeasure(cardProps.task.id, element.getBoundingClientRect().height);
|
|
995
|
+
reportHeight();
|
|
996
|
+
if (typeof ResizeObserver === 'undefined')
|
|
997
|
+
return;
|
|
998
|
+
const observer = new ResizeObserver(reportHeight);
|
|
999
|
+
observer.observe(element);
|
|
1000
|
+
return () => observer.disconnect();
|
|
1001
|
+
}, [cardProps.task.id, onMeasure]);
|
|
1002
|
+
return (_jsx("div", { ref: rowRef, className: styles.kanbanVirtualRow, style: { top: `${top}px` }, "data-kanban-virtual-index": cardProps.task.id, children: _jsx(SortableTaskCard, { ...cardProps }) }));
|
|
857
1003
|
});
|
|
858
1004
|
const SortableTaskCard = React.memo(function SortableTaskCard({ sortableId, task, onClick, commonCardProps, compressed, isRecentlyChanged = false }) {
|
|
859
1005
|
const dragDisabled = Boolean(commonCardProps?.readOnlyMode);
|
|
@@ -45,6 +45,11 @@ interface TaskListProps {
|
|
|
45
45
|
copiedId: string | null;
|
|
46
46
|
recentlyChangedTaskIds?: string[];
|
|
47
47
|
showTaskCardStatusLabel?: boolean;
|
|
48
|
+
showTaskCardDescription?: boolean;
|
|
49
|
+
showTaskCardAttachments?: boolean;
|
|
50
|
+
showTaskCardChecklistProgress?: boolean;
|
|
51
|
+
showTaskCardLatestActivity?: boolean;
|
|
52
|
+
tintTaskCardActivityBackground?: boolean;
|
|
48
53
|
deletedTaskRecordByTaskId?: Map<string, DeletedTaskRecord>;
|
|
49
54
|
selectedDeletedRecordIds?: Set<string>;
|
|
50
55
|
onDeletedSelectionChange?: (deletedRecordId: string, selected: boolean) => void;
|
|
@@ -16,7 +16,7 @@ import { AssigneeIdentity } from '../ui/AssigneeIdentity';
|
|
|
16
16
|
const EMPTY_DELETED_RECORD_MAP = new Map();
|
|
17
17
|
const EMPTY_SELECTED_DELETED_IDS = new Set();
|
|
18
18
|
export const TaskList = forwardRef((props, ref) => {
|
|
19
|
-
const { tasks, archivedTasks, categories, types, priorities, taxonomyDisplayLabels, assigneeOptions = [], workstreams = [], initiatives = [], workspaceId = null, searchQuery, filterCategories, filterTypes, filterPriorities, filterStatus, filterAssignees = [], filterTaxonomies, sortBy, sortOrder, showArchive, taskScope, collapsedCategories, loadingTasks, filteredTasks, filteredArchive, groupedTasks, filteredDeletedTasks = [], groupedDeletedTasks = {}, copiedId, recentlyChangedTaskIds = [], showTaskCardStatusLabel = false, deletedTaskRecordByTaskId = EMPTY_DELETED_RECORD_MAP, selectedDeletedRecordIds = EMPTY_SELECTED_DELETED_IDS, onDeletedSelectionChange, trashControls, onSearchChange, onFilterCategoriesChange, onFilterTypesChange, onFilterPrioritiesChange, onFilterStatusChange, onFilterAssigneesChange, onTaxonomyFilterChange, onSortByChange, onSortOrderChange, onShowArchiveChange, onTaskScopeChange, onClearFilters, onToggleCategory, onEditTask, onUpdateTask, taskReferences, onCopyId, onToggleInProgress, onToggleReview, onToggleComplete, onToggleCancel, onSetStatus, onArchiveTask, onBulkArchive, onUnarchive, onDelete, onFetchArchive, onAddTaskToCategory, supplementalTasks = [], taxonomies, } = props;
|
|
19
|
+
const { tasks, archivedTasks, categories, types, priorities, taxonomyDisplayLabels, assigneeOptions = [], workstreams = [], initiatives = [], workspaceId = null, searchQuery, filterCategories, filterTypes, filterPriorities, filterStatus, filterAssignees = [], filterTaxonomies, sortBy, sortOrder, showArchive, taskScope, collapsedCategories, loadingTasks, filteredTasks, filteredArchive, groupedTasks, filteredDeletedTasks = [], groupedDeletedTasks = {}, copiedId, recentlyChangedTaskIds = [], showTaskCardStatusLabel = false, showTaskCardDescription = true, showTaskCardAttachments = true, showTaskCardChecklistProgress = true, showTaskCardLatestActivity = true, tintTaskCardActivityBackground = false, deletedTaskRecordByTaskId = EMPTY_DELETED_RECORD_MAP, selectedDeletedRecordIds = EMPTY_SELECTED_DELETED_IDS, onDeletedSelectionChange, trashControls, onSearchChange, onFilterCategoriesChange, onFilterTypesChange, onFilterPrioritiesChange, onFilterStatusChange, onFilterAssigneesChange, onTaxonomyFilterChange, onSortByChange, onSortOrderChange, onShowArchiveChange, onTaskScopeChange, onClearFilters, onToggleCategory, onEditTask, onUpdateTask, taskReferences, onCopyId, onToggleInProgress, onToggleReview, onToggleComplete, onToggleCancel, onSetStatus, onArchiveTask, onBulkArchive, onUnarchive, onDelete, onFetchArchive, onAddTaskToCategory, supplementalTasks = [], taxonomies, } = props;
|
|
20
20
|
const changedTaskIdSet = React.useMemo(() => new Set(recentlyChangedTaskIds), [recentlyChangedTaskIds]);
|
|
21
21
|
const workstreamById = React.useMemo(() => new Map(workstreams.map((workstream) => [workstream.id, workstream])), [workstreams]);
|
|
22
22
|
const initiativeById = React.useMemo(() => new Map(initiatives.map((initiative) => [initiative.id, initiative])), [initiatives]);
|
|
@@ -132,11 +132,11 @@ export const TaskList = forwardRef((props, ref) => {
|
|
|
132
132
|
: undefined;
|
|
133
133
|
return (_jsx(TaskCard, { task: task, taskWorkstream: taskWorkstream, taskInitiative: taskInitiative, workspaceId: workspaceId, searchQuery: searchQuery, copiedId: copiedId, taxonomies: taxonomies, types: types, priorities: priorities, assigneeOptions: assigneeOptions, workstreams: workstreams, onClick: onEditTask, onAssigneeChange: handleAssigneeChange, onWorkstreamChange: (nextTask, workstreamId) => (onUpdateTask(nextTask.id, { workstreamId })), taskReferences: taskReferences, onCopyId: onCopyId, onToggleInProgress: onToggleInProgress, onToggleReview: onToggleReview, onToggleComplete: onToggleComplete, onToggleCancel: onToggleCancel, onSetStatus: onSetStatus, onArchiveTask: onArchiveTask, onUnarchive: activeReadOnlyMode ? onUnarchive : undefined, onDelete: activeReadOnlyMode ? onDelete : undefined, categories: categories, isRecentlyChanged: changedTaskIdSet.has(task.id), readOnlyMode: activeReadOnlyMode, selectable: Boolean(deletedRecord && onDeletedSelectionChange), selected: Boolean(deletedRecord && selectedDeletedRecordIds.has(deletedRecord.id)), onSelectionChange: deletedRecord
|
|
134
134
|
? (selected) => onDeletedSelectionChange?.(deletedRecord.id, selected)
|
|
135
|
-
: undefined, showStatusLabel: showTaskCardStatusLabel }, task.id));
|
|
135
|
+
: undefined, showStatusLabel: showTaskCardStatusLabel, showDescription: showTaskCardDescription, showAttachments: showTaskCardAttachments, showChecklistProgress: showTaskCardChecklistProgress, showLatestActivity: showTaskCardLatestActivity, tintActivityBackground: tintTaskCardActivityBackground }, task.id));
|
|
136
136
|
})())) }))] }, category));
|
|
137
137
|
}) })), !useScopeToggle && showArchive && filteredArchive.length > 0 && (_jsxs("div", { className: styles.archiveList, children: [_jsx("div", { className: styles.archiveHeader, children: "Archived" }), filteredArchive.map((task) => ((() => {
|
|
138
138
|
const { taskWorkstream, taskInitiative } = resolveTaskHierarchy(task);
|
|
139
|
-
return (_jsx(TaskCard, { task: task, taskWorkstream: taskWorkstream, taskInitiative: taskInitiative, workspaceId: workspaceId, searchQuery: searchQuery, copiedId: copiedId, isArchived: true, types: types, assigneeOptions: assigneeOptions, workstreams: workstreams, onClick: onEditTask, onCopyId: onCopyId, onSetStatus: onSetStatus, onUnarchive: onUnarchive, onDelete: onDelete, deleteActionTitle: "Delete Permanently", taskReferences: taskReferences, categories: categories, showStatusLabel: showTaskCardStatusLabel }, task.id));
|
|
139
|
+
return (_jsx(TaskCard, { task: task, taskWorkstream: taskWorkstream, taskInitiative: taskInitiative, workspaceId: workspaceId, searchQuery: searchQuery, copiedId: copiedId, isArchived: true, types: types, assigneeOptions: assigneeOptions, workstreams: workstreams, onClick: onEditTask, onCopyId: onCopyId, onSetStatus: onSetStatus, onUnarchive: onUnarchive, onDelete: onDelete, deleteActionTitle: "Delete Permanently", taskReferences: taskReferences, categories: categories, showStatusLabel: showTaskCardStatusLabel, showDescription: showTaskCardDescription, showAttachments: showTaskCardAttachments, showChecklistProgress: showTaskCardChecklistProgress, showLatestActivity: showTaskCardLatestActivity, tintActivityBackground: tintTaskCardActivityBackground }, task.id));
|
|
140
140
|
})()))] }))] }));
|
|
141
141
|
});
|
|
142
142
|
TaskList.displayName = 'TaskList';
|
|
@@ -11,6 +11,40 @@ const NO_WORKFLOW = '__none__';
|
|
|
11
11
|
function statusLabel(status) {
|
|
12
12
|
return status.charAt(0).toUpperCase() + status.slice(1);
|
|
13
13
|
}
|
|
14
|
+
function workflowAssignmentFromMutation(value, taskId) {
|
|
15
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
16
|
+
return null;
|
|
17
|
+
const assignment = value;
|
|
18
|
+
if (!assignment.execution
|
|
19
|
+
|| assignment.execution.taskId !== taskId
|
|
20
|
+
|| !assignment.template
|
|
21
|
+
|| !assignment.version
|
|
22
|
+
|| !Array.isArray(assignment.steps)
|
|
23
|
+
|| !Array.isArray(assignment.events))
|
|
24
|
+
return null;
|
|
25
|
+
return assignment;
|
|
26
|
+
}
|
|
27
|
+
function latestWorkflowEventSequence(assignment) {
|
|
28
|
+
return Math.max(0, ...(assignment?.events || []).map((event) => event.sequenceNumber || 0));
|
|
29
|
+
}
|
|
30
|
+
function workflowExecutionCreatedAt(assignment) {
|
|
31
|
+
const timestamp = Date.parse(assignment.execution.createdAt);
|
|
32
|
+
return Number.isFinite(timestamp) ? timestamp : 0;
|
|
33
|
+
}
|
|
34
|
+
function newerWorkflowAssignment(current, candidate) {
|
|
35
|
+
if (!candidate)
|
|
36
|
+
return current;
|
|
37
|
+
if (!current)
|
|
38
|
+
return candidate;
|
|
39
|
+
if (current.execution.id !== candidate.execution.id) {
|
|
40
|
+
return workflowExecutionCreatedAt(candidate) > workflowExecutionCreatedAt(current)
|
|
41
|
+
? candidate
|
|
42
|
+
: current;
|
|
43
|
+
}
|
|
44
|
+
return latestWorkflowEventSequence(candidate) >= latestWorkflowEventSequence(current)
|
|
45
|
+
? candidate
|
|
46
|
+
: current;
|
|
47
|
+
}
|
|
14
48
|
export function TaskWorkflowAssignmentField({ taskId, workspaceId, taskStatus, taskUpdatedAt, comments = [], assigneeOptions = [], currentActorId, apiBaseUrl, runtimeMode = 'local', disabled = false, onActivatePendingWorkflow, onActiveOwnerChange, }) {
|
|
15
49
|
const [workflows, setWorkflows] = React.useState([]);
|
|
16
50
|
const [assignment, setAssignment] = React.useState(null);
|
|
@@ -21,6 +55,7 @@ export function TaskWorkflowAssignmentField({ taskId, workspaceId, taskStatus, t
|
|
|
21
55
|
const [activationRetryToken, setActivationRetryToken] = React.useState(0);
|
|
22
56
|
const [error, setError] = React.useState('');
|
|
23
57
|
const requestGenerationRef = React.useRef(0);
|
|
58
|
+
const assignmentRefreshGenerationRef = React.useRef(0);
|
|
24
59
|
const activationAttemptRef = React.useRef(null);
|
|
25
60
|
const refreshedTaskRevisionRef = React.useRef({
|
|
26
61
|
taskId,
|
|
@@ -29,6 +64,7 @@ export function TaskWorkflowAssignmentField({ taskId, workspaceId, taskStatus, t
|
|
|
29
64
|
const requestContext = React.useMemo(() => ({ workspaceId, apiBaseUrl, runtimeMode }), [apiBaseUrl, runtimeMode, workspaceId]);
|
|
30
65
|
React.useEffect(() => {
|
|
31
66
|
const requestGeneration = ++requestGenerationRef.current;
|
|
67
|
+
const assignmentRefreshGeneration = ++assignmentRefreshGenerationRef.current;
|
|
32
68
|
setLoading(true);
|
|
33
69
|
setAssigning(false);
|
|
34
70
|
setCompletingStep(false);
|
|
@@ -47,18 +83,23 @@ export function TaskWorkflowAssignmentField({ taskId, workspaceId, taskStatus, t
|
|
|
47
83
|
if (workflowResult.status === 'fulfilled') {
|
|
48
84
|
setWorkflows(workflowResult.value.filter((summary) => (summary.template.status === 'active' && Boolean(summary.latestPublishedVersion))));
|
|
49
85
|
}
|
|
50
|
-
if (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
86
|
+
if (assignmentRefreshGeneration === assignmentRefreshGenerationRef.current) {
|
|
87
|
+
if (assignmentResult.status === 'fulfilled') {
|
|
88
|
+
setAssignment(assignmentResult.value);
|
|
89
|
+
if (!assignmentResult.value && workflowResult.status === 'rejected') {
|
|
90
|
+
setError(String(workflowResult.reason?.message || 'Unable to load workflows.'));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
setError(String(assignmentResult.reason?.message || 'Unable to load workflow assignment.'));
|
|
95
|
+
}
|
|
58
96
|
}
|
|
59
97
|
setLoading(false);
|
|
60
98
|
});
|
|
61
|
-
return () => {
|
|
99
|
+
return () => {
|
|
100
|
+
requestGenerationRef.current += 1;
|
|
101
|
+
assignmentRefreshGenerationRef.current += 1;
|
|
102
|
+
};
|
|
62
103
|
}, [requestContext, taskId]);
|
|
63
104
|
const latestAssignment = assignment?.execution.taskId === taskId ? assignment : null;
|
|
64
105
|
const hasActiveExecution = latestAssignment
|
|
@@ -186,13 +227,18 @@ export function TaskWorkflowAssignmentField({ taskId, workspaceId, taskStatus, t
|
|
|
186
227
|
return;
|
|
187
228
|
refreshedTaskRevisionRef.current = { taskId, revision: taskRevision };
|
|
188
229
|
const requestGeneration = requestGenerationRef.current;
|
|
230
|
+
const assignmentRefreshGeneration = ++assignmentRefreshGenerationRef.current;
|
|
189
231
|
void getTaskWorkflowAssignment(taskId, requestContext).then((nextAssignment) => {
|
|
190
232
|
if (requestGeneration !== requestGenerationRef.current)
|
|
191
233
|
return;
|
|
234
|
+
if (assignmentRefreshGeneration !== assignmentRefreshGenerationRef.current)
|
|
235
|
+
return;
|
|
192
236
|
setAssignment(nextAssignment);
|
|
193
237
|
}).catch((requestError) => {
|
|
194
238
|
if (requestGeneration !== requestGenerationRef.current)
|
|
195
239
|
return;
|
|
240
|
+
if (assignmentRefreshGeneration !== assignmentRefreshGenerationRef.current)
|
|
241
|
+
return;
|
|
196
242
|
setError(String(requestError?.message || 'Unable to refresh workflow assignment.'));
|
|
197
243
|
});
|
|
198
244
|
}, [isPending, requestContext, taskId, taskStatus, taskUpdatedAt]);
|
|
@@ -210,15 +256,27 @@ export function TaskWorkflowAssignmentField({ taskId, workspaceId, taskStatus, t
|
|
|
210
256
|
const eventTaskId = String(detail.taskId || '').trim();
|
|
211
257
|
if (eventTaskId !== taskId)
|
|
212
258
|
return;
|
|
213
|
-
const
|
|
259
|
+
const authoritativeAssignment = workflowAssignmentFromMutation(detail.authoritativeWorkflowAssignment, taskId);
|
|
260
|
+
if (authoritativeAssignment) {
|
|
261
|
+
++assignmentRefreshGenerationRef.current;
|
|
262
|
+
setAssignment((current) => newerWorkflowAssignment(current, authoritativeAssignment));
|
|
263
|
+
setError('');
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
const requestGeneration = requestGenerationRef.current;
|
|
267
|
+
const assignmentRefreshGeneration = ++assignmentRefreshGenerationRef.current;
|
|
214
268
|
void getTaskWorkflowAssignment(taskId, requestContext).then((nextAssignment) => {
|
|
215
269
|
if (requestGeneration !== requestGenerationRef.current)
|
|
216
270
|
return;
|
|
271
|
+
if (assignmentRefreshGeneration !== assignmentRefreshGenerationRef.current)
|
|
272
|
+
return;
|
|
217
273
|
setAssignment(nextAssignment);
|
|
218
274
|
setError('');
|
|
219
275
|
}).catch((requestError) => {
|
|
220
276
|
if (requestGeneration !== requestGenerationRef.current)
|
|
221
277
|
return;
|
|
278
|
+
if (assignmentRefreshGeneration !== assignmentRefreshGenerationRef.current)
|
|
279
|
+
return;
|
|
222
280
|
setError(String(requestError?.message || 'Unable to refresh workflow assignment.'));
|
|
223
281
|
});
|
|
224
282
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { type InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface PasswordInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
3
|
+
visibilityLabel?: string;
|
|
4
|
+
visibilityToggleTestId?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState } from 'react';
|
|
3
|
+
import { Eye, EyeOff } from 'lucide-react';
|
|
4
|
+
import styles from './PasswordInput.module.css';
|
|
5
|
+
export const PasswordInput = forwardRef(function PasswordInput({ className, disabled, visibilityLabel = 'password', visibilityToggleTestId, ...inputProps }, ref) {
|
|
6
|
+
const [visible, setVisible] = useState(false);
|
|
7
|
+
const actionLabel = `${visible ? 'Hide' : 'Show'} ${visibilityLabel}`;
|
|
8
|
+
return (_jsxs("span", { className: styles.wrapper, children: [_jsx("input", { ...inputProps, ref: ref, className: `${className || ''} ${styles.input}`.trim(), type: visible ? 'text' : 'password', disabled: disabled }), _jsx("button", { type: "button", className: styles.toggle, "aria-label": actionLabel, title: actionLabel, "data-testid": visibilityToggleTestId, disabled: disabled, onClick: () => setVisible((current) => !current), children: visible
|
|
9
|
+
? _jsx(EyeOff, { size: 18, "aria-hidden": "true" })
|
|
10
|
+
: _jsx(Eye, { size: 18, "aria-hidden": "true" }) })] }));
|
|
11
|
+
});
|
|
@@ -13,5 +13,5 @@ export function TopNoticeLayer({ notice, onDismiss, placement = 'top' }) {
|
|
|
13
13
|
const layerClassName = placement === 'task'
|
|
14
14
|
? `${styles.topNoticeLayer} ${styles.taskNoticeLayer}`
|
|
15
15
|
: styles.topNoticeLayer;
|
|
16
|
-
return (_jsx("div", { className: layerClassName, children: _jsxs("div", { className: `${styles.topNotice} ${toneClass}`, role: statusRole, "aria-live": notice.tone === 'error' ? 'assertive' : 'polite', children: [notice.tone === 'error' ? _jsx(AlertTriangle, { size: 14 }) : notice.tone === 'success' ? _jsx(Check, { size: 14 }) : _jsx(Info, { size: 14 }), _jsx("span", { className: styles.topNoticeMessage, children: notice.message }), notice.actionLabel && notice.onAction && (_jsx("button", { type: "button", className: "tf-button-ghost tf-button-compact", onClick: notice.
|
|
16
|
+
return (_jsx("div", { className: layerClassName, children: _jsxs("div", { className: `${styles.topNotice} ${toneClass}`, role: statusRole, "aria-live": notice.tone === 'error' ? 'assertive' : 'polite', children: [notice.tone === 'error' ? _jsx(AlertTriangle, { size: 14 }) : notice.tone === 'success' ? _jsx(Check, { size: 14 }) : _jsx(Info, { size: 14 }), _jsx("span", { className: styles.topNoticeMessage, children: notice.message }), notice.actionLabel && notice.onAction && (_jsx("button", { type: "button", className: `${notice.actionPrimary ? 'tf-button-primary' : 'tf-button-ghost'} tf-button-compact`, onClick: notice.onAction, children: notice.actionLabel })), notice.secondaryActionLabel && notice.onSecondaryAction && (_jsx("button", { type: "button", className: "tf-button-ghost tf-button-compact", onClick: notice.onSecondaryAction, children: notice.secondaryActionLabel })), onDismiss && notice.dismissible !== false && (_jsx("button", { type: "button", className: styles.topNoticeDismiss, onClick: onDismiss, "aria-label": "Dismiss notice", title: "Dismiss notice", children: _jsx(X, { size: 14 }) }))] }) }));
|
|
17
17
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
2
|
+
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
3
3
|
import styles from '../../Taskforce.module.css';
|
|
4
4
|
import shellStyles from './WorkspaceShell.module.css';
|
|
5
5
|
import logoLight from '../../assets/branding/logos/logo_light_no_bg.svg';
|
|
@@ -10,6 +10,7 @@ export function AppShellHeader({ projectName, currentWorkspaceId, brandLabel = '
|
|
|
10
10
|
const headerTitleRef = useRef(null);
|
|
11
11
|
const projectNameGroupRef = useRef(null);
|
|
12
12
|
const [projectNameFits, setProjectNameFits] = useState(true);
|
|
13
|
+
const [workspaceCopyStatus, setWorkspaceCopyStatus] = useState('idle');
|
|
13
14
|
const logo = isLightThemeFamily(theme) ? logoDark : logoLight;
|
|
14
15
|
const normalizedProjectName = String(projectName || '').trim();
|
|
15
16
|
const workspaceIdForCopy = String(currentWorkspaceId || '').trim();
|
|
@@ -56,20 +57,28 @@ export function AppShellHeader({ projectName, currentWorkspaceId, brandLabel = '
|
|
|
56
57
|
resizeObserver.observe(projectEl);
|
|
57
58
|
return () => resizeObserver.disconnect();
|
|
58
59
|
}, [measureProjectNameFit, normalizedProjectName, meta]);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (workspaceCopyStatus === 'idle')
|
|
62
|
+
return;
|
|
63
|
+
const timer = window.setTimeout(() => setWorkspaceCopyStatus('idle'), 1600);
|
|
64
|
+
return () => window.clearTimeout(timer);
|
|
65
|
+
}, [workspaceCopyStatus]);
|
|
59
66
|
const showProjectName = canShowProjectName && projectNameFits;
|
|
60
|
-
const copyWorkspaceId = () => {
|
|
67
|
+
const copyWorkspaceId = async () => {
|
|
61
68
|
if (!workspaceIdForCopy || typeof navigator === 'undefined')
|
|
62
69
|
return;
|
|
63
70
|
const clipboard = navigator.clipboard;
|
|
64
|
-
if (!clipboard?.writeText)
|
|
65
|
-
|
|
66
|
-
void clipboard.writeText(workspaceIdForCopy).catch(() => undefined);
|
|
67
|
-
};
|
|
68
|
-
const handleProjectNameKeyDown = (event) => {
|
|
69
|
-
if (event.key !== 'Enter' && event.key !== ' ')
|
|
71
|
+
if (!clipboard?.writeText) {
|
|
72
|
+
setWorkspaceCopyStatus('failed');
|
|
70
73
|
return;
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
await clipboard.writeText(workspaceIdForCopy);
|
|
77
|
+
setWorkspaceCopyStatus('copied');
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
setWorkspaceCopyStatus('failed');
|
|
81
|
+
}
|
|
73
82
|
};
|
|
74
83
|
const brandContent = (_jsxs(_Fragment, { children: [_jsx("img", { src: logo, alt: "Taskforce Logo", className: styles.brandIcon, onError: (event) => {
|
|
75
84
|
const target = event.currentTarget;
|
|
@@ -80,5 +89,17 @@ export function AppShellHeader({ projectName, currentWorkspaceId, brandLabel = '
|
|
|
80
89
|
target.style.display = 'none';
|
|
81
90
|
}
|
|
82
91
|
} }), _jsx("span", { children: brandLabel }), runtimeMode === 'cloud' && (_jsx("span", { className: styles.brandCloudSuffix, children: "HQ" }))] }));
|
|
83
|
-
return (_jsxs("div", { className: `${styles.header} ${shellStyles.standaloneHeader}`, children: [_jsxs("div", { ref: headerTitleRef, className: `${styles.headerTitle} ${shellStyles.standaloneTitle}`, children: [onBrandClick ? (_jsx("button", { type: "button", className: styles.brandHomeButton, onClick: onBrandClick, title: brandHomeLabel, "aria-label": brandHomeLabel, children: brandContent })) : (_jsx("span", { className: styles.brandHomeStatic, children: brandContent })), canShowProjectName && (_jsxs("span", { ref: projectNameGroupRef, className: `${styles.projectNameGroup} ${showProjectName ? '' : styles.projectNameGroupHidden}`.trim(), "aria-hidden": showProjectName ? undefined : true, children: [_jsx("span", { className: styles.projectSlash, children: "/" }), _jsx("
|
|
92
|
+
return (_jsxs("div", { className: `${styles.header} ${shellStyles.standaloneHeader}`, children: [_jsxs("div", { ref: headerTitleRef, className: `${styles.headerTitle} ${shellStyles.standaloneTitle}`, children: [onBrandClick ? (_jsx("button", { type: "button", className: styles.brandHomeButton, onClick: onBrandClick, title: brandHomeLabel, "aria-label": brandHomeLabel, children: brandContent })) : (_jsx("span", { className: styles.brandHomeStatic, children: brandContent })), canShowProjectName && (_jsxs("span", { ref: projectNameGroupRef, className: `${styles.projectNameGroup} ${showProjectName ? '' : styles.projectNameGroupHidden}`.trim(), "aria-hidden": showProjectName ? undefined : true, children: [_jsx("span", { className: styles.projectSlash, children: "/" }), workspaceIdForCopy ? (_jsx("button", { type: "button", className: `${styles.projectName} ${workspaceCopyStatus === 'copied' ? styles.projectNameCopied : ''}`.trim(), title: workspaceCopyStatus === 'copied'
|
|
93
|
+
? 'Workspace ID copied'
|
|
94
|
+
: workspaceCopyStatus === 'failed'
|
|
95
|
+
? 'Unable to copy workspace ID'
|
|
96
|
+
: `Workspace ID: ${workspaceIdForCopy}`, "aria-label": `${normalizedProjectName}. ${workspaceCopyStatus === 'copied'
|
|
97
|
+
? 'Workspace ID copied.'
|
|
98
|
+
: workspaceCopyStatus === 'failed'
|
|
99
|
+
? 'Unable to copy workspace ID.'
|
|
100
|
+
: 'Copy workspace ID.'}`, disabled: !showProjectName, onClick: () => { void copyWorkspaceId(); }, children: normalizedProjectName })) : (_jsx("span", { className: styles.projectName, children: normalizedProjectName })), _jsx("span", { className: styles.projectNameCopyFeedback, "aria-live": "polite", children: workspaceCopyStatus === 'copied'
|
|
101
|
+
? 'Workspace ID copied.'
|
|
102
|
+
: workspaceCopyStatus === 'failed'
|
|
103
|
+
? 'Unable to copy workspace ID.'
|
|
104
|
+
: '' })] })), meta] }), _jsx("div", { className: styles.headerActions, style: { gap: '16px' }, children: actions })] }));
|
|
84
105
|
}
|