Skip to content

feat: update internal video languages#6791

Closed
edmonday wants to merge 31 commits into
mainfrom
edmondshen/nes-62-auto-update-arclight-video-langauge
Closed

feat: update internal video languages#6791
edmonday wants to merge 31 commits into
mainfrom
edmondshen/nes-62-auto-update-arclight-video-langauge

Conversation

@edmonday
Copy link
Copy Markdown
Contributor

@edmonday edmonday commented Jun 3, 2025

This PR adds the option to be able to update the video language of all internal arclight videos when translating.

Summary by CodeRabbit

  • New Features

    • Added support for selecting a separate video language when translating or duplicating journeys, allowing video content to be translated independently from journey text.
    • Introduced a new language selection interface for video languages in relevant dialogs and forms.
  • Enhancements

    • Improved journey duplication and translation flows to include video language selection and handling.
    • Added a new hook to determine common supported video languages across all videos in a journey.
  • Bug Fixes

    • Updated language query invocations to use a consistent structure for passing variables.
  • Tests

    • Expanded and added tests to cover video language selection and translation scenarios.
  • Documentation

    • Updated documentation to reflect new usage of supported language IDs and video language features.

@linear
Copy link
Copy Markdown

linear Bot commented Jun 3, 2025

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (12)
  • apis/api-analytics/src/__generated__/graphql-env.d.ts is excluded by !**/__generated__/**
  • apis/api-journeys-modern/src/__generated__/graphql-env.d.ts is excluded by !**/__generated__/**
  • apis/api-journeys/src/__generated__/graphql.ts is excluded by !**/__generated__/**
  • apis/api-languages/src/__generated__/graphql-env.d.ts is excluded by !**/__generated__/**
  • apis/api-media/src/__generated__/graphql-gateway-env.d.ts is excluded by !**/__generated__/**
  • apps/arclight/src/__generated__/graphql-env.d.ts is excluded by !**/__generated__/**
  • apps/journeys-admin/__generated__/JourneyAiTranslateCreate.ts is excluded by !**/__generated__/**
  • apps/journeys/__generated__/JourneyAiTranslateCreate.ts is excluded by !**/__generated__/**
  • apps/short-links/src/__generated__/graphql-env.d.ts is excluded by !**/__generated__/**
  • apps/videos-admin/src/__generated__/graphql-env.d.ts is excluded by !**/__generated__/**
  • apps/watch/__generated__/JourneyAiTranslateCreate.ts is excluded by !**/__generated__/**
  • libs/journeys/ui/src/libs/useJourneyAiTranslateMutation/__generated__/JourneyAiTranslateCreate.ts is excluded by !**/__generated__/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

## Walkthrough

This change introduces support for selecting and applying a video language variant during the journey AI translation and duplication flows. It adds an optional `videoLanguageId` field to relevant GraphQL schemas, updates backend mutation logic, enhances UI components to allow separate journey and video language selection, and implements a new hook to determine common video variant languages across journey videos.

## Changes

| Files/Areas                                                                                                                                      | Change Summary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|--------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `apis/api-gateway/schema.graphql`, `apis/api-journeys-modern/schema.graphql`                                                                     | Added optional field `videoLanguageId: ID` to `JourneyAiTranslateInput` input type.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `apis/api-journeys-modern/src/schema/journeyAiTranslate/journeyAiTranslate.ts`                                                                  | Extended mutation to accept `videoLanguageId` and update all internal video blocks' language variant if provided.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `libs/journeys/ui/src/libs/useJourneyAiTranslateMutation/useJourneyAiTranslateMutation.ts`                                                      | Updated GraphQL mutation to include optional `videoLanguageId` variable in input.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `libs/journeys/ui/src/libs/useJourneyDuplicateAndTranslate/useJourneyDuplicateAndTranslate.ts`                                                  | Added `selectedVideoLanguage` to props and mutation variables for translation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/` (all files)                                                                         | Introduced new hook (`useCommonVideoVariantLanguages`), queries, tests, and mocks to determine common video variant languages across a journey's internal videos.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `libs/journeys/ui/src/components/CopyToTeamDialog/CopyToTeamDialog.tsx`                                                                         | Enhanced dialog to support video language selection, updated form state, props, validation, and UI to include a second language autocomplete for video language.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardMenu/TranslateJourneyDialog/TranslateJourneyDialog.tsx`                  | Enhanced dialog to support selecting both journey and video languages; integrated new hook and updated translation handler.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `apps/journeys-admin/src/components/Team/CopyToTeamMenuItem/CopyToTeamMenuItem.tsx`                                                            | Enhanced to support video language selection in duplication flow; updated handler and dialog props.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardMenu/TranslateJourneyDialog/TranslateJourneyDialog.spec.tsx`,<br>`apps/journeys-admin/src/components/Team/CopyToTeamMenuItem/CopyToTeamMenuItem.spec.tsx` | Updated tests to handle video language selection, added mocks for video languages, and verified UI/logic for both language selectors.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `libs/journeys/ui/src/libs/useLanguagesQuery/useLanguagesQuery.ts`,<br>`libs/journeys/ui/src/libs/useLanguagesQuery/useLanguagesQuery.spec.tsx`,<br>`libs/journeys/ui/src/components/TemplateGallery/HeaderAndLanguageFilter/HeaderAndLanguageFilter.tsx`,<br>`apps/journeys-admin/src/components/Editor/Toolbar/Items/TemplateSettingsItem/TemplateSettingsDialog/MetadataTabPanel/MetadataTabPanel.tsx`,<br>`apps/journeys-admin/src/components/Editor/Toolbar/JourneyDetails/JourneyDetailsDialog/JourneyDetailsDialog.tsx`,<br>`apps/videos-admin/src/app/(dashboard)/videos/[videoId]/audio/add/page.tsx`,<br>`apps/videos-admin/src/components/FormLanguageSelect/FormLanguageSelect.tsx` | Changed usage of `useLanguagesQuery` to accept a full options object (including `variables`), updated all call sites and related tests accordingly.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `libs/journeys/ui/src/libs/useJourneyAiTranslateMutation/supportedLanguages.ts`                                                                 | Updated documentation comment to mention usage in new video variant language hook.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `libs/locales/en/apps-journeys-admin.json`, `libs/locales/en/libs-journeys-ui.json`                                                              | Added and renamed localization keys for "Select Journey Language" and "Select Video Language" used in UI components.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `libs/journeys/ui/src/components/TemplateView/CreateJourneyButton/CreateJourneyButton.tsx`                                                      | Updated `handleCreateJourney` to accept optional `selectedVideoLanguage` parameter for duplication and translation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant UI (Dialog)
    participant useCommonVideoVariantLanguages
    participant Backend (API)
    participant DB

    User->>UI (Dialog): Open Translate or Duplicate Dialog
    UI (Dialog)->>useCommonVideoVariantLanguages: Fetch common video languages for journey
    useCommonVideoVariantLanguages->>Backend (API): Query journey's internal videos
    Backend (API)->>DB: Get journey blocks
    DB-->>Backend (API): Return video blocks
    Backend (API)-->>useCommonVideoVariantLanguages: Return video block data
    useCommonVideoVariantLanguages->>Backend (API): Query video variant languages for videos
    Backend (API)->>DB: Get video variant languages
    DB-->>Backend (API): Return language variants
    Backend (API)-->>useCommonVideoVariantLanguages: Return variant languages
    useCommonVideoVariantLanguages->>UI (Dialog): Provide common languages
    User->>UI (Dialog): Select journey and video language, submit
    UI (Dialog)->>Backend (API): Call mutation with journeyLanguageId and videoLanguageId
    Backend (API)->>DB: Update journey translation and video block language variants
    DB-->>Backend (API): Confirm updates
    Backend (API)-->>UI (Dialog): Return success
    UI (Dialog)-->>User: Show confirmation

Possibly related PRs

  • JesusFilm/core#6543: Introduces the initial AI translation dialog and UI components; this PR extends that functionality by adding video language support.
  • JesusFilm/core#6742: Introduces the initial journeyAiTranslateCreate mutation and schema types; this PR builds upon it by adding videoLanguageId and video block updates.

Suggested reviewers

  • mikeallisonJS
  • edmonday

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAMxJqLmxuWmoPeAwaCgw0Xwl4JXxIL0wibDRSRGjIAHc0ZAcBZnUaejkw2A9sREpIOmZ8DFT5eus7DEcBXoA2AHYATgBGDRhOzwpufB7+WI7UWxRkAnRaeljsDDF4Qdz1eVxYanQffBrkZNTxDCIOj3zC4qlcqkHbPXwZLI5XwAQQoDC88CIsFC/xIW0gtGwFAyPweHlwVAwiBK4kGPAo+AY0kQKzgqDIj0uJDYmT6OQEkRkJFwWUgzEwFWZ7HQQwURKQNEu8nwu1RRRK32BHh6PJxyBq6gQWDxKEylChkFh8MRyMgcvsskQNGYtLWBwYmEgUz8JHyJBqUSeOti+BeGu+kAAqjYADJcZG4biIDgAehjRE12AEGiYzBjAClpN0AGLwLxppj+GPcbxeGNzJYaIz6YzgKBkegynAEYhkZStBSsdhcXj8YSicRSGTyJhKKiqdRaHQ1kxQOnIVCOtB4Qikch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DqfaAMXrL8Zl/hLeUv034zIp8WCzBjk6XhgIZhi/1fLPhmAb0Z5y+LAGAiweT7J+y8XfYgiwCOrsHE9cf6CPHvjwJ/dB0BOJDYOz0AA=== -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details>
<summary>✨ Finishing Touches</summary>

<details>
<summary>🧪 Generate unit tests</summary>

- [ ] <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} -->   Create PR with unit tests
- [ ] <!-- {"checkboxId": "07f1e7d6-8a8e-4e23-9900-8731c2c87f58", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} -->   Post copyable unit tests in a comment
- [ ] <!-- {"checkboxId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} -->   Commit unit tests in branch `edmondshen/nes-62-auto-update-arclight-video-langauge`

</details>

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=JesusFilm/core&utm_content=6791):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai generate unit tests` to generate unit tests for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@edmonday edmonday self-assigned this Jun 3, 2025
@edmonday edmonday requested a review from mikeallisonJS June 3, 2025 02:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2025

Warnings
⚠️ ❗ Big PR (2205 changes)

(change count - 2205): Pull Request size seems relatively large. If Pull Request contains multiple changes, split each into separate PR will helps faster, easier review.

Generated by 🚫 dangerJS against 4eddda0

@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin June 3, 2025 02:36 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch June 3, 2025 02:36 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin June 3, 2025 02:36 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys June 3, 2025 02:36 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2025

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys ✅ Ready journeys preview Wed Jun 4 10:50:53 NZST 2025

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2025

The latest updates on your projects.

Name Status Preview Updated (UTC)
watch ✅ Ready watch preview Wed Jun 4 10:51:20 NZST 2025

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2025

The latest updates on your projects.

Name Status Preview Updated (UTC)
videos-admin ✅ Ready videos-admin preview Wed Jun 4 10:51:37 NZST 2025

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2025

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys-admin ✅ Ready journeys-admin preview Wed Jun 4 10:51:55 NZST 2025

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
apis/api-journeys-modern/src/schema/journeyAiTranslate/journeyAiTranslate.ts (1)

167-179: Well-implemented video language update logic.

The implementation correctly:

  • Uses conditional execution only when videoLanguageId is provided
  • Efficiently updates multiple blocks with updateMany
  • Properly filters by journey, block type, and source
  • Follows the existing code patterns in the file

Consider adding validation to ensure the videoLanguageId exists before the update operation, though this might be handled at the GraphQL schema level.

+        // Validate that the video language exists
+        if (input.videoLanguageId) {
+          const videoLanguage = await prisma.language.findUnique({
+            where: { id: input.videoLanguageId }
+          })
+          if (!videoLanguage) {
+            throw new GraphQLError('Video language not found', {
+              extensions: { code: 'NOT_FOUND' }
+            })
+          }
+        }
+
         // Update video blocks' videoVariantLanguageId if videoLanguageId is provided
         if (input.videoLanguageId) {
libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.mock.ts (2)

15-73: Languages Mock Coverage
The languagesMock accurately simulates the GET_LANGUAGES query and its response shape. For closer fidelity to Apollo’s cache normalization, consider adding a __typename: 'Language' property on each language entry in the array.


134-198: Video Variant Languages Mock
The videosVariantLanguagesMock covers both overlapping and unique language sets across multiple videos. To mirror typical GraphQL responses and avoid potential cache mismatches, you may want to include __typename on the top-level videos, each variant, each item in variants, and the nested language objects.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 71f579d and 26a2596.

⛔ Files ignored due to path filters (6)
  • apps/journeys-admin/__generated__/GetJourneyInternalVideos.ts is excluded by !**/__generated__/**
  • apps/journeys-admin/__generated__/GetVideosVariantLanguages.ts is excluded by !**/__generated__/**
  • apps/journeys-admin/__generated__/JourneyAiTranslateCreate.ts is excluded by !**/__generated__/**
  • libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/__generated__/GetJourneyInternalVideos.ts is excluded by !**/__generated__/**
  • libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/__generated__/GetVideosVariantLanguages.ts is excluded by !**/__generated__/**
  • libs/journeys/ui/src/libs/useJourneyAiTranslateMutation/__generated__/JourneyAiTranslateCreate.ts is excluded by !**/__generated__/**
📒 Files selected for processing (22)
  • apis/api-gateway/schema.graphql (1 hunks)
  • apis/api-journeys-modern/schema.graphql (1 hunks)
  • apis/api-journeys-modern/src/schema/journeyAiTranslate/journeyAiTranslate.ts (3 hunks)
  • apps/journeys-admin/src/components/Editor/Toolbar/Items/TemplateSettingsItem/TemplateSettingsDialog/MetadataTabPanel/MetadataTabPanel.tsx (1 hunks)
  • apps/journeys-admin/src/components/Editor/Toolbar/JourneyDetails/JourneyDetailsDialog/JourneyDetailsDialog.tsx (1 hunks)
  • apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardMenu/TranslateJourneyDialog/TranslateJourneyDialog.spec.tsx (6 hunks)
  • apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardMenu/TranslateJourneyDialog/TranslateJourneyDialog.tsx (6 hunks)
  • apps/journeys-admin/src/components/Team/CopyToTeamMenuItem/CopyToTeamMenuItem.spec.tsx (8 hunks)
  • apps/journeys-admin/src/components/Team/CopyToTeamMenuItem/CopyToTeamMenuItem.tsx (4 hunks)
  • apps/videos-admin/src/app/(dashboard)/videos/[videoId]/audio/add/page.tsx (1 hunks)
  • apps/videos-admin/src/components/FormLanguageSelect/FormLanguageSelect.tsx (1 hunks)
  • libs/journeys/ui/src/components/CopyToTeamDialog/CopyToTeamDialog.tsx (6 hunks)
  • libs/journeys/ui/src/components/TemplateGallery/HeaderAndLanguageFilter/HeaderAndLanguageFilter.tsx (1 hunks)
  • libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/index.ts (1 hunks)
  • libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.mock.ts (1 hunks)
  • libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.spec.tsx (1 hunks)
  • libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.ts (1 hunks)
  • libs/journeys/ui/src/libs/useJourneyAiTranslateMutation/supportedLanguages.ts (1 hunks)
  • libs/journeys/ui/src/libs/useJourneyAiTranslateMutation/useJourneyAiTranslateMutation.ts (2 hunks)
  • libs/journeys/ui/src/libs/useJourneyDuplicateAndTranslate/useJourneyDuplicateAndTranslate.ts (3 hunks)
  • libs/journeys/ui/src/libs/useLanguagesQuery/useLanguagesQuery.spec.tsx (2 hunks)
  • libs/journeys/ui/src/libs/useLanguagesQuery/useLanguagesQuery.ts (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (7)
apps/journeys-admin/src/components/Editor/Toolbar/Items/TemplateSettingsItem/TemplateSettingsDialog/MetadataTabPanel/MetadataTabPanel.tsx (1)
libs/journeys/ui/src/libs/useLanguagesQuery/useLanguagesQuery.ts (1)
  • useLanguagesQuery (21-29)
apps/journeys-admin/src/components/Editor/Toolbar/JourneyDetails/JourneyDetailsDialog/JourneyDetailsDialog.tsx (1)
libs/journeys/ui/src/libs/useLanguagesQuery/useLanguagesQuery.ts (1)
  • useLanguagesQuery (21-29)
apps/videos-admin/src/components/FormLanguageSelect/FormLanguageSelect.tsx (1)
libs/journeys/ui/src/libs/useLanguagesQuery/useLanguagesQuery.ts (1)
  • useLanguagesQuery (21-29)
libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.spec.tsx (2)
libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.ts (1)
  • useCommonVideoVariantLanguages (49-119)
libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.mock.ts (6)
  • journey (9-13)
  • journeyInternalVideosMock (76-110)
  • videosVariantLanguagesMock (134-198)
  • languagesMock (15-74)
  • journeyInternalWithoutVideosMock (112-132)
  • videosVariantLanguagesWithoutVideosMock (200-212)
libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.ts (4)
libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/__generated__/GetJourneyInternalVideos.ts (2)
  • GetJourneyInternalVideos (47-49)
  • GetJourneyInternalVideosVariables (51-53)
libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/__generated__/GetVideosVariantLanguages.ts (2)
  • GetVideosVariantLanguages (32-34)
  • GetVideosVariantLanguagesVariables (36-38)
libs/journeys/ui/src/libs/useJourneyAiTranslateMutation/supportedLanguages.ts (1)
  • SUPPORTED_LANGUAGE_IDS (15-62)
libs/journeys/ui/src/libs/useLanguagesQuery/useLanguagesQuery.ts (1)
  • useLanguagesQuery (21-29)
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardMenu/TranslateJourneyDialog/TranslateJourneyDialog.spec.tsx (2)
libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.mock.ts (2)
  • journeyInternalVideosMock (76-110)
  • videosVariantLanguagesMock (134-198)
apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardMenu/TranslateJourneyDialog/TranslateJourneyDialog.tsx (1)
  • TranslateJourneyDialog (48-177)
apps/journeys-admin/src/components/Team/CopyToTeamMenuItem/CopyToTeamMenuItem.spec.tsx (1)
libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.mock.ts (2)
  • journeyInternalVideosMock (76-110)
  • videosVariantLanguagesMock (134-198)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Deploy Preview and Test (journeys-admin, 6791/merge, pull_request, 22)
🔇 Additional comments (73)
apis/api-gateway/schema.graphql (1)

4309-4315: Add optional videoLanguageId to JourneyAiTranslateInput
The new optional field videoLanguageId: ID enables specifying a video language variant in the AI translation mutation. Please verify that the downstream service (API_JOURNEYS_MODERN)’s schema, resolver logic, and generated client types/codegen are updated to accept and propagate this field.

apis/api-journeys-modern/schema.graphql (1)

58-58: LGTM! Well-designed schema extension.

The addition of the optional videoLanguageId field follows good GraphQL practices by maintaining backward compatibility while enabling the new video language selection functionality. The field type and naming convention are consistent with the existing textLanguageId field.

apps/videos-admin/src/components/FormLanguageSelect/FormLanguageSelect.tsx (1)

25-29: LGTM! Good alignment with Apollo Client patterns.

The change to wrap query variables in a variables object aligns the hook with standard Apollo Client conventions and makes it more flexible for accepting additional query options. This is consistent with the updated useLanguagesQuery hook signature shown in the relevant code snippets.

apps/journeys-admin/src/components/Editor/Toolbar/JourneyDetails/JourneyDetailsDialog/JourneyDetailsDialog.tsx (1)

53-57: LGTM! Consistent with the hook signature update.

This change follows the same pattern as other files in the PR, updating the useLanguagesQuery call to wrap variables in a variables object. This maintains consistency with the updated hook signature and Apollo Client conventions.

apps/videos-admin/src/app/(dashboard)/videos/[videoId]/audio/add/page.tsx (1)

73-77: LGTM! Correct API migration for useLanguagesQuery hook.

The change properly wraps the languageId parameter in a variables object to align with the updated useLanguagesQuery hook signature that now accepts a full QueryHookOptions object instead of variables directly.

apps/journeys-admin/src/components/Editor/Toolbar/Items/TemplateSettingsItem/TemplateSettingsDialog/MetadataTabPanel/MetadataTabPanel.tsx (1)

21-25: LGTM! Consistent API migration implementation.

The change correctly updates the useLanguagesQuery call to wrap the languageId in a variables object, maintaining consistency with the hook signature changes across the codebase.

libs/journeys/ui/src/components/TemplateGallery/HeaderAndLanguageFilter/HeaderAndLanguageFilter.tsx (1)

172-203: LGTM! Comprehensive API migration for complex query parameters.

The change correctly wraps both the languageId and where clause parameters in a variables object. The extensive language filtering logic is preserved while conforming to the updated useLanguagesQuery hook signature.

libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/index.ts (1)

1-5: LGTM! Clean export pattern for new video variant language functionality.

The file follows standard practices by providing centralized re-exports for the video variant language hooks and queries, making them easily accessible throughout the application.

libs/journeys/ui/src/libs/useLanguagesQuery/useLanguagesQuery.spec.tsx (1)

66-68: LGTM! Test correctly updated for new hook signature.

The test cases have been properly updated to wrap query parameters inside a variables object, which aligns with the hook signature change mentioned in the AI summary. The mock request variables are also correctly updated to match this structure.

Also applies to: 106-110

libs/journeys/ui/src/libs/useJourneyDuplicateAndTranslate/useJourneyDuplicateAndTranslate.ts (3)

25-25: LGTM! Proper extension of interface.

The addition of the optional selectedVideoLanguage parameter follows the existing pattern and uses the already defined JourneyLanguage type.


56-56: LGTM! Function signature correctly updated.

The function signature properly includes the new optional parameter, maintaining backward compatibility.


92-92: LGTM! Safe parameter passing with optional chaining.

The use of optional chaining (selectedVideoLanguage?.id) ensures safe access to the ID property and prevents runtime errors when the parameter is undefined.

apis/api-journeys-modern/src/schema/journeyAiTranslate/journeyAiTranslate.ts (2)

6-6: LGTM! Appropriate import for video block filtering.

The import of VideoBlockSource enum is needed for the new functionality to filter internal video blocks.


28-28: LGTM! Proper addition of optional field.

The videoLanguageId field is correctly defined as optional, maintaining backward compatibility with existing API usage.

libs/journeys/ui/src/libs/useJourneyAiTranslateMutation/useJourneyAiTranslateMutation.ts (2)

15-15: LGTM! Proper addition of optional mutation parameter.

The videoLanguageId parameter is correctly defined as optional with the appropriate GraphQL type.


24-24: LGTM! Correct parameter forwarding to input object.

The parameter is properly passed through to the mutation input object, completing the GraphQL schema extension.

libs/journeys/ui/src/libs/useLanguagesQuery/useLanguagesQuery.ts (3)

1-1: LGTM: Proper import addition for enhanced hook API.

The import of QueryHookOptions is correctly added to support the enhanced hook signature.


22-22: LGTM: Enhanced hook API provides better flexibility.

The parameter change from variables to options allows passing the full range of Apollo Client query options, not just variables. This is a beneficial API enhancement that maintains backward compatibility.


25-25: LGTM: Correct implementation of options spreading.

The change to spread the entire options object instead of just variables properly implements the enhanced API while maintaining all Apollo Client query functionality.

libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.spec.tsx (5)

1-12: LGTM: Proper test setup with appropriate imports.

The imports are well-organized and include all necessary testing utilities and mocks for comprehensive testing of the hook.


15-38: LGTM: Well-structured test for common languages scenario.

The test properly verifies the hook's initial loading state and final resolved data with appropriate mocking and async handling.


40-71: LGTM: Comprehensive assertion of resolved data structure.

The test thoroughly validates the expected data structure returned by the hook, ensuring correct language information including names, slugs, and primary/secondary name variants.


73-98: LGTM: Proper handling of edge case with no videos.

This test case correctly verifies the hook's behavior when a journey contains no videos, ensuring it returns undefined for common languages after loading completes.


100-107: LGTM: Appropriate handling of undefined journey parameter.

The test correctly verifies that when no journey is provided, the hook immediately returns a non-loading state with undefined common languages.

apps/journeys-admin/src/components/Team/CopyToTeamMenuItem/CopyToTeamMenuItem.spec.tsx (7)

17-21: LGTM: Proper imports for video language support.

The addition of video-related mocks from the useCommonVideoVariantLanguages module correctly supports the new video language selection feature.


84-86: LGTM: Updated translate mock for French language support.

The mock correctly uses French language ID (496) and corresponding French language name, aligning with the new video language feature requirements.


93-95: LGTM: Consistent French localization in mock data.

The mock response properly includes French title and description, maintaining consistency with the language selection changes.


114-114: LGTM: Journey ID consistency improvement.

The change from 'journeyId' to 'journey-id' maintains consistency with the mock data and other parts of the codebase.


194-211: LGTM: Enhanced language mock data with French support.

The addition of French language data to the mock correctly supports the dual language selection feature and maintains proper language name structure with primary/secondary variants.


311-314: LGTM: Proper addition of video-related mocks.

The inclusion of journeyInternalVideosMock, videosVariantLanguagesMock, and commonLanguagesMock correctly supports the video language selection functionality in the translation test.


367-390: LGTM: Comprehensive dual language selection testing.

The test properly simulates user interaction with both journey and video language selectors, ensuring both language selections are functional and properly integrated.

apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardMenu/TranslateJourneyDialog/TranslateJourneyDialog.spec.tsx (8)

11-15: LGTM: Proper imports for video language testing support.

The addition of video-related mocks from the useCommonVideoVariantLanguages module correctly enables testing of the dual language selection feature.


113-114: LGTM: Enhanced mutation mock with video language support.

The addition of videoLanguageId: '496' to the journeyAiTranslateCreateMock correctly reflects the new GraphQL mutation signature that supports video language translation.


141-143: LGTM: Good testing practice with mock cleanup.

The beforeEach hook properly clears all mocks before each test, ensuring test isolation and preventing test interference.


147-154: LGTM: Comprehensive mock setup for rendering tests.

The updated mock provider correctly includes all necessary mocks for video language functionality, ensuring proper component rendering and data loading.


162-163: LGTM: Verification of dual language selection UI elements.

The test correctly verifies that both "Select Journey Language" and "Select Video Language" labels are present, confirming the UI supports the new dual language selection feature.


172-179: LGTM: Consistent mock setup in cancel test.

The cancel test properly includes the video language mocks, maintaining consistency across all test scenarios.


195-197: LGTM: Video language mocks inclusion in translation test.

The translation test correctly includes all video language related mocks, enabling proper testing of the complete translation workflow.


215-237: LGTM: Comprehensive dual language selection simulation.

The test thoroughly simulates user interaction with both journey and video language selectors, ensuring the complete translation workflow is properly tested including both language selections.

apps/journeys-admin/src/components/JourneyList/JourneyCard/JourneyCardMenu/TranslateJourneyDialog/TranslateJourneyDialog.tsx (6)

11-11: LGTM: Clean import of the new hook.

The import of useCommonVideoVariantLanguages follows the established import pattern and is appropriately placed with other journey-related imports.


59-61: LGTM: Proper hook integration.

The hook is correctly called with the journey data and follows the established pattern of destructuring the returned values with meaningful names.


96-98: LGTM: Appropriate state management.

The selectedVideoLanguage state is properly initialized as optional and follows the same pattern as selectedLanguage.


106-107: LGTM: Consistent state reset logic.

The dialog close handler correctly resets both language selections, maintaining consistency with the component's behavior.


122-122: LGTM: Clean integration with mutation.

The selectedVideoLanguage is properly passed to the duplicateAndTranslate function, maintaining the optional nature of video language selection.


139-174: LGTM: Well-structured UI with good accessibility.

The two-tier language selection UI is well-implemented:

  • Clear separation between journey and video language selection
  • Consistent styling and props across both autocomplete components
  • Appropriate labels distinguishing the two selectors
  • Proper loading state handling for each language source

The Stack layout with spacing provides good visual hierarchy.

libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.ts (9)

1-15: LGTM: Clean imports and type definitions.

The imports are well-organized and all necessary dependencies are included. The generated type imports follow the established pattern.


16-31: LGTM: Well-structured GraphQL query.

The GET_JOURNEY_INTERNAL_VIDEOS query efficiently fetches only the necessary fields for video blocks, including the critical videoId and videoVariantLanguageId fields.


33-47: LGTM: Comprehensive video variants query.

The GET_VIDEOS_VARIANT_LANGUAGES query correctly fetches variant language information for multiple videos in a single request, which is efficient.


49-59: LGTM: Proper query setup with appropriate skip condition.

The first query is correctly configured with proper error handling through the skip condition when journey is null.


61-73: LGTM: Efficient video ID extraction with memoization.

The useMemo optimization prevents unnecessary re-computation of video IDs. The logic correctly filters for VideoBlock types and extracts valid video IDs.


75-84: LGTM: Proper dependent query with comprehensive skip conditions.

The second query correctly depends on the video IDs from the first query and has appropriate skip conditions to prevent unnecessary requests.


86-97: LGTM: Correct intersection logic for common languages.

The reduce function correctly finds languages common to all videos by:

  1. Starting with the first video's languages
  2. Filtering subsequent videos to only include common languages

This ensures only languages supported across ALL videos are returned.


105-113: LGTM: Efficient final query with proper skip condition.

The final useLanguagesQuery call correctly uses the intersection result and skips when no common languages are found, preventing unnecessary API calls.


115-119: LGTM: Comprehensive loading state and clean return.

The combined loading state correctly reflects all three async operations, and the return object provides a clean interface for consumers.

apps/journeys-admin/src/components/Team/CopyToTeamMenuItem/CopyToTeamMenuItem.tsx (4)

8-8: LGTM: Consistent hook import.

The import follows the established pattern and is correctly placed with other journey-related imports.


52-53: LGTM: Proper hook integration.

The hook is correctly called with journey data and follows the same destructuring pattern used elsewhere in the codebase.


71-71: LGTM: Clean function signature extension.

The handleDuplicateJourney function signature is properly extended to include the optional selectedVideoLanguage parameter, and it's correctly passed through to the duplicateAndTranslate function.

Also applies to: 79-79


111-112: LGTM: Proper prop passing to dialog component.

The video languages and loading state are correctly passed to the CopyToTeamDialog component, maintaining the separation of concerns between data fetching and UI presentation.

libs/journeys/ui/src/components/CopyToTeamDialog/CopyToTeamDialog.tsx (10)

16-19: LGTM: Clean import restructuring.

The import has been properly restructured to include the Language type alongside LanguageAutocomplete, improving type safety.


28-32: LGTM: Consistent interface definition.

The JourneyLanguage interface is properly defined and matches the pattern used in other components.


39-42: LGTM: Well-structured prop interface updates.

The new video language props are properly typed and optional, maintaining backward compatibility while providing the necessary data for the new functionality.

Also applies to: 47-47


55-55: LGTM: Consistent form values extension.

The videoLanguageSelect field is properly added to the form values interface as an optional field, matching the pattern of languageSelect.


67-72: LGTM: Comprehensive prop documentation.

The JSDoc comments have been properly updated to document the new video language props and the extended submit action signature.


80-81: LGTM: Clean parameter destructuring.

The new video language props are properly destructured in the component parameters.


92-97: LGTM: Improved query variable structure.

The useLanguagesQuery call has been properly restructured to use a variables object, which is a better practice and aligns with the Apollo Client conventions.


107-107: LGTM: Proper form submission update.

The submitAction call correctly includes the video language selection, maintaining the optional nature of this parameter.


145-145: LGTM: Appropriate validation schema extension.

The validation schema properly includes videoLanguageSelect as an optional nullable field, which is correct since video language selection should remain optional.

Also applies to: 153-153


270-311: LGTM: Well-implemented dual language selection UI.

The UI implementation effectively provides separate language selection for journey and video:

  • Clear visual separation using Stack layout
  • Consistent styling between both autocomplete components
  • Appropriate labels distinguishing journey vs video language
  • Proper loading state handling for each language source
  • Correct data binding for each form field

The implementation maintains good UX by keeping both selectors within the same conditional block.

libs/journeys/ui/src/libs/useCommonVideoVariantLanguages/useCommonVideoVariantLanguages.mock.ts (5)

1-7: Import Statements Structure
The imports are correctly organized and reference the appropriate modules for Journey, GET_LANGUAGES, GET_JOURNEY_INTERNAL_VIDEOS, and GET_VIDEOS_VARIANT_LANGUAGES.


9-13: Mock Journey Object
The minimal journey mock aligns with the JourneyFields type and provides __typename, id, and title. Casting via as unknown as Journey is acceptable for mock contexts.


76-110: Internal Videos Journey Mock
journeyInternalVideosMock correctly reflects a journey containing both VideoBlock and non-video (TypographyBlock) entries. The use of __typename and the required fields (videoId, videoVariantLanguageId, source) is spot on.


112-132: Journey with No Internal Videos
journeyInternalWithoutVideosMock cleanly handles the case where a journey has no video blocks, returning only typography blocks as expected.


200-212: Empty Videos Variant Mock
videosVariantLanguagesWithoutVideosMock correctly simulates querying with an empty ids array, returning an empty videos list.

Comment thread libs/journeys/ui/src/libs/useJourneyAiTranslateMutation/supportedLanguages.ts Outdated
@github-actions github-actions Bot temporarily deployed to Preview - watch June 3, 2025 02:59 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin June 3, 2025 02:59 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links June 3, 2025 04:26 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch June 3, 2025 04:26 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys June 3, 2025 04:26 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin June 3, 2025 21:05 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links June 3, 2025 22:43 Inactive
@github-actions github-actions Bot requested a deployment to Preview - journeys-admin June 3, 2025 22:43 Pending
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin June 3, 2025 22:43 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys June 3, 2025 22:43 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - arclight June 3, 2025 22:43 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch June 3, 2025 22:43 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - arclight June 3, 2025 22:48 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch June 3, 2025 22:48 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin June 3, 2025 22:48 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin June 3, 2025 22:48 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys June 3, 2025 22:48 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - short-links June 3, 2025 22:48 Inactive
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 5, 2025

This pull request has been marked stale due to 28 days without activity. It will be closed in 14 days unless updated.

@github-actions github-actions Bot added the stale label Aug 5, 2025
@github-actions
Copy link
Copy Markdown
Contributor

This pull request was automatically closed after remaining stale for 14 days.

@github-actions github-actions Bot closed this Aug 20, 2025
@github-actions github-actions Bot deleted the edmondshen/nes-62-auto-update-arclight-video-langauge branch September 11, 2025 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants