Skip to content

[FIX] 빌드 오류 수정#94

Merged
rbqks529 merged 3 commits into
THIP-TextHip:developfrom
rbqks529:develop
Aug 17, 2025
Merged

[FIX] 빌드 오류 수정#94
rbqks529 merged 3 commits into
THIP-TextHip:developfrom
rbqks529:develop

Conversation

@rbqks529
Copy link
Copy Markdown
Collaborator

@rbqks529 rbqks529 commented Aug 17, 2025

➕ 이슈 링크

  • closed #이슈넘버

🔎 작업 내용

  • 어떤 부분이 구현되었는지 설명해주세요

📸 스크린샷


😢 해결하지 못한 과제

  • [] TASK


📢 리뷰어들에게

  • 참고해야 할 사항들을 적어주세요

Summary by CodeRabbit

  • 개선사항
    • 피드 화면이 내부 상태로 탭과 콘텐츠를 더 일관되게 표시합니다.
    • 구독 바가 최신 작성자 데이터를 직접 사용해 표시 정확도가 향상됩니다.
  • 버그 수정
    • 글쓰기·댓글 내비게이션 호출 방식이 정리되어 안정성이 개선되었습니다.
    • 번호 매기기 문자열의 포맷 처리 방식이 명확해져 렌더링 문제가 해소되었습니다.
  • 리팩터링
    • 피드 관련 경로·화면·데이터 흐름이 단순화되어 사용성 및 유지보수가 향상되었습니다.
  • 기타(Chores)
    • 개발 도구의 정렬 우선순위 설정이 업데이트되었습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

피드 모델 패키지명을 feeds.responsefeed.response로 정정하고 관련 import를 업데이트했습니다. FeedScreen에서 feeds, totalFeedCount, selectedTabIndex 파라미터를 제거해 ViewModel 상태로 대체했습니다. FeedRoutes의 정적 Write 객체를 제거하고 호출을 Write()로 변경했으며, strings.xmlnumberingformatted="false"를 추가했습니다. IDE 정렬 설정이 갱신되었습니다.

Changes

Cohort / File(s) Summary of Changes
IDE 정렬 설정
.idea/deviceManager.xml
DeviceTable의 컬럼 정렬 상태에 API 컬럼 DESCENDING 우선, Name ASCENDING 보조 정렬 추가
피드 응답 모델 패키지 정리
app/src/main/java/com/texthip/thip/data/model/feed/response/AllFeedResponse.kt, app/src/main/java/com/texthip/thip/data/model/feed/response/MyFeedResponse.kt
패키지 경로를 com.texthip.thip.data.model.feeds.responsecom.texthip.thip.data.model.feed.response로 변경
리포지토리/서비스 import 수정
app/src/main/java/com/texthip/thip/data/repository/FeedRepository.kt, app/src/main/java/com/texthip/thip/data/service/FeedService.kt
AllFeedResponse/MyFeedResponse import 경로를 새 패키지로 업데이트
FeedScreen 시그니처/데이터 소스 변경
app/src/main/java/com/texthip/thip/ui/feed/screen/FeedScreen.kt
feeds, totalFeedCount, selectedTabIndex 파라미터 제거; recentWritersMySubscribeBarlist에 직접 전달하도록 변경; 프리뷰/임포트 정리
FeedViewModel 상태 업데이트 헬퍼 도입
app/src/main/java/com/texthip/thip/ui/feed/viewmodel/FeedViewModel.kt
모델 import 경로 수정; _uiState.update 호출을 updateState 헬퍼로 변경; 사소한 구조/공백 조정
네비게이션 확장/구성 수정
app/src/main/java/com/texthip/thip/ui/navigator/extensions/FeedNavigationExtensions.kt, .../ui/navigator/navigations/FeedNavigation.kt
FeedRoutes.WriteFeedRoutes.Write() 호출로 변경; FeedScreen 호출에서 제거된 파라미터 미전달; 중복 import 제거 및 문법 보정
라우트 정의 정리
app/src/main/java/com/texthip/thip/ui/navigator/routes/FeedRoutes.kt
sealed class 내부의 정적 data object Write 제거; data class Write(...)만 유지
리소스 포맷 속성 추가
app/src/main/res/values/strings.xml
numbering 문자열 리소스에 formatted="false" 속성 추가(내용 동일)

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant FeedScreen
  participant FeedViewModel
  participant Repository
  participant Service

  User->>FeedScreen: 화면 진입
  FeedScreen->>FeedViewModel: feedUiState 수집
  FeedViewModel->>Repository: recentWriters/feeds 요청
  Repository->>Service: API 호출
  Service-->>Repository: 응답 반환
  Repository-->>FeedViewModel: 데이터 전달
  FeedViewModel-->>FeedScreen: feedUiState 업데이트
  FeedScreen-->>User: recentWriters 직접 표시 및 탭/콘텐츠 렌더링
Loading
sequenceDiagram
  actor User
  participant NavExt as NavigationExtensions
  participant Nav as NavController
  participant Routes as FeedRoutes

  User->>NavExt: 글쓰기 요청
  NavExt->>Routes: FeedRoutes.Write() 생성
  Routes-->>NavExt: 라우트 문자열 반환
  NavExt->>Nav: navigate(route)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

🍀 refactor, ✅ OK merge

Suggested reviewers

  • JJUYAAA

Poem

토끼가 껑충, 코드 길을 바꾸었네 🐇
패키지 단정하고 라우트는 Write()로 탁,
피드는 뷰모델 품에 안겨 조용히 비치고,
숫자 노래는 그대로, 포맷만 잠재웠다네 ✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3a73e42 and ed0ce4a.

📒 Files selected for processing (1)
  • app/src/main/java/com/texthip/thip/ui/feed/viewmodel/FeedViewModel.kt (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (1)
app/src/main/java/com/texthip/thip/ui/feed/viewmodel/FeedViewModel.kt (1)

266-280: fetchRecentWriters 실패 시 isLoading 해제 누락 — 로딩 고착/무한스크롤 차단 위험

실패 분기에서 isLoading을 false로 되돌리지 않아 canLoadMore 계산이 영구 false가 될 수 있습니다.

다음 패치를 적용해 주세요:

                 .onFailure { exception ->
-                    updateState { it.copy(error = exception.message) }
+                    updateState { it.copy(isLoading = false, error = exception.message) }
                 }
🧹 Nitpick comments (2)
.idea/deviceManager.xml (1)

6-9: IDE 설정 파일 커밋은 지양 권장 (팀 정책 확인 필요)

Device Manager 정렬 상태 변경은 로컬 개발 환경에 종속적입니다. VCS에 포함하면 불필요한 변경 이력이 자주 발생할 수 있어요. 팀에서 .idea 하위 파일을 버전관리하는 정책이 아니라면 이 변경은 제외하는 것을 권장드립니다.

팀 정책상 유지가 필요 없다면, .gitignore에 다음 항목 추가를 고려해주세요:

  • .idea/deviceManager.xml
app/src/main/java/com/texthip/thip/ui/feed/viewmodel/FeedViewModel.kt (1)

80-125: 중복 로직(전체/내 피드 로딩) 최소화 제안

loadAllFeeds/loadMyFeeds가 거의 동일한 흐름입니다. 공통화하면 버그 표면적을 줄일 수 있습니다.

예시(개념 스케치):

private inline fun <T> loadFeeds(
    isInitial: Boolean,
    isLoadingFlag: () -> Boolean,
    setLoadingFlag: (Boolean) -> Unit,
    getNextCursor: () -> String?,
    setNextCursor: (String?) -> Unit,
    stateInitializer: (FeedUiState) -> FeedUiState,
    appendToState: (FeedUiState, List<T>, Boolean) -> FeedUiState,
    repoCall: suspend (String?) -> Result<Response<T>?>
) { /* 공통 구현 */ }

필요 시 실제 코드로 풀어드릴게요.

Also applies to: 127-172

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 234d156 and 3a73e42.

📒 Files selected for processing (11)
  • .idea/deviceManager.xml (1 hunks)
  • app/src/main/java/com/texthip/thip/data/model/feed/response/AllFeedResponse.kt (1 hunks)
  • app/src/main/java/com/texthip/thip/data/model/feed/response/MyFeedResponse.kt (1 hunks)
  • app/src/main/java/com/texthip/thip/data/repository/FeedRepository.kt (1 hunks)
  • app/src/main/java/com/texthip/thip/data/service/FeedService.kt (1 hunks)
  • app/src/main/java/com/texthip/thip/ui/feed/screen/FeedScreen.kt (1 hunks)
  • app/src/main/java/com/texthip/thip/ui/feed/viewmodel/FeedViewModel.kt (2 hunks)
  • app/src/main/java/com/texthip/thip/ui/navigator/extensions/FeedNavigationExtensions.kt (1 hunks)
  • app/src/main/java/com/texthip/thip/ui/navigator/navigations/FeedNavigation.kt (0 hunks)
  • app/src/main/java/com/texthip/thip/ui/navigator/routes/FeedRoutes.kt (0 hunks)
  • app/src/main/res/values/strings.xml (1 hunks)
💤 Files with no reviewable changes (2)
  • app/src/main/java/com/texthip/thip/ui/navigator/routes/FeedRoutes.kt
  • app/src/main/java/com/texthip/thip/ui/navigator/navigations/FeedNavigation.kt
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/src/main/java/com/texthip/thip/ui/feed/viewmodel/FeedViewModel.kt (2)
app/src/main/java/com/texthip/thip/ui/feed/viewmodel/FeedDetailViewModel.kt (1)
  • updateState (28-30)
app/src/main/java/com/texthip/thip/ui/feed/viewmodel/FeedWriteViewModel.kt (1)
  • updateState (34-36)
🔇 Additional comments (12)
app/src/main/java/com/texthip/thip/data/model/feed/response/AllFeedResponse.kt (1)

1-1: 구 패키지 참조 없음 확인 — 변경 승인
rg 검사 결과 더 이상 com.texthip.thip.data.model.feeds.response를 참조하는 코드가 없습니다. 패키지 경로를 feed.response로 수정한 현재 상태로 문제없으니 승인하겠습니다.

app/src/main/res/values/strings.xml (1)

186-186: formatted 속성 제거 및 위치 지정 포맷 전환 권장

formatted="false"%d/%s 병용 시 빌드 타임 포맷 검증이 비활성화되어, 향후 로케일별 자리표시자 개수·순서 불일치를 놓칠 수 있습니다. positional format을 사용하고 formatted 속성은 제거하는 것을 추천드립니다.

  • 변경 대상: app/src/main/res/values/strings.xml (186행)
    -    <string name="numbering" formatted="false">%d. %s</string>
    +    <string name="numbering">%1$d. %2$s</string>
  • 현재 다른 values-*/strings.xml에는 동일 key가 없으나, 새로운 로케일이 추가될 경우 번역 시 자리표시자 유지 여부를 꼭 검증해주세요.
  • CardVote.kt (106행) 등에서 R.string.numbering을 호출할 때 getString() 혹은 stringResource()에 두 개의 인자(숫자, 문자열)가 올바르게 전달되는지 확인이 필요합니다.

위 사항 검토 후 반영 부탁드립니다.

app/src/main/java/com/texthip/thip/data/repository/FeedRepository.kt (1)

10-11: import 경로 수정 LGTM

모델 패키지 경로 변경(feed.response)과 일치하도록 import를 정정한 부분 문제 없습니다. 런타임 동작에 영향은 없고 컴파일 정합성만 보장됩니다.

app/src/main/java/com/texthip/thip/data/service/FeedService.kt (1)

9-10: import 경로 수정 LGTM

서비스 인터페이스 시그니처 변경 없이 모델 패키지 경로에만 맞춘 정정으로 보입니다. 연쇄 영향도 최소입니다.

app/src/main/java/com/texthip/thip/data/model/feed/response/MyFeedResponse.kt (1)

1-1: 패키지 경로 정정 LGTM – 잔존 참조 없음 확인됨

rg 스캔 결과 com.texthip.thip.data.model.feeds.response에 대한 구 경로 참조가 전혀 발견되지 않았습니다.
추가 작업 없이 머지하세요!

app/src/main/java/com/texthip/thip/ui/navigator/extensions/FeedNavigationExtensions.kt (2)

25-25: 닫는 중괄호 보완 OK

의도대로 형식 보완만 이뤄졌습니다.


19-20: 정적 객체 호출 잔여 없음 — 검증 완료

  • FeedNavigation.kt (55, 56): FeedRoutes.Write는 제네릭 타입 파라미터(composable<FeedRoutes.Write>, toRoute<FeedRoutes.Write>)로 사용된 부분이며, 정적 객체 호출이 아닙니다.

더 이상의 괄호 없는 FeedRoutes.Write 호출은 존재하지 않습니다.

app/src/main/java/com/texthip/thip/ui/feed/viewmodel/FeedViewModel.kt (3)

57-59: updateState 도입으로 상태 갱신 일관화

다른 ViewModel(FeedWrite/FeedDetail)과 동일한 패턴으로 통일되어 가독성과 유지보수성이 개선되었습니다.


258-258: 닫는 중괄호 추가 OK

정상 종료 누락을 보완한 단순 수정입니다.


5-6: 모든 구 패키지 참조가 제거되었습니다

rg 검색 결과 com.texthip.thip.data.model.feeds.response 경로가 코드베이스에 더 이상 존재하지 않음을 확인했습니다.

app/src/main/java/com/texthip/thip/ui/feed/screen/FeedScreen.kt (2)

235-241: 해당 경고 불필요: whole_num 문자열에 formatted="false"가 설정되어 있지 않습니다.

strings.xml 확인 결과 whole_num 리소스에는 formatted 속성이 기본값(true)으로 유지되어 있으며, %d 플레이스홀더가 포함되어 있어 stringResource(R.string.whole_num, feedUiState.myFeeds.size) 호출 시 예외가 발생하지 않습니다.
현재 구현을 그대로 유지하시면 됩니다.

Likely an incorrect or invalid review comment.


309-311: MySubscribeBarlist에 전달된 타입이 시그니처와 일치합니다

FeedUiState.recentWritersList<RecentWriterList>로 선언되어 있으며, MySubscribeBarlist(subscriptions: List<RecentWriterList>)의 파라미터 타입과 완전히 일치합니다. 따라서 추가 매핑 계층이나 시그니처 변경 없이 그대로 전달해도 빌드 에러가 발생하지 않습니다.

@rbqks529 rbqks529 merged commit e3438dc into THIP-TextHip:develop Aug 17, 2025
1 check was pending
This was referenced Aug 18, 2025
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