feat(ui): CEO Control Room 채팅 자동 스크롤·폴링 간격 정리 - #418
Merged
Conversation
- 결과 영역에 MutationObserver를 달아 새 답변·상태 카드 도착 시 최하단으로 자동 스크롤 - 바닥 48px 밖으로 올려 읽는 중이면 자동 스크롤 보류, 새 질의 전송 시 다시 따라감 - 본부별 진행·최종 답변·자율 연구·전략 배포 폴링을 CHAT_POLL_MS 5초로 통일 - PAPER 주문 폴링은 체결 반영 지연 방지 위해 ORDER_POLL_MS 2초 유지 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
CEO Control Room 결과 영역은
h-[320px]고정 스크롤 박스다. 답변과 본부별 진행·주문·연구·배포 카드가 폴링으로 뒤늦게 붙어서, 새로 온 내용이 화면 밖에 쌓여도 사용자가 직접 내려야 했다.변경
자동 스크롤
MutationObserver(childList/subtree/characterData)를 달아 DOM 변화를 직접 감지 — 카드 추가뿐 아니라 텍스트만 바뀌는 폴링 갱신(주문 state, 진행 문구)도 잡는다onScroll로 바닥 근처(여유 48px) 여부를 기록해, 위로 올려 읽는 중이면 따라 내리지 않는다. 다시 바닥으로 내리면 자동 재개MutationObserver가 없는 환경에서는 초기 1회 스크롤만 하고 조용히 넘어간다폴링 간격
CHAT_POLL_MS)ORDER_POLL_MS)주문은 체결 반영이 늦게 보이면 안 되므로 예외로 2초를 유지했다. 주문의
UNKNOWN백오프는 10초 → 5초. 각 쿼리의 종료 조건(terminal state,summary도착, CANDIDATE/COMPLETED/BLOCKED, REMOVED/FAILED)은 그대로라 끝나면 폴링을 멈춘다.범위 밖
PaperOrderConsole이 쓰는paperDirectivePollInterval(2초 → 나이별 10/30초 백오프)은 별도 패널이라 손대지 않았다.검증
npx tsc --noEmit— 이 파일 에러 없음 (기존WorkforceRosterPanel.tsx2건은 사전 존재)npx eslint app/dashboard/CeoControlRoomChat.tsx— 통과권한 경계 변화 없음: 화면 표시 전용이고 주문·판정 경로는 건드리지 않는다.
🤖 Generated with Claude Code