-
Notifications
You must be signed in to change notification settings - Fork 18
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
Task #0000 fix: Orchestration Api Url changes #28
Task #0000 fix: Orchestration Api Url changes #28
Conversation
WalkthroughThe recent updates primarily focus on standardizing API endpoint hosts across various components, shifting from a specific app host to a more general orchestration host. Additionally, there's a minor adjustment in the voice analysis logic and a simplification in parameter naming for better clarity. These changes are aimed at enhancing the system's integration and data handling capabilities. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration 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: 3
Review Status
Configuration used: .coderabbit.yaml
Files selected for processing (6)
- src/components/Assesment/Assesment.jsx (2 hunks)
- src/components/AssesmentEnd/AssesmentEnd.jsx (1 hunks)
- src/components/DiscoverSentance/DiscoverSentance.jsx (2 hunks)
- src/utils/VoiceAnalyser.js (1 hunks)
- src/utils/urlConstants.json (1 hunks)
- src/views/Practice/Practice.jsx (2 hunks)
Additional comments not posted (6)
src/utils/urlConstants.json (2)
5-5
: LGTM! The update to theGET_POINTER
endpoint URL aligns with the PR objectives.
7-7
: LGTM! The update to theADD_POINTER
endpoint URL aligns with the PR objectives.src/utils/VoiceAnalyser.js (1)
441-441
: LGTM! The adjustment to the percentage range check aligns with the PR objectives and potentially improves the voice analysis feature.src/components/Assesment/Assesment.jsx (1)
516-516
: Ensure the environment variableREACT_APP_LEARNER_AI_ORCHESTRATION_HOST
is correctly configured in your deployment environment.Also applies to: 541-541
src/views/Practice/Practice.jsx (2)
146-146
: Ensure the environment variableREACT_APP_LEARNER_AI_ORCHESTRATION_HOST
is correctly configured in your deployment environment.
152-152
: Verify that the backend API correctly expects the parameter namemilestone
instead ofmilestoneLevel
.
@@ -44,7 +44,7 @@ const AssesmentEnd = () => { | |||
setLocalData("userLevel", data.data.milestone_level?.replace("m", "")); | |||
const sessionId = getLocalData("sessionId"); | |||
const getPointersDetails = await axios.get( | |||
`${process.env.REACT_APP_LEARNER_AI_APP_HOST}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}` | |||
`${process.env.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}` |
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.
Consider encapsulating the access to environment variables in a configuration module or utility function. This approach enhances maintainability and testing.
- `${process.env.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}`
+ `${getApiHost()}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}`
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
`${process.env.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}` | |
`${getApiHost()}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}` |
@@ -71,7 +71,7 @@ const SpeakSentenceComponent = () => { | |||
const virtualId = getLocalData("virtualId"); | |||
const lang = getLocalData("lang"); | |||
const getPointersDetails = await axios.get( | |||
`${process.env.REACT_APP_LEARNER_AI_APP_HOST}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}` | |||
`${process.env.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}` |
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.
Consider encapsulating the access to environment variables in a configuration module or utility function, similar to previous recommendations.
- `${process.env.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}`
+ `${getApiHost()}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}`
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
`${process.env.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}` | |
`${getApiHost()}/${config.URLS.GET_POINTER}/${virtualId}/${sessionId}?language=${lang}` |
`${process.env.REACT_APP_LEARNER_AI_ORCHESTRATION_HOST}/${config.URLS.ADD_POINTER}`, | ||
{ | ||
userId: localStorage.getItem("virtualId"), | ||
sessionId: localStorage.getItem("sessionId"), | ||
points: 1, | ||
language: lang, | ||
milestoneLevel: "m0", | ||
milestone: "m0", |
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.
Tip
Codebase Verification
The verification process has revealed that the old parameter name milestoneLevel
is still present in multiple locations within the application, specifically in src/views/Practice/Practice.jsx
and src/components/DiscoverSentance/DiscoverSentance.jsx
. This suggests that the change to milestone
may not have been consistently applied across the application.
Analysis chain
Ensure the change from milestoneLevel
to milestone
is consistently applied across the application to maintain parameter naming consistency.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for occurrences of the old parameter name to ensure it's been fully updated.
rg --type js "milestoneLevel"
Length of output: 703
…n-service Task #0000 fix: Orchestration Api Url changes
Summary by CodeRabbit
urlConstants.json
for better clarity and consistency.VoiceAnalyser.js
for more accurate feedback.milestone
parameter across components, replacingmilestoneLevel
.