hermes-control-interface
hermes-control-interface copied to clipboard
feat(office): renderOfficeFloor + Auto-refresh + Agent Popup
Summary
Office 핵심 렌더링 로직 구현.
Functions added to src/js/main.js
loadOffice(container)— 페이지 skeleton 렌더,refreshOffice()호출, 10초 interval 설정refreshOffice()—/api/profiles+/api/office/departments병렬 fetch →renderOfficeFloorrenderOfficeFloor(profiles, departments, floorEl)— 핵심 함수- profileMap, assignmentMap, unassigned 분리
- Zone 레이아웃:
DESKS_PER_ROW=3,DESK_SLOT=88px, 수직 배치 .office-dept-zoneabsolute 포지셔닝,.office-desk + .office-agentper profile- running/idle CSS class 토글
escapeHtml()XSS 방지
showOfficeAgentPopup(agentEl, event)—getBoundingClientRect()기반 팝업, 외부 클릭 시 닫기
Test
- 실제 에이전트로 방문 → running 에이전트 green glow 확인
- 에이전트 클릭 → 팝업 표시, "Open" 클릭 → agent-detail 이동
- 10초 후 상태 자동 갱신
- 타 페이지 이동 → interval 누수 없음
Closed by merge commit e4b31af (PR #60 — office visualization with departments + Playwright e2e tests)