Skip to content

Comments

feat(SnackGameBase): 피버타임 중에는 스트릭 발생 시마다 검증 요청을 보낸다#388

Merged
nijuy merged 1 commit intodevelopfrom
feat/verify-request-in-fever
Jan 19, 2026
Merged

feat(SnackGameBase): 피버타임 중에는 스트릭 발생 시마다 검증 요청을 보낸다#388
nijuy merged 1 commit intodevelopfrom
feat/verify-request-in-fever

Conversation

@nijuy
Copy link
Collaborator

@nijuy nijuy commented Jan 19, 2026

💻 개요

  • 신규 피처 (인데 아직 완성 전임)

📋 변경 및 추가 사항

  • 피버타임 중에는 스트릭을 누적시키지 않고 바로바로 검증 요청을 쏘도록 수정했습니다

    26/01/12 회의에서 결정했던 내용이에용

    피버타임 아닐 때 피버타임일 때 (new)
    피버 아닐 땐 골든일 때만 요청 피버일 떈 무조건 ㄱㄱ
    동일 (스트릭 누적 ➡️ 황금 스낵 제거 시 한 번에 검증 요청) 스트릭 제거될 때마다 검증 요청

💬 To. 리뷰어

@nijuy nijuy self-assigned this Jan 19, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @nijuy, 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은 SnackGameBase 컴포넌트에 새로운 피처를 도입하여 피버타임 중 스트릭 처리 방식을 개선합니다. 기존에는 황금 스낵 제거 시에만 스트릭 검증 요청을 보냈지만, 이제 피버타임 중에는 스트릭이 발생할 때마다 즉시 검증 요청을 보내어 게임 로직의 반응성을 높이고 사용자 경험을 향상시키는 것을 목표로 합니다.

Highlights

  • 피버타임 스트릭 처리: 피버타임 중에는 스트릭이 발생할 때마다 즉시 검증 요청을 보내도록 SnackGameBase 컴포넌트의 handleStreak 함수 로직을 수정했습니다. 이전에는 황금 스낵일 경우에만 즉시 요청을 보냈습니다.

🧠 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.

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

안녕하세요! PR을 잘 살펴보았습니다. 피버 타임 중 스트릭 발생 시 바로 검증 요청을 보내도록 수정한 로직 변경, 잘 확인했습니다.

리뷰 중 두 가지 개선점을 발견하여 코멘트를 남겼습니다.
첫째, session! non-null assertion 대신 가드 구문을 사용하여 런타임 에러 가능성을 줄이는 방안을 제안했습니다.
둘째, handleStreak 함수의 인자를 객체로 캡슐화하여 코드의 명확성과 유지보수성을 높이는 리팩토링 아이디어를 공유했습니다.

자세한 내용은 코드의 각 코멘트를 확인해주세요.

@@ -135,7 +135,7 @@ const SnackGameBase = ({ replaceErrorHandler }: Props) => {
const handleStreak = async (streak: StreakWithMeta, isGolden: boolean) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

장기적인 유지보수성 관점에서 handleStreak 함수의 시그니처 개선을 제안합니다. isGolden 파라미터를 별도로 받는 대신, streak 객체에 관련 정보를 모두 포함시키는 것이 좋습니다. 예를 들어 StreakWithMeta 타입을 확장하여 isGolden 프로퍼티를 추가하는 방식입니다.

// in snackGame/SnackGameUtil.ts
export type StreakWithMeta = {
  coordinates: Streak;
  isFever: boolean;
  isGolden: boolean; // 속성 추가
  occurredAt: string;
};

// in SnackGameBase.tsx
const handleStreak = async (streak: StreakWithMeta) => {
  // ...
  if (streak.isGolden || streak.isFever) { /* ... */ }
}

이렇게 리팩토링하면 streak 관련 데이터가 하나의 객체로 캡슐화되어 코드의 명확성과 일관성이 향상됩니다. 향후 리팩토링 시 고려해보시면 좋겠습니다.

@nijuy nijuy merged commit 264c535 into develop Jan 19, 2026
1 check passed
@nijuy nijuy deleted the feat/verify-request-in-fever branch January 19, 2026 11:29
nijuy added a commit that referenced this pull request Jan 27, 2026
* Revert "feat(SnackGameBase): 피버타임일 땐 스트릭 발생 시마다 검증 요청을 보낸다 (#388)"

This reverts commit 264c535.

* fix(GameScreen): 아이템 선택 및 해제 함수 추가

* feat: Biz 스트릭 처리 타입 수정

- Streak -> StreakWithMeta

* fix(PausePopup): 게임 종료 및 재개 버튼 활성화 상태 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant