154 Commits

Author SHA1 Message Date
02476c001f feat(control): add live workboard v0 2026-06-19 14:41:43 +09:00
be0120bd0c feat(rpg): Phaser/픽셀아트 빼고 profile photo 기반 가상 사무실로 전환
자기야 피드백: "픽셀 아트 안 예쁘다, profile photo 로 바꿀 수 없나?
픽셀 아트 고집 안 해도 됨." → 16x28 픽셀로는 anime 일러스트 정체성 못
살리는 게 사실. Phaser 자체도 큰 의존성이라 깔끔하게 빼고 React+CSS+SVG
로 재작성.

## 변경

### 제거
- phaser 4.0.0 의존성 (~3MB)
- frontend/components/office-rpg/ 전체 (Phaser 통합 layer + procedural
  pixel sprite factory + Office scene)

### 신설
- frontend/components/office-room/OfficeRoom.tsx
  - 2x2 grid layout: 하랑/나랑 (위), 다랑/이랑 (아래)
  - 가운데 회의실 (시각 표시만, 향후 인터랙션용)
  - 각 자매 = 책상 SVG 위에 원형 portrait card
    - 72px portrait (실제 /api/sisters/{name}/avatar)
    - 자매 시그니처 색 border (harang=blue, narang=teal, darang=red, erang=violet)
    - hover 시 위로 살짝 떠오름
    - 활성 stage 일 때 PulseRing + StatusDot 펄스
  - 자매 사이 SVG flow arrow (plan → impl → review → deploy 방향)
    활성 stage 시 화살표 hi-lighted
  - 클릭 → 우측 SisterDetailPanel slide-in
- frontend/components/office-room/SisterDetailPanel.tsx
  - 기존 office-rpg 의 detail panel 을 재사용 (PortraitLg + 자매 시그니처
    accent + 역할 설명 + 백엔드 sister info)

### app/page.tsx
- OfficeRpg → OfficeRoom 으로 교체
- 4초 polling 으로 활성 파이프라인의 currentState 추적 →
  STATE_TO_STAGE 매핑 → 해당 자매 카드 자동 펄스
2026-04-11 05:01:40 +09:00
480db0c734 fix(rpg): 자매 sprite 를 실제 일러스트와 닮게 재작성
자기야 발견: 1차 sprite 색상이 실제 자매 일러스트와 거리가 멀었음. 4 자매
실제 avatar.png (각 LXC 의 ~/.openclaw/avatar.png) 를 직접 확인 후 시그니처
정정:

  하랑 — 흰/은 머리 + 흰 cat ears + 파란 리본 + 파란 눈 (이전: 빨강 — 틀림)
  나랑 — 검은 short bob + 검은 cat ears + 청록 보타이 + 청록 눈 (그나마 비슷)
  다랑 — 흰 머리 + 흰 cat ears + 빨간 chinese 옷 + 빨간 눈 (이전: 노랑 — 틀림)
  이랑 — 흰 long hair + 흰 cat ears + 흰 옷 + 파란 눈 + 파란 나비 (이전: 보라)

핵심 변경:
- spriteFactory.ts SISTER_PALETTES 전면 재작성: hair / hairShadow / outfit /
  outfit2 / eye / earInner 등 분리. 자매별로 정확한 시그니처 색상.
- 4 자매 모두 catgirl 이라 sprite 위쪽에 cat ears 추가 (행 0-2 에 cat ear
  outline + hair fill + earInner pink).
- CHAR_H 24 → 28 로 키워서 cat ears 와 더 긴 머리/몸 표현 공간 확보.
- 자매별 추가 디테일:
    darang  → 이마에 빨간 보석 점
    erang   → 머리 옆에 작은 파란 나비
    harang  → 머리 위에 파란 리본
    narang  → 옆머리 청록 헤어핀
- narang 만 short bob (옆 bangs 다른 자매보다 짧음). 나머지 3 명은 long hair.
- OfficeScene.ts: sprite 28px 으로 커졌으니 origin 을 (0.5, 1) 로 바꾸고
  발끝을 타일 바닥 위에 정렬해 일관된 standing height.

이전: sprite 가 식별 불가능한 색깔 박스. 이번: 4 자매 각각 일러스트 시그
니처 색 + cat ears + 머리스타일이 보임.
2026-04-11 04:37:37 +09:00
9a17f65419 feat(rpg): Phase 1 — pixel art office + 페이지 5개 통합 + replan 마커
자기야 요청: 픽셀 RPG 스타일 (deskrpg/openclaw-office 분위기) 의 가상
사무실로 대시보드 메인 리뉴얼. 페이지 너무 많은 거 줄이고 office 를 메인
기능으로 승격. rails 페이지에 재기획 (replan) 시각적 표시 추가.

## Phase 1 (이번 세션) 범위

### Office RPG (Phaser 3 + procedural pixel art)
- frontend/components/office-rpg/ 신설
- spriteFactory.ts: 16x16 floor/wall/carpet/desk/chair 타일 + 16x24 자매
  캐릭터 sprite 4 명 (harang/narang/darang/erang) 자매별 색상. 모두 코드로
  procedural 생성 (외부 asset 0, 라이선스 문제 0)
- OfficeScene.ts: 16x12 tile layout (벽/바닥/4 책상/회의실/문). 자매 sprite
  가 각 책상에 idle (2-frame breathing), 클릭 가능
- PhaserHost.tsx: Next.js dynamic import (ssr:false), Phaser 4 namespace
  import. Camera zoom 3x 픽셀 perfect 렌더링
- OfficeRpg.tsx: React wrapper. 좌측 PhaserHost + 우측 SisterDetailPanel
  slide-in
- SisterDetailPanel.tsx: 자매 클릭 시 SisterAvatar 사진 + 역할 + 상태 표시

### 메인 페이지 리뉴얼 (1242 줄 → 50 줄)
- app/page.tsx 를 office-first 로 교체. 헤더 한 줄 + OfficeRpg + 최근
  파이프라인 strip
- ActivePipelineStrip.tsx 신설: 최근 8 개 파이프라인 카드, 5초 polling

### 페이지 19 → 5 통합
- 삭제: app/projects, app/sisters, app/activities, app/org, app/office,
  app/admin/*, app/rails/log, app/rails/escalations
- 유지: app/page (=office), app/rails (=파이프라인 + 통합 timeline),
  app/settings, app/login, app/register
- Sidebar 메뉴: 11 → 3 (사무실 / 레일 / 설정)

### Rails 페이지 — TransitionsTimeline + replan 마커
- TransitionsTimeline.tsx 신설: 파이프라인의 모든 state transitions 를
  세로 타임라인으로. 4초 polling. 통계 배지 (전이 수, review loop ×N,
  ↑ 재기획 ×N, 🚨 escalated)
- reviewing → planning 전이는 빨간 "↑ 재기획" 마커 + 빨간 도트
- escalated 전이는 노란 "🚨 escalated" 마커
- 일반 전이는 파란 도트

### 의존성
- + phaser 4.0.0

## 다음 phase 계획

Phase 2 (다음 세션):
- Walk animation (4 방향)
- Stage handoff: narang sprite 가 darang 책상으로 walk over
- Active pipeline 이 office 위 floating bubble 로
- 클릭으로 rails drawer

Phase 3 (그 후):
- 사용자 본인 아바타 (자기야 캐릭터)
- 회의실 인터랙션
- 채팅 통합

## 빌드 결과
build clean. 8 routes (/, /login, /rails, /register, /settings, /_not-found,
favicon, robots).
2026-04-11 04:30:45 +09:00
9addaba626 fix(rails): LLM 응답 텍스트 드래그/복사 가능하게 + drawer drag-select 보호
자기야 요청: 대시보드의 LLM 응답 본문을 드래그해서 복사하고 싶음.

수정:
- LlmOutput 에 user-select: text + cursor: text 를 명시. 부모 어딘가에서
  상속받을 가능성을 차단. ::selection 색상도 추가해 선택 영역이 가시적
- LlmOutput 내부의 button (더보기 토글) 만 user-select: none 로 예외 처리
- Backdrop click 핸들러 개선: 사용자가 drawer 내부에서 drag-select 시작
  하다가 mouseup 이 backdrop 위에서 끝나면 기존 코드는 drawer 를 닫아 버려
  selection 이 사라졌음. 이제 mousedown 도 backdrop 에서 시작했을 때만
  close 를 실행 (data-backdrop-down attr 로 추적)
2026-04-11 01:56:22 +09:00
837ab28d07 feat(rails): SubTaskDetailDrawer 컴팩트화 — collapsible 섹션 + 이벤트 필터
자기야 피드백: 드로어가 너무 길어서 보기 힘듦. LLM 응답 + 전체 이벤트 로그
+ 자식 노드 다 펼쳐져 있어서 하나 클릭하면 화면 한 페이지가 다 차버림.

수정:
- LLM 응답: 280 자 미리보기 + "더 보기 (+N chars)" 토글. 긴 마크다운이
  디폴트로 화면을 먹지 않음. 응답 길이를 헤더 옆 배지로 미리 표시
- 하위 노드: 디폴트 접힘. 헤더에 개수 배지, 클릭하면 펼침
- 이벤트 로그: 디폴트 접힘. 펼치면 두 칩 (milestones / all) 으로 필터링
  - milestones: spawned/completed/failed/escalated 만
  - all: started/progress/output 까지 전부
  대부분 디버깅엔 milestones 만 보면 충분
- 새 sub-task 클릭 시 expanded 상태 전부 리셋

새 styled components: CollapsibleHeader, ChevronIcon, SectionCount, ChipRow,
Chip, ShowMoreButton (재사용 가능)

대시보드 한 화면이 디폴트로 절반 이하로 줄어듦. 정보 손실 0 — 클릭으로
다 볼 수 있음.
2026-04-11 01:49:46 +09:00
13e95f4ace feat(rails): GIT_RAW_ALLOWED_HOSTS env 로 파일 프록시 allowlist 외부화
- 기존에는 git.nabomhalang.co.kr 한 곳만 하드코딩되어 있었음
- GIT_RAW_ALLOWED_HOSTS=comma,separated,hosts 로 여러 호스트 지원
- 기본값은 기존과 동일 (git.nabomhalang.co.kr) — 행동 변화 없음
- hanarang-rails v0.1.3 의 외부 배포 친화 패키지와 세트
2026-04-10 21:52:11 +09:00
9a99a8a33c feat(rails): MD 파일 클릭해서 뷰어 모달로 내용 보기
- backend: /api/rails/file-content 프록시 (Gitea host allowlist)
- frontend: FileViewerModal — 마크다운/코드 렌더링, front matter 파싱
- drawer: FileRow 클릭 핸들러 + 호버 효과
  - .md 로그는 resultJson에서 직접 표시
  - 추출된 코드 파일은 rawUrlBase로 백엔드 프록시 페치
2026-04-10 21:09:38 +09:00
548279c888 feat(drawer): artifacts section — files, code blocks, deploy URL 2026-04-10 20:35:12 +09:00
fb8f2f3b87 merge: LLM output markdown rendering 2026-04-10 19:37:22 +09:00
501c430ab2 feat(ui): parse LLM resultJson and render as markdown in detail drawer
- resultJson was showing as raw {"text":"..."} JSON string
- Now parses the JSON and renders the text via react-markdown
- Pretty rendering: headings, lists, code blocks, blockquotes, links
- Shows status dot + model name header
- Fallback to raw view when text field is empty
2026-04-10 19:37:15 +09:00
a7cb728602 feat(dashboard): SIEM log + escalations + office collaboration lines
B - SIEM 로그 + 경보:
- backend/rails: GET /api/rails/transitions (filter by pipelineId, eventType)
- backend/rails: GET /api/rails/escalations (filter by resolved)
- frontend/app/rails/log/page.tsx — 결정론적 이벤트 스트림
    필터: pipelineId / eventType / 초기화
    timestamp / event badge / pipeline pill / state transition / 클릭 → 필터링
    이벤트 타입별 색상 (REQUEST_CHANGES=주황, ERROR=빨강, 등)
- frontend/app/rails/escalations/page.tsx — 경보 카드 뷰
    탭: 전체 / 미해결 / 해결됨
    카드: reason, category 태그, attempts, stage, 시간
    context snapshot 펼침 (JSON pretty)
- sidebar: 로그 / 경보 메뉴 추가

C - Office collaboration lines:
- OfficeFloor 의 4자매 책상 위에 SVG overlay
- harang→narang→narang→darang→darang→erang 흐름선
- active stage 가 있으면 점선 애니메이션 (flowDash keyframe)
- 비활성 시 흐릿한 정적 점선
- 화살표 마커로 방향 표시
2026-04-10 18:28:07 +09:00
f8da7331ce feat(ui): 자매 프로필 사진 통합
- OfficeFloor: 4자매 책상에 SisterAvatar (60px gradient frame)
- SubTaskTree: 노드 row 에 작은 SisterAvatar (20px) 표시
- SubTaskDetailDrawer: 헤더에 큰 SisterAvatar (40px) + role badge 함께

이미 있는 백엔드 /api/sisters/:name/avatar 엔드포인트 재활용
(SSH 로 ~/.openclaw/avatar.png 가져오는 AvatarService)
2026-04-10 18:14:39 +09:00
5ec1287792 feat(rails): node detail drawer — click any sub-task to inspect
Backend:
- rails.service.ts: getSubTaskDetail(id) - calls rails GET /api/sub-tasks/:id
- rails.controller.ts: GET /api/rails/sub-tasks/:id

Frontend:
- components/rails/SubTaskDetailDrawer.tsx — slide-in drawer
    Header: role badge, title, close button (ESC)
    Body: state/agent/model/duration/complexity grid,
          description, error, result JSON
          children list
          event log timeline (color-coded by event type)
- components/rails/SubTaskTree.tsx: clickable Node, hover state, onSelectNode prop
- app/rails/page.tsx: detailNodeId state, drawer mount
- app/office/page.tsx: same drawer wired to its sub-tree

ESC key closes drawer. Backdrop click closes.
2026-04-10 17:59:16 +09:00
98ee03baa9 chore: gitignore .claude/state 2026-04-10 17:42:15 +09:00
d100ee7c42 feat(ui): redesign /rails + /office for breathing room and digital office feel
Office (full rewrite):
- frontend/components/office/OfficeFloor.tsx — 새로운 책상 그리드
  4 자매 책상 (2x2 grid), 자매당 카드 형태
  자매 아바타 (gradient), 역할 라벨, 작업 중 pulse 애니메이션
  worker pill chips (manager/principal/lead/junior 색상별)
  Stats: workers / active / done / fail
  십자 가이드 라인으로 office floor plan 분위기
- frontend/app/office/page.tsx — 867 → 220 줄 압축
  rails 데이터 직접 사용 (sisters API 의존성 제거)
  사이드 패널: 선택된 자매의 sub-task 트리

Rails (간격 + 가독성):
- frontend/app/rails/page.tsx — 카드 spacing 확대, 헤더 명료화
  Start 폼을 별도 카드로 분리 (한 줄 → enter 시 시작)
  파이프라인 카드 padding 18px, 클릭 영역 확장
  state badge 컬러 + 라운드, project name 큼지막
  rel time / id 메타는 mono font 로 separator
- frontend/components/rails/SubTaskTree.tsx — 노드 padding 12px,
  자식들 사이 dashed border + 16px 들여쓰기 ( 시각적 hierarchy)
  Title sans font 로 변경, complexity meta 별도 줄

Sidebar:
- 기존 작업 변경 없음 ('레일' 메뉴는 이전 커밋에서 추가됨)

검증: pnpm build (next 16 turbopack) ✓
2026-04-10 17:42:06 +09:00
8ad373f78e merge: rails integration into dashboard 2026-04-10 17:30:18 +09:00
80598e7b58 feat(rails): integrate hanarang-rails orchestrator into dashboard
Backend:
- src/rails/rails.service.ts — HTTP client for rails API (read-only)
- src/rails/rails.controller.ts — REST under /api/rails/* (JwtGuard 보호)
    GET /pipelines, /pipelines/:id, /pipelines/:id/sub-tasks, /health
    POST /pipelines/start, /pipelines/:id/abort
- src/rails/rails.scheduler.ts — 2초마다 rails poll → EventEmitter2 broadcast
- src/rails/rails.module.ts — module + DI
- events.gateway.ts — rails.* 이벤트 핸들러 3종 (Socket.IO 'rails:*')
- app.module.ts — RailsModule 등록

Frontend:
- lib/useRailsSocket.ts — Socket.IO 훅 (rails:pipelines / pipeline:updated / subtasks)
- components/rails/PipelineList.tsx — 좌측 파이프라인 카드 목록
- components/rails/SubTaskTree.tsx — 우측 계층 트리 뷰
    role 별 색상 (manager/principal/lead/junior)
    state 별 dot + running pulse 애니메이션
    duration / model 표시
- app/rails/page.tsx — 라이브 대시보드 페이지
    좌: 파이프라인 목록 + Start 폼
    우: 선택된 파이프라인의 sub-task 트리
- components/common/Sidebar.tsx — '레일' 메뉴 추가

기존 hanarang-dashboard 의 UX/테마 그대로 재사용 (CSS variables).
인증은 기존 JwtGuard 그대로 적용.

검증: backend nest build ✓ | frontend next build ✓ (turbopack)

다음: Dev 서버에 배포 + 첫 라이브 파이프라인 구동 확인.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 17:30:11 +09:00
bec8df64ec fix: ChatWorkspace loadRuntime() use cookie-based withSessionRequest 2026-04-09 10:08:02 +09:00
2d01f520c4 Merge PR: SPRINT-017 office mobile plan 2026-04-09 09:59:27 +09:00
622eac3a10 fix: SPRINT-017 review fixes
1. Desktop breakpoint 768px → 1280px+ (tablet keeps mobile flow)
2. Default context always rendered (shows working sister when none selected)
3. MobileSisterCard aria-pressed for accessibility
4. ChatWorkspace localStorage → cookie-based withSessionRequest
2026-04-09 09:51:12 +09:00
4434e75a12 feat: SPRINT-017 mobile-first office dashboard overhaul
- Mobile summary view with sister cards, focus, health, quick actions
- Compact card flow replaces OfficeScene on mobile (no shrink)
- ContextPanel absorbed inline on mobile
- PipelinePanel vertical stack on mobile
- ServerHealthPanel 2-col mobile, 1-col below 360px
- ChatWorkspace tab padding optimized for narrow screens
- Desktop 1280+ layout preserved as-is
- Breakpoints: 360 / 390 / 768 / 1280+
2026-04-09 09:40:22 +09:00
ba800ea8e3 docs: sharpen sprint 017 office mobile plan 2026-04-09 09:20:30 +09:00
c25e05f685 Merge PR #14: SPRINT-016 office dashboard hotfix 2026-04-09 08:59:16 +09:00
54535e7b5e fix: resolve 8 review/security issues (SPRINT-016 hotfix)
Security:
- JwtGuard + RoleGuard on all sisters endpoints
- Admin-only access for config/sessions/subagents/activity
- ThrottlerGuard on /auth/refresh
- HttpOnly SameSite cookies + CSRF (replaces localStorage)

Code Quality:
- Per-sister draft input (Record<SisterName, string>)
- crypto.randomUUID for optimistic message ids (dedupe ready)
- Polling disabled while WebSocket connected
- SVG keyboard accessibility (role/tabIndex/onKeyDown)
2026-04-09 08:51:28 +09:00
bc6904d348 docs: add sprint 017 office stabilization plan 2026-04-08 18:51:17 +09:00
fc0d831f57 merge: fix circular dependency Events↔Sisters↔Activity + restore WebSocket broadcast 2026-04-08 05:50:07 +00:00
58843db298 fix: wire activity.logged event to WebSocket broadcast
Add @OnEvent('activity.logged') listener in EventsGateway to bridge
EventEmitter2 → WebSocket activity:new broadcast. Restores real-time
activity push without reintroducing circular dependency.
2026-04-08 14:14:01 +09:00
d8f2818e59 fix: break circular dependency between Events↔Sisters↔Activity
- Replace EventsGateway direct dependency in ActivityService with EventEmitter2
- ActivityModule no longer imports EventsModule (cycle broken)
- Register EventEmitterModule in AppModule
- Update activity.service.spec.ts to provide EventEmitter2
- SistersModule safely imports ActivityModule without creating a cycle

Dependency graph after fix:
  EventsModule → SistersModule → ActivityModule (leaf, no back-edge)
2026-04-08 14:07:19 +09:00
88547e9464 fix: wire office dashboard to runtime state 2026-04-08 13:49:26 +09:00
bb36380c92 fix: wrap office pipeline keyframes with css helper 2026-04-07 05:09:05 +00:00
1ccc1e6830 docs: add sprint-016 release preflight 2026-04-07 13:56:45 +09:00
a9e1e677b0 feat: merge SPRINT-016 isometric office dashboard 2026-04-07 13:36:58 +09:00
658d5e7af7 docs: restore code-reviewer in sprint 016 spec 2026-04-07 13:01:44 +09:00
3bdd24a3a5 fix: restore 17 subagents in office dashboard 2026-04-07 12:57:43 +09:00
f920318138 fix: align office dashboard subagent count 2026-04-07 12:51:55 +09:00
a731ecee4b fix: stabilize office dashboard demo states and motion 2026-04-07 12:12:11 +09:00
6e0583efeb feat: implement SPRINT-016 isometric office dashboard
Build the 4자매 office dashboard with SVG scene, agent state
visualization, context panel, direct chat workspace, pipeline panel,
and server health panel.

- frontend/app/office/page.tsx: Main office page (sisters + ops data,
  WS live + polling fallback, selected agent state, chat toggle)
- frontend/components/office/OfficeScene.tsx: SVG 2D office floor plan
  with 4 fixed sister desks, 17 subagent nodes, handoff connector lines,
  conference room, and per-state animations (idle/thinking/tool_calling/
  speaking/error)
- frontend/components/office/ContextPanel.tsx: Right context panel
  showing selected sister or subagent detail, current task, subagent
  list, chat/detail links
- frontend/components/office/ChatWorkspace.tsx: Direct chat workspace
  with sister tabs, message timeline, streaming-ready layout; Gateway
  connection pending notice (honest fallback labeling)
- frontend/components/office/PipelinePanel.tsx: Bottom pipeline panel
  with sprint/workflow nodes and flow animations
- frontend/components/office/ServerHealthPanel.tsx: Server health grid
  for 4 sisters + Dev + Docker with live/snapshot/fallback labels
- frontend/components/common/Sidebar.tsx: Add /office nav item

Data labeling: sisters live via WS (snapshot fallback),
subagent states derived/fallback, pipeline snapshot, chat gateway-pending.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 11:49:23 +09:00
3ba765b430 docs: plan sprint-016 office dashboard 2026-04-07 11:29:59 +09:00
68c69f6dfa merge: hotfix-006 dashboard copy and live fidelity 2026-04-06 20:47:24 +09:00
441f590989 fix: correct dashboard freshness wiring 2026-04-06 20:45:41 +09:00
6596090677 fix: tighten dashboard copy and freshness labels 2026-04-06 20:40:59 +09:00
b47248b2be docs: plan hotfix-006 dashboard copy and live fidelity 2026-04-06 20:37:04 +09:00
768f9fdc20 merge: sprint-015 dashboard v3 redesign 2026-04-06 20:25:39 +09:00
a8ff05c96a fix: stabilize backend prisma and lint 2026-04-06 20:21:40 +09:00
90ab555915 fix: source dashboard ops from real logs 2026-04-06 20:04:20 +09:00
5b7e4ec50d feat: redesign dashboard v3 layout 2026-04-06 19:52:29 +09:00
1b3edd45f6 docs: plan sprint-015 dashboard v3 redesign 2026-04-06 19:44:31 +09:00
2aa8dc14b9 Merge remote-tracking branch 'origin/feature/structure-renewal-sync' 2026-04-06 12:33:04 +09:00
4b8ee187f6 qa: add sprint 014 review 3 (PASSED) 2026-04-06 12:32:47 +09:00