Skip to content

Conversation

@ggamnunq
Copy link
Contributor

@ggamnunq ggamnunq commented Aug 31, 2025

  • 챗봇 게스트 사진 수정
  • 게스트 계정 이름 수정
  • 챗봇 정보도 조회되도록 수정

Summary by CodeRabbit

  • 신기능
    • 채팅 메시지 타입을 BOT_REQUEST/BOT_RESPONSE로 세분화하여 챗봇 상호작용을 향상.
    • 챗봇 응답에 전용 아바타 이미지가 표시됩니다.
  • 개선
    • 게스트 로그인 시 기본 프로필 이미지가 자동 적용되며, 닉네임이 더 짧은 형식(guestXXXX)으로 생성됩니다.
    • 시간 변환을 Asia/Seoul 기준으로 적용해 채팅/활동 시간 표시의 일관성이 향상되었습니다.
  • 설정
    • 애플리케이션 설정에 챗봇/게스트 이미지 경로 항목이 추가되었습니다.

@ggamnunq ggamnunq self-assigned this Aug 31, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 31, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

메시지 타입을 BOT에서 BOT_REQUEST/BOT_RESPONSE로 분리하고 컨트롤러 설명을 갱신. ChatMongoService에 챗봇 아바타 이미지 주입 및 BOT 요청/응답 처리 로직 추가. 사용자 게스트 로그인에 기본 이미지 주입 및 닉네임 규칙 변경. MongoDB KST 시간대 변환기 2종 추가 및 커스텀 컨버전 등록. 설정에 이미지 키 추가. 기타 불필요한 import 정리와 주석화된 Mongo 설정 파일 추가.

Changes

Cohort / File(s) Summary
Chat 메시징 타입 및 플로우
src/main/kotlin/busanVibe/busan/domain/chat/controller/ChatRestController.kt, src/main/kotlin/busanVibe/busan/domain/chat/enums/MessageType.kt, src/main/kotlin/busanVibe/busan/domain/chat/service/ChatMongoService.kt
- 컨트롤러 API 설명: 허용 타입을 ['CHAT','BOT_RESPONSE','BOT_REQUEST']로 갱신
- MessageType: BOT 제거, BOT_REQUEST/BOT_RESPONSE 추가
- ChatMongoService: @Value("${image.chat-bot}") 주입, 슬래시 시작 메시지는 BOT_REQUEST로 분류, BOT_RESPONSE 생성 시 OpenAI 호출 및 저장, 수신 DTO의 이미지 URL에 챗봇 이미지 사용, WebSocket 발행은 CHAT에 한정
게스트 로그인 변경
src/main/kotlin/busanVibe/busan/domain/user/service/UserCommandService.kt
- @Value("${image.guest}") guestImage 생성자 파라미터 추가
- guestLogin: 닉네임 접미사 길이 4로 단축, profileImageUrlguestImage로 설정
Mongo KST 컨버터 및 등록
src/main/kotlin/busanVibe/busan/global/config/mongo/DateToLocalDateTimeKstConverter.kt, .../LocalDateTimeToDateKstConverter.kt, .../MongoConfig.kt
- Date⇄LocalDateTime 변환기(Asia/Seoul) 2종 추가(Reading/WritingConverter, @component)
- MongoConfigMongoCustomConversions 빈 추가로 컨버터 등록
설정 추가
src/main/resources/application.yml
- image 섹션 추가: chat-bot: ${IMAGE_CHATBOT}, guest: ${IMAGE_GUEST}
정리/주석
src/main/kotlin/busanVibe/busan/domain/common/BaseEntity.kt, src/main/kotlin/busanVibe/busan/global/config/mongo/MongoTimeConfig.kt
- BaseEntity: 불필요한 import 제거
- MongoTimeConfig: 주석 처리된 샘플 설정 파일 추가(비활성)

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Controller as ChatRestController
  participant Service as ChatMongoService
  participant OpenAI as OpenAI Service
  participant Mongo as MongoDB
  participant WS as WebSocket Broker

  User->>Controller: POST /send (message, userId)
  Controller->>Service: handleSend(message, userId)
  alt message starts with "/"
    note over Service: Classify as BOT_REQUEST
    Service->>Mongo: Save ChatMessage (type=BOT_REQUEST)
    Service->>OpenAI: chatToOpenAI(message)
    OpenAI-->>Service: bot reply
    Service->>Mongo: Save ChatMessage (type=BOT_RESPONSE, image=chat-bot)
    note over WS: No publish for BOT_REQUEST/BOT_RESPONSE per current logic
  else normal message
    note over Service: Classify as CHAT
    Service->>Mongo: Save ChatMessage (type=CHAT)
    Service-->>WS: Publish ReceiveDto (type=CHAT)
  end
Loading
sequenceDiagram
  autonumber
  actor Guest as Anonymous User
  participant UserSvc as UserCommandService
  participant Mongo as MongoDB

  Guest->>UserSvc: guestLogin()
  note over UserSvc: nickname = "guest" + 4-char suffix
  note over UserSvc: profileImageUrl = ${image.guest}
  UserSvc->>Mongo: Save Guest User
  UserSvc-->>Guest: Return tokens + user profile
Loading
sequenceDiagram
  autonumber
  participant App as Application
  participant MongoCfg as MongoConfig
  participant ConvW as LocalDateTime→Date
  participant ConvR as Date→LocalDateTime
  participant Mongo as MongoDB

  App->>MongoCfg: init()
  MongoCfg->>App: MongoCustomConversions([ConvW, ConvR])
  App->>Mongo: Write LocalDateTime
  Mongo-->>App: Uses ConvW (Asia/Seoul)
  App->>Mongo: Read Date
  Mongo-->>App: Uses ConvR (Asia/Seoul)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

(\/)

( •
•) 봇이 말해, 두 갈래로—요청과 응답!

/) ) 채팅은 톡, 게스트는 반짝 이미지로 입장.

✨ 시간은 부산의 하늘, KST로 착착 저장.

나는 깡총 검토 토끼, 커밋 사이를 폴짝!

오늘도 코드 행운을, 당근 한 입과 함께. 🥕

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Free

💡 Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 396ccdb and 65487a5.

📒 Files selected for processing (10)
  • src/main/kotlin/busanVibe/busan/domain/chat/controller/ChatRestController.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/chat/enums/MessageType.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/chat/service/ChatMongoService.kt (5 hunks)
  • src/main/kotlin/busanVibe/busan/domain/common/BaseEntity.kt (0 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/service/UserCommandService.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/global/config/mongo/DateToLocalDateTimeKstConverter.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/global/config/mongo/LocalDateTimeToDateKstConverter.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/global/config/mongo/MongoConfig.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/global/config/mongo/MongoTimeConfig.kt (1 hunks)
  • src/main/resources/application.yml (1 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 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? Join our Discord community 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 or @coderabbit 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.

@ggamnunq ggamnunq merged commit 45033d2 into main Aug 31, 2025
1 of 2 checks 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