Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
1ab0db0
[refactor]: 피드 댓글에서 댓글창 안올라오는 문제 수정 (#101)
Nico1eKim Aug 18, 2025
81ed889
[refactor]: 피드 댓글 하단부 잘리는 문제 해결 (#101)
Nico1eKim Aug 18, 2025
0c87615
[refactor]: 기록장 필터 ui 깨지는거 수정 (#101)
Nico1eKim Aug 18, 2025
ba4211d
[refactor]: 기록장 프로필 이미지 받아오도록 수정 (#101)
Nico1eKim Aug 18, 2025
280fea4
[refactor]: 오늘의 한마디 수정 없애기 (#101)
Nico1eKim Aug 18, 2025
58a58a1
[refactor]: 독서메이트 최대 간격 설정 (#101)
Nico1eKim Aug 18, 2025
9755565
[refactor]: 댓글 바텀시트 높이 수정 (#101)
Nico1eKim Aug 18, 2025
8053bb4
[refactor]: 기록장 기록 간격 수정 (#101)
Nico1eKim Aug 18, 2025
2d36888
[refactor]: 기록 생성 시 오류 잘리는 문제 해결 (#101)
Nico1eKim Aug 18, 2025
cc276a5
[refactor]: 기록 생성 시 페이지 오류 나고 총평으로 바꿨을 때 오류 남아있는 문제 수정 (#101)
Nico1eKim Aug 18, 2025
52982b8
[refactor]: 진행중인 모집방 독서메이트 클릭 범위 수정 (#101)
Nico1eKim Aug 18, 2025
b97c811
[refactor]: 독서메이트에서 사용자 피드로 이동하게 수정 (#101)
Nico1eKim Aug 18, 2025
e61223a
[refactor]: 피드 댓글 화면에서 프로필 누르면 사용자 피드로 이동하게 수정 (#101)
Nico1eKim Aug 18, 2025
9f60344
[refactor]: 기록장 프로필 누르면 화면이동하도록 수정 (#101)
Nico1eKim Aug 18, 2025
3d106e5
Merge branch 'develop' of https://github.com/THIP-TextHip/THIP-Androi…
Nico1eKim Aug 18, 2025
5a598ec
[refactor]: 피드 프로필 누르면 화면이동하도록 수정 (#101)
Nico1eKim Aug 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class CommentsCreateResponse(
val commentId: Int?,
val creatorId: Int?,
val creatorId: Long?,
val creatorProfileImageUrl: String?,
val creatorNickname: String?,
val aliasName: String?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data class CommentsResponse(
@Serializable
data class CommentList(
val commentId: Int?,
val creatorId: Int?,
val creatorId: Long?,
val creatorProfileImageUrl: String?,
Comment on lines +15 to 16
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

ID Int→Long 전환은 방향성 OK. 잔존 Int 참조/캐스팅 흔적 점검 제안

모델의 ID 타입 확장은 합리적입니다. 다만 호출부·콜백·네비게이션 파라미터에서 Int 시그니처가 남아 있거나 toInt()/toLong() 캐스팅으로 임시 대응한 곳이 없는지 확인 부탁드립니다. 아래 스크립트로 빠르게 훑어볼 수 있어요.

Also applies to: 33-34


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) 남아있는 Int 타입 ID 필드 검색 (userId/creatorId)..."
rg -nP --type=kt -C2 '\b(creatorId|userId)\s*:\s*Int\??\b' || true

echo "2) 사용자 프로필 네비게이션 콜백이 Int를 받는 곳 검색..."
rg -nP --type=kt -C2 '\b(onNavigateToUserProfile|onUserClick|onProfileClick)\s*:\s*\(\s*Int\??\s*\)\s*->' || true

echo "3) ID 변환 캐스팅 흔적 검색(.toInt()/.toLong())..."
rg -nP --type=kt -C2 '\.(toInt|toLong)\s*\(' || true

echo "4) GroupRoomMatesList 호출부 점검"
rg -nP --type=kt -C3 'GroupRoomMatesList\s*\(' || true

Length of output: 764


추가 검증: .kt 파일 전체에서 Int → Long 변경 후 남아있는 Int 참조 및 캐스팅 여부 재검색


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "1) 남아있는 Int 타입 ID 필드 검색 (creatorId/userId)..."
rg -g '*.kt' -nP -C2 '\b(creatorId|userId)\s*:\s*Int\??\b' || true

echo "2) 네비게이션/콜백에서 Int 파라미터 사용 검색 (onNavigateToUserProfile/onUserClick/onProfileClick)..."
rg -g '*.kt' -nP -C2 '\b(onNavigateToUserProfile|onUserClick|onProfileClick)\s*\(\s*Int\??\s*\)' || true

echo "3) ID 변환 캐스팅 흔적 검색 (.toInt()/.toLong())..."
rg -g '*.kt' -nP -C2 '\.(toInt|toLong)\s*\(' || true

echo "4) GroupRoomMatesList 호출부 점검..."
rg -g '*.kt' -nP -C3 'GroupRoomMatesList\s*\(' || true

Length of output: 13674


ID 타입 확장(Int→Long) 추가 반영 필요
모델·콜백·호출부에 여전히 Int 필드 및 .toLong() 캐스팅이 남아 있어, 일관된 Long 시그니처로 변경하고 불필요한 캐스팅을 제거해주세요.

점검 대상 파일 및 필드:

  • app/src/main/java/com/texthip/thip/data/model/users/response/UserSearchResponse.kt
    @SerializedName("userId") val userId: IntLong
  • app/src/main/java/com/texthip/thip/data/model/rooms/response/RoomsDailyGreetingResponse.kt
    val attendanceCheckId: Int, val creatorId: IntLong
  • app/src/main/java/com/texthip/thip/data/model/feed/response/RelatedBooksResponse.kt
    @SerialName("feedId") val feedId: Int, @SerialName("creatorId") val creatorId: IntLong
  • app/src/main/java/com/texthip/thip/data/model/feed/response/FeedUsersInfoResponse.kt
    val creatorId: IntLong
  • app/src/main/java/com/texthip/thip/data/model/feed/response/FeedMineInfoResponse.kt
    @SerialName("creatorId") val creatorId: IntLong
  • app/src/main/java/com/texthip/thip/data/model/comments/response/CommentsResponse.kt (15–16, 33–34)
    val creatorId: Int?, val replyId: Int? 등 → Long?
  • UI 호출부
    • FeedCommentScreen.kt → commentsViewModel.initialize(postId = feedId.toLong(), …)
    • GroupNoteScreen.kt → commentsViewModel.initialize(postId = post.postId.toLong(), …)
      ⇒ 시그니처를 Long으로 변경 후 .toLong() 제거
  • ViewModel
    • CommentsViewModel.kt → deleteComment(commentId.toLong()), likeComment(commentId.toLong(), …)
      ⇒ 파라미터 타입을 Long으로 변경하고 캐스팅 제거

※ AdvancedImePadding.kt, SearchBookDetailScreen.kt 등의 toInt() 호출은 ID 변환이 아닌 UI 좌표 로직이므로 그대로 두셔도 됩니다.

🤖 Prompt for AI Agents
app/src/main/java/com/texthip/thip/data/model/comments/response/CommentsResponse.kt
(lines 15–16 and 33–34) 및 리뷰에 나열된 모든 위치: 모델 필드가 Int/Int?로 남아 있고 호출부에서 .toLong()
캐스팅을 사용하고 있어 ID 타입 변경(Int→Long)이 완전히 반영되지 않았습니다. 각 모델 파일의 ID 관련 프로퍼티를 Int/Int?에서
Long/Long?으로 변경하고(예: UserSearchResponse.userId,
RoomsDailyGreetingResponse.attendanceCheckId/creatorId,
RelatedBooksResponse.feedId/creatorId, FeedUsersInfoResponse.creatorId,
FeedMineInfoResponse.creatorId, CommentsResponse.creatorId/replyId 등),
ViewModel과 UI 호출부(CommentsViewModel, FeedCommentScreen, GroupNoteScreen 등)의 해당
파라미터 시그니처를 Long으로 변경한 뒤 모든 불필요한 .toLong() 호출을 제거하세요; nullable 여부는 기존 로직과 일치하도록
유지하세요. Ensure serialization annotations remain correct and run a build to fix
any remaining type mismatches.

val creatorNickname: String?,
val aliasName: String?,
Expand All @@ -30,7 +30,7 @@ data class CommentList(
data class ReplyList(
val commentId: Int,
val parentCommentCreatorNickname: String,
val creatorId: Int,
val creatorId: Long,
val creatorProfileImageUrl: String,
val creatorNickname: String,
val aliasName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data class AllFeedResponse(
@Serializable
data class AllFeedItem(
@SerialName("feedId") val feedId: Int,
@SerialName("creatorId") val creatorId: Int,
@SerialName("creatorId") val creatorId: Long,
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

creatorId를 Long으로 확장한 변경 적절 — 교차 계층 호환성만 빠르게 점검해 주세요

  • 대용량 ID 대응과 오버플로 방지 측면에서 적절한 변경입니다. Kotlinx Serialization에서도 숫자(JSON number)라면 문제없이 역직렬화됩니다.
  • 다음 누락 포인트만 점검 부탁드립니다:
    • 서버가 드물게 문자열(JSON string)로 ID를 보내는지 여부(그럴 경우 커스텀 serializer 필요).
    • NavGraph 인자 타입이 NavType.LongType으로 교체되었는지.
    • SavedStateHandle/Bundle에서 putInt/getInt → putLong/getLong 전환 누락 여부.
    • 캐시/DB/도메인 모델/매퍼에 남아있는 Int 타입 및 toInt() 변환 호출.

필요 시 아래 스크립트를 루트에서 실행해 잔존 Int 사용 지점을 빠르게 확인할 수 있습니다.

필요하시면 스크립트 결과 기반으로 후속 패치(diff)까지 정리해 드리겠습니다.


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Int 타입으로 남아있는 ID 필드 정의 검사 ==="
rg -n --type=kt -C2 $'\b(creatorId|userId)\s*:\s*Int\??\b'

echo
echo "=== toInt() 변환 사용 검사 (ID 관련) ==="
rg -n --type=kt -C2 $'\b(creatorId|userId)\b.*\.toInt\('

echo
echo "=== NavType.IntType 사용 검사 ==="
rg -n --type=kt -C3 'NavType\.IntType'

echo
echo "=== Bundle/SavedStateHandle Int 사용 패턴 검사 ==="
rg -n --type=kt -C2 $'\b(putInt|getInt)\(\s*"userId"'
rg -n --type=kt -C2 $'SavedStateHandle.*get<Int>\\("userId"\\)'

echo
echo "=== 함수/파라미터 시그니처에서 Int ID 잔존 검사 ==="
rg -n --type=kt -C2 $'\b(fun|val|var)\b[^\n]*\b(creatorId|userId)\s*:\s*Int\??\b'

Length of output: 180


아래 스크립트로 .kt 파일을 glob 필터링하여 다시 검사해 주세요.


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "=== Int 타입으로 남아있는 ID 필드 정의 검사 ==="
rg -n -C2 -g '*.kt' '\b(creatorId|userId)\s*:\s*Int\??\b'

echo
echo "=== toInt() 변환 사용 검사 (ID 관련) ==="
rg -n -C2 -g '*.kt' '\b(creatorId|userId)\b.*\.toInt\('

echo
echo "=== NavType.IntType 사용 검사 ==="
rg -n -C3 -g '*.kt' 'NavType\.IntType'

echo
echo "=== Bundle/SavedStateHandle Int 사용 패턴 검사 ==="
rg -n -C2 -g '*.kt' '\b(putInt|getInt)\(\s*"userId"'
rg -n -C2 -g '*.kt' 'SavedStateHandle.*get<Int>\("userId"\)'

echo
echo "=== 함수/파라미터 시그니처에서 Int ID 잔존 검사 ==="
rg -n -C2 -g '*.kt' '\b(fun|val|var)\b[^\n]*\b(creatorId|userId)\s*:\s*Int\??\b'

Length of output: 3450


Int 타입 ID 필드 전부 Long으로 변경 필요

다음 데이터 모델 클래스에 여전히 Int로 선언된 ID 필드가 남아 있습니다. 큰 값 대응을 위해 모두 Long으로 변경해주세요.

  • app/src/main/java/com/texthip/thip/data/model/users/response/UserSearchResponse.kt
    • line 12: val userId: Int
  • app/src/main/java/com/texthip/thip/data/model/rooms/response/RoomsDailyGreetingResponse.kt
    • line 14: val attendanceCheckId: Int
    • line 15: val creatorId: Int
  • app/src/main/java/com/texthip/thip/data/model/feed/response/RelatedBooksResponse.kt
    • line 15: val feedId: Int
    • line 16: val creatorId: Int
  • app/src/main/java/com/texthip/thip/data/model/feed/response/FeedUsersInfoResponse.kt
    • line 7: val creatorId: Int
  • app/src/main/java/com/texthip/thip/data/model/feed/response/FeedMineInfoResponse.kt
    • line 8: val creatorId: Int

추가로 아래 부분도 누락 없는지 검토 바랍니다:

  • NavGraph 인자 → NavType.LongType 전환
  • Bundle/SavedStateHandle → putLong/getLong
  • 매퍼나 뷰모델에서의 .toInt() 호출

위 수정 후 다시 직렬화·내비게이션 동작을 점검해주세요.

🤖 Prompt for AI Agents
In
app/src/main/java/com/texthip/thip/data/model/users/response/UserSearchResponse.kt
line 12;
app/src/main/java/com/texthip/thip/data/model/rooms/response/RoomsDailyGreetingResponse.kt
lines 14-15;
app/src/main/java/com/texthip/thip/data/model/feed/response/RelatedBooksResponse.kt
lines 15-16;
app/src/main/java/com/texthip/thip/data/model/feed/response/FeedUsersInfoResponse.kt
line 7; and
app/src/main/java/com/texthip/thip/data/model/feed/response/FeedMineInfoResponse.kt
line 8 change the ID properties declared as Int to Long, update any Kotlin
serialization types/signatures accordingly, and adjust all call sites: switch
NavGraph arguments to NavType.LongType, replace Bundle/SavedStateHandle put/get
usages with putLong/getLong, and remove or replace any .toInt() conversions used
for IDs (use .toLong() or avoid conversion) so serialization, navigation and
viewmodel mappers remain consistent; after edits run serialization and
navigation flows to verify behavior.

@SerialName("creatorNickname") val creatorNickname: String,
@SerialName("creatorProfileImageUrl") val creatorProfileImageUrl: String?,
@SerialName("aliasName") val aliasName: String,
Expand Down
Copy link
Collaborator

Choose a reason for hiding this comment

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

이런 코드 수정이 많아 보이는데 Long으로 바꾼 이유가 있을까요? QA에서는 확인이 안되는디

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class FeedDetailResponse(
@SerialName("feedId") val feedId: Int,
@SerialName("creatorId") val creatorId: Int,
@SerialName("creatorId") val creatorId: Long,
@SerialName("creatorNickname") val creatorNickname: String,
@SerialName("creatorProfileImageUrl") val creatorProfileImageUrl: String?,
@SerialName("aliasName") val aliasName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data class PostList(
val postDate: String,
val postType: String,
val page: Int,
val userId: Int,
val userId: Long,
val nickName: String,
val profileImageUrl: String?,
val content: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data class RoomsUsersResponse(

@Serializable
data class UserList(
val userId: Int,
val userId: Long,
val nickname: String,
val imageUrl: String,
val aliasColor: String,
Expand Down
Copy link
Collaborator

Choose a reason for hiding this comment

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

에러 필드 수정 고생했습니다..

Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,15 @@ fun BookPageTextField(
bookTotalPage: Int,
enabled: Boolean = true,
text: String,
isError: Boolean,
onValueChange: (String) -> Unit,
) {
var isError by rememberSaveable { mutableStateOf(false) }
var errorMessageRes by rememberSaveable { mutableStateOf<Int?>(null) }

Column {
OutlinedTextField(
value = text,
onValueChange = { newText: String ->
if (newText.isEmpty() || newText.all { it.isDigit() }) {
onValueChange(newText)

if (newText.isNotEmpty()) {
val pageNum = newText.toInt()
isError = pageNum > bookTotalPage
errorMessageRes = if (isError) {
R.string.error_page_over
} else {
null
}
} else {
isError = false
errorMessageRes = null
}
}
},
enabled = enabled,
Expand Down Expand Up @@ -111,20 +96,18 @@ fun BookPageTextField(
modifier = Modifier.clickable {
if (text.isNotEmpty()) {
onValueChange("")
isError = false
errorMessageRes = null
}
},
tint = Color.Unspecified
)
}
)

Box(modifier = Modifier.height(22.dp)) {
if (isError && errorMessageRes != null) {
Box(modifier = Modifier.height(24.dp)) {
if (isError) {
Text(
modifier = Modifier.padding(start = 4.dp, top = 8.dp),
text = stringResource(id = errorMessageRes!!),
text = stringResource(id = R.string.error_page_over),
color = colors.Red,
style = typography.menu_r400_s14_h24.copy(lineHeight = 12.sp)
)
Expand Down Expand Up @@ -172,6 +155,7 @@ fun BookPageTextFieldPreviewEmpty() {
BookPageTextField(
bookTotalPage = 456,
text = text,
isError = false,
onValueChange = {
text = it
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import com.texthip.thip.ui.theme.ThipTheme.typography
@Composable
fun ProfileBar(
modifier: Modifier = Modifier,
profileImage: String,
profileImage: String?,
topText: String,
bottomText: String,
bottomTextColor: Color = colors.NeonGreen,
Expand Down
Copy link
Collaborator

Choose a reason for hiding this comment

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

이게 잘 확인은 안되는데 프로필 이미지를 터치했을 때 해당 유저의 피드 게시글로 이동하는거 맞나요?

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.texthip.thip.ui.common.header

import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -31,10 +32,12 @@ fun ProfileBarFeed(
genreName: String,
genreColor: Color = colors.NeonGreen,
date: String,
onClick: () -> Unit = {}
) {
Row(
modifier = Modifier
.fillMaxWidth(),
.fillMaxWidth()
.clickable { onClick() },
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {
Expand Down
Loading