팀 생성하기 페이지 퍼블리싱 및 관련 로직 추가 #54
Conversation
Summary of ChangesHello @Jieunsse, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자가 새로운 팀을 생성할 수 있는 기능을 도입합니다. 팀 생성 페이지의 사용자 인터페이스를 구축하고, 팀 이름의 유효성을 검사하는 로직을 포함하여 중복된 팀 이름 생성을 방지합니다. 또한, 팀 생성 과정을 관리하는 재사용 가능한 커스텀 훅을 제공하여 비즈니스 로직을 효율적으로 처리합니다. 이 변경사항은 애플리케이션의 팀 관리 기능을 확장하고 사용자 경험을 개선합니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| const cachedNames = getCachedTeamNames(queryClient); | ||
| if (isDuplicated(cachedNames, normalizedName)) { | ||
| throw new Error(DUPLICATED_TEAM_NAME_ERROR); | ||
| } |
There was a problem hiding this comment.
현재 팀 이름 중복 검사를 클라이언트 측 캐시 데이터에만 의존하고 있어 안정성에 문제가 있을 수 있습니다. 사용자의 캐시가 최신이 아니거나 모든 팀 목록을 포함하지 않을 경우 중복 검사가 실패할 수 있으며, 여러 사용자가 동시에 생성할 때 Race Condition이 발생할 수 있습니다.
가장 안정적인 방법은 서버 API에서 이름의 유일성을 보장하고, 중복 시 에러를 반환하도록 하는 것입니다. 클라이언트에서는 API가 반환하는 에러를 처리하여 사용자에게 알리는 것이 좋습니다. 클라이언트 측 검사는 즉각적인 피드백을 위한 보조 수단으로 활용할 수 있지만, 최종적인 데이터 정합성은 서버에서 책임져야 합니다.
There was a problem hiding this comment.
서버 스펙을 변경할 수 없어 정합성을 확보할 수는 없지만, 리뷰를 반영하여 프론트단에서 할 수 있는 조치를 적용했습니다.
| const handleSubmit = async () => { | ||
| if (isSubmitDisabled) return; | ||
|
|
||
| await createTeam(teamName); | ||
| setTeamName(''); | ||
| }; |
There was a problem hiding this comment.
팀 생성이 성공적으로 완료된 후, 입력 필드를 비우는 것 외에 사용자에게 명확한 피드백이 없습니다. 이로 인해 사용자는 작업이 성공했는지 알기 어렵습니다. 생성 성공을 알리는 메시지를 보여주거나 다른 페이지로 이동시키는 등 후속 처리를 추가하는 것을 권장합니다.
const handleSubmit = async () => {
if (isSubmitDisabled) return;
try {
await createTeam(teamName);
setTeamName('');
// TODO: 팀 생성 성공 후 사용자 피드백(e.g. 토스트 메시지) 또는 페이지 이동(e.g. router.push) 처리가 필요합니다.
} catch (error) {
// 에러는 useCreateTeam 훅의 error 상태로 처리되므로 여기서는 별도 처리가 필요하지 않을 수 있습니다.
}
};
Summary
Issue
Scope
특이사항: