kookmin-sw / capstone-2024-08

아나운서 준비생을 위한 맞춤형 AI 스피치 연습 애플리케이션, Loro(로로)
https://kookmin-sw.github.io/capstone-2024-08
5 stars 4 forks source link

[CD-153] Feat: 'AI로 생성하기' 버튼 기능 구현 #42

Closed Shin-MG closed 7 months ago

Shin-MG commented 7 months ago

Feature Description

사용자 대본 생성(CreateUserScript) 페이지의 'AI로 생성하기' 버튼 기능 구현 완료했습니다.

백엔드 코드는 정리 후 올리겠습니다.

Tasks to Complete

Additional Resources (Optional)

why-arong commented 7 months ago

바뀐 디자인 이뻐요!!

"카테고리 선택해주세요 " <- 얘를 위로 빼는 건 어떤가요?

Shin-MG commented 7 months ago

카테고리를 제목 위로요?

why-arong commented 7 months ago

@CodiumAI-Agent /review

CodiumAI-Agent commented 7 months ago

PR Review

⏱️ Estimated effort to review [1-5] 3, because the PR involves multiple files and significant changes including new features, refactoring, and UI adjustments. The complexity of the changes and the need to ensure that the new features work correctly with existing functionality increase the review effort.
🧪 Relevant tests No
🔍 Possible issues Possible Bug: The method `createScriptByGpt` in `create_user_script.dart` does not handle exceptions that might occur during the API call. This could lead to unhandled exceptions if the network request fails or returns an error.
Data Validation Issue: In `create_user_script.dart`, the method `checkValidCategory` only checks if the category is null. It does not validate whether the category is actually one of the expected valid categories, which might lead to incorrect data being used or stored.
🔒 Security concerns No
Code feedback:
relevant filefront/lib/screen/script/create_user_script/create_user_script.dart
suggestion       Consider adding exception handling for the `createScriptByGpt` method to manage potential errors from the network request. This could include try-catch blocks around the API call to handle exceptions and provide user feedback in case of failure. [important]
relevant lineawait GptController().createScript(title, category).then((script) {

relevant filefront/lib/screen/script/create_user_script/create_user_script.dart
suggestion       Enhance the `checkValidCategory` method to include validation against a list of allowed categories. This ensures that the category selected is one of the predefined valid options, improving data integrity and user experience. [important]
relevant linevoid checkValidCategory(String? category) {

relevant filefront/lib/screen/script/create_user_script/create_user_script.dart
suggestion       Implement a fallback or error handling mechanism in the `createScriptByGpt` method if the category or title is invalid, preventing the API call when data is not valid. This could improve the robustness of the feature by ensuring that all prerequisites are met before making the request. [medium]
relevant lineif (_titleKey.currentState!.validate()) {

relevant filefront/lib/screen/script/create_user_script/create_user_script.dart
suggestion       Add a loading indicator or disable the 'AI로 생성하기' button while the `createScriptByGpt` is processing. This provides feedback to the user that the system is working and prevents multiple submissions which could lead to duplicated entries or other issues. [medium]
relevant lineoutlinedRoundedRectangleButton('AI로 생성하기', () {


✨ Review tool usage guide:
**Overview:** The `review` tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be [added](https://pr-agent-docs.codium.ai/tools/review/#general-configurations) by configuring the tool. The tool can be triggered [automatically](https://pr-agent-docs.codium.ai/usage-guide/automations_and_usage/#github-app-automatic-tools-when-a-new-pr-is-opened) every time a new PR is opened, or can be invoked manually by commenting on any PR. - When commenting, to edit [configurations](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L23) related to the review tool (`pr_reviewer` section), use the following template: ``` /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=... ``` - With a [configuration file](https://pr-agent-docs.codium.ai/usage-guide/configuration_options/), use the following template: ``` [pr_reviewer] some_config1=... some_config2=... ``` See the review [usage page](https://pr-agent-docs.codium.ai/tools/review/) for a comprehensive guide on using this tool.
why-arong commented 7 months ago

카테고리를 제목 위로요?

넹 끊기는 느낌 들어서 그런건데 계속 보니 지금도 좋네여 ㅎㅎ

anjiwon319 commented 7 months ago

"카테고리 선택해주세요" 문장과 하단의 카테고리 버튼들간의 구분이 잘 안되는 것 같습니다! "카테고리 선택해주세요" 문장을 볼드체 + 글자 크기 확대하는 건 어떠신가유?