Conversation
…tps://github.com/JesusFilm/core into 25-00-NC-feat-ai-translate-quick-start-templates
- Added .cursorignore to exclude environment files. - Updated .gitignore to include new personal Claude rules and Strapi CMS config files. - Modified .prettierignore to include Kubernetes manifests. - Updated package.json with new dependencies and version upgrades. - Added new rules and guidelines for backend, frontend, and infrastructure in .claude directory. - Updated workflows to improve dependency installation and notifications. - Adjusted TypeScript configuration for better module resolution.
…put structure - Replaced instances of generateObject with generateText in translation logic. - Adjusted mock implementations and test cases to reflect the new function usage. - Updated return values to align with the new Output structure in the translation schema. - Enhanced error handling in LanguageScreen for guest and signed-in users during journey duplication.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughSwitches AI calls to generateText/streamText with Output wrappers, adds translateCustomizationFields (implementation + tests), changes streamed block validation/update flow, includes customization fields in queries/subscriptions/cache, adds AI translation UI and language selection, and upgrades Gemini model + SDK versions. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant UI as Admin UI
participant Sub as Translate Subscription
participant API as journeyAiTranslate API
participant AI as Gemini AI
participant DB as Database
participant Cache as Apollo Cache
User->>UI: Enable "Translate with AI" + pick language
UI->>UI: Duplicate journey (if signed-in)
UI->>Sub: Start translation subscription (includes userLanguageName/Id)
Sub->>API: Run translation flow
API->>AI: generateText (metadata & customization fields)
AI-->>API: Output.object/array (translated metadata/fields)
API->>AI: streamText (elementStream for blocks)
AI-->>API: Streamed block translation elements (elementStream)
API->>DB: Update blocks & customization fields (per-item, validated)
DB-->>API: Confirm updates
API->>Sub: Emit progress updates + final journey
Sub->>Cache: writeFragment (journey + customization fields)
Cache-->>Sub: Cache updated
Sub->>UI: Notify completion
UI->>User: Show success & continue
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
💰 Infracost reportMonthly estimate increased by $155 📈
*Usage costs can be estimated by updating Infracost Cloud settings, see docs for other options. Estimate details (includes details of unsupported resources) |
|
Ran Plan for dir: Show OutputTerraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
- destroy
+/- create replacement and then destroy
Terraform will perform the following actions:
# module.prod.module.api-analytics.module.ecs-task.aws_ecs_service.ecs_service will be updated in-place
~ resource "aws_ecs_service" "ecs_service" {
id = "arn:aws:ecs:us-east-2:410965620680:service/jfp-ecs-cluster-prod/api-analytics-prod-service"
name = "api-analytics-prod-service"
tags = {}
~ task_definition = "arn:aws:ecs:us-east-2:410965620680:task-definition/jfp-api-analytics-prod:9" -> (known after apply)
# (18 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
# module.prod.module.api-analytics.module.ecs-task.aws_ecs_task_definition.ecs_task_definition must be replaced
+/- resource "aws_ecs_task_definition" "ecs_task_definition" {
~ arn = "arn:aws:ecs:us-east-2:410965620680:task-definition/jfp-api-analytics-prod:9" -> (known after apply)
~ arn_without_revision = "arn:aws:ecs:us-east-2:410965620680:task-definition/jfp-api-analytics-prod" -> (known after apply)
~ container_definitions = jsonencode(
~ [
~ {
name = "jfp-api-analytics-prod-app"
~ secrets = [
+ {
+ name = "DD_API_KEY"
+ valueFrom = "arn:aws:ssm:us-east-2:410965620680:parameter/terraform/prd/DATADOG_API_KEY"
},
{
name = "GATEWAY_HMAC_SECRET"
valueFrom = "arn:aws:ssm:us-east-2:410965620680:parameter/ecs/api-analytics/prod/GATEWAY_HMAC_SECRET"
},
# (1 unchanged element hidden)
{
name = "PLAUSIBLE_SECRET_KEY_BASE"
valueFrom = "arn:aws:ssm:us-east-2:410965620680:parameter/ecs/api-analytics/prod/PLAUSIBLE_SECRET_KEY_BASE"
},
- {
- name = "PRISMA_LOCATION_ANALYTICS"
- valueFrom = "arn:aws:ssm:us-east-2:410965620680:parameter/ecs/api-analytics/prod/PRISMA_LOCATION_ANALYTICS"
},
- {
- name = "DD_API_KEY"
- valueFrom = "arn:aws:ssm:us-east-2:410965620680:parameter/terraform/prd/DATADOG_API_KEY"
},
]
- systemControls = []
# (9 unchanged attributes hidden)
},
~ {
- cpu = 0
name = "jfp-api-analytics-prod-datadog-agent"
- systemControls = []
# (9 unchanged attributes hidden)
},
~ {
- cpu = 0
name = "jfp-api-analytics-prod-log-router"
- systemControls = []
# (10 unchanged attributes hidden)
},
] # forces replacement
)
~ enable_fault_injection = false -> (known after apply)
~ id = "jfp-api-analytics-prod" -> (known after apply)
~ revision = 9 -> (known after apply)
- tags = {} -> null
~ tags_all = {} -> (known after apply)
# (12 unchanged attributes hidden)
}
# module.prod.module.api-analytics.module.ecs-task.aws_ssm_parameter.parameters["PRISMA_LOCATION_ANALYTICS"] will be destroyed
# (because key ["PRISMA_LOCATION_ANALYTICS"] is not in for_each map)
- resource "aws_ssm_parameter" "parameters" {
- arn = "arn:aws:ssm:us-east-2:410965620680:parameter/ecs/api-analytics/prod/PRISMA_LOCATION_ANALYTICS" -> null
- data_type = "text" -> null
- id = "/ecs/api-analytics/prod/PRISMA_LOCATION_ANALYTICS" -> null
- key_id = "alias/aws/ssm" -> null
- name = "/ecs/api-analytics/prod/PRISMA_LOCATION_ANALYTICS" -> null
- overwrite = true -> null
- region = "us-east-2" -> null
- tags = {
- "name" = "PRISMA_LOCATION_ANALYTICS"
} -> null
- tags_all = {
- "name" = "PRISMA_LOCATION_ANALYTICS"
} -> null
- tier = "Standard" -> null
- type = "SecureString" -> null
- value = (sensitive value) -> null
- value_wo = (write-only attribute) -> null
- version = 3 -> null
# (2 unchanged attributes hidden)
}
# module.prod.module.api-media.module.ecs-task.aws_appautoscaling_target.service_autoscaling will be updated in-place
~ resource "aws_appautoscaling_target" "service_autoscaling" {
id = "service/jfp-ecs-cluster-prod/api-media-prod-service"
~ min_capacity = 2 -> 1
tags = {}
# (8 unchanged attributes hidden)
# (1 unchanged block hidden)
}
# module.prod.module.api-media.module.ecs-task.aws_ecs_service.ecs_service will be updated in-place
~ resource "aws_ecs_service" "ecs_service" {
~ desired_count = 2 -> 1
id = "arn:aws:ecs:us-east-2:410965620680:service/jfp-ecs-cluster-prod/api-media-prod-service"
name = "api-media-prod-service"
tags = {}
# (18 unchanged attributes hidden)
# (5 unchanged blocks hidden)
}
# module.prod.module.arclight.module.ecs-task.aws_ecs_service.ecs_service will be updated in-place
~ resource "aws_ecs_service" "ecs_service" {
~ desired_count = 1 -> 2
id = "arn:aws:ecs:us-east-2:410965620680:service/jfp-ecs-cluster-prod/arclight-prod-service"
name = "arclight-prod-service"
tags = {}
# (18 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
# module.stage.module.api-users.module.ecs-task.aws_ecs_service.ecs_service will be updated in-place
~ resource "aws_ecs_service" "ecs_service" {
id = "arn:aws:ecs:us-east-2:410965620680:service/jfp-ecs-cluster-stage/api-users-stage-service"
name = "api-users-stage-service"
tags = {}
~ task_definition = "arn:aws:ecs:us-east-2:410965620680:task-definition/jfp-api-users-stage:44" -> (known after apply)
# (18 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
# module.stage.module.api-users.module.ecs-task.aws_ecs_task_definition.ecs_task_definition must be replaced
+/- resource "aws_ecs_task_definition" "ecs_task_definition" {
~ arn = "arn:aws:ecs:us-east-2:410965620680:task-definition/jfp-api-users-stage:44" -> (known after apply)
~ arn_without_revision = "arn:aws:ecs:us-east-2:410965620680:task-definition/jfp-api-users-stage" -> (known after apply)
~ container_definitions = jsonencode(
~ [
~ {
name = "jfp-api-users-stage-app"
~ secrets = [
# (4 unchanged elements hidden)
{
name = "GATEWAY_HMAC_SECRET"
valueFrom = "arn:aws:ssm:us-east-2:410965620680:parameter/ecs/api-users/stage/GATEWAY_HMAC_SECRET"
},
- {
- name = "GATEWAY_URL"
- valueFrom = "arn:aws:ssm:us-east-2:410965620680:parameter/ecs/api-users/stage/GATEWAY_URL"
},
{
name = "GOOGLE_APPLICATION_JSON"
valueFrom = "arn:aws:ssm:us-east-2:410965620680:parameter/ecs/api-users/stage/GOOGLE_APPLICATION_JSON"
},
# (8 unchanged elements hidden)
]
- systemControls = []
# (9 unchanged attributes hidden)
},
~ {
name = "jfp-api-users-stage-datadog-agent"
- systemControls = []
# (9 unchanged attributes hidden)
},
~ {
name = "jfp-api-users-stage-log-router"
- systemControls = []
# (10 unchanged attributes hidden)
},
] # forces replacement
)
~ enable_fault_injection = false -> (known after apply)
~ id = "jfp-api-users-stage" -> (known after apply)
~ revision = 44 -> (known after apply)
- tags = {} -> null
~ tags_all = {} -> (known after apply)
# (12 unchanged attributes hidden)
}
# module.stage.module.api-users.module.ecs-task.aws_ssm_parameter.parameters["GATEWAY_URL"] will be destroyed
# (because key ["GATEWAY_URL"] is not in for_each map)
- resource "aws_ssm_parameter" "parameters" {
- arn = "arn:aws:ssm:us-east-2:410965620680:parameter/ecs/api-users/stage/GATEWAY_URL" -> null
- data_type = "text" -> null
- has_value_wo = false -> null
- id = "/ecs/api-users/stage/GATEWAY_URL" -> null
- key_id = "alias/aws/ssm" -> null
- name = "/ecs/api-users/stage/GATEWAY_URL" -> null
- overwrite = true -> null
- region = "us-east-2" -> null
- tags = {
- "name" = "GATEWAY_URL"
} -> null
- tags_all = {
- "name" = "GATEWAY_URL"
} -> null
- tier = "Standard" -> null
- type = "SecureString" -> null
- value = (sensitive value) -> null
- value_wo = (write-only attribute) -> null
- version = 3 -> null
# (2 unchanged attributes hidden)
}
Plan: 2 to add, 5 to change, 4 to destroy.
╷
│ Warning: Deprecated Resource
│
│ with module.datadog.datadog_integration_aws.sandbox,
│ on modules/aws/datadog/main.tf line 118, in resource "datadog_integration_aws" "sandbox":
│ 118: resource "datadog_integration_aws" "sandbox" {
│
│ **This resource is deprecated - use the `datadog_integration_aws_account`
│ resource instead**:
│ https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/integration_aws_account
╵
╷
│ Warning: Deprecated attribute
│
│ on .terraform/modules/datadog.datadog_log_forwarder/modules/log_forwarder/main.tf line 2, in locals:
│ 2: bucket_name = var.bucket_name != "" ? var.bucket_name : "datadog-forwarder-${data.aws_caller_identity.current.account_id}-${data.aws_region.current.name}"
│
│ The attribute "name" is deprecated. Refer to the provider documentation for
│ details.
│
│ (and 2 more similar warnings elsewhere)
╵
Plan: 2 to add, 5 to change, 4 to destroy.
|
… screens - Added loading states to the Next and Done buttons in various screens (DoneScreen, LanguageScreen, LinksScreen, MediaScreen, SocialScreen, TextScreen) to enhance user experience during asynchronous operations. - Updated button components to reflect loading states and prevent multiple submissions. - Ensured that loading states are properly managed in the component state for better UI feedback.
- Removed dotenv and prisma from package.json as they are no longer needed in the project.
|
View your CI Pipeline Execution ↗ for commit 8300c61
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit c052613
☁️ Nx Cloud last updated this comment at |
… tracking This commit updates the LanguageScreen component to improve team selection functionality for users. It introduces logic to set the last active team ID and ensures that the team selection reflects the user's current context. Additionally, it modifies the JourneyCustomizeTeamSelect component to streamline team selection handling. The changes enhance the user experience by providing better team management and integration with the journey duplication process.
This commit enhances the LanguageScreen component by integrating the `journeyCustomizationDescriptionTranslate` mutation. It adds logic to automatically translate the journey description when the user's locale differs from the selected journey language during the duplication process. This improvement streamlines the user experience and ensures accurate localization of journey descriptions.
This commit updates the LanguageScreen component to include error handling for the description translation process. It ensures that navigation is not blocked if the translation fails, improving the user experience during journey duplication.
This comment has been minimized.
This comment has been minimized.
|
I see you added the "on stage" label, I'll get this merged to the stage branch! |
|
Merge conflict attempting to merge this into stage. Please fix manually. |
…ation handling This commit modifies the quickStartTemplate function to accept a reset action, allowing for improved customization of journey templates. It enhances the customization description with additional fields and updates the creation of customization fields to use createMany for efficiency. Additionally, it refines the handling of curly braces in translation processes to ensure accurate preservation of template variables. These changes streamline the journey creation process and improve localization capabilities.
This update modifies the `resolveJourneyCustomizationString` function to support both "{{ key }}" and "{{ key: value }}" syntaxes. It allows for inline values to be resolved when no matching field exists, improving the flexibility of customization templates. Additionally, test cases have been updated to reflect these changes, ensuring accurate resolution of both quoted and unquoted inline values.
|
Merge conflict attempting to merge this into stage. Please fix manually. |
This update clarifies the translation instructions by removing redundant examples and emphasizing the importance of preserving template variables within curly braces. The changes aim to enhance the understanding of translation processes while maintaining cultural appropriateness and conciseness in UI contexts.
|
Merge conflict attempting to merge this into stage. Please fix manually. |
This update introduces the `translateValue` function to handle the translation of customization field values alongside the journey customization description. It modifies the `journeyCustomizationDescriptionTranslate` mutation to include logic for translating field values when a description is absent or empty. Additionally, the schema has been updated to include `journeyCustomizationFields` in relevant queries, improving the overall translation capabilities for journey customizations.
…ation This update modifies the `videoPublishChildren` mutation to include additional parameters: `mode` and `dryRun`, allowing for more flexible publishing options. The result type has been updated to reflect changes in published video IDs and counts, and a new type for unpublished videos has been introduced to handle validation failures. Additionally, the `videoPublishChildrenAndLanguages` mutation has been removed to streamline the API. Tests have been updated accordingly to ensure proper functionality.
… videoPublishChildren types This update removes the `videoPublishChildrenAndLanguages` mutation to simplify the API. The `videoPublishChildren` mutation has been enhanced with new parameters: `mode` and `dryRun`, and the result type has been updated to include additional fields for published videos and validation failures. A new type for unpublished videos has also been introduced, improving error handling during the publishing process.
|
Merge conflict attempting to merge this into stage. Please fix manually. |
|
Merge conflict attempting to merge this into stage. Please fix manually. |
This comment has been minimized.
This comment has been minimized.
- Introduced batch translation for customization fields and descriptions to improve efficiency. - Updated translation prompts to ensure cultural appropriateness and preserve specific formats. - Refactored translation logic to handle multiple values in a single AI call, reducing the number of requests. - Added new schemas for batch translation responses and improved error handling in translation processes.
Summary by CodeRabbit
New Features
Improvements
Tests
Localization