Feat(#280): 채팅 화면 UI/UX 디자인 개선#289
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughToolStatusBar를 추가하고 assistant 메시지 렌더를 확장해 streaming/빈 콘텐츠 상황에서 toolStatuses를 조건부 표시합니다. 채팅 말풍선·아이콘·패딩·컨테이너 여백과 리사이저 제약을 조정하고, 개발용 목업 toolStatuses 주입 유틸과 훅 연동을 도입했습니다. ChangesTool Status Feature and Chat Layout Enhancement
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
- ToolStatusIconType을 chat_types로 통합해 아이콘 유니온 타입 중복 제거 - 도구 상태바 목업 데이터/헬퍼를 tool_status_mock.ts로 분리 - 상태바 공통 컨테이너 클래스를 STATUS_BAR_BASE_CLASS 상수로 추출 (ToolStatusBar / ThinkingBar / FinalResponseLoadingBar 공유) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@CodeRabbit 코드 리뷰 부탁합니다 |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Read the changed files for review
echo "=== ChatMessages.tsx ==="
cat src/features/chat/components/rightpanel/ChatMessages.tsx
echo ""
echo "=== ToolStatusBar.tsx ==="
cat src/features/chat/components/rightpanel/ToolStatusBar.tsx
echo ""
echo "=== chat_types.ts ==="
cat src/features/chat/types/chat_types.ts
echo ""
echo "=== useChatMessages.ts ==="
cat src/features/chat/hooks/useChatMessages.ts
echo ""
echo "=== useChatPanel.ts ==="
cat src/features/chat/hooks/useChatPanel.ts
echo ""
echo "=== RightPanel.tsx ==="
cat src/features/chat/components/rightpanel/RightPanel.tsx
echo ""
echo "=== ThinkingBar.tsx ==="
cat src/features/chat/components/rightpanel/ThinkingBar.tsx
echo ""
echo "=== index.ts ==="
cat src/features/chat/components/rightpanel/index.ts
echo ""
echo "=== ChatPage.tsx ==="
cat src/pages/ChatPage.tsxLength of output: 51297 첫 번째 PR 설명 이미지는 ToolStatusBar UI를 보여줍니다 — "파이썬 코드 생성 중...", "파이썬 코드로 문제의 정답 계산 중...", "변형 문제가 생성되는 중..."의 세 가지 상태 바가 표시되고 있습니다. 두 번째 PR 설명 이미지는 채팅 메시지 레이아웃을 보여줍니다 — 어시스턴트 아이콘의 크기가 두 메시지에서 다르게 보이는 문제를 빨간 박스로 표시하고 있습니다 (위 메시지는 아이콘이 더 크고, 아래 메시지는 더 작게 보임).
요약전반적으로 UI 개선 목표가 잘 구현되었습니다. 스트리밍 분기 처리 로직과 스크롤 앵커링 로직이 잘 유지되었습니다. 다만 아래 몇 가지 버그와 개선 사항을 확인했습니다. 🔴 버그1.
|
같은 transform 아이콘이 여러 개 렌더링되면 linearGradient의 하드코딩된 id가 문서 내에서 중복되어 SVG 스펙을 위반함. useId()로 인스턴스마다 고유 gradient id를 생성하도록 수정.
비스트리밍 분기에서 content가 비어 있고 toolStatuses도 없을 때 `content.trim() || !toolStatuses?.length` 조건이 true가 되어 빈 흰색 말풍선이 렌더링됨. 스트림이 토큰 없이 끊긴 경우 등에서 발생. content가 실제로 있을 때만 말풍선을 렌더링하도록 조건 수정.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/features/chat/components/rightpanel/status_bar_styles.ts (1)
7-8: 💤 Low value하드코딩된 색상 값을 테마로 추출하면 더 유지보수하기 좋습니다.
#D1D6DE와#E3E7ED같은 색상 값을 직접 사용하는 대신, Tailwind의 색상 팔레트나 CSS 변수로 정의하면 일관성 있는 디자인 시스템 관리가 가능합니다.예를 들어:
// 색상을 theme에 정의한 후 export const STATUS_BAR_BASE_CLASS = "flex min-h-[30px] w-full items-center gap-[8px] overflow-hidden rounded-[12px] border-[0.5px] border-gray-300 bg-gray-100";또는 CSS 변수 사용 시:
// Tailwind v4에서는 괄호 사용 export const STATUS_BAR_BASE_CLASS = "flex min-h-[30px] w-full items-center gap-[8px] overflow-hidden rounded-[12px] border-[0.5px] border-(--status-bar-border) bg-(--status-bar-bg)";하지만 현재 구조도 충분히 작동하며, 개선은 선택사항입니다.
🤖 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 `@src/features/chat/components/rightpanel/status_bar_styles.ts` around lines 7 - 8, STATUS_BAR_BASE_CLASS currently embeds hardcoded hex colors (border-[`#D1D6DE`], bg-[`#E3E7ED`]); replace those with theme-aware tokens to improve maintainability by either using Tailwind palette classes (e.g., border-gray-300 and bg-gray-100) or CSS variables (e.g., border-(--status-bar-border) and bg-(--status-bar-bg)) and ensure the corresponding theme entries or CSS variables are defined in your global styles or Tailwind config so STATUS_BAR_BASE_CLASS references theme values rather than raw hex codes.
🤖 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.
Nitpick comments:
In `@src/features/chat/components/rightpanel/status_bar_styles.ts`:
- Around line 7-8: STATUS_BAR_BASE_CLASS currently embeds hardcoded hex colors
(border-[`#D1D6DE`], bg-[`#E3E7ED`]); replace those with theme-aware tokens to
improve maintainability by either using Tailwind palette classes (e.g.,
border-gray-300 and bg-gray-100) or CSS variables (e.g.,
border-(--status-bar-border) and bg-(--status-bar-bg)) and ensure the
corresponding theme entries or CSS variables are defined in your global styles
or Tailwind config so STATUS_BAR_BASE_CLASS references theme values rather than
raw hex codes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5646764a-c273-4eba-8788-bfe816eefd19
📒 Files selected for processing (7)
src/features/chat/components/rightpanel/ChatMessages.tsxsrc/features/chat/components/rightpanel/ThinkingBar.tsxsrc/features/chat/components/rightpanel/ToolStatusBar.tsxsrc/features/chat/components/rightpanel/status_bar_styles.tssrc/features/chat/hooks/tool_status_mock.tssrc/features/chat/hooks/useChatMessages.tssrc/features/chat/types/chat_types.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- src/features/chat/types/chat_types.ts
- src/features/chat/components/rightpanel/ToolStatusBar.tsx
- src/features/chat/components/rightpanel/ThinkingBar.tsx
- src/features/chat/components/rightpanel/ChatMessages.tsx
- src/features/chat/hooks/useChatMessages.ts
📌 관련 이슈
🏷️ PR 타입
📝 작업 내용
채팅 메시지 영역 디자인 개선
ProfileIcon) 제거, 메시지 내부 패딩10px → 16px조정50px원형 래퍼 제거 후30px아이콘으로 변경, 아이콘-본문 간격24px적용540px고정, 메시지 영역에px-30px적용 및 항상 가운데 정렬되도록 조정mt-24px) 분기 추가로 메시지 그룹 간 여백 정돈10px → 16px통일AI 도구 실행 상태바 추가 (
ToolStatusBar)ToolStatusBar컴포넌트 신규 추가 (python / transform 아이콘)ChatMessage타입에toolStatuses필드 및ToolStatus인터페이스 추가ChatMessages/useChatMessages연동?toolStatusMock=true쿼리 파라미터로 도구 상태바 UI 확인 가능기타
useChatMessages의 미리보기 URL 정리 로직에서 cleanup 시점의 ref 스냅샷을 사용하도록 수정 (exhaustive-deps 경고 해소)📸 스크린샷 (UI 변경 시 필수)
✅ 체크리스트
공통
pnpm tsc --noEmit타입 체크를 통과했습니다type/이슈번호-작업명)UI/레이아웃 변경 시
PageContainer/ContentGrid공통 컴포넌트를 활용했습니다📎 기타 참고사항
ToolStatusBar)는 현재 개발 환경 목업(?toolStatusMock=true) 기준으로 동작합니다. 실제 SSE 이벤트 연동은 후속 작업에서 진행 예정입니다.Summary by CodeRabbit
New Features
Style