feat(agent-office): notification badges + CEO desk document panel + telegram test

- Add notification state management with badge counts in useAgentManager
- Render exclamation badge on agent sprites (separate from status icons)
- Add CEO desk document icon with click-to-open activity panel
- Create DocumentPanel with unified activity feed + per-agent detail tabs
- Add telegram test button to stock agent ChatPanel
- Remove TaskHistory + bottom toolbar (replaced by DocumentPanel)
- Add getActivityFeed API helper

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-11 15:19:14 +09:00
parent 25715a2198
commit deb285695a
11 changed files with 459 additions and 96 deletions

View File

@@ -2,7 +2,7 @@ import { useRef, useEffect, useCallback } from 'react';
import { OfficeRenderer } from '../canvas/OfficeRenderer';
import officeMap from '../assets/office-map.json';
export function useOfficeCanvas(containerRef, onAgentClick) {
export function useOfficeCanvas(containerRef, onAgentClick, onCeoClick) {
const rendererRef = useRef(null);
useEffect(() => {
@@ -30,6 +30,10 @@ export function useOfficeCanvas(containerRef, onAgentClick) {
if (onAgentClick) onAgentClick(agentId);
});
renderer.setOnCeoClick(() => {
if (onCeoClick) onCeoClick();
});
const handleClick = (e) => {
const rect = canvas.getBoundingClientRect();
const x = e.clientX - rect.left;
@@ -48,7 +52,7 @@ export function useOfficeCanvas(containerRef, onAgentClick) {
containerRef.current.removeChild(canvas);
}
};
}, [containerRef, onAgentClick]);
}, [containerRef, onAgentClick, onCeoClick]);
const updateAgentState = useCallback((agentId, state, detail) => {
rendererRef.current?.updateAgentState(agentId, state, detail);
@@ -58,5 +62,13 @@ export function useOfficeCanvas(containerRef, onAgentClick) {
rendererRef.current?.moveAgent(agentId, target);
}, []);
return { updateAgentState, moveAgent };
const setAgentNotification = useCallback((agentId, count) => {
rendererRef.current?.setAgentNotification(agentId, count);
}, []);
const setCeoDocBadge = useCallback((count) => {
rendererRef.current?.setCeoDocBadge(count);
}, []);
return { updateAgentState, moveAgent, setAgentNotification, setCeoDocBadge };
}