@taskforcehq/taskforce 0.3.305 → 0.3.306
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Taskforce.module.css +295 -89
- package/dist/TaskforceCore.js +215 -43
- package/dist/TaskforceCore.test.js +433 -28
- package/dist/assets/fonts/CourierPrime-Bold.woff2 +0 -0
- package/dist/assets/fonts/CourierPrime-BoldItalic.woff2 +0 -0
- package/dist/assets/fonts/CourierPrime-Italic.woff2 +0 -0
- package/dist/assets/fonts/CourierPrime-Regular.woff2 +0 -0
- package/dist/assets/fonts/Noir_medium.woff2 +0 -0
- package/dist/assets/fonts/Noir_regular.woff2 +0 -0
- package/dist/assets/fonts/RussoOne-Regular.woff2 +0 -0
- package/dist/assets/fonts/SpecialElite-Regular.woff2 +0 -0
- package/dist/compat/workspaceSyncCompat.js +46 -2
- package/dist/compat/workspaceSyncCompat.test.js +38 -1
- package/dist/components/context/ContextAttachmentManager.d.ts +14 -0
- package/dist/components/context/ContextAttachmentManager.js +549 -0
- package/dist/components/features/AgentsModule.d.ts +10 -1
- package/dist/components/features/AgentsModule.js +260 -15
- package/dist/components/features/AgentsModule.test.js +255 -5
- package/dist/components/features/DocumentViewer.d.ts +5 -1
- package/dist/components/features/DocumentViewer.js +60 -3
- package/dist/components/features/DocumentWorkspace.js +1 -1
- package/dist/components/features/DocumentWorkspace.test.js +33 -0
- package/dist/components/features/documentWorkspaceModel.d.ts +1 -1
- package/dist/components/task/TaskCard.js +19 -28
- package/dist/components/task/TaskCard.test.js +38 -3
- package/dist/components/task/TaskContextUpload.js +4 -526
- package/dist/components/task/TaskForm.js +85 -90
- package/dist/components/task/TaskForm.test.js +110 -8
- package/dist/components/task/TaskKanban.d.ts +2 -1
- package/dist/components/task/TaskKanban.js +94 -13
- package/dist/components/task/TaskKanban.test.js +36 -0
- package/dist/components/ui/EditableAvatarButton.d.ts +18 -0
- package/dist/components/ui/EditableAvatarButton.js +18 -0
- package/dist/components/views/PlanComparisonPage.d.ts +9 -1
- package/dist/components/views/PlanComparisonPage.js +70 -14
- package/dist/components/views/PlanComparisonPage.test.js +238 -0
- package/dist/components/views/PlansPage.js +127 -36
- package/dist/components/views/PlansPage.test.js +294 -12
- package/dist/components/views/StandaloneLayout.js +283 -533
- package/dist/components/views/panels/PlanningDrawer.d.ts +8 -1
- package/dist/components/views/panels/PlanningDrawer.js +18 -11
- package/dist/components/views/panels/PlanningDrawer.test.d.ts +1 -0
- package/dist/components/views/panels/PlanningDrawer.test.js +141 -0
- package/dist/components/views/planningScope.d.ts +20 -0
- package/dist/components/views/planningScope.js +25 -0
- package/dist/components/views/planningScope.test.d.ts +1 -0
- package/dist/components/views/planningScope.test.js +60 -0
- package/dist/components/views/standalone/modals/AccountHubModal.d.ts +26 -1
- package/dist/components/views/standalone/modals/AccountHubModal.js +76 -2
- package/dist/components/views/standalone/modals/AccountHubModal.test.js +20 -3
- package/dist/components/views/standalone/modals/AvatarImageManagerModal.d.ts +20 -0
- package/dist/components/views/standalone/modals/AvatarImageManagerModal.js +127 -0
- package/dist/components/views/standalone/modals/EditProfileModal.d.ts +2 -9
- package/dist/components/views/standalone/modals/EditProfileModal.js +3 -2
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.d.ts +9 -0
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.js +6 -0
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.test.d.ts +1 -0
- package/dist/components/views/standalone/modals/SyncEnableWarningModal.test.js +24 -0
- package/dist/components/views/standalone/modals/SyncStatusModal.d.ts +2 -1
- package/dist/components/views/standalone/modals/SyncStatusModal.js +2 -2
- package/dist/core/AiProfileService.d.ts +39 -2
- package/dist/core/AiProfileService.js +639 -73
- package/dist/core/AiProfileService.test.js +19 -1
- package/dist/core/AiProfiles.test.js +566 -7
- package/dist/core/AttachmentLinkService.js +57 -15
- package/dist/core/AuthIdentityService.d.ts +107 -0
- package/dist/core/AuthIdentityService.js +284 -0
- package/dist/core/AuthTokenService.d.ts +4 -0
- package/dist/core/AuthTokenService.js +34 -6
- package/dist/core/AuthTokenService.test.js +3 -3
- package/dist/core/EntitlementsPolicy.test.js +2 -2
- package/dist/core/GlobalSettingsService.js +115 -6
- package/dist/core/PlanEntitlementService.d.ts +23 -2
- package/dist/core/PlanEntitlementService.js +343 -57
- package/dist/core/PlanFeatureCatalog.test.d.ts +1 -0
- package/dist/core/PlanFeatureCatalog.test.js +84 -0
- package/dist/core/PlanVersionPolicy.test.js +35 -2
- package/dist/core/PlanningEntities.test.js +52 -0
- package/dist/core/SignupMonetizationSettings.test.js +199 -27
- package/dist/core/SyncReconciliationService.js +2 -65
- package/dist/core/SystemAdmin.test.js +42 -42
- package/dist/core/TaskAttachmentsCanonical.test.js +51 -1
- package/dist/core/Taskforce.d.ts +225 -14
- package/dist/core/Taskforce.js +765 -192
- package/dist/core/Taskforce.listTasksSlim.test.d.ts +1 -0
- package/dist/core/Taskforce.listTasksSlim.test.js +91 -0
- package/dist/core/UserProfileAvatarDrafts.test.js +30 -3
- package/dist/core/WorkspaceLifecycleService.js +0 -5
- package/dist/core/WorkspacePermissions.test.js +25 -1
- package/dist/core/WorkspacePlanMode.test.js +117 -16
- package/dist/core/shared.d.ts +1 -1
- package/dist/core/shared.js +5 -1
- package/dist/core/types.d.ts +68 -2
- package/dist/hooks/auth/useTaskforceAuthBootstrap.js +26 -1
- package/dist/hooks/sync/bootstrap.js +2 -0
- package/dist/hooks/sync/controlPlane.d.ts +37 -0
- package/dist/hooks/sync/controlPlane.js +78 -0
- package/dist/hooks/sync/controlPlane.test.d.ts +1 -0
- package/dist/hooks/sync/controlPlane.test.js +121 -0
- package/dist/hooks/sync/lifecyclePolicy.d.ts +45 -0
- package/dist/hooks/sync/lifecyclePolicy.js +93 -0
- package/dist/hooks/sync/lifecyclePolicy.test.d.ts +1 -0
- package/dist/hooks/sync/lifecyclePolicy.test.js +124 -0
- package/dist/hooks/sync/orchestratorShared.d.ts +10 -1
- package/dist/hooks/sync/orchestratorShared.js +68 -47
- package/dist/hooks/sync/orchestratorShared.test.js +50 -1
- package/dist/hooks/sync/pullLifecycle.d.ts +31 -0
- package/dist/hooks/sync/pullLifecycle.js +24 -0
- package/dist/hooks/sync/pullLifecycle.test.d.ts +1 -0
- package/dist/hooks/sync/pullLifecycle.test.js +80 -0
- package/dist/hooks/sync/recovery.d.ts +16 -2
- package/dist/hooks/sync/recovery.js +171 -53
- package/dist/hooks/sync/recovery.test.d.ts +1 -0
- package/dist/hooks/sync/recovery.test.js +292 -0
- package/dist/hooks/sync/transfers.d.ts +15 -3
- package/dist/hooks/sync/transfers.js +179 -62
- package/dist/hooks/sync/transfers.test.d.ts +1 -0
- package/dist/hooks/sync/transfers.test.js +396 -0
- package/dist/hooks/sync/useRecentSyncEvents.d.ts +21 -0
- package/dist/hooks/sync/useRecentSyncEvents.js +92 -0
- package/dist/hooks/sync/useRecentSyncEvents.test.d.ts +1 -0
- package/dist/hooks/sync/useRecentSyncEvents.test.js +124 -0
- package/dist/hooks/sync/useSyncStatusActions.d.ts +30 -0
- package/dist/hooks/sync/useSyncStatusActions.js +88 -0
- package/dist/hooks/sync/useSyncStatusActions.test.d.ts +1 -0
- package/dist/hooks/sync/useSyncStatusActions.test.js +133 -0
- package/dist/hooks/sync/useSyncStatusControls.d.ts +25 -0
- package/dist/hooks/sync/useSyncStatusControls.js +60 -0
- package/dist/hooks/sync/useSyncStatusControls.test.d.ts +1 -0
- package/dist/hooks/sync/useSyncStatusControls.test.js +88 -0
- package/dist/hooks/useSyncOrchestrator.aiProfiles.test.js +12 -0
- package/dist/hooks/useSyncOrchestrator.d.ts +9 -2
- package/dist/hooks/useSyncOrchestrator.js +359 -178
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.js +407 -0
- package/dist/hooks/useTaskData.js +8 -3
- package/dist/hooks/useTaskData.test.js +45 -0
- package/dist/hooks/useTaskforce.d.ts +60 -2
- package/dist/hooks/useTaskforce.js +549 -240
- package/dist/hooks/useTaskforce.runtime-routing.test.d.ts +1 -0
- package/dist/hooks/useTaskforce.runtime-routing.test.js +152 -0
- package/dist/hooks/useTaskforce.sync-behavior.test.js +2380 -212
- package/dist/hooks/useWorkspaceSyncController.d.ts +1 -0
- package/dist/hooks/useWorkspaceSyncController.js +6 -1
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.d.ts +16 -0
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.js +316 -35
- package/dist/localization/locales/en-US.d.ts +0 -1
- package/dist/localization/locales/en-US.js +0 -1
- package/dist/localization/locales/es-419.js +0 -1
- package/dist/localization/locales/pt-BR.js +0 -1
- package/dist/mcp/documentAssetRegistrar.js +3 -3
- package/dist/mcp/runtime.d.ts +2 -0
- package/dist/mcp/runtime.js +131 -64
- package/dist/mcp/runtime.test.js +291 -12
- package/dist/migrations/taskSchemaMigrations.d.ts +1 -1
- package/dist/migrations/taskSchemaMigrations.js +171 -61
- package/dist/migrations/taskSchemaMigrations.test.js +15 -0
- package/dist/resources/templates/workflow-sources/workflowDocs.mjs +6 -6
- package/dist/resources/templates/workflows/collaborate.yaml +1 -1
- package/dist/resources/templates/workflows/evaluate.yaml +2 -2
- package/dist/resources/templates/workflows/plan.yaml +1 -1
- package/dist/resources/templates/workflows/review.yaml +2 -2
- package/dist/server/annotatedAttachmentsRoutes.test.js +3 -3
- package/dist/server/auth/providers/apple.d.ts +33 -0
- package/dist/server/auth/providers/apple.js +82 -0
- package/dist/server/auth/providers/appleClientSecret.d.ts +37 -0
- package/dist/server/auth/providers/appleClientSecret.js +65 -0
- package/dist/server/auth/providers/github.d.ts +26 -0
- package/dist/server/auth/providers/github.js +86 -0
- package/dist/server/auth/providers/google.d.ts +21 -0
- package/dist/server/auth/providers/google.js +56 -0
- package/dist/server/auth/providers/types.d.ts +21 -0
- package/dist/server/auth/providers/types.js +1 -0
- package/dist/server/auth.d.ts +2 -0
- package/dist/server/auth.js +6 -3
- package/dist/server/documentReviewRoutes.test.js +36 -3
- package/dist/server/index.cookieProxy.test.js +1 -0
- package/dist/server/index.d.ts +12 -0
- package/dist/server/index.js +120 -9
- package/dist/server/index.rateLimit.test.js +3 -0
- package/dist/server/index.test.js +106 -3
- package/dist/server/routes/admin.d.ts +3 -0
- package/dist/server/routes/admin.js +272 -19
- package/dist/server/routes/auth.d.ts +15 -2
- package/dist/server/routes/auth.js +994 -57
- package/dist/server/routes/authSupport.d.ts +1 -1
- package/dist/server/routes/authSupport.js +1 -1
- package/dist/server/routes/billing.js +361 -35
- package/dist/server/routes/billing.test.js +592 -12
- package/dist/server/routes/documents.d.ts +1 -0
- package/dist/server/routes/documents.js +172 -70
- package/dist/server/routes/shared.d.ts +28 -2
- package/dist/server/routes/shared.js +69 -4
- package/dist/server/routes/sync.integration.test.js +437 -39
- package/dist/server/routes/sync.js +61 -605
- package/dist/server/routes/syncAuxRoutes.d.ts +15 -0
- package/dist/server/routes/syncAuxRoutes.js +91 -0
- package/dist/server/routes/syncAuxRoutes.test.d.ts +1 -0
- package/dist/server/routes/syncAuxRoutes.test.js +158 -0
- package/dist/server/routes/syncPullApplyRoutes.d.ts +36 -0
- package/dist/server/routes/syncPullApplyRoutes.js +204 -0
- package/dist/server/routes/syncPushRoutes.d.ts +24 -0
- package/dist/server/routes/syncPushRoutes.js +212 -0
- package/dist/server/routes/syncRouteGuards.d.ts +36 -0
- package/dist/server/routes/syncRouteGuards.js +67 -0
- package/dist/server/routes/syncRouteGuards.test.d.ts +1 -0
- package/dist/server/routes/syncRouteGuards.test.js +94 -0
- package/dist/server/routes/syncRouteTypes.d.ts +13 -0
- package/dist/server/routes/syncRouteTypes.js +1 -0
- package/dist/server/routes/syncSnapshotRoutes.d.ts +66 -0
- package/dist/server/routes/syncSnapshotRoutes.js +180 -0
- package/dist/server/routes/tasks.js +43 -1
- package/dist/server/routes/workspaces.js +36 -5
- package/dist/server/routes.js +60 -3
- package/dist/server/routes.test.js +1824 -171
- package/dist/services/workflowExportSnapshots.test.js +2 -0
- package/dist/shared/aiProfileSeatScope.d.ts +5 -0
- package/dist/shared/aiProfileSeatScope.js +21 -0
- package/dist/shared/passwordPolicy.d.ts +13 -0
- package/dist/shared/passwordPolicy.js +84 -0
- package/dist/shared/passwordPolicy.test.d.ts +1 -0
- package/dist/shared/passwordPolicy.test.js +34 -0
- package/dist/storage/workspaceAssetStore.d.ts +15 -3
- package/dist/storage/workspaceAssetStore.js +132 -44
- package/dist/storage/workspaceAssetStore.test.js +93 -6
- package/dist/styles/fonts.css +70 -0
- package/dist/sync/collaborationSyncPayload.d.ts +6 -1
- package/dist/sync/collaborationSyncPayload.js +17 -11
- package/dist/sync/collaborationSyncPayload.test.js +13 -1
- package/dist/sync/contentSyncState.d.ts +4 -8
- package/dist/sync/contentSyncState.js +17 -70
- package/dist/sync/syncApplyHandlers.d.ts +7 -0
- package/dist/sync/syncApplyHandlers.js +28 -13
- package/dist/sync/syncApplyHandlers.test.js +70 -3
- package/dist/sync/syncFieldSemantics.d.ts +12 -0
- package/dist/sync/syncFieldSemantics.js +55 -0
- package/dist/sync/syncResourceAdapters.d.ts +44 -0
- package/dist/sync/syncResourceAdapters.js +77 -0
- package/dist/sync/syncService.d.ts +5 -0
- package/dist/sync/syncService.js +52 -0
- package/dist/sync/syncService.test.js +57 -3
- package/dist/sync/taskSyncChangeKey.d.ts +2 -0
- package/dist/sync/taskSyncChangeKey.js +143 -0
- package/dist/sync/taskSyncPayload.js +3 -8
- package/dist/sync/workspacePullFeed.js +4 -3
- package/dist/sync/workspacePullFeed.test.js +43 -0
- package/dist/sync/workspaceRepair.js +5 -2
- package/dist/sync/workspaceSyncModel.d.ts +45 -0
- package/dist/sync/workspaceSyncModel.js +183 -28
- package/dist/sync/workspaceSyncModel.test.js +291 -12
- package/dist/sync/workspaceSyncState.d.ts +17 -0
- package/dist/sync/workspaceSyncState.js +2 -1
- package/dist/sync/workspaceSyncSurface.js +3 -8
- package/dist/types.d.ts +17 -0
- package/dist/ui/assets/AgentsModule-DrLawwNl.js +1 -0
- package/dist/ui/assets/{AnnotatedAttachmentWorkspace-BG6P_GVW.js → AnnotatedAttachmentWorkspace-Z9_whf7F.js} +1 -1
- package/dist/ui/assets/CourierPrime-Bold-BuLj_dpw.woff2 +0 -0
- package/dist/ui/assets/CourierPrime-BoldItalic-BrK2pUkZ.woff2 +0 -0
- package/dist/ui/assets/CourierPrime-Italic-DFUZK5Ey.woff2 +0 -0
- package/dist/ui/assets/CourierPrime-Regular-BsKphzVf.woff2 +0 -0
- package/dist/ui/assets/DocumentWorkspace-B03MaSkw.js +252 -0
- package/dist/ui/assets/DocumentWorkspace-Dhdso07p.css +1 -0
- package/dist/ui/assets/{InitiativesModule-Dhm7M8e7.js → InitiativesModule-9E6ParrY.js} +1 -1
- package/dist/ui/assets/Noir_medium-bxQwKGzB.woff2 +0 -0
- package/dist/ui/assets/Noir_regular-ojf2kxlG.woff2 +0 -0
- package/dist/ui/assets/PlansPage-CvfnMiWq.css +1 -0
- package/dist/ui/assets/PlansPage-DRXscYxH.js +1 -0
- package/dist/ui/assets/RussoOne-Regular-Cu_qq_qC.woff2 +0 -0
- package/dist/ui/assets/SpecialElite-Regular-Di6gSvAS.woff2 +0 -0
- package/dist/ui/assets/{TaskSettings-ln0aF7xc.js → TaskSettings-DZX4jk7e.js} +1 -1
- package/dist/ui/assets/{WorkflowsModule-BcS4afRn.js → WorkflowsModule-BA7jcEpH.js} +1 -1
- package/dist/ui/assets/index-9eT8e0Lu.css +1 -0
- package/dist/ui/assets/index-C6k75jr8.js +6 -0
- package/dist/ui/assets/{vendor-icons-BSUaRwF8.js → vendor-icons-DuEd_65c.js} +1 -1
- package/dist/ui/fonts/CourierPrime-Bold.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-Bold.woff2 +0 -0
- package/dist/ui/fonts/CourierPrime-BoldItalic.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-BoldItalic.woff2 +0 -0
- package/dist/ui/fonts/CourierPrime-Italic.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-Italic.woff2 +0 -0
- package/dist/ui/fonts/CourierPrime-Regular.ttf +0 -0
- package/dist/ui/fonts/CourierPrime-Regular.woff2 +0 -0
- package/dist/ui/fonts/Noir_medium.otf +0 -0
- package/dist/ui/fonts/Noir_medium.woff2 +0 -0
- package/dist/ui/fonts/Noir_regular.otf +0 -0
- package/dist/ui/fonts/Noir_regular.woff2 +0 -0
- package/dist/ui/fonts/RussoOne-Regular.woff2 +0 -0
- package/dist/ui/fonts/SpecialElite-Regular.ttf +0 -0
- package/dist/ui/fonts/SpecialElite-Regular.woff2 +0 -0
- package/dist/ui/index.html +3 -3
- package/dist/utils/accountProfileSummaryCache.d.ts +5 -0
- package/dist/utils/assignees.d.ts +2 -0
- package/dist/utils/assignees.js +2 -0
- package/dist/utils/avatarUpload.d.ts +27 -0
- package/dist/utils/avatarUpload.js +132 -0
- package/dist/utils/avatarUpload.test.d.ts +1 -0
- package/dist/utils/avatarUpload.test.js +40 -0
- package/dist/utils/bootstrapTrace.d.ts +7 -0
- package/dist/utils/bootstrapTrace.js +29 -0
- package/dist/utils/commercialLifecyclePresentation.js +3 -0
- package/dist/utils/contextAssetEvents.d.ts +2 -0
- package/dist/utils/syncEventDetails.d.ts +3 -0
- package/dist/utils/syncEventDetails.js +64 -0
- package/dist/utils/syncEventDetails.test.d.ts +1 -0
- package/dist/utils/syncEventDetails.test.js +23 -0
- package/dist/utils/syncEventPresentation.d.ts +15 -0
- package/dist/utils/syncEventPresentation.js +129 -0
- package/dist/utils/syncEventPresentation.test.d.ts +1 -0
- package/dist/utils/syncEventPresentation.test.js +64 -0
- package/dist/utils/syncStatusPresentation.d.ts +72 -0
- package/dist/utils/syncStatusPresentation.js +217 -0
- package/dist/utils/syncStatusPresentation.test.d.ts +1 -0
- package/dist/utils/syncStatusPresentation.test.js +164 -0
- package/dist/utils/taskActivity.d.ts +2 -0
- package/dist/utils/taskActivity.js +228 -22
- package/dist/utils/taskActivity.test.js +119 -8
- package/dist/utils/workspaceSyncPresentation.d.ts +4 -0
- package/dist/utils/workspaceSyncPresentation.js +68 -2
- package/dist/utils/workspaceSyncPresentation.test.js +36 -1
- package/package.json +3 -2
- package/scripts/export-sqlite-to-postgres.mjs +7 -9
- package/scripts/run-e2e-realtime.sh +17 -3
- package/scripts/run-smoke.sh +17 -5
- package/scripts/run-soak.sh +17 -5
- package/src/resources/templates/workflow-sources/workflowDocs.mjs +6 -6
- package/src/resources/templates/workflows/collaborate.yaml +1 -1
- package/src/resources/templates/workflows/evaluate.yaml +2 -2
- package/src/resources/templates/workflows/plan.yaml +1 -1
- package/src/resources/templates/workflows/review.yaml +2 -2
- package/dist/ui/assets/AgentsModule-N2MnQBZk.js +0 -1
- package/dist/ui/assets/DocumentWorkspace-B3nV_Gc5.css +0 -1
- package/dist/ui/assets/DocumentWorkspace-DRbDMwh8.js +0 -252
- package/dist/ui/assets/PlansPage-C2dd2n1X.css +0 -1
- package/dist/ui/assets/PlansPage-Cq0zXj3I.js +0 -1
- package/dist/ui/assets/RussoOne-Regular-C3BxZIj7.ttf +0 -0
- package/dist/ui/assets/index-C2-OXZV7.css +0 -1
- package/dist/ui/assets/index-DcSI5F86.js +0 -6
- package/scripts/migrate-planning-model.ts +0 -233
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { useLocation, useNavigate } from 'react-router-dom';
|
|
4
4
|
import { User } from 'lucide-react';
|
|
@@ -9,16 +9,29 @@ import { resolveTaskforceCloudEnvironmentFromBaseUrl } from '../../config/cloudE
|
|
|
9
9
|
import { ACCOUNT_PROFILE_SUMMARY_PATH, invalidateAccountProfileSummaryCache, loadAccountProfileSummaryCached } from '../../utils/accountProfileSummaryCache';
|
|
10
10
|
import { isCommercialEntitlementActive, resolveCommercialLifecyclePresentation } from '../../utils/commercialLifecyclePresentation';
|
|
11
11
|
const TRANSIENT_CHECKOUT_QUERY_CLEAR_DELAY_MS = 1600;
|
|
12
|
-
const
|
|
12
|
+
const CHECKOUT_CONFIRM_INITIAL_RETRY_DELAYS_MS = [0, 500, 1000, 2000];
|
|
13
|
+
const CHECKOUT_CONFIRM_RETRY_INTERVAL_MS = 5000;
|
|
14
|
+
const CHECKOUT_CONFIRM_MAX_AUTO_RETRY_MS = 45000;
|
|
15
|
+
const HIDDEN_GATE_MESSAGE = 'Choose a plan to continue.';
|
|
13
16
|
function shouldRetryCheckoutConfirmation(statusCode, errorCode) {
|
|
14
17
|
if (statusCode === 401) {
|
|
15
18
|
return true;
|
|
16
19
|
}
|
|
17
|
-
|
|
20
|
+
const normalizedErrorCode = String(errorCode || '').trim().toUpperCase();
|
|
21
|
+
return normalizedErrorCode === 'CHECKOUT_SESSION_INCOMPLETE'
|
|
22
|
+
|| normalizedErrorCode === 'CHECKOUT_PLAN_VERSION_UNRESOLVED';
|
|
18
23
|
}
|
|
19
24
|
function parseInterval(raw) {
|
|
20
25
|
return raw === 'year' ? 'year' : 'month';
|
|
21
26
|
}
|
|
27
|
+
function normalizeIntervalValue(raw) {
|
|
28
|
+
const normalized = String(raw || '').trim().toLowerCase();
|
|
29
|
+
if (normalized === 'year')
|
|
30
|
+
return 'year';
|
|
31
|
+
if (normalized === 'month')
|
|
32
|
+
return 'month';
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
22
35
|
function normalizeApiBaseUrl(raw) {
|
|
23
36
|
const trimmed = String(raw || '').trim();
|
|
24
37
|
if (!trimmed)
|
|
@@ -40,16 +53,19 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
40
53
|
const location = useLocation();
|
|
41
54
|
const [accountProfileSummary, setAccountProfileSummary] = useState(null);
|
|
42
55
|
const [actionBusy, setActionBusy] = useState(false);
|
|
56
|
+
const [continueActionBusy, setContinueActionBusy] = useState(false);
|
|
43
57
|
const [feedback, setFeedback] = useState(null);
|
|
44
58
|
const checkoutStartRan = useRef(false);
|
|
45
|
-
const
|
|
59
|
+
const checkoutSuccessSettledRef = useRef(null);
|
|
46
60
|
const transientQueryClearTimeoutRef = useRef(null);
|
|
61
|
+
const onContinueToTaskforceRef = useRef(onContinueToTaskforce);
|
|
47
62
|
const query = useMemo(() => new URLSearchParams(location.search), [location.search]);
|
|
48
63
|
const checkoutState = String(query.get('checkout') || '').trim().toLowerCase();
|
|
49
64
|
const gateState = String(query.get('gate') || '').trim().toLowerCase();
|
|
50
65
|
const queryPlanId = String(query.get('planId') || '').trim();
|
|
51
66
|
const queryPlanVersionId = String(query.get('planVersionId') || '').trim();
|
|
52
67
|
const queryInterval = parseInterval(query.get('interval'));
|
|
68
|
+
const queryIntervalValue = normalizeIntervalValue(query.get('interval'));
|
|
53
69
|
const querySessionId = String(query.get('session_id') || '').trim();
|
|
54
70
|
const normalizedApiBaseUrl = useMemo(() => normalizeApiBaseUrl(apiBaseUrl), [apiBaseUrl]);
|
|
55
71
|
const normalizedConnectedEnvironmentSource = useMemo(() => normalizeApiBaseUrl(connectedEnvironmentSource), [connectedEnvironmentSource]);
|
|
@@ -80,16 +96,15 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
80
96
|
const nextQuery = params.toString();
|
|
81
97
|
navigate(`/${nextQuery ? `?${nextQuery}` : ''}${location.hash || ''}`);
|
|
82
98
|
}, [location.hash, location.search, navigate]);
|
|
83
|
-
const
|
|
84
|
-
const endpoints = [
|
|
85
|
-
normalizedApiBaseUrl ? `${normalizedApiBaseUrl}/api/taskforce/public/pricing` : '',
|
|
86
|
-
'/api/taskforce/public/pricing'
|
|
87
|
-
].map((value) => String(value || '').trim()).filter((value, index, all) => value && all.indexOf(value) === index);
|
|
88
|
-
return endpoints;
|
|
89
|
-
}, [normalizedApiBaseUrl]);
|
|
99
|
+
const pricingEndpoint = useMemo(() => buildCloudBillingUrl('/api/taskforce/public/pricing'), [buildCloudBillingUrl]);
|
|
90
100
|
const lifecyclePresentation = useMemo(() => resolveCommercialLifecyclePresentation(accountProfileSummary, gateState), [accountProfileSummary, gateState]);
|
|
91
101
|
const hasResolvedActiveEntitlement = useMemo(() => lifecyclePresentation.allowReturnToApp, [lifecyclePresentation.allowReturnToApp]);
|
|
92
|
-
const gateMessage = useMemo(() =>
|
|
102
|
+
const gateMessage = useMemo(() => {
|
|
103
|
+
const message = String(lifecyclePresentation.message || '').trim();
|
|
104
|
+
if (!message || message === HIDDEN_GATE_MESSAGE)
|
|
105
|
+
return null;
|
|
106
|
+
return message;
|
|
107
|
+
}, [lifecyclePresentation.message]);
|
|
93
108
|
const clearTransientQueryState = useCallback(() => {
|
|
94
109
|
const next = new URLSearchParams(location.search);
|
|
95
110
|
next.delete('checkout');
|
|
@@ -110,6 +125,9 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
110
125
|
transientQueryClearTimeoutRef.current = null;
|
|
111
126
|
}, TRANSIENT_CHECKOUT_QUERY_CLEAR_DELAY_MS);
|
|
112
127
|
}, [clearTransientQueryState]);
|
|
128
|
+
useEffect(() => {
|
|
129
|
+
onContinueToTaskforceRef.current = onContinueToTaskforce;
|
|
130
|
+
}, [onContinueToTaskforce]);
|
|
113
131
|
const loadAccountProfileSummary = useCallback(async (options) => {
|
|
114
132
|
const accountProfileSummaryUrl = buildCloudBillingUrl(ACCOUNT_PROFILE_SUMMARY_PATH);
|
|
115
133
|
if (!isAuthenticated) {
|
|
@@ -131,11 +149,14 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
131
149
|
return null;
|
|
132
150
|
}
|
|
133
151
|
}, [authUserId, buildCloudBillingUrl, isAuthenticated, onAccountProfileSummaryChange]);
|
|
134
|
-
const resolveRecoveryMessage = useCallback((summary, fallback) => {
|
|
152
|
+
const resolveRecoveryMessage = useCallback((summary, fallback, options) => {
|
|
153
|
+
const normalizedFallback = String(fallback || '').trim();
|
|
154
|
+
if (options?.preferFallback && normalizedFallback)
|
|
155
|
+
return normalizedFallback;
|
|
135
156
|
const message = resolveCommercialLifecyclePresentation(summary, gateState).message;
|
|
136
157
|
if (message)
|
|
137
158
|
return message;
|
|
138
|
-
return
|
|
159
|
+
return normalizedFallback || 'Unable to confirm checkout completion.';
|
|
139
160
|
}, [gateState]);
|
|
140
161
|
const shouldAutoContinueAfterActivation = useCallback((summary, fallbackGate) => {
|
|
141
162
|
return !resolveCommercialLifecyclePresentation(summary, fallbackGate).allowReturnToApp;
|
|
@@ -226,6 +247,47 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
226
247
|
retryable: false
|
|
227
248
|
};
|
|
228
249
|
}
|
|
250
|
+
const confirmViaSummary = async () => {
|
|
251
|
+
invalidateAccountProfileSummaryCache(buildCloudBillingUrl(ACCOUNT_PROFILE_SUMMARY_PATH), { identityKey: authUserId });
|
|
252
|
+
const summary = await loadAccountProfileSummary({ force: true });
|
|
253
|
+
const summaryState = String(summary?.entitlementState || '').trim().toLowerCase();
|
|
254
|
+
if (!isCommercialEntitlementActive(summaryState)) {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
const expectedPlanId = queryPlanId;
|
|
258
|
+
const expectedPlanVersionId = queryPlanVersionId;
|
|
259
|
+
const expectedInterval = queryIntervalValue;
|
|
260
|
+
const currentPlanId = String(summary?.planId || '').trim();
|
|
261
|
+
const currentPlanVersionId = String(summary?.planVersionId || '').trim();
|
|
262
|
+
const currentInterval = normalizeIntervalValue(summary?.billingInterval ?? null);
|
|
263
|
+
const preSummary = options?.preConfirmationSummary ?? null;
|
|
264
|
+
const preState = String(preSummary?.entitlementState || '').trim().toLowerCase();
|
|
265
|
+
const preWasActive = isCommercialEntitlementActive(preState);
|
|
266
|
+
const prePlanId = String(preSummary?.planId || '').trim();
|
|
267
|
+
const prePlanVersionId = String(preSummary?.planVersionId || '').trim();
|
|
268
|
+
const preInterval = normalizeIntervalValue(preSummary?.billingInterval ?? null);
|
|
269
|
+
if (expectedPlanId && currentPlanId && currentPlanId !== expectedPlanId) {
|
|
270
|
+
return false;
|
|
271
|
+
}
|
|
272
|
+
if (expectedPlanVersionId && currentPlanVersionId && currentPlanVersionId !== expectedPlanVersionId) {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
if (expectedInterval && currentInterval && currentInterval !== expectedInterval) {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
if (preWasActive) {
|
|
279
|
+
const requestedPlanChanged = Boolean(expectedPlanId) && currentPlanId === expectedPlanId && prePlanId !== currentPlanId;
|
|
280
|
+
const requestedPlanVersionChanged = Boolean(expectedPlanVersionId) && currentPlanVersionId === expectedPlanVersionId && prePlanVersionId !== currentPlanVersionId;
|
|
281
|
+
const requestedIntervalChanged = Boolean(expectedInterval) && currentInterval === expectedInterval && preInterval !== currentInterval;
|
|
282
|
+
if (!requestedPlanChanged && !requestedPlanVersionChanged && !requestedIntervalChanged) {
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
if (options?.autoContinueOnActivation === true) {
|
|
287
|
+
await onContinueToTaskforceRef.current?.();
|
|
288
|
+
}
|
|
289
|
+
return true;
|
|
290
|
+
};
|
|
229
291
|
try {
|
|
230
292
|
const res = await fetch(buildCloudBillingUrl('/api/taskforce/billing/checkout-session/confirm'), {
|
|
231
293
|
method: 'POST',
|
|
@@ -236,17 +298,18 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
236
298
|
const payload = await res.json().catch(() => ({}));
|
|
237
299
|
if (!res.ok) {
|
|
238
300
|
const errorCode = String(payload?.code || '').trim();
|
|
301
|
+
const retryable = shouldRetryCheckoutConfirmation(res.status, errorCode);
|
|
302
|
+
if (retryable && await confirmViaSummary()) {
|
|
303
|
+
return { confirmed: true };
|
|
304
|
+
}
|
|
239
305
|
return {
|
|
240
306
|
confirmed: false,
|
|
241
307
|
errorMessage: String(payload?.error || 'Unable to confirm checkout completion.'),
|
|
242
|
-
retryable
|
|
308
|
+
retryable
|
|
243
309
|
};
|
|
244
310
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
const summaryState = String(summary?.entitlementState || '').trim().toLowerCase();
|
|
248
|
-
if (options?.autoContinueOnActivation === true && isCommercialEntitlementActive(summaryState)) {
|
|
249
|
-
await onContinueToTaskforce?.();
|
|
311
|
+
if (await confirmViaSummary()) {
|
|
312
|
+
return { confirmed: true };
|
|
250
313
|
}
|
|
251
314
|
return { confirmed: true };
|
|
252
315
|
}
|
|
@@ -257,14 +320,14 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
257
320
|
retryable: true
|
|
258
321
|
};
|
|
259
322
|
}
|
|
260
|
-
}, [authUserId, buildCloudBillingUrl, loadAccountProfileSummary,
|
|
323
|
+
}, [authUserId, buildCloudBillingUrl, loadAccountProfileSummary, queryIntervalValue, queryPlanId, queryPlanVersionId]);
|
|
261
324
|
const openBillingPortal = useCallback(async () => {
|
|
262
325
|
if (!isAuthenticated) {
|
|
263
326
|
navigate(`/login?mode=login&next=${encodeURIComponent(buildEmbeddedPlansPath())}`);
|
|
264
327
|
return;
|
|
265
328
|
}
|
|
266
329
|
setActionBusy(true);
|
|
267
|
-
setFeedback(
|
|
330
|
+
setFeedback({ type: 'info', message: 'Opening billing portal...' });
|
|
268
331
|
try {
|
|
269
332
|
const res = await fetch(buildCloudBillingUrl('/api/taskforce/billing/portal-session'), {
|
|
270
333
|
method: 'POST',
|
|
@@ -289,6 +352,17 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
289
352
|
setActionBusy(false);
|
|
290
353
|
}
|
|
291
354
|
}, [buildCloudBillingUrl, isAuthenticated, navigate]);
|
|
355
|
+
const handleContinueToTaskforce = useCallback(async () => {
|
|
356
|
+
if (!onContinueToTaskforce || continueActionBusy || continueBusy)
|
|
357
|
+
return;
|
|
358
|
+
setContinueActionBusy(true);
|
|
359
|
+
try {
|
|
360
|
+
await onContinueToTaskforce();
|
|
361
|
+
}
|
|
362
|
+
finally {
|
|
363
|
+
setContinueActionBusy(false);
|
|
364
|
+
}
|
|
365
|
+
}, [continueActionBusy, continueBusy, onContinueToTaskforce]);
|
|
292
366
|
useEffect(() => {
|
|
293
367
|
void loadAccountProfileSummary();
|
|
294
368
|
}, [loadAccountProfileSummary]);
|
|
@@ -306,7 +380,7 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
306
380
|
}, []);
|
|
307
381
|
useEffect(() => {
|
|
308
382
|
if (checkoutState !== 'success') {
|
|
309
|
-
|
|
383
|
+
checkoutSuccessSettledRef.current = null;
|
|
310
384
|
}
|
|
311
385
|
}, [checkoutState]);
|
|
312
386
|
useEffect(() => {
|
|
@@ -326,7 +400,8 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
326
400
|
if (checkoutState === 'success') {
|
|
327
401
|
checkoutStartRan.current = true;
|
|
328
402
|
setFeedback({ type: 'success', message: 'Checkout completed successfully. Finalizing your plan...' });
|
|
329
|
-
|
|
403
|
+
const shouldWaitForAuthBootstrap = !isAuthenticated && !authSessionResolved;
|
|
404
|
+
if (shouldWaitForAuthBootstrap) {
|
|
330
405
|
return () => {
|
|
331
406
|
cancelled = true;
|
|
332
407
|
pendingRetryTimeouts.forEach((timeoutId) => window.clearTimeout(timeoutId));
|
|
@@ -342,33 +417,40 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
342
417
|
};
|
|
343
418
|
}
|
|
344
419
|
const successFlowKey = querySessionId || '__missing_session__';
|
|
345
|
-
if (
|
|
420
|
+
if (checkoutSuccessSettledRef.current === successFlowKey) {
|
|
346
421
|
return () => {
|
|
347
422
|
cancelled = true;
|
|
348
423
|
pendingRetryTimeouts.forEach((timeoutId) => window.clearTimeout(timeoutId));
|
|
349
424
|
pendingRetryTimeouts.clear();
|
|
350
425
|
};
|
|
351
426
|
}
|
|
352
|
-
checkoutSuccessHandledRef.current = successFlowKey;
|
|
353
427
|
void (async () => {
|
|
428
|
+
const autoConfirmStartedAt = Date.now();
|
|
354
429
|
const preConfirmationSummary = await loadAccountProfileSummary({ force: true });
|
|
355
430
|
if (cancelled)
|
|
356
431
|
return;
|
|
357
432
|
let confirmation = querySessionId
|
|
358
433
|
? { confirmed: false, errorMessage: 'Unable to confirm checkout completion.', retryable: true }
|
|
359
434
|
: { confirmed: false, errorMessage: 'Checkout session is missing.', retryable: false };
|
|
360
|
-
|
|
435
|
+
let attemptIndex = 0;
|
|
436
|
+
while (true) {
|
|
437
|
+
const delayMs = attemptIndex < CHECKOUT_CONFIRM_INITIAL_RETRY_DELAYS_MS.length
|
|
438
|
+
? CHECKOUT_CONFIRM_INITIAL_RETRY_DELAYS_MS[attemptIndex]
|
|
439
|
+
: CHECKOUT_CONFIRM_RETRY_INTERVAL_MS;
|
|
440
|
+
attemptIndex += 1;
|
|
361
441
|
await waitForRetry(delayMs);
|
|
362
442
|
if (cancelled)
|
|
363
443
|
return;
|
|
364
444
|
confirmation = querySessionId
|
|
365
445
|
? await confirmCheckoutSession(querySessionId, {
|
|
366
|
-
autoContinueOnActivation: shouldAutoContinueAfterActivation(preConfirmationSummary, gateState)
|
|
446
|
+
autoContinueOnActivation: shouldAutoContinueAfterActivation(preConfirmationSummary, gateState),
|
|
447
|
+
preConfirmationSummary
|
|
367
448
|
})
|
|
368
449
|
: { confirmed: false, errorMessage: 'Checkout session is missing.', retryable: false };
|
|
369
450
|
if (cancelled)
|
|
370
451
|
return;
|
|
371
452
|
if (confirmation.confirmed) {
|
|
453
|
+
checkoutSuccessSettledRef.current = successFlowKey;
|
|
372
454
|
setFeedback({ type: 'success', message: 'Checkout completed successfully.' });
|
|
373
455
|
scheduleTransientQueryClear();
|
|
374
456
|
return;
|
|
@@ -376,6 +458,9 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
376
458
|
if (!confirmation.retryable) {
|
|
377
459
|
break;
|
|
378
460
|
}
|
|
461
|
+
if ((Date.now() - autoConfirmStartedAt) >= CHECKOUT_CONFIRM_MAX_AUTO_RETRY_MS) {
|
|
462
|
+
break;
|
|
463
|
+
}
|
|
379
464
|
}
|
|
380
465
|
if (cancelled)
|
|
381
466
|
return;
|
|
@@ -383,11 +468,18 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
383
468
|
const summary = await loadAccountProfileSummary({ force: true });
|
|
384
469
|
if (cancelled)
|
|
385
470
|
return;
|
|
471
|
+
if (!confirmation.retryable) {
|
|
472
|
+
checkoutSuccessSettledRef.current = successFlowKey;
|
|
473
|
+
}
|
|
386
474
|
setFeedback({
|
|
387
475
|
type: 'error',
|
|
388
|
-
message: resolveRecoveryMessage(summary, confirmation.errorMessage
|
|
476
|
+
message: resolveRecoveryMessage(summary, confirmation.errorMessage, {
|
|
477
|
+
preferFallback: !confirmation.retryable
|
|
478
|
+
})
|
|
389
479
|
});
|
|
390
|
-
|
|
480
|
+
if (!confirmation.retryable) {
|
|
481
|
+
scheduleTransientQueryClear();
|
|
482
|
+
}
|
|
391
483
|
return;
|
|
392
484
|
}
|
|
393
485
|
})();
|
|
@@ -464,7 +556,7 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
464
556
|
}, [accountProfileSummary, gateState, isAuthenticated, navigate, openBillingPortal, shouldAutoContinueAfterActivation, startCheckout]);
|
|
465
557
|
const handleBack = useCallback(() => {
|
|
466
558
|
if (hasResolvedActiveEntitlement && onContinueToTaskforce) {
|
|
467
|
-
void
|
|
559
|
+
void handleContinueToTaskforce();
|
|
468
560
|
return;
|
|
469
561
|
}
|
|
470
562
|
if (embedded) {
|
|
@@ -476,9 +568,8 @@ export function PlansPage({ isAuthenticated, authUserId, runtimeMode, authSessio
|
|
|
476
568
|
return;
|
|
477
569
|
}
|
|
478
570
|
navigate('/');
|
|
479
|
-
}, [closeEmbeddedPlansScreen, embedded, hasResolvedActiveEntitlement, navigate, onContinueToTaskforce]);
|
|
480
|
-
const
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
return (_jsx(PlanComparisonPage, { chrome: chrome, heading: "Subscription Plans", subtitle: "Manage your subscription and explore available features. Your current plan is highlighted below.", isAuthenticated: isAuthenticated, authSessionResolved: authSessionResolved, currentPlanId: String(accountProfileSummary?.planId || queryPlanId || '').trim() || null, currentPlanVersionId: String(accountProfileSummary?.planVersionId || queryPlanVersionId || '').trim() || null, currentEntitlementState: String(accountProfileSummary?.entitlementState || '').trim() || null, canManageCurrentPlan: Boolean(accountProfileSummary?.stripeCustomerId), pricingEndpoint: pricingEndpoints[0], statusBanner: feedback, onBack: handleBack, backLabel: hasResolvedActiveEntitlement ? 'Take Me to Taskforce' : (embedded ? 'Back to Board' : 'Back to App'), backDisabled: continueBusy || (isAuthenticated && !hasResolvedActiveEntitlement), topActions: embedded ? topActions : null, shellOwnsScroll: shellOwnsScroll, showPageBackButton: !embedded, fallbackPricingSource: fallbackPricingSource, onSelectPlan: handleSelectPlan }));
|
|
571
|
+
}, [closeEmbeddedPlansScreen, embedded, handleContinueToTaskforce, hasResolvedActiveEntitlement, navigate, onContinueToTaskforce]);
|
|
572
|
+
const headerActions = embedded ? null : (_jsxs(_Fragment, { children: [_jsx("button", { className: styles.navAction, onClick: handleBack, disabled: continueBusy || continueActionBusy || (isAuthenticated && !hasResolvedActiveEntitlement), children: hasResolvedActiveEntitlement ? 'Take Me to Taskforce' : 'Back' }), isAuthenticated && accountProfileSummary?.stripeCustomerId && (_jsx("button", { className: styles.navAction, onClick: () => { void openBillingPortal(); }, disabled: actionBusy, children: "Manage billing" })), !isAuthenticated && (_jsxs("button", { className: styles.navAction, onClick: () => navigate(`/login?mode=login&next=${encodeURIComponent(buildEmbeddedPlansPath())}`), children: [_jsx(User, { size: 16, style: { marginRight: '8px', verticalAlign: 'text-bottom' } }), "Sign In"] }))] }));
|
|
573
|
+
const chrome = embedded ? null : (_jsx(AppShellHeader, { projectName: projectName, currentWorkspaceId: currentWorkspaceId, runtimeMode: runtimeMode === 'cloud' ? 'cloud' : 'local', theme: currentTheme, actions: headerActions }));
|
|
574
|
+
return (_jsx(PlanComparisonPage, { chrome: chrome, heading: "Subscription Plans", subtitle: "Manage your subscription and explore available features. Your current plan is highlighted below.", isAuthenticated: isAuthenticated, authSessionResolved: authSessionResolved, currentPlanId: String(accountProfileSummary?.planId || queryPlanId || '').trim() || null, currentPlanVersionId: String(accountProfileSummary?.planVersionId || queryPlanVersionId || '').trim() || null, currentEntitlementState: String(accountProfileSummary?.entitlementState || '').trim() || null, markCurrentPlan: lifecyclePresentation.markCurrentPlan, canManageCurrentPlan: Boolean(accountProfileSummary?.stripeCustomerId), pricingEndpoint: pricingEndpoint, statusBanner: feedback, onBack: handleBack, backLabel: hasResolvedActiveEntitlement ? 'Take Me to Taskforce' : (embedded ? 'Back to Board' : 'Back to App'), backDisabled: continueBusy || continueActionBusy || (isAuthenticated && !hasResolvedActiveEntitlement), topActions: null, shellOwnsScroll: shellOwnsScroll, showPageBackButton: false, showHeaderBarWithChrome: false, currentPlanCardActionMode: "manage", fallbackPricingSource: fallbackPricingSource, onSelectPlan: handleSelectPlan }));
|
|
484
575
|
}
|