fix: User story changes and bug fix #352
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces functionality for handling user browser language preferences, improves date formatting based on locale, and removes unnecessary logging from the frontend. Key changes include adding methods to manage browser language, implementing locale-based date formatting, and cleaning up console logs across the frontend codebase.
Backend Changes
User Browser Language Support:
get_user_local_browser_languageandset_user_local_browser_languageinsrc/backend/app_config.pyto manage user browser language preferences via environment variables.UserLanguagemodel insrc/backend/models/messages_kernel.pyto represent user language data./api/user_browser_languageinsrc/backend/app_kernel.pyto receive and store the user's browser language.Locale-based Date Formatting:
format_dates_in_messagesfunction insrc/backend/app_kernel.pyto format dates in messages based on the user's locale.get_plansmethod insrc/backend/app_kernel.pyto format dates in messages using the user's browser language.HrToolsandProductToolsinsrc/backend/kernel_toolsto dynamically use the user's selected language for date formatting. [1] [2]Error Handling Improvements:
input_task_endpointto provide clearer feedback to the user. [1] [2]Dependencies and Testing:
babeltosrc/backend/requirements.txtfor date and internationalization support.src/backend/test_utils_date_fixed.pyto validate date formatting functionality.Frontend Changes
User Browser Language Integration:
/user_browser_languagetoAPI_ENDPOINTSinsrc/frontend/src/api/apiService.tsx.sendUserBrowserLanguageinAPIServiceto send the user's browser language to the backend.sendUserBrowserLanguageinsrc/frontend/src/index.tsxduring application initialization.Logging Cleanup:
console.logstatements from various files, includingapiClient.tsx,config.tsx,HomeInput.tsx, andPlanPage.tsx, to reduce noise in the logs. [1] [2] [3] [4] [5] [6] [7] [8]Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information