Skip to content

feat(chat): 채팅 세션 UI 및 매물 검색 결과 카드 구현 (#88) - #104

Merged
crolvlee merged 3 commits into
developfrom
phase/88-chat-session-ui
Jun 25, 2026
Merged

feat(chat): 채팅 세션 UI 및 매물 검색 결과 카드 구현 (#88)#104
crolvlee merged 3 commits into
developfrom
phase/88-chat-session-ui

Conversation

@crolvlee

@crolvlee crolvlee commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Chatbot.vue: 세션 사이드바·메시지 렌더링·분석 카드·매물 결과 카드 UI 구현
  • chatSessionStore: 세션 생성·전환·로컬스토리지 유지 로직 구현
  • ChatResponse.java: Map::copyOfHashMap::new NPE 수정
  • application.properties: HikariCP prepareThreshold=0 설정으로 prepared statement 충돌 방지
  • llm_client: PROPERTY_SEARCH 0건 시 안내 문구 및 LLM 매물 요약 답변 추가
  • price_analysis / safety_analysis: requiresSelection=True 시 분석 카드 미생성 처리
  • analysis_answer_service: 매물 미선택 시 안내 텍스트 반환 개선

Test plan

  • 채팅 세션 전환 시 이전 세션 메시지 유지 확인
  • 매물 검색 결과 카드 렌더링 확인 (매물명·주소·유형·가격·면적·층수)
  • 매물 미선택 상태에서 분석 질문 시 안내 메시지 반환 확인
  • 페이지 새로고침 후 세션 복원 확인

Closes #88

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a chat sidebar so you can start, switch, and review past conversations more easily.
    • Property results now appear as richer cards with clearer pricing, location, and building details.
  • Bug Fixes

    • Empty chats are no longer shown in the session list.
    • Improved handling of property search results, including clearer messages when no matches are found.
    • Updated stability for safety-related responses and database connection behavior.

@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
salmanhae Ready Ready Preview, Comment Jun 25, 2026 9:10am

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a52949a0-83f6-4865-9bc1-563985e08913

📥 Commits

Reviewing files that changed from the base of the PR and between 7934ee4 and fa0a51c.

📒 Files selected for processing (8)
  • backend-ai/app/clients/llm_client.py
  • backend-ai/app/graph/nodes/price_analysis.py
  • backend-ai/app/graph/nodes/safety_analysis.py
  • backend/src/main/java/com/ssafy/salmanhae/model/dto/chat/ChatResponse.java
  • backend/src/main/resources/application.properties
  • frontend/src/store/chatSessionStore.js
  • frontend/src/views/Chatbot.vue
  • scripts/execute.py
✅ Files skipped from review due to trivial changes (1)
  • backend/src/main/resources/application.properties
🚧 Files skipped from review as they are similar to previous changes (5)
  • backend-ai/app/graph/nodes/safety_analysis.py
  • frontend/src/store/chatSessionStore.js
  • frontend/src/views/Chatbot.vue
  • backend/src/main/java/com/ssafy/salmanhae/model/dto/chat/ChatResponse.java
  • backend-ai/app/clients/llm_client.py

📝 Walkthrough

Walkthrough

The PR updates property-search responses and analysis handling, adds property-card and session-sidebar UI in chat, changes a datasource prepared-statement setting, and updates phase branch naming.

Changes

Property search and analysis flow

Layer / File(s) Summary
Response contract and live answer generation
backend/src/main/java/com/ssafy/salmanhae/.../ChatResponse.java, backend-ai/app/clients/llm_client.py
ChatResponse now copies property-map entries into mutable HashMap instances, and LLMClient revises supervisor prompts plus property-search handling with a live /chat/completions branch and a no-match fallback.
Selection-required analysis handling
backend-ai/app/graph/nodes/price_analysis.py, backend-ai/app/graph/nodes/safety_analysis.py
safety_analysis now merges tool_results before returning early when requiresSelection is set, and price_analysis keeps the same flow with a spacing-only edit.
Property card rendering
frontend/src/views/Chatbot.vue
Chatbot.vue renders msg.properties as clickable property cards and adds label, price-formatting, and card-style helpers for the new layout.

Chat session sidebar

Layer / File(s) Summary
Session store lifecycle
frontend/src/store/chatSessionStore.js
sessionList filters out empty sessions, newChat() clears currentSessionId, and session creation now flows through _createSession() and _ensureSession().
Sidebar wiring and layout
frontend/src/views/Chatbot.vue
Chatbot.vue adds the session sidebar, session switching, relative session dates, and sidebar/layout styles.

Datasource configuration

Layer / File(s) Summary
Prepared-statement setting
backend/src/main/resources/application.properties
application.properties adds spring.datasource.hikari.data-source-properties.prepareThreshold=0 with a datasource comment.

Phase branch naming

Layer / File(s) Summary
Branch suffix calculation
scripts/execute.py
run_phase derives phase_slug from the phase file stem and builds phase/{branch_suffix}-{phase_slug} using the created issue number or p{phase_num} fallback.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • ssafy-salman/salmanhae#42: This PR also changes the property-search flow and the properties payload path used to populate search results.
  • ssafy-salman/salmanhae#27: This PR touches the chat response pipeline that normalizes API output into a properties array for the frontend store.
  • ssafy-salman/salmanhae#80: This PR also changes Chatbot.vue card rendering for chat responses, which is the same UI area updated here.

Poem

I hop through chats where fresh sessions bloom 🐰
Property cards twinkle in a tidy room
A prompt with two lines makes the listings sing
And branch names now hop with a brisk new spring

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR covers the new chat session UI, but the linked issue also requires backend session APIs and login-only persistence, which aren't evidenced here. Add or confirm the session create/list/messages APIs and document that session storage only works when logged in.
Out of Scope Changes check ⚠️ Warning scripts/execute.py changes branch naming for issue phases, which is unrelated to chat session management and appears out of scope. Move the branch-naming change to a separate PR or remove it from this one if it is unrelated to the chat session feature.
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: chat session UI plus property result cards.
Description check ✅ Passed The description covers the main changes, links issue #88, and includes testing notes, though it does not follow the exact template.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch phase/88-chat-session-ui

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

crolvlee and others added 3 commits June 25, 2026 18:08
- Chatbot.vue: 세션 사이드바·메시지 렌더링·분석 카드 UI 구현
- chatSessionStore: 세션 생성·전환·로컬스토리지 유지 로직 구현
- ChatResponse: Map::copyOf → HashMap::new로 NPE 수정
- application.properties: HikariCP prepareThreshold=0 설정으로 prepared statement 충돌 방지
- price_analysis/safety_analysis: requiresSelection=True 시 분석 카드 미생성
- analysis_answer_service: 매물 미선택 시 안내 텍스트 반환으로 개선

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Chatbot.vue: properties 카드 렌더링 추가 (매물명·주소·유형·가격·면적·층수)
- llm_client: PROPERTY_SEARCH 결과 0건 시 안내 메시지 개선
- llm_client: 매물 검색 결과 요약 LLM 답변 생성 메서드 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 매물 검색 결과가 있을 때 안내 문구를 LLM 답변 유무와 관계없이 항상 출력
- supervisor 프롬프트: "가장 싼 매물" 등 가격 조건 검색은 PROPERTY_SEARCH로 처리
- PRICE_ANALYSIS/SAFETY_ANALYSIS는 매물이 선택된 상태에서만 사용하도록 명시

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend-ai/app/graph/nodes/price_analysis.py`:
- Around line 70-77: The exception handler in price_analysis should be narrowed
so it only catches the specific database/client errors expected instead of a
blanket Exception. Update the except block around the DB fetch logic in the
price analysis node to handle only the relevant connection/query/client
exception types, and leave unexpected programming errors uncaught so they
surface normally. Keep the existing error payload shape for the expected DB
failure path, but move the broader catch-all behavior out of this handler.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a52949a0-83f6-4865-9bc1-563985e08913

📥 Commits

Reviewing files that changed from the base of the PR and between 7934ee4 and fa0a51c.

📒 Files selected for processing (8)
  • backend-ai/app/clients/llm_client.py
  • backend-ai/app/graph/nodes/price_analysis.py
  • backend-ai/app/graph/nodes/safety_analysis.py
  • backend/src/main/java/com/ssafy/salmanhae/model/dto/chat/ChatResponse.java
  • backend/src/main/resources/application.properties
  • frontend/src/store/chatSessionStore.js
  • frontend/src/views/Chatbot.vue
  • scripts/execute.py
✅ Files skipped from review due to trivial changes (1)
  • backend/src/main/resources/application.properties
🚧 Files skipped from review as they are similar to previous changes (5)
  • backend-ai/app/graph/nodes/safety_analysis.py
  • frontend/src/store/chatSessionStore.js
  • frontend/src/views/Chatbot.vue
  • backend/src/main/java/com/ssafy/salmanhae/model/dto/chat/ChatResponse.java
  • backend-ai/app/clients/llm_client.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend-ai/app/graph/nodes/price_analysis.py`:
- Around line 70-77: The exception handler in price_analysis should be narrowed
so it only catches the specific database/client errors expected instead of a
blanket Exception. Update the except block around the DB fetch logic in the
price analysis node to handle only the relevant connection/query/client
exception types, and leave unexpected programming errors uncaught so they
surface normally. Keep the existing error payload shape for the expected DB
failure path, but move the broader catch-all behavior out of this handler.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a52949a0-83f6-4865-9bc1-563985e08913

📥 Commits

Reviewing files that changed from the base of the PR and between 7934ee4 and fa0a51c.

📒 Files selected for processing (8)
  • backend-ai/app/clients/llm_client.py
  • backend-ai/app/graph/nodes/price_analysis.py
  • backend-ai/app/graph/nodes/safety_analysis.py
  • backend/src/main/java/com/ssafy/salmanhae/model/dto/chat/ChatResponse.java
  • backend/src/main/resources/application.properties
  • frontend/src/store/chatSessionStore.js
  • frontend/src/views/Chatbot.vue
  • scripts/execute.py
✅ Files skipped from review due to trivial changes (1)
  • backend/src/main/resources/application.properties
🚧 Files skipped from review as they are similar to previous changes (5)
  • backend-ai/app/graph/nodes/safety_analysis.py
  • frontend/src/store/chatSessionStore.js
  • frontend/src/views/Chatbot.vue
  • backend/src/main/java/com/ssafy/salmanhae/model/dto/chat/ChatResponse.java
  • backend-ai/app/clients/llm_client.py
🛑 Comments failed to post (1)
backend-ai/app/graph/nodes/price_analysis.py (1)

70-77: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Narrow this exception handler.

Catching Exception here will also mask programming bugs and turn them into DB_UNAVAILABLE, which makes real failures harder to diagnose. Please restrict this to the specific DB/client exceptions you expect.

🧰 Tools
🪛 Ruff (0.15.18)

[warning] 70-70: Do not catch blind exception: Exception

(BLE001)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend-ai/app/graph/nodes/price_analysis.py` around lines 70 - 77, The
exception handler in price_analysis should be narrowed so it only catches the
specific database/client errors expected instead of a blanket Exception. Update
the except block around the DB fetch logic in the price analysis node to handle
only the relevant connection/query/client exception types, and leave unexpected
programming errors uncaught so they surface normally. Keep the existing error
payload shape for the expected DB failure path, but move the broader catch-all
behavior out of this handler.

Source: Linters/SAST tools

@crolvlee
crolvlee merged commit 43d7623 into develop Jun 25, 2026
3 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.

[FEAT][F-2][F-3][F-4] 챗봇 대화 세션 관리 — 새 대화 시작 · 최근 대화 목록

1 participant