-
Notifications
You must be signed in to change notification settings - Fork 6
Add Language.usesAIAssistance boolean #3538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
🗞 GraphQL SummaryView schema changes@@ -2508,8 +2508,16 @@
"""The earliest start date from its engagements."""
sponsorStartDate: SecuredDate!
tags: SecuredTags!
+
+ """
+ Whether any engagement for this language is using AI-assisted translation.
+
+ This is true if any engagement's "usingAIAssistedTranslation" property is not "None" or "Unknown".
+ Used to track and filter languages that have AI assistance in their translation process.
+ """
+ usesAIAssistance: SecuredBoolean!
}
type LanguageEngagement implements ChangesetAware & Commentable & Engagement & Resource {
"""Whether the requesting user can delete this resource"""
@@ -2625,8 +2633,11 @@
registryOfLanguageVarietiesCode: String
"""Only these sensitivities"""
sensitivity: [Sensitivity!]
+
+ """Only languages that have an AI-assisted translation engagement"""
+ usesAIAssistance: Boolean
}
input LanguageListInput {
"""The number of items to return in a single page"""
|
803a478
to
3eafd80
Compare
📝 WalkthroughWalkthroughA new calculated field, Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (4)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings
📚 Learning: in the seedcompany/cord-api-v3 project, edgedb/gel migrations are stored in `/dbschema/migrations/` ...
Applied to files:
📚 Learning: files in the migrations folder (e.g., dbschema/migrations/*.edgeql) are generated and not meant to b...
Applied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
🔇 Additional comments (2)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/components/language/dto/language.dto.ts
(1 hunks)src/components/language/dto/list-language.dto.ts
(1 hunks)src/components/language/language.gel.repository.ts
(1 hunks)src/components/language/language.repository.ts
(5 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CarsonF
PR: SeedCompany/cord-api-v3#3438
File: src/components/language/migrations/add-flags.migration.ts:6-8
Timestamp: 2025-07-08T14:12:59.042Z
Learning: In the SeedCompany/cord-api-v3 project PR #3438, the isWiderComm field was initially planned to be added to the Language entity but was subsequently removed during development. Only the isAvailableForReporting field remained in the final implementation.
📚 Learning: in the seedcompany/cord-api-v3 project pr #3438, the iswidercomm field was initially planned to be a...
Learnt from: CarsonF
PR: SeedCompany/cord-api-v3#3438
File: src/components/language/migrations/add-flags.migration.ts:6-8
Timestamp: 2025-07-08T14:12:59.042Z
Learning: In the SeedCompany/cord-api-v3 project PR #3438, the isWiderComm field was initially planned to be added to the Language entity but was subsequently removed during development. Only the isAvailableForReporting field remained in the final implementation.
Applied to files:
src/components/language/language.gel.repository.ts
src/components/language/dto/list-language.dto.ts
src/components/language/dto/language.dto.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: E2E Tests (neo4j 1/6)
- GitHub Check: E2E Tests (neo4j 3/6)
- GitHub Check: E2E Tests (neo4j 6/6)
- GitHub Check: E2E Tests (neo4j 4/6)
- GitHub Check: E2E Tests (neo4j 5/6)
- GitHub Check: E2E Tests (neo4j 2/6)
- GitHub Check: Unit
- GitHub Check: Clean
- GitHub Check: lint
- GitHub Check: Generate (base)
- GitHub Check: Generate (head)
🔇 Additional comments (5)
src/components/language/dto/language.dto.ts (1)
187-196
: LGTM!The new calculated field is well-implemented with proper decorators, clear documentation, and appropriate typing. The description accurately reflects the business logic for determining AI assistance usage.
src/components/language/language.repository.ts (4)
383-400
: Query logic looks correct for detecting AI assistance usage.The
usingAIAssistance
fragment correctly:
- Matches language engagements through the proper relationship path
- Checks the
usingAIAssistedTranslation
property values- Excludes null, "None", and "Unknown" values as specified in the DTO description
- Uses
any()
function to return true if any engagement meets the criteria
212-212
: Integration with hydrate method is properly implemented.The fragment is correctly applied in the hydration pipeline and the result is properly included in the returned DTO fields.
Also applies to: 226-226
344-347
: Filter implementation follows established patterns.The filter correctly applies the
usingAIAssistance
fragment and uses the computed value for filtering. The implementation is consistent with other boolean filters in the codebase.
433-437
: Sorter implementation is consistent and correct.The sorter properly applies the
usingAIAssistance
fragment and uses the computed value for sorting, following the same pattern as other computed field sorters.
3eafd80
to
4411d7f
Compare
Add
usesAIAssistance
boolean toLanguage
which computesusingAIAssistedTranslation
from relatedEngagements