Skip to content

Comments

Main#119

Merged
hiwon-lee merged 9 commits intodevelopfrom
main
Feb 22, 2026
Merged

Main#119
hiwon-lee merged 9 commits intodevelopfrom
main

Conversation

@hiwon-lee
Copy link
Contributor

#️⃣ 연관된 이슈

관련된 이슈 번호를 적어주세요. 예: #이슈번호

#️⃣ 작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요. (이미지 첨부 가능)

#️⃣ 테스트 결과

코드 변경에 대해 테스트를 수행한 결과를 요약해주세요. 예: 모든 테스트 통과 여부, 새로 작성한 테스트 케이스 등

#️⃣ 변경 사항 체크리스트

  • 코드에 영향이 있는 모든 부분에 대한 테스트를 작성하고 실행했나요?
  • 문서를 작성하거나 수정했나요? (필요한 경우)
  • 코드 컨벤션에 따라 코드를 작성했나요?
  • 본 PR에서 발생할 수 있는 모든 의존성 문제가 해결되었나요?

#️⃣ 스크린샷 (선택)

관련된 스크린샷이 있다면 여기에 첨부해주세요.

#️⃣ 리뷰 요구사항 (선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요.
예시: 이 부분의 코드가 잘 작동하는지 테스트해 주실 수 있나요?

📎 참고 자료 (선택)

관련 문서, 스크린샷, 또는 예시 등이 있다면 여기에 첨부해주세요

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @hiwon-lee, 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은 ExhibitionReview DTO에 게시글의 삭제 상태를 나타내는 필드를 추가하여 데이터 표현을 개선하고, 사용자 경험 향상을 위해 리프레시 토큰의 유효 기간을 14일에서 30일로 연장하는 변경 사항을 포함합니다. 이는 사용자 로그인 세션 유지 시간을 늘려 재로그인 필요성을 줄이는 데 기여합니다.

Highlights

  • DTO 업데이트: ExhibitionReview DTO에 게시글의 삭제 여부를 나타내는 isDeleted 필드를 추가했습니다.
  • 리프레시 토큰 유효 기간 연장: 인증 컨트롤러에서 리프레시 토큰 쿠키의 유효 기간을 14일에서 30일로 연장했습니다.
  • JWT 토큰 유효 기간 상수 조정: JWT 토큰 제공자에서 리프레시 토큰의 유효 기간 상수를 기존 2시간에서 30일로 조정했습니다.

🧠 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
  • src/main/java/com/example/tikitaka/domain/post/dto/ExhibitionReview.java
    • of 메서드에서 isDeleted 필드를 빌더에 추가했습니다.
  • src/main/java/com/example/tikitaka/global/config/auth/AuthController.java
    • loginWithKakao 메서드에서 REFRESH_TOKEN 쿠키의 maxAge를 14일(기존 2시간으로 잘못 설정되어 있던 부분)에서 30일로 변경했습니다.
    • refresh 메서드에서 REFRESH_TOKEN 쿠키의 maxAge를 14일에서 30일로 변경했습니다.
  • src/main/java/com/example/tikitaka/global/config/auth/jwt/JwtTokenProvider.java
    • REFRESH_TOKEN_VALIDITY_MS 상수를 기존 2시간(2 * 60 * 60 * 1000L)에서 30일(30L * 24 * 60 * 60 * 1000L)로 변경했습니다.
Activity
  • 현재까지 PR에 대한 사람의 활동은 없습니다.
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
Contributor

@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은 Refresh Token의 만료 기간을 30일로 연장하고, ExhibitionReview DTO에 isDeleted 필드를 추가하는 변경 사항을 포함하고 있습니다. 전반적으로 코드의 일관성을 높이는 좋은 시도이지만, 몇 가지 개선할 점이 보입니다. 중복 코드와 하드코딩된 값을 상수로 만들어 가독성과 유지보수성을 높이는 방향으로 리뷰를 남겼습니다.

.content(post.getContent())
.isWriter(isWriter)
.images(images)
.isDeleted(post.isDeleted())
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

isDeleted 속성이 중복으로 설정되었습니다. 65번째 줄에 이미 동일한 코드가 있으므로 이 줄은 삭제하는 것이 좋습니다. 빌더 패턴에서 같은 속성을 두 번 설정하면 마지막에 설정된 값으로 덮어쓰여지므로 기능상 문제는 없지만, 코드 가독성과 유지보수성을 위해 중복된 코드는 제거하는 것이 바람직합니다.

.sameSite(cookieSameSite)
.path("/")
.maxAge(2 * 60 * 60)
.maxAge(30L * 24 * 60 * 60)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Refresh 토큰의 만료 시간(30일)이 초 단위로 계산되어 하드코딩되어 있습니다. 이 값은 119번째 줄에서도 동일하게 사용되고 있어 중복이 발생합니다. 유지보수성을 높이고 실수를 방지하기 위해 이 값을 클래스 레벨의 private static final 상수로 추출하여 사용하는 것을 권장합니다.

예시:

private static final long REFRESH_TOKEN_MAX_AGE_SECONDS = 30L * 24 * 60 * 60;

// ...
.maxAge(REFRESH_TOKEN_MAX_AGE_SECONDS)

// 14일
private final long REFRESH_TOKEN_VALIDITY_MS = 2 * 60 * 60 * 1000L;
// 14일 -> 30일
private final long REFRESH_TOKEN_VALIDITY_MS = 30L * 24 * 60 * 60 * 1000L;
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Refresh 토큰의 유효 기간을 밀리초 단위로 계산하는 로직이 하드코딩되어 있습니다. 30L * 24 * 60 * 60 * 1000L과 같은 계산식은 가독성이 떨어지고 의도를 파악하기 어렵습니다. java.util.concurrent.TimeUnit을 사용하면 코드를 더 명확하고 안전하게 만들 수 있습니다.

Suggested change
private final long REFRESH_TOKEN_VALIDITY_MS = 30L * 24 * 60 * 60 * 1000L;
private final long REFRESH_TOKEN_VALIDITY_MS = java.util.concurrent.TimeUnit.DAYS.toMillis(30L);

@hiwon-lee hiwon-lee merged commit dfe220c into develop Feb 22, 2026
1 check passed
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.

2 participants