Skip to content

Feature/#132 : 마이페이지 출석내역 내비게이션 연결 및 작업#133

Merged
TaeseongYun merged 6 commits intorelease/v1.1.0from
feature/#132-mypage-navigate
Apr 24, 2025
Merged

Feature/#132 : 마이페이지 출석내역 내비게이션 연결 및 작업#133
TaeseongYun merged 6 commits intorelease/v1.1.0from
feature/#132-mypage-navigate

Conversation

@TaeseongYun
Copy link
Contributor

💡 Issue

🌱 Key changes

  • 마이페이지 출석내역 내비게이션 연결
  • 출석내역 API 연결
  • 세션 API 연결

✅ To Reviewers

각 API 를 연결 했지만 현재 500, 403 에러가 발생하고 있는 상황입니다.
빠른 확인을 위하여 먼저 PR 을 올렸습니다.

📸 스크린샷

Screen_recording_20250418_104628.mp4

@TaeseongYun TaeseongYun added Feature 기능 추가, 개발 CodeRabbit CodeRabbit 코드 리뷰 요청 labels Apr 18, 2025
@TaeseongYun TaeseongYun requested a review from DongChyeon April 18, 2025 01:48
@TaeseongYun TaeseongYun self-assigned this Apr 18, 2025
@coderabbitai
Copy link

coderabbitai bot commented Apr 18, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Comment on lines +51 to 63

@Singleton
@Provides
fun provideAttendanceApi(retrofit: Retrofit): AttendanceApi {
return retrofit.create()
}

@Singleton
@Provides
fun providesSessionsApi(retrofit: Retrofit) = retrofit.create<SessionApi>()
}
Copy link
Member

@DongChyeon DongChyeon Apr 18, 2025

Choose a reason for hiding this comment

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

Suggested change
@Singleton
@Provides
fun provideAttendanceApi(retrofit: Retrofit): AttendanceApi {
return retrofit.create()
}
@Singleton
@Provides
fun providesSessionsApi(retrofit: Retrofit) = retrofit.create<SessionApi>()
}
@Singleton
@Provides
fun provideAttendanceApi(@AuthRetrofit retrofit: Retrofit): AttendanceApi {
return retrofit.create(AttendanceApi::class.java)
}
@Singleton
@Provides
fun providesSessionsApi(@AuthRetrofit retrofit: Retrofit): Session {
return retrofit.create(SessionApi::class.java)
}
}

R: @AuthRetrofit 어노테이션을 붙여야 AuthInterceptor 가 붙은 레트로핏 클라이언트를 사용할 수 있어요.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fa9c1f5

코멘트 적용 완료 처리했습니다 ~

@TaeseongYun TaeseongYun requested a review from DongChyeon April 18, 2025 23:49
Comment on lines 48 to 63
fun providePostsApi(retrofit: Retrofit): PostsApi {
return retrofit.create(PostsApi::class.java)
}

@Singleton
@Provides
fun provideAttendanceApi(@AuthRetrofit retrofit: Retrofit): AttendanceApi {
return retrofit.create()
}

@Singleton
@Provides
fun providesSessionsApi(@AuthRetrofit retrofit: Retrofit) = retrofit.create<SessionApi>()
}
Copy link
Member

Choose a reason for hiding this comment

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

A : 기능적으로는 문제 없지만, 생성하는 코드 스타일을 통일하면 좋을 것 같습니다

Copy link
Contributor Author

Choose a reason for hiding this comment

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

776f421

반영했습니다 !

@TaeseongYun TaeseongYun force-pushed the feature/#129-mypage-ui branch from b750833 to 392fdd7 Compare April 24, 2025 06:47
@TaeseongYun TaeseongYun changed the base branch from feature/#129-mypage-ui to release/v1.1.0 April 24, 2025 06:48
@TaeseongYun TaeseongYun force-pushed the feature/#132-mypage-navigate branch from 776f421 to 367ac9c Compare April 24, 2025 06:49
@TaeseongYun TaeseongYun merged commit 9e7d409 into release/v1.1.0 Apr 24, 2025
1 check passed
Copy link
Member

@DongChyeon DongChyeon left a comment

Choose a reason for hiding this comment

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

세션 API 쪽 작업하신거 저도 필요해서 cherry-pick 해서 사용했었는데
진욱님이 해당 커밋 쪽 보고 코드 리뷰 남겨주신 거 그대로 옮깁니다.

Comment on lines +55 to +64
LaunchedEffect(viewModel.store.sideEffects) {
viewModel.store.sideEffects.onEach { effect ->
when(effect) {
SideEffect.NavigateToBack -> {
navigateToBack()
}
}
}.launchIn(scope)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

C: collectsWithLifeCycle 확장함수 만들어놔서 이거 써주시면 좋을거같아요

Comment on lines +27 to +29
data object OnEntryScreen : AttendHistoryIntent
data object OnClickBackButton : AttendHistoryIntent
}
Copy link
Member

Choose a reason for hiding this comment

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

C: Intent는 'On' 없이 그냥 EntryScreen으로 작성하고 있어서 컨벤션 맞춰주시면 감사하겠습니다.

Comment on lines +16 to +24
val alertMessage: String
get() {
return if (absenceCount >= 10) {
"결석이 10번 이상이 되면 출결에 문제가 생겨 재적처리가 될 수 있어요. 출석 관리에 조금 더 신경 써 주세요!"
} else {
""
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

A: get을 쓰지 않더라도 매번 AttendHistoryState는 copy로 새로 생성되기 때문에 get이 없어도 될거에요

Comment on lines +8 to +18
internal class AttendHistoryUseCase @Inject constructor(
private val attendanceRepository: AttendanceRepository,
private val sessionRepository: SessionRepository
){
operator fun invoke() = combine(
attendanceRepository.getAttendanceStatistics(),
sessionRepository.getSessions()
) { attendStatistics, sessions ->
attendStatistics to sessions
}
}
Copy link
Member

Choose a reason for hiding this comment

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

A:
combine 좋네요.
getAttendanceStatistics(), getSessions()가 모두 flow로 되어있던데 일반 suspend 함수로 바꾼 후 UseCase에서 flowOf로 만들어서 처리하는건 어떠세요?

Repository 단에서는 최대한 기본 suspend 함수로 처리하면 좋을 것 같아요.
만약 getAttendanceStatistics()만 별도로 사용하게 되는 경우, flow는 오버헤드가 있을 것 같습니다.

@DongChyeon
Copy link
Member

세션 API 쪽 작업하신거 저도 필요해서 cherry-pick 해서 사용했었는데 진욱님이 해당 커밋 쪽 보고 코드 리뷰 남겨주신 거 그대로 옮깁니다.

@TaeseongYun 이미 병합된거지만 리마인드차 멘션 드려요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CodeRabbit CodeRabbit 코드 리뷰 요청 Feature 기능 추가, 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants